Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package collectd for openSUSE:Factory 
checked in at 2026-03-27 16:51:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/collectd (Old)
 and      /work/SRC/openSUSE:Factory/.collectd.new.8177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "collectd"

Fri Mar 27 16:51:11 2026 rev:50 rq:1343138 version:5.12.0.382.g2cd055fe

Changes:
--------
--- /work/SRC/openSUSE:Factory/collectd/collectd.changes        2025-10-17 
17:26:18.939339983 +0200
+++ /work/SRC/openSUSE:Factory/.collectd.new.8177/collectd.changes      
2026-03-27 16:53:56.238574603 +0100
@@ -1,0 +2,26 @@
+Thu Mar 26 15:51:10 UTC 2026 - Thomas Renninger <[email protected]>
+
+- Fix compile error in intel_rdt.c
+A Fix-new-qpos-library-call-missing-an-arguement.patch
+
+-------------------------------------------------------------------
+Thu Mar 26 15:50:33 UTC 2026 - Thomas Renninger <[email protected]>
+
+- Update to version 5.12.0.382.g2cd055fe:
+  * mqtt plugin: review fixes
+  * mqtt plugin: add NotificationPrefix config, default to "collectd/event"
+  * mqtt plugin: add JSON format to mqtt_write
+  * mqtt plugin: format PLAIN notifications similar to notify_email
+  * mqtt plugin: add Format config, default to PLAIN
+  * mqtt plugin: add SendNotifications config, default false
+  * mqtt plugin: publish notifications as JSON to event subtopic
+  * snmp plugin: remove the deprecated DES debug info
+  * configure.ac: fix grpc build
+  * virt: Drop ATTRIBUTE_UNUSED for virt_eventloop_timeout_cb
+  * dpdk: check rte_eth_link_get_nowait return value
+  * Fix lcc_receive
+  * Run contrib/format.sh on src/libcollectdclient/client.c
+- Patch mainline:
+D collectd-fix_attr_unused.patch
+
+-------------------------------------------------------------------
@@ -247,0 +274 @@
+- Use manual instead of local services in _service

Old:
----
  collectd-5.12.0.366.gc254dc2c.obscpio
  collectd-fix_attr_unused.patch

New:
----
  Fix-new-qpos-library-call-missing-an-arguement.patch
  collectd-5.12.0.382.g2cd055fe.obscpio

----------(Old B)----------
  Old:- Patch mainline:
D collectd-fix_attr_unused.patch
----------(Old E)----------

----------(New B)----------
  New:- Fix compile error in intel_rdt.c
A Fix-new-qpos-library-call-missing-an-arguement.patch
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ collectd.spec ++++++
--- /var/tmp/diff_new_pack.Bv0iDI/_old  2026-03-27 16:53:57.194614624 +0100
+++ /var/tmp/diff_new_pack.Bv0iDI/_new  2026-03-27 16:53:57.198614792 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package collectd
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 # Copyright (c) 2005-2013 Pascal Bleser <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -60,7 +60,7 @@
 %endif
 %bcond_with epics
 Name:           collectd
-Version:        5.12.0.366.gc254dc2c
+Version:        5.12.0.382.g2cd055fe
 Release:        0
 Summary:        Statistics Collection Daemon for filling RRD Files
 License:        GPL-2.0-only AND MIT
@@ -84,7 +84,8 @@
 # PATCH-FIX-OPENSUSE avoid-pg-config.patch avoid pg_config if possible
 Patch11:        avoid-pg-config.patch
 Patch12:        harden_collectd.service.patch
-Patch13:        collectd-fix_attr_unused.patch
+# PATCH-FIX-UPSTREAM -- based on PR 4401
+Patch13:        Fix-new-qpos-library-call-missing-an-arguement.patch
 # for /etc/apache2/... ownership (rpmlint):
 BuildRequires:  apache2
 BuildRequires:  autoconf

++++++ Fix-new-qpos-library-call-missing-an-arguement.patch ++++++
From: Thomas Renninger <[email protected]>
Subject: Fix new qpos library call missing an arguement
References: 
Patch-Mainline: 9a714f6b
Git-commit: 9a714f6be7da85d1141ce94adb48abd607dece5c


Fixes compile error:
src/intel_rdt.c: In function ‘rdt_init_cores_monitoring’:
src/intel_rdt.c:1406:48: error: passing argument 5 of \
‘pqos_mon_start_cores’ from incompatible pointer type \
[-Wincompatible-pointer-types]

Cmp with latest /usr/include/pqos.h lines 1044-1105.
The new pqos_mon_start_cores has a new arguement at position 5
and now takes 6 arguements:
https://github.com/intel/intel-cmt-cat/commit/6496fa8c2bd935745dfceb3cc6d17688b309a38e

int pqos_mon_start_cores(const unsigned num_cores,
                         const unsigned *cores,
                         const enum pqos_mon_event event,
                         void *context,
----->
                         struct pqos_mon_mem_region *mem_region,
----->
                         struct pqos_mon_data **group);


Signed-off-by: Thomas Renninger <[email protected]>
diff --git a/src/intel_rdt.c b/src/intel_rdt.c
index c386d930..d791ed03 100644
--- a/src/intel_rdt.c
+++ b/src/intel_rdt.c
@@ -1400,7 +1400,11 @@ static void rdt_init_cores_monitoring() {
   for (size_t i = 0; i < g_rdt->cores.num_cgroups; i++) {
     core_group_t *cg = g_rdt->cores.cgroups + i;
 
-#if PQOS_VERSION >= 40600
+#if PQOS_VERSION >= 60001
+    int mon_start_result =
+       pqos_mon_start_cores(cg->num_cores, cg->cores, g_rdt->events[i],
+                            (void *)cg->desc, NULL, &g_rdt->pcgroups[i]);
+#elif PQOS_VERSION >= 40600
     int mon_start_result =
         pqos_mon_start_cores(cg->num_cores, cg->cores, g_rdt->events[i],
                              (void *)cg->desc, &g_rdt->pcgroups[i]);

++++++ _service ++++++
--- /var/tmp/diff_new_pack.Bv0iDI/_old  2026-03-27 16:53:57.266617638 +0100
+++ /var/tmp/diff_new_pack.Bv0iDI/_new  2026-03-27 16:53:57.270617806 +0100
@@ -1,5 +1,5 @@
 <services>
-  <service name="obs_scm" mode="localonly">
+  <service name="obs_scm" mode="manual">
     <param name="scm">git</param>
     <param name="url">https://github.com/collectd/collectd.git</param>
     <param name="revision">HEAD</param>
@@ -8,7 +8,7 @@
     <param name="changesgenerate">enable</param>
     <param name="submodules">disable</param>
   </service>
-  <service name="set_version" mode="localonly"/>
+  <service name="set_version" mode="manual"/>
   <service name="tar" mode="buildtime"/>
   <service name="recompress" mode="buildtime">
     <param name="file">*.tar</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.Bv0iDI/_old  2026-03-27 16:53:57.326620150 +0100
+++ /var/tmp/diff_new_pack.Bv0iDI/_new  2026-03-27 16:53:57.338620652 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/collectd/collectd.git</param>
-              <param 
name="changesrevision">c254dc2c1eb10b43d32ed6a3202b770f73f6ef25</param></service></servicedata>
+              <param 
name="changesrevision">2cd055fe855a3168bbe38e7ca83bd805fb9acb3e</param></service></servicedata>
 (No newline at EOF)
 

++++++ collectd-5.12.0.366.gc254dc2c.obscpio -> 
collectd-5.12.0.382.g2cd055fe.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/collectd-5.12.0.366.gc254dc2c/Makefile.am 
new/collectd-5.12.0.382.g2cd055fe/Makefile.am
--- old/collectd-5.12.0.366.gc254dc2c/Makefile.am       2025-08-29 
16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/Makefile.am       2025-12-08 
17:00:50.000000000 +0100
@@ -1511,7 +1511,9 @@
 mqtt_la_SOURCES = src/mqtt.c
 mqtt_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMOSQUITTO_CPPFLAGS)
 mqtt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMOSQUITTO_LDFLAGS)
-mqtt_la_LIBADD = $(BUILD_WITH_LIBMOSQUITTO_LIBS)
+mqtt_la_LIBADD = \
+       libformat_json.la \
+       $(BUILD_WITH_LIBMOSQUITTO_LIBS)
 endif
 
 if BUILD_PLUGIN_MMC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/collectd-5.12.0.366.gc254dc2c/configure.ac 
new/collectd-5.12.0.382.g2cd055fe/configure.ac
--- old/collectd-5.12.0.366.gc254dc2c/configure.ac      2025-08-29 
16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/configure.ac      2025-12-08 
17:00:50.000000000 +0100
@@ -2844,20 +2844,20 @@
 fi
 
 if test "x$withval" != "xno"; then
-  AC_MSG_CHECKING([whether $CXX accepts -std=c++14])
-  if test_cxx_flags -std=c++14; then
+  AC_MSG_CHECKING([whether $CXX accepts -std=c++17])
+  if test_cxx_flags -std=c++17; then
     AC_MSG_RESULT([yes])
   else
     AC_MSG_RESULT([no])
-    with_libgrpcpp="no (requires C++14 support)"
-    with_libprotobuf="no (<absl/base/policy_checks.h> requires C++14 support)"
+    with_libgrpcpp="no (requires C++17 support)"
+    with_libprotobuf="no (<absl/base/policy_checks.h> requires C++17 support)"
   fi
 fi
 
 if test "x$with_libgrpcpp" = "xyes"; then
   AC_LANG_PUSH(C++)
   SAVE_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
+  CPPFLAGS="-std=c++17 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
   AC_CHECK_HEADERS([grpc++/grpc++.h],
     [with_libgrpcpp="yes"],
     [with_libgrpcpp="no (<grpc++/grpc++.h> not found)"]
@@ -2871,7 +2871,7 @@
   SAVE_CPPFLAGS="$CPPFLAGS"
   SAVE_LDFLAGS="$LDFLAGS"
   SAVE_LIBS="$LIBS"
-  CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
+  CPPFLAGS="-std=c++17 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
   LDFLAGS="$with_libgrpcpp_ldflags"
   if test "x$GRPCPP_LIBS" = "x"; then
     LIBS="-lgrpc++"
@@ -2899,7 +2899,7 @@
   AC_LANG_POP(C++)
 fi
 
-BUILD_WITH_LIBGRPCPP_CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags 
$GRPCPP_CFLAGS"
+BUILD_WITH_LIBGRPCPP_CPPFLAGS="-std=c++17 $with_libgrpcpp_cppflags 
$GRPCPP_CFLAGS"
 BUILD_WITH_LIBGRPCPP_LDFLAGS="$with_libgrpcpp_ldflags"
 BUILD_WITH_LIBGRPCPP_LIBS="$GRPCPP_LIBS"
 AC_SUBST([BUILD_WITH_LIBGRPCPP_CPPFLAGS])
@@ -4843,7 +4843,7 @@
   AC_CHECK_LIB([protobuf], [main],
     [
       SAVE_CPPFLAGS="$CPPFLAGS"
-      CPPFLAGS="-std=c++14 $with_libprotobuf_cppflags $PROTOBUF_CFLAGS"
+      CPPFLAGS="-std=c++17 $with_libprotobuf_cppflags $PROTOBUF_CFLAGS"
       if test "x$PROTOBUF_LIBS" = "x"
       then
         PROTOBUF_LIBS="-lprotobuf"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/collectd-5.12.0.366.gc254dc2c/src/collectd.conf.in 
new/collectd-5.12.0.382.g2cd055fe/src/collectd.conf.in
--- old/collectd-5.12.0.366.gc254dc2c/src/collectd.conf.in      2025-08-29 
16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/src/collectd.conf.in      2025-12-08 
17:00:50.000000000 +0100
@@ -1092,9 +1092,12 @@
 #              User "user"
 #              Password "secret"
 #              QoS 0
+#              Format PLAIN
 #              Prefix "collectd"
 #              StoreRates true
 #              Retain false
+#              SendNotifications false
+#              NotificationPrefix "collectd/event"
 #              CACert "/etc/ssl/ca.crt"
 #              CertificateFile "/etc/ssl/client.crt"
 #              CertificateKeyFile "/etc/ssl/client.pem"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/collectd-5.12.0.366.gc254dc2c/src/collectd.conf.pod 
new/collectd-5.12.0.382.g2cd055fe/src/collectd.conf.pod
--- old/collectd-5.12.0.366.gc254dc2c/src/collectd.conf.pod     2025-08-29 
16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/src/collectd.conf.pod     2025-12-08 
17:00:50.000000000 +0100
@@ -5445,6 +5445,10 @@
 on a message is larger than the maximum accepted QoS of a subscriber, the
 message's QoS will be downgraded.
 
+=item B<Format> I<Format> (Publish only)
+
+The output format to use. Can be one of C<PLAIN> or C<JSON>. Defaults to 
C<PLAIN>.
+
 =item B<Prefix> I<Prefix> (Publish only)
 
 This plugin will use one topic per I<value list> which will looks like a path.
@@ -5454,6 +5458,15 @@
 
  collectd/cpu-0/cpu-user
 
+=item B<NotificationPrefix> I<Prefix> (Publish only)
+
+Like B<Prefix>, this plugin will use one topic per I<notification> instance.
+I<Prefix> is used as the first path element and defaults to B<collectd/event>.
+
+An example topic name would be:
+
+ collectd/event/host/interface-eth0/if_octets
+
 =item B<Retain> B<false>|B<true> (Publish only)
 
 Controls whether the MQTT broker will retain (keep a copy of) the last message
@@ -5464,6 +5477,12 @@
 Controls whether C<DERIVE> and C<COUNTER> metrics are converted to a I<rate>
 before sending. Defaults to B<true>.
 
+=item B<SendNotifications> B<true>|B<false> (Publish only)
+
+Controls whether notifications are sent. Defaults to B<false>.
+
+Notifications are published with a B<NotificationPrefix> for each type 
instance.
+
 =item B<CleanSession> B<true>|B<false> (Subscribe only)
 
 Controls whether the MQTT "cleans" the session up after the subscriber
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/collectd-5.12.0.366.gc254dc2c/src/dpdkevents.c 
new/collectd-5.12.0.382.g2cd055fe/src/dpdkevents.c
--- old/collectd-5.12.0.366.gc254dc2c/src/dpdkevents.c  2025-08-29 
16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/src/dpdkevents.c  2025-12-08 
17:00:50.000000000 +0100
@@ -418,6 +418,7 @@
 
 static int dpdk_helper_link_status_get(dpdk_helper_ctx_t *phc) {
   dpdk_events_ctx_t *ec = DPDK_EVENTS_CTX_GET(phc);
+  int ret = 0;
 
 /* get Link Status values from DPDK */
 #if RTE_VERSION < RTE_VERSION_NUM(18, 05, 0, 0)
@@ -436,9 +437,13 @@
     if (ec->config.link_status.enabled_port_mask & (1 << i)) {
       struct rte_eth_link link;
       ec->link_info[i].read_time = cdtime();
+#if RTE_VERSION >= RTE_VERSION_NUM(19, 11, 0, 0)
+      ret = rte_eth_link_get_nowait(i, &link);
+#else
       rte_eth_link_get_nowait(i, &link);
-      if ((link.link_status == ETH_LINK_NA) ||
-          (link.link_status != ec->link_info[i].link_status)) {
+#endif
+      if (ret == 0 && ((link.link_status == ETH_LINK_NA) ||
+                       (link.link_status != ec->link_info[i].link_status))) {
         ec->link_info[i].link_status = link.link_status;
         ec->link_info[i].status_updated = 1;
         DPDK_CHILD_LOG(" === PORT %d Link Status: %s\n", i,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/collectd-5.12.0.366.gc254dc2c/src/libcollectdclient/client.c 
new/collectd-5.12.0.382.g2cd055fe/src/libcollectdclient/client.c
--- old/collectd-5.12.0.366.gc254dc2c/src/libcollectdclient/client.c    
2025-08-29 16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/src/libcollectdclient/client.c    
2025-12-08 17:00:50.000000000 +0100
@@ -163,7 +163,7 @@
                 buflen);
     }
   }
-    /* #endif STRERROR_R_CHAR_P */
+  /* #endif STRERROR_R_CHAR_P */
 
 #else
   if (strerror_r(errnum, buf, buflen) != 0) {
@@ -309,7 +309,7 @@
     ptr++;
 
   /* Now copy the message. */
-  strncpy(res.message, ptr, sizeof(res.message));
+  strncpy(res.message, ptr, sizeof(res.message) - 1);
   res.message[sizeof(res.message) - 1] = '\0';
 
   /* Error or no lines follow: We're done. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/collectd-5.12.0.366.gc254dc2c/src/mqtt.c 
new/collectd-5.12.0.382.g2cd055fe/src/mqtt.c
--- old/collectd-5.12.0.366.gc254dc2c/src/mqtt.c        2025-08-29 
16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/src/mqtt.c        2025-12-08 
17:00:50.000000000 +0100
@@ -33,6 +33,8 @@
 
 #include "plugin.h"
 #include "utils/common/common.h"
+
+#include "utils/format_json/format_json.h"
 #include "utils_complain.h"
 
 #include <mosquitto.h>
@@ -42,6 +44,7 @@
 #define MQTT_DEFAULT_HOST "localhost"
 #define MQTT_DEFAULT_PORT 1883
 #define MQTT_DEFAULT_TOPIC_PREFIX "collectd"
+#define MQTT_DEFAULT_NOTIFICATION_PREFIX "collectd/event"
 #define MQTT_DEFAULT_TOPIC "collectd/#"
 #ifndef MQTT_KEEPALIVE
 #define MQTT_KEEPALIVE 60
@@ -66,6 +69,9 @@
   char *username;
   char *password;
   int qos;
+#define MQTT_FORMAT_PLAIN 0
+#define MQTT_FORMAT_JSON 1
+  uint8_t format;
   char *cacertificatefile;
   char *certificatefile;
   char *certificatekeyfile;
@@ -74,8 +80,10 @@
 
   /* For publishing */
   char *topic_prefix;
+  char *notification_prefix;
   bool store_rates;
   bool retain;
+  bool send_notifications;
 
   /* For subscribing */
   pthread_t thread;
@@ -149,6 +157,7 @@
   sfree(conf->password);
   sfree(conf->client_id);
   sfree(conf->topic_prefix);
+  sfree(conf->notification_prefix);
   sfree(conf);
 }
 
@@ -526,12 +535,160 @@
     return status;
   }
 
-  status = format_values(payload, sizeof(payload), ds, vl, conf->store_rates);
+  if (conf->format == MQTT_FORMAT_JSON) {
+    size_t offset = 0;
+    size_t bfree = sizeof(payload);
+
+    format_json_initialize(payload, &offset, &bfree);
+    format_json_value_list(payload, &offset, &bfree, ds, vl, 
conf->store_rates);
+    status = format_json_finalize(payload, &offset, &bfree);
+
+    if (status != 0) {
+      ERROR("mqtt plugin: format_json_finalize failed with status %d.", 
status);
+      return status;
+    }
+  } else { /* MQTT_FORMAT_PLAIN */
+    status = format_values(payload, sizeof(payload), ds, vl, 
conf->store_rates);
+    if (status != 0) {
+      ERROR("mqtt plugin: format_values failed with status %d.", status);
+      return status;
+    }
+  }
+
+  status = publish(conf, topic, payload, strlen(payload));
+  if (status != 0) {
+    ERROR("mqtt plugin: publish failed: %s", mosquitto_strerror(status));
+    return status;
+  }
+
+  return status;
+} /* mqtt_write */
+
+static int format_notification_topic(char *buf, size_t buf_len,
+                                     notification_t const *n,
+                                     mqtt_client_conf_t *conf) {
+  char name[MQTT_MAX_TOPIC_SIZE];
+  int status;
+  char *c;
+
+  if ((conf->notification_prefix == NULL) ||
+      (conf->notification_prefix[0] == 0)) {
+    // tempting but unsafe to use FORMAT_VL here
+    return format_name(buf, buf_len, n->host, n->plugin, n->plugin_instance,
+                       n->type, n->type_instance);
+  }
+
+  status = format_name(name, sizeof(name), n->host, n->plugin,
+                       n->plugin_instance, n->type, n->type_instance);
+  if (status != 0)
+    return status;
+
+  status = ssnprintf(buf, buf_len, "%s/%s", conf->notification_prefix, name);
+  if ((status < 0) || (((size_t)status) >= buf_len))
+    return ENOMEM;
+
+  while ((c = strchr(buf, '#')) || (c = strchr(buf, '+'))) {
+    *c = '_';
+  }
+
+  return 0;
+} /* format_notification_topic */
+
+static int format_plain_notification(char *buf, size_t buf_len,
+                                     notification_t const *n) {
+  int status = 0;
+
+#define APPEND_VA(format, ...)                                                 
\
+  if (buf_len > 0) {                                                           
\
+    status = ssnprintf(buf, buf_len, format "\r\n", __VA_ARGS__);              
\
+    if (status >= 0) {                                                         
\
+      buf += status;                                                           
\
+      buf_len -= status;                                                       
\
+    } else {                                                                   
\
+      ERROR("mqtt plugin: notification buf too small.");                       
\
+      return ENOMEM;                                                           
\
+    }                                                                          
\
+  }
+
+  APPEND_VA("Time: %.3f", CDTIME_T_TO_DOUBLE(n->time));
+  switch (n->severity) {
+  case NOTIF_FAILURE:
+    APPEND_VA("Severity: %s", "FAILURE");
+    break;
+  case NOTIF_WARNING:
+    APPEND_VA("Severity: %s", "WARNING");
+    break;
+  case NOTIF_OKAY:
+    APPEND_VA("Severity: %s", "OKAY");
+    break;
+  default:
+    APPEND_VA("Severity: %s", "UNKNOWN");
+  }
+
+  for (notification_meta_t const *meta = n->meta; meta != NULL;
+       meta = meta->next) {
+    switch (meta->type) {
+    case NM_TYPE_STRING:
+      APPEND_VA("%s: %s", meta->name, meta->nm_value.nm_string);
+      break;
+    case NM_TYPE_SIGNED_INT:
+      APPEND_VA("%s: %" PRIi64, meta->name, meta->nm_value.nm_signed_int);
+      break;
+    case NM_TYPE_UNSIGNED_INT:
+      APPEND_VA("%s: %" PRIu64, meta->name, meta->nm_value.nm_unsigned_int);
+      break;
+    case NM_TYPE_DOUBLE:
+      APPEND_VA("%s: " GAUGE_FORMAT, meta->name, meta->nm_value.nm_double);
+      break;
+    case NM_TYPE_BOOLEAN:
+      APPEND_VA("%s: %s", meta->name,
+                meta->nm_value.nm_boolean ? "true" : "false");
+      break;
+    default:
+      WARNING("mqtt plugin: notification metadata type (%i) not supported.",
+              meta->type);
+      continue;
+    }
+  }
+
+  APPEND_VA("\r\nMessage: %s", n->message);
+
+  return 0;
+} /* format_plain_notification */
+
+static int mqtt_notification(const notification_t *n,
+                             user_data_t __attribute__((unused)) * user_data) {
+  DEBUG("mqtt plugin: notification");
+  mqtt_client_conf_t *conf;
+  char topic[MQTT_MAX_TOPIC_SIZE];
+  char payload[MQTT_MAX_MESSAGE_SIZE];
+  int status = 0;
+
+  if ((user_data == NULL) || (user_data->data == NULL))
+    return EINVAL;
+  conf = user_data->data;
+
+  status = format_notification_topic(topic, sizeof(topic), n, conf);
   if (status != 0) {
-    ERROR("mqtt plugin: format_values failed with status %d.", status);
+    ERROR("mqtt plugin: format_notification_topic failed with status %d.",
+          status);
     return status;
   }
 
+  if (conf->format == MQTT_FORMAT_JSON) {
+    status = format_json_notification(payload, sizeof(payload), n);
+    if (status != 0) {
+      ERROR("mqtt plugin: format_json_notification failed: %d", status);
+      return status;
+    }
+  } else { /* MQTT_FORMAT_PLAIN */
+    status = format_plain_notification(payload, sizeof(payload), n);
+    if (status != 0) {
+      ERROR("mqtt plugin: format_plain_notification failed: %d", status);
+      return status;
+    }
+  }
+
   status = publish(conf, topic, payload, strlen(payload));
   if (status != 0) {
     ERROR("mqtt plugin: publish failed: %s", mosquitto_strerror(status));
@@ -539,7 +696,30 @@
   }
 
   return status;
-} /* mqtt_write */
+} /* int mqtt_notification */
+
+static int config_set_format(mqtt_client_conf_t *conf, oconfig_item_t *ci) {
+  char *string;
+
+  if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING)) {
+    WARNING("mqtt plugin: The `%s' config option "
+            "needs exactly one string argument.",
+            ci->key);
+    return -1;
+  }
+
+  string = ci->values[0].value.string;
+  if (strcasecmp("Plain", string) == 0)
+    conf->format = MQTT_FORMAT_PLAIN;
+  else if (strcasecmp("JSON", string) == 0)
+    conf->format = MQTT_FORMAT_JSON;
+  else {
+    ERROR("mqtt plugin: Invalid format string: %s", string);
+    return -1;
+  }
+
+  return 0;
+} /* int config_set_format */
 
 /*
  * <Publish "name">
@@ -551,7 +731,10 @@
  *   Prefix "collectd"
  *   StoreRates true
  *   Retain false
+ *   SendNotifications false
+ *   NotificationPrefix "collectd/event"
  *   QoS 0
+ *   Format PLAIN
  *   CACert "ca.pem"                      Enables TLS if set
  *   CertificateFile "client-cert.pem"   optional
  *   CertificateKeyFile "client-key.pem"  optional
@@ -581,7 +764,9 @@
   conf->port = MQTT_DEFAULT_PORT;
   conf->client_id = NULL;
   conf->qos = 0;
+  conf->format = MQTT_FORMAT_PLAIN;
   conf->topic_prefix = strdup(MQTT_DEFAULT_TOPIC_PREFIX);
+  conf->notification_prefix = strdup(MQTT_DEFAULT_NOTIFICATION_PREFIX);
   conf->store_rates = true;
 
   status = pthread_mutex_init(&conf->lock, NULL);
@@ -617,10 +802,16 @@
         conf->qos = tmp;
     } else if (strcasecmp("Prefix", child->key) == 0)
       cf_util_get_string(child, &conf->topic_prefix);
+    else if (strcasecmp("Format", child->key) == 0)
+      config_set_format(conf, child);
     else if (strcasecmp("StoreRates", child->key) == 0)
       cf_util_get_boolean(child, &conf->store_rates);
     else if (strcasecmp("Retain", child->key) == 0)
       cf_util_get_boolean(child, &conf->retain);
+    else if (strcasecmp("SendNotifications", child->key) == 0)
+      cf_util_get_boolean(child, &conf->send_notifications);
+    else if (strcasecmp("NotificationPrefix", child->key) == 0)
+      cf_util_get_string(child, &conf->notification_prefix);
     else if (strcasecmp("CACert", child->key) == 0)
       cf_util_get_string(child, &conf->cacertificatefile);
     else if (strcasecmp("CertificateFile", child->key) == 0)
@@ -640,6 +831,14 @@
                         &(user_data_t){
                             .data = conf,
                         });
+
+  if (conf->send_notifications) {
+    plugin_register_notification(cb_name, mqtt_notification,
+                                 &(user_data_t){
+                                     .data = conf,
+                                 });
+  }
+
   return 0;
 } /* mqtt_config_publisher */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/collectd-5.12.0.366.gc254dc2c/src/snmp.c 
new/collectd-5.12.0.382.g2cd055fe/src/snmp.c
--- old/collectd-5.12.0.366.gc254dc2c/src/snmp.c        2025-08-29 
16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/src/snmp.c        2025-12-08 
17:00:50.000000000 +0100
@@ -787,8 +787,7 @@
     return -1;
   }
 
-  DEBUG("snmp plugin: host = %s; host->priv_protocol = %s;", hd->name,
-        hd->priv_protocol == usmAESPrivProtocol ? "AES" : "DES");
+  DEBUG("snmp plugin: host = %s; host->priv_protocol = AES;", hd->name);
 
   return 0;
 } /* int csnmp_config_add_host_priv_protocol */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/collectd-5.12.0.366.gc254dc2c/src/virt.c 
new/collectd-5.12.0.382.g2cd055fe/src/virt.c
--- old/collectd-5.12.0.366.gc254dc2c/src/virt.c        2025-08-29 
16:22:03.000000000 +0200
+++ new/collectd-5.12.0.382.g2cd055fe/src/virt.c        2025-12-08 
17:00:50.000000000 +0100
@@ -2206,8 +2206,9 @@
   return 0;
 }
 
-static void virt_eventloop_timeout_cb(int timer ATTRIBUTE_UNUSED,
-                                      void *timer_info) {}
+static void
+virt_eventloop_timeout_cb(__attribute__((unused)) int timer,
+                          __attribute__((unused)) void *timer_info) {}
 
 static int register_event_impl(void) {
   if (virEventRegisterDefaultImpl() < 0) {

++++++ collectd.obsinfo ++++++
--- /var/tmp/diff_new_pack.Bv0iDI/_old  2026-03-27 16:53:58.178655817 +0100
+++ /var/tmp/diff_new_pack.Bv0iDI/_new  2026-03-27 16:53:58.186656153 +0100
@@ -1,5 +1,5 @@
 name: collectd
-version: 5.12.0.366.gc254dc2c
-mtime: 1756477323
-commit: c254dc2c1eb10b43d32ed6a3202b770f73f6ef25
+version: 5.12.0.382.g2cd055fe
+mtime: 1765209650
+commit: 2cd055fe855a3168bbe38e7ca83bd805fb9acb3e
 

Reply via email to