]> git.ipfire.org Git - thirdparty/collectd.git/log
thirdparty/collectd.git
3 months agoconfigure.ac: fix grpc build 4249/head
Fabrice Fontaine [Mon, 22 Jan 2024 21:15:21 +0000 (22:15 +0100)] 
configure.ac: fix grpc build

abseil and other google tools are now subject to
"Google's Foundational C++ Support Policy" [0][1]. This currently
mandates gcc 7.3.1 and C++14 as minimum versions. So replace -std=c++11
by -std=c++14 to fix following build failure:

checking whether /home/buildroot/autobuild/instance-0/output-1/host/bin/sparc64-linux-g++ accepts -std=c++11
configure:25105: result: yes
configure:25127: checking grpc++/grpc++.h usability
configure:25127: /home/buildroot/autobuild/instance-0/output-1/host/bin/sparc64-linux-g++ -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O1 -g0 -D_FORTIFY_SOURCE=2 -std=c++11  -DNOMINMAX  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.cpp >&5
In file included from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/absl/base/config.h:86,
                 from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/absl/base/const_init.h:25,
                 from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/absl/synchronization/mutex.h:67,
                 from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpcpp/impl/codegen/sync.h:32,
                 from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpcpp/completion_queue.h:41,
                 from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpcpp/channel.h:25,
                 from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpcpp/grpcpp.h:52,
                 from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpc++/grpc++.h:26,
                 from conftest.cpp:167:
/home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported."
   79 | #error "C++ versions less than C++14 are not supported."
      |  ^~~~~

[0] https://github.com/abseil/abseil-cpp/releases/tag/20230125.0
[1] https://github.com/google/oss-policies-info/blob/b842c39db88e6569dfe2cf98be434b03507cb503/foundational-cxx-support-matrix.md

Fixes:
 - http://autobuild.buildroot.org/results/e2cf909ab3c356f1881fd18cfa039e87faa10d7d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3 months agoMerge pull request #3917 from eero-t/gcc-warnings
Florian Forster [Fri, 19 Jan 2024 19:39:20 +0000 (20:39 +0100)] 
Merge pull request #3917 from eero-t/gcc-warnings

Fix some gcc warnings with more strict checks

3 months agowrite_riemann_threshold.c: fix switch-case fall through warning 3917/head
Eero Tamminen [Wed, 17 Jan 2024 15:28:07 +0000 (17:28 +0200)] 
write_riemann_threshold.c: fix switch-case fall through warning

Checking also warning limits was just executing redundant code, but
otherwise harmless as later code checks failure count first.

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
3 months agoPass strcmp() to c_avl_create() as function pointer, not data one
Eero Tamminen [Wed, 17 Jan 2024 15:19:16 +0000 (17:19 +0200)] 
Pass strcmp() to c_avl_create() as function pointer, not data one

Matches how strcmp() is passed to c_avl_create() elsewhere.

Reported by -Wpendantic:
------------------------------------
write_prometheus.c: In function ‘prom_init’:
write_prometheus.c:900:28: error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic]
  900 |     metrics = c_avl_create((void *)strcmp);
      |                            ^
write_prometheus.c:900:28: error: ISO C forbids passing argument 1 of ‘c_avl_create’ between function pointer and ‘void *’ [-Werror=pedantic]
  900 |     metrics = c_avl_create((void *)strcmp);
      |                            ^~~~~~~~~~~~~~
In file included from write_prometheus.c:30:
utils/avltree/avltree.h:54:34: note: expected ‘int (*)(const void *, const void *)’ but argument is of type ‘void *’
   54 | c_avl_tree_t *c_avl_create(int (*compare)(const void *, const void *));
      |
                                   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
3 months agoturbostat, format_json: Satisfy clang-format CI check
Eero Tamminen [Fri, 4 Feb 2022 10:24:40 +0000 (12:24 +0200)] 
turbostat, format_json: Satisfy clang-format CI check

CI has changed since this code was added to collectd.

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
3 months agoFix signedness mismatch GCC warnings in few of the plugins
Eero Tamminen [Fri, 4 Feb 2022 10:21:51 +0000 (12:21 +0200)] 
Fix signedness mismatch GCC warnings in few of the plugins

Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output.

3 months agodaemon/utils_cache: remove unused functions and function args
Eero Tamminen [Tue, 16 Jan 2024 12:57:05 +0000 (14:57 +0200)] 
daemon/utils_cache: remove unused functions and function args

Arg update required touching also threshold.c & write_riemann plugin.

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
3 months agoRemove unused function arguments from few of the plugins
Eero Tamminen [Fri, 4 Feb 2022 10:19:06 +0000 (12:19 +0200)] 
Remove unused function arguments from few of the plugins

Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output.

3 months agoAttribute unused function args as such in few of the plugins
Eero Tamminen [Fri, 4 Feb 2022 10:20:27 +0000 (12:20 +0200)] 
Attribute unused function args as such in few of the plugins

Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output.

3 months agowrite_prometheus: annotate unused args and fix comments
Eero Tamminen [Fri, 9 Jul 2021 15:43:38 +0000 (18:43 +0300)] 
write_prometheus: annotate unused args and fix comments

Fix obsolete comment to match MHD docs:
  https://www.gnu.org/software/libmicrohttpd/  ("Queueing responses" section)
  https://git.gnunet.org/libmicrohttpd.git/tree/src/include/microhttpd.h#n2398

3 months agoformat_json, network_parse: annotate unused args as unused
Eero Tamminen [Fri, 9 Jul 2021 15:44:28 +0000 (18:44 +0300)] 
format_json, network_parse: annotate unused args as unused

Based on output of:
 gcc -O3 -Werror -Wall -Wextra -Wno-missing-field-initializers -Wformat-security

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
3 months agoMerge pull request #4230 from octo/workflows
Florian Forster [Mon, 15 Jan 2024 10:38:50 +0000 (11:38 +0100)] 
Merge pull request #4230 from octo/workflows

Import changes to `.github/workflows/` from the `collectd-6.0` branch.

3 months agoMerge pull request #4235 from clear-code/lua-notification
Florian Forster [Sat, 13 Jan 2024 20:31:01 +0000 (21:31 +0100)] 
Merge pull request #4235 from clear-code/lua-notification

 lua: add missing notification callback

3 months agolua: update explanation about register_notification callback 4235/head
Kentaro Hayashi [Sat, 13 Jan 2024 11:37:43 +0000 (20:37 +0900)] 
lua: update explanation about register_notification callback

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
3 months agolua: add missing notification callback
Kentaro Hayashi [Sat, 13 Jan 2024 08:27:32 +0000 (17:27 +0900)] 
lua: add missing notification callback

* register_notification

In this version, it support callback function something like:

  function notification(notif)
     print(inspect(notif))
     return 0
  end

  collectd.register_notification(notification)

It accepts PUTNOTIF event via plugin_dispatch_notification then you can
handle it.

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
3 months ago.github/workflows/distcheck.yml: Run on Debian12 (current stable). 4230/head
Florian Forster [Thu, 21 Dec 2023 13:06:02 +0000 (14:06 +0100)] 
.github/workflows/distcheck.yml: Run on Debian12 (current stable).

3 months agoMerge pull request #4232 from octo/write_riemann
Florian Forster [Fri, 12 Jan 2024 09:40:15 +0000 (10:40 +0100)] 
Merge pull request #4232 from octo/write_riemann

write_riemann plugin: Terminate `riemann_event_set` arguments with `RIEMANN_EVENT_FIELD_NONE`.

3 months agowrite_riemann plugin: Terminate `riemann_event_set` arguments with `RIEMANN_EVENT_FIE... 4232/head
Florian Forster [Thu, 11 Jan 2024 19:35:30 +0000 (20:35 +0100)] 
write_riemann plugin: Terminate `riemann_event_set` arguments with `RIEMANN_EVENT_FIELD_NONE`.

`riemann_event_set` is a variadic function, that means it accepts a variable
number of arguments. That means it needs some way to determine – at runtime
– how many arguments there are. It appears to be doing so by using
`RIEMANN_EVENT_FIELD_NONE` to indicate the last element in the argument
list. Unfortunately I was unable to find the library's documentation and
code and could not verify this.

That means that the argument list passed to `riemann_event_set` was not
always terminated, causing it to read past where it was supposed to and
adding random crap into the message it crafted.

Issue: #4050

3 months agoMerge pull request #3779 from clear-code/main-more-lua-callbacks
Florian Forster [Thu, 11 Jan 2024 18:15:09 +0000 (19:15 +0100)] 
Merge pull request #3779 from clear-code/main-more-lua-callbacks

lua: Add functions to register some missing callbacks

3 months ago.cirrus.yml: Provide expected plugin list to `check-built-plugins.sh` if present.
Florian Forster [Thu, 21 Dec 2023 12:34:41 +0000 (13:34 +0100)] 
.cirrus.yml: Provide expected plugin list to `check-built-plugins.sh` if present.

3 months ago.cirrus.yml: Rename container images.
Florian Forster [Thu, 21 Dec 2023 13:42:21 +0000 (14:42 +0100)] 
.cirrus.yml: Rename container images.

* bookworm_amd64 → debian12
* mantic_amd64 → ubuntu23.10
* el9_x86_64 → centos9
* fedora_rawhide_x86_64 → fedora_main

3 months ago.github/workflows/build.yml: Add "Check expected plugins" to "experimental".
Florian Forster [Thu, 21 Dec 2023 16:22:53 +0000 (17:22 +0100)] 
.github/workflows/build.yml: Add "Check expected plugins" to "experimental".

3 months ago.github/workflows/build.yml: Add a "Check expected plugins" step.
Florian Forster [Thu, 21 Dec 2023 15:54:19 +0000 (16:54 +0100)] 
.github/workflows/build.yml: Add a "Check expected plugins" step.

3 months ago.github/workflows/: Rename container images.
Florian Forster [Thu, 21 Dec 2023 13:05:32 +0000 (14:05 +0100)] 
.github/workflows/: Rename container images.

* bookworm_amd64 → debian12
* bullseye_amd64 → debian11
* buster_amd64 → debian10
* mantic_amd64 → ubuntu23.10
* jammy_amd64 → ubuntu22.04
* focal_amd64 → ubuntu20.04
* el9_x86_64 → centos9
* fedora38_x86_64 -> fedora38
* fedora_rawhide_x86_64 → fedora_main

3 months ago.github/workflows/build.yml: Remove Ubuntu Bionic.
Florian Forster [Thu, 14 Dec 2023 07:28:35 +0000 (08:28 +0100)] 
.github/workflows/build.yml: Remove Ubuntu Bionic.

It is too old to work with `actions/checkout@v4`.

3 months agolua: Add functions to register some missing callbacks 3779/head
Kentaro Hayashi [Tue, 10 Nov 2020 01:29:38 +0000 (10:29 +0900)] 
lua: Add functions to register some missing callbacks

* register_init
* register_shutdown
* register_config

In this version, the configuration for each Script is
supported.

  Script "foo.lua"
  Script "bar.lua"
  <Module "foo.lua">
    Key1 Value1
  </Module>
  <Module "bar.lua">
    Key2 Value2
  </Module>

The scope of accessible key-value pair is limited to under <Module>
This feature is similar to collectd-python.

  ref. https://www.collectd.org/documentation/manpages/collectd-python.html

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
4 months agoMerge pull request #3777 from clear-code/change-lock-scope
Florian Forster [Sat, 30 Dec 2023 20:20:13 +0000 (21:20 +0100)] 
Merge pull request #3777 from clear-code/change-lock-scope

lua: Use a global lock to call Lua's API

4 months agoMerge pull request #3778 from clear-code/detect-luajit
Florian Forster [Sat, 30 Dec 2023 20:18:19 +0000 (21:18 +0100)] 
Merge pull request #3778 from clear-code/detect-luajit

lua: support to detect LuaJIT automatically

4 months agolua: Use a global lock to call Lua's API 3777/head
Takuro Ashie [Mon, 26 Oct 2020 02:22:29 +0000 (11:22 +0900)] 
lua: Use a global lock to call Lua's API

Since vanilla Lua isn't multi-thread-safe, a global lock should be used
when calling their functions. The previous code causes unstable behavior
especially on loading Lua's C modules with both read & write threads.

e.g.)

  collectd.register_read(function()
    require('cqueues')
    return 0
  end)

  collectd.register_write(function()
    return 0
  end)

Note that you need to add the following config to your collectd.conf to
load C modules:

  <LoadPlugin lua>
    Globals true
  </LoadPlugin>

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
4 months agoMerge pull request #4022 from matwey/epics
Florian Forster [Fri, 29 Dec 2023 15:21:19 +0000 (16:21 +0100)] 
Merge pull request #4022 from matwey/epics

EPICS plugin

4 months agoInitial implementation for epics plugin 4022/head
Matwey V. Kornilov [Wed, 5 Jan 2022 14:20:06 +0000 (17:20 +0300)] 
Initial implementation for epics plugin

EPICS is Experimental Physics and Industrial Control System.

Reference: https://epics-controls.org/

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
4 months agolua: add fallback to detect LuaJIT 3778/head
Kentaro Hayashi [Mon, 5 Oct 2020 06:36:18 +0000 (15:36 +0900)] 
lua: add fallback to detect LuaJIT

Before:
  LIBLUA_PKG_CONFIG_NAME=luajit ./configure --enable-lua

After:
  ./configure --enable-lua

In the previous versions, for enabling LuaJIT,
it needs to specify LIBLUA_PKG_CONFIG_NAME=luajit explicitly.

In this commit, add fallback to detect LuaJIT without specifying
LIBLUA_PKG_CONFIG_NAME=luajit explicitly by default (just use
--enable-lua).

Note that if both of lua and luajit exists, then lua is used.

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
4 months agocollection3: Fix inappropriate usage of CGI:param
Kentaro Hayashi [Mon, 8 Feb 2021 12:26:16 +0000 (21:26 +0900)] 
collection3: Fix inappropriate usage of CGI:param

When using collection3 as a CGI, the following error is sent to logs
repeatedly.

  FastCGI sent in stderr: "CGI::param called in list context from
  /usr/share/doc/collectd-core/examples/collection3/lib/Collectd/Graph/Common.pm
  line 529, this can lead to vulnerabilities. See the warning in
  "Fetching the value or values of a single named parameter" at
  /usr/share/perl5/CGI.pm line 412"

This is caused inappropriate usage of param(), it should be handled as
a scalar or should be treated by multi_param() explicitly.

Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>
4 months agoMerge pull request #4205 from octo/putval
Florian Forster [Thu, 21 Dec 2023 12:37:41 +0000 (13:37 +0100)] 
Merge pull request #4205 from octo/putval

cmds: Add a unittest for `cmd_parse_putval`.

4 months agocommon: Use `sstrncpy` to get around misinformed compiler error. 4205/head
Florian Forster [Thu, 21 Dec 2023 11:15:52 +0000 (12:15 +0100)] 
common: Use `sstrncpy` to get around misinformed compiler error.

4 months agocommon: Fix compiler warning in unit test.
Florian Forster [Thu, 21 Dec 2023 11:05:45 +0000 (12:05 +0100)] 
common: Fix compiler warning in unit test.

Some compilers complained about using a value that depends on the input for the
size argument passed to `strncpy`. They missed that the size of `buf` also
depends on the source argument and therefore this use is fine.

```
  CC       src/utils/common/common_test.o
../../src/utils/common/common_test.c: In function 'test_parse_values':
../../src/utils/common/common_test.c:316:5: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
  316 |     strncpy(buf, cases[i].buffer, buf_sz);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/utils/common/common_test.c:314:21: note: length computed here
  314 |     size_t buf_sz = strlen(cases[i].buffer) + 1;
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
```

4 months agocontrib/format.sh src/utils/common/common_test.c
Florian Forster [Wed, 20 Dec 2023 20:08:49 +0000 (21:08 +0100)] 
contrib/format.sh src/utils/common/common_test.c

4 months agocmds: Add a test for `cmd_parse_putval`.
Florian Forster [Wed, 20 Dec 2023 19:59:52 +0000 (20:59 +0100)] 
cmds: Add a test for `cmd_parse_putval`.

4 months agocmds: Prevent `cmd_parse_putval` from modifying its `argv` argument.
Florian Forster [Wed, 20 Dec 2023 19:56:13 +0000 (20:56 +0100)] 
cmds: Prevent `cmd_parse_putval` from modifying its `argv` argument.

4 months agocommon: Change `parse_values` so it doesn't modify the parsed string.
Florian Forster [Wed, 20 Dec 2023 19:45:49 +0000 (20:45 +0100)] 
common: Change `parse_values` so it doesn't modify the parsed string.

4 months agoMerge pull request #4184 from octo/issue/4137
Florian Forster [Wed, 6 Dec 2023 09:11:06 +0000 (10:11 +0100)] 
Merge pull request #4184 from octo/issue/4137

MySQL plugin: Fix incorrect WSREP/Galera metric types.

4 months agoMySQL plugin: Fix incorrect WSREP/Galera metric types. 4184/head
Florian Forster [Wed, 6 Dec 2023 08:19:49 +0000 (09:19 +0100)] 
MySQL plugin: Fix incorrect WSREP/Galera metric types.

Fixes: #4137
4 months agoMerge pull request #4065 from carlospeon/flush-buffer
Florian Forster [Tue, 5 Dec 2023 12:14:29 +0000 (13:14 +0100)] 
Merge pull request #4065 from carlospeon/flush-buffer

evaluate flush condition with oldest value in the buffer

4 months agoevaluate flush condition with oldest value in the buffer 4065/head
Carlos Peon Costa [Tue, 5 Dec 2023 11:39:16 +0000 (12:39 +0100)] 
evaluate flush condition with oldest value in the buffer

5 months agoMerge pull request #4178 from octo/convigure-virt
Florian Forster [Fri, 1 Dec 2023 12:57:15 +0000 (13:57 +0100)] 
Merge pull request #4178 from octo/convigure-virt

configure: Improve the reporting when the "virt" plugin cannot be built.

5 months agoMakefile.am: Build `test_virt_plugin` with the same `CFLAGS` as the *virt plugin*. 4178/head
Florian Forster [Fri, 1 Dec 2023 09:44:03 +0000 (10:44 +0100)] 
Makefile.am: Build `test_virt_plugin` with the same `CFLAGS` as the *virt plugin*.

Using different flags leads to build errors if libvirt is in a non-system location.

5 months agoconfigure: Use `elif` instead of two separate `if` blocks.
Florian Forster [Fri, 1 Dec 2023 09:43:09 +0000 (10:43 +0100)] 
configure: Use `elif` instead of two separate `if` blocks.

5 months agoconfigure: Improve the reporting when the "virt" plugin cannot be built.
Florian Forster [Thu, 30 Nov 2023 09:10:07 +0000 (10:10 +0100)] 
configure: Improve the reporting when the "virt" plugin cannot be built.

5 months agoMerge pull request #4172 from octo/procevent
Florian Forster [Wed, 29 Nov 2023 15:35:15 +0000 (16:35 +0100)] 
Merge pull request #4172 from octo/procevent

procevent plugin: Remove embedded flexible array member to fix compiler warning.

5 months agoprocevent plugin: Consistently mention the unit in log message. 4172/head
Florian Forster [Wed, 29 Nov 2023 13:40:17 +0000 (14:40 +0100)] 
procevent plugin: Consistently mention the unit in log message.

Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
5 months agoprocevent plugin: Reference buffer sizing guideline.
Florian Forster [Wed, 29 Nov 2023 13:32:30 +0000 (14:32 +0100)] 
procevent plugin: Reference buffer sizing guideline.

Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
5 months agowrite_log plugin: remove the "write_log values:" line when logging metrics.
Florian Forster [Wed, 29 Nov 2023 09:54:40 +0000 (10:54 +0100)] 
write_log plugin: remove the "write_log values:" line when logging metrics.

5 months agoprocevent plugin: report errors in human readable form.
Florian Forster [Wed, 29 Nov 2023 09:02:08 +0000 (10:02 +0100)] 
procevent plugin: report errors in human readable form.

5 months agoprocevent plugin: ensure the ring buffer length is not zero.
Florian Forster [Wed, 29 Nov 2023 09:00:43 +0000 (10:00 +0100)] 
procevent plugin: ensure the ring buffer length is not zero.

The manpage documents a default of 10, which was not implemented. This
change brings the implementation in line with the documentation.

5 months agoprocevent plugin: remove use of a nested flexible array member.
Florian Forster [Tue, 28 Nov 2023 18:31:11 +0000 (19:31 +0100)] 
procevent plugin: remove use of a nested flexible array member.

The previous code used an ad-hoc struct to construct or parse a Netlink
message. This relied on allocating a field _after_ the struct with the
flexible array member, which is prohibited by the C standard, leading to
compiler warnings.

5 months agoMerge pull request #4171 from octo/workflow
Florian Forster [Tue, 28 Nov 2023 12:02:17 +0000 (13:02 +0100)] 
Merge pull request #4171 from octo/workflow

Improve CI workflows

5 months agoMerge pull request #4164 from octo/notify_upstart_systemd
Florian Forster [Mon, 27 Nov 2023 15:57:32 +0000 (16:57 +0100)] 
Merge pull request #4164 from octo/notify_upstart_systemd

Notify upstart/systemd after initialization is complete.

5 months agoBuild workflow: request that clang produce DWARF v4 debug symbols. 4171/head
Florian Forster [Mon, 27 Nov 2023 15:50:00 +0000 (16:50 +0100)] 
Build workflow: request that clang produce DWARF v4 debug symbols.

5 months agoDisable "exit on error" when running `make check`.
Florian Forster [Mon, 27 Nov 2023 15:34:06 +0000 (16:34 +0100)] 
Disable "exit on error" when running `make check`.

5 months agoprocevent plugin: Disable the `-Wgnu-variable-sized-type-not-at-end` warning.
Florian Forster [Mon, 27 Nov 2023 13:59:05 +0000 (14:59 +0100)] 
procevent plugin: Disable the `-Wgnu-variable-sized-type-not-at-end` warning.

5 months ago.cirrus.yml: Update list of compilers to match the `debian_unstable` container.
Florian Forster [Mon, 27 Nov 2023 10:17:05 +0000 (11:17 +0100)] 
.cirrus.yml: Update list of compilers to match the `debian_unstable` container.

5 months agoBuild workflow: add builds for `--enable-debug` and `CC=clang`.
Florian Forster [Mon, 27 Nov 2023 10:15:51 +0000 (11:15 +0100)] 
Build workflow: add builds for `--enable-debug` and `CC=clang`.

5 months agoMerge pull request #4170 from octo/debian_sid
Florian Forster [Mon, 27 Nov 2023 09:35:08 +0000 (10:35 +0100)] 
Merge pull request #4170 from octo/debian_sid

Workflows: rename "sid_amd64" to "debian_unstable".

5 months agoWorkflows: rename "sid_amd64" to "debian_sid". 4170/head
Florian Forster [Mon, 27 Nov 2023 08:11:07 +0000 (09:11 +0100)] 
Workflows: rename "sid_amd64" to "debian_sid".

5 months agoMerge pull request #4166 from octo/cirrus
Florian Forster [Sun, 26 Nov 2023 21:07:07 +0000 (22:07 +0100)] 
Merge pull request #4166 from octo/cirrus

Improve tests run on the Cirrus CI platform.

5 months ago.cirrus.yml: Report failures from CentOS 9 and Fedora 39. 4166/head
Florian Forster [Sun, 26 Nov 2023 21:01:17 +0000 (22:01 +0100)] 
.cirrus.yml: Report failures from CentOS 9 and Fedora 39.

5 months ago.cirrus.yml: Fix reporting of test failure.
Florian Forster [Sat, 25 Nov 2023 14:49:54 +0000 (15:49 +0100)] 
.cirrus.yml: Fix reporting of test failure.

5 months ago.cirrus.yml: set parallelism to number of CPUs.
Florian Forster [Sat, 25 Nov 2023 14:47:28 +0000 (15:47 +0100)] 
.cirrus.yml: set parallelism to number of CPUs.

5 months ago.cirrus.yml: Add task for FreeBSD builds.
Florian Forster [Sat, 25 Nov 2023 14:04:10 +0000 (15:04 +0100)] 
.cirrus.yml: Add task for FreeBSD builds.

5 months ago.cirrus.yml: remove obsolete platforms, add recent ones.
Florian Forster [Sat, 25 Nov 2023 13:52:39 +0000 (14:52 +0100)] 
.cirrus.yml: remove obsolete platforms, add recent ones.

5 months ago.cirrus.yml: s/master/main/
Florian Forster [Sat, 25 Nov 2023 13:44:31 +0000 (14:44 +0100)] 
.cirrus.yml: s/master/main/

5 months agoMerge pull request #4169 from octo/nut/upsclient
Florian Forster [Sun, 26 Nov 2023 19:10:09 +0000 (20:10 +0100)] 
Merge pull request #4169 from octo/nut/upsclient

NUT plugin: improve support for faulty versions of libupsclient.

5 months agoNUT plugin: import `<time.h>` before `<upsclient.h>`. 4169/head
Florian Forster [Sun, 26 Nov 2023 14:27:28 +0000 (15:27 +0100)] 
NUT plugin: import `<time.h>` before `<upsclient.h>`.

5 months agoMerge pull request #4167 from octo/ganglia
Florian Forster [Sat, 25 Nov 2023 23:17:18 +0000 (00:17 +0100)] 
Merge pull request #4167 from octo/ganglia

gmond plugin: Import `<ganglia.h>`.

5 months agogmond plugin: Improve `mc_handle_metadata_msg()`. 4167/head
Florian Forster [Sat, 25 Nov 2023 23:10:52 +0000 (00:10 +0100)] 
gmond plugin: Improve `mc_handle_metadata_msg()`.

This function was not properly formatted. While there:

* Handle the error instead of indenting the successful flow.
* Declare variables late.
* Initialize variables when declaring them.

5 months agogmond plugin: Look for RPC headers in /usr/include/tirpc.
Florian Forster [Sat, 25 Nov 2023 22:47:47 +0000 (23:47 +0100)] 
gmond plugin: Look for RPC headers in /usr/include/tirpc.

glibc removed the SunRPC headers, and the replacement headers are in a
different location. Try and look for them there.

5 months agogmond plugin: Import `<ganglia.h>`.
Florian Forster [Sat, 25 Nov 2023 16:35:27 +0000 (17:35 +0100)] 
gmond plugin: Import `<ganglia.h>`.

`<gm_protocol.h>` has been removed in new versions of libganglia.

5 months agoMerge pull request #4168 from octo/workflow/upload
Florian Forster [Sat, 25 Nov 2023 21:57:02 +0000 (22:57 +0100)] 
Merge pull request #4168 from octo/workflow/upload

Workflow build: upload `config.log` and other log files.

5 months agoWorkflow build: upload `config.log` and other log files. 4168/head
Florian Forster [Sat, 25 Nov 2023 19:39:29 +0000 (20:39 +0100)] 
Workflow build: upload `config.log` and other log files.

5 months agoNotify upstart/systemd after initialization is complete. 4164/head
Florian Forster [Fri, 24 Nov 2023 22:31:03 +0000 (23:31 +0100)] 
Notify upstart/systemd after initialization is complete.

Fixes: #4152
5 months agoMerge pull request #4165 from octo/netlink/valgrind_issue
Florian Forster [Sat, 25 Nov 2023 13:22:21 +0000 (14:22 +0100)] 
Merge pull request #4165 from octo/netlink/valgrind_issue

Netlink plugin: complete initialize structs used for testing.

5 months agoSMART plugin: initialize struct passed to `ioctl(2)`. 4165/head
Florian Forster [Sat, 25 Nov 2023 13:12:59 +0000 (14:12 +0100)] 
SMART plugin: initialize struct passed to `ioctl(2)`.

Valgrind is complaining about a conditional jump based on uninitialized
memory:

```
==66462== Conditional jump or move depends on uninitialised value(s)
==66462==    at 0x10C500: smart_read_nvme_intel_disk (in /__w/collectd/collectd/test_plugin_smart)
==66462==    by 0x10D366: test_x (in /__w/collectd/collectd/test_plugin_smart)
==66462==    by 0x10D638: main (in /__w/collectd/collectd/test_plugin_smart)
```

This may be due to the `struct nvme_additional_smart_log` being
uninitialized when it's being passed to `ioctl(2)`.

This there, this removed an unnecessary level of indentation.

5 months agoNetlink plugin: complete initialize structs used for testing.
Florian Forster [Sat, 25 Nov 2023 12:51:57 +0000 (13:51 +0100)] 
Netlink plugin: complete initialize structs used for testing.

Valgrind complains about a conditional jump based on uninitialized
memory:

```
==66438== Conditional jump or move depends on uninitialised value(s)
==66438==    at 0x10CA06: vf_info_submit (in /__w/collectd/collectd/test_plugin_netlink)
==66438==    by 0x1110F2: test_vf_submit_test (in /__w/collectd/collectd/test_plugin_netlink)
==66438==    by 0x112EAC: main (in /__w/collectd/collectd/test_plugin_netlink)
```

This is likely caused by the `vf_stats_t` being only partially
initialized. Using a struct initializer is not only cleaner, it also
ensures the remainder of the struct is initialized to zero.

5 months agoMerge pull request #4163 from octo/workflows/fedora39
Florian Forster [Fri, 24 Nov 2023 15:16:21 +0000 (16:16 +0100)] 
Merge pull request #4163 from octo/workflows/fedora39

Build workflow: Add Fedora 38 and 39.

5 months agoBuild workflow: report the status of `make check` after the test log has been uploaded. 4163/head
Florian Forster [Fri, 24 Nov 2023 14:56:12 +0000 (15:56 +0100)] 
Build workflow: report the status of `make check` after the test log has been uploaded.

5 months agoBuild workflow: use all available CPUs.
Florian Forster [Fri, 24 Nov 2023 14:53:44 +0000 (15:53 +0100)] 
Build workflow: use all available CPUs.

5 months agoBuild workflow: Add Fedora 38 and 39, remove Fedora 36.
Florian Forster [Fri, 24 Nov 2023 14:26:10 +0000 (15:26 +0100)] 
Build workflow: Add Fedora 38 and 39, remove Fedora 36.

5 months agoMerge pull request #4162 from octo/workflows/build
Florian Forster [Fri, 24 Nov 2023 14:46:55 +0000 (15:46 +0100)] 
Merge pull request #4162 from octo/workflows/build

Build workflow: remove old distros.

5 months ago./contrib/format.sh src/amqp.c
Florian Forster [Fri, 24 Nov 2023 13:25:01 +0000 (14:25 +0100)] 
./contrib/format.sh src/amqp.c

5 months agoUpdate README.md
Vatsalya Vyas [Tue, 31 Oct 2023 06:59:31 +0000 (12:29 +0530)] 
Update README.md

5 months agoAdd Ubuntu 22.04 ("Jammy Jellyfish") and Ubuntu 23.10 ("Mantic Minotaur"). 4162/head
Florian Forster [Fri, 24 Nov 2023 13:58:46 +0000 (14:58 +0100)] 
Add Ubuntu 22.04 ("Jammy Jellyfish") and Ubuntu 23.10 ("Mantic Minotaur").

5 months agoBuild workflow: also remove EL8 (based on CentOS 8).
Florian Forster [Fri, 24 Nov 2023 13:27:05 +0000 (14:27 +0100)] 
Build workflow: also remove EL8 (based on CentOS 8).

5 months agoBuild workflow: remove old distros.
Florian Forster [Fri, 24 Nov 2023 11:04:25 +0000 (12:04 +0100)] 
Build workflow: remove old distros.

This removes old and unsupported Linux distros:

*   Ubuntu 16 ("Xenial", support ended April 2021)
*   Ubuntu 18 ("Bionic Beaver", support ended June 2023)
*   Enterprise Linux 7 (technically still supported, but nine years old
    at this point)
*   Fedora 34 (support ended June 2022)
*   Fedora 35 (support ended December 2022)

Fedora 36 is also unsupported. We will keep the builder until we have
never versions of Fedora available (or at least Rawhide builds again).

5 months agoMerge pull request #4111 from mrunge/rabbitmq
Florian Forster [Fri, 24 Nov 2023 13:28:22 +0000 (14:28 +0100)] 
Merge pull request #4111 from mrunge/rabbitmq

Fix compile warning for amqp

5 months agoAMQP plugin: prefer the `rabbitmq-c/amqp.h` header if available. 4111/head
Florian Forster [Fri, 24 Nov 2023 13:14:05 +0000 (14:14 +0100)] 
AMQP plugin: prefer the `rabbitmq-c/amqp.h` header if available.

At some point, RabbitMQ has moved their headers to the `rabbitmq-c/`
subdirectory. The old locations still exist but throw an error, saying
the old headers are "deprecated".

This adds appropriate checks for the new headers to the configure script
and uses those if present.

To simplify both the configure script and plugin, support for ancient
versions of the library is removed. This affects versions that don't
have the `amqp_tcp_socket_new()` function yet.

5 months agoFix compile warning for amqp
Matthias Runge [Mon, 24 Apr 2023 08:16:55 +0000 (10:16 +0200)] 
Fix compile warning for amqp

warning "amqp.h is deprecated, use rabbitmq-c/amqp.h instead."

5 months agoMerge pull request #4161 from octo/intel_rdt/pids2
Florian Forster [Fri, 24 Nov 2023 11:19:14 +0000 (12:19 +0100)] 
Merge pull request #4161 from octo/intel_rdt/pids2

Intel RDT plugin: use `pqos_mon_start_pids2()` if available.

5 months agoIntel RDT plugin: use `pqos_mon_start_cores()` if available. 4161/head
Florian Forster [Fri, 24 Nov 2023 10:39:00 +0000 (11:39 +0100)] 
Intel RDT plugin: use `pqos_mon_start_cores()` if available.

5 months agoIntel RDT plugin: use `pqos_mon_start_pids2()` if available.
Florian Forster [Fri, 24 Nov 2023 10:20:01 +0000 (11:20 +0100)] 
Intel RDT plugin: use `pqos_mon_start_pids2()` if available.

Newer versions of the pqos library deprecate the previous function, so
we have to migrate even though it makes memory management quite ugly.

ChangeLog: Intel RDT plugin: support for PQOS ≥5.0.0 has been added.

5 months agoMerge pull request #4160 from octo/python/SetArgv
Florian Forster [Fri, 24 Nov 2023 09:28:59 +0000 (10:28 +0100)] 
Merge pull request #4160 from octo/python/SetArgv

Python plugin: use `PyConfig` to set argv.