]> git.ipfire.org Git - thirdparty/collectd.git/log
thirdparty/collectd.git
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 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.

5 months agoPython plugin: use `PyConfig` to set argv. 4160/head
Florian Forster [Fri, 24 Nov 2023 09:03:12 +0000 (10:03 +0100)] 
Python plugin: use `PyConfig` to set argv.

`PySys_SetArgv` has been deprecated in Python 3.11.

5 months agoMerge pull request #4158 from octo/write_mongodb/format-truncation
Florian Forster [Fri, 24 Nov 2023 08:27:16 +0000 (09:27 +0100)] 
Merge pull request #4158 from octo/write_mongodb/format-truncation

Write MongoDB plugin: fix format trunction errors.

5 months agoWrite MongoDB plugin: fix format trunction errors. 4158/head
Florian Forster [Fri, 24 Nov 2023 08:15:04 +0000 (09:15 +0100)] 
Write MongoDB plugin: fix format trunction errors.

When a `size_t` is a 64bit integer, the 16 byte buffer could potentially
overflow. Fix this by using a larger buffer and also collectd's own
`ssnprintf()` function which guarantees to result in a null terminated
string.

```
In function 'wm_create_bson',
    inlined from 'wm_write' at src/write_mongodb.c:229:17:
src/write_mongodb.c:99:32: error: '%zu' directive output may be truncated writing between 1 and 20 bytes into a region of size 16 [-Werror=format-truncation=]
   99 |     snprintf(key, sizeof(key), "%" PRIsz, i);
      |                                ^~~
src/write_mongodb.c: In function 'wm_write':
src/write_mongodb.c:99:33: note: format string is defined here
   99 |     snprintf(key, sizeof(key), "%" PRIsz, i);
```

5 months agoMerge pull request #4157 from octo/distcheck
Florian Forster [Fri, 24 Nov 2023 08:09:41 +0000 (09:09 +0100)] 
Merge pull request #4157 from octo/distcheck

Add new GitHub action for running `make distcheck`.

5 months agoGive the action and job better names. 4157/head
Florian Forster [Fri, 24 Nov 2023 08:03:39 +0000 (09:03 +0100)] 
Give the action and job better names.

5 months agoRemove `make distcheck` from the regular "build" action.
Florian Forster [Fri, 24 Nov 2023 08:01:34 +0000 (09:01 +0100)] 
Remove `make distcheck` from the regular "build" action.

5 months agoDistcheck action: use Debian 11 ("Bullseye") for now.
Florian Forster [Fri, 24 Nov 2023 07:55:34 +0000 (08:55 +0100)] 
Distcheck action: use Debian 11 ("Bullseye") for now.

Debian 12 does not compile yet.

5 months agoAdd new GitHub action for running `make distcheck`.
Florian Forster [Fri, 24 Nov 2023 07:46:59 +0000 (08:46 +0100)] 
Add new GitHub action for running `make distcheck`.

5 months agoMerge pull request #4156 from octo/curl_off_t
Florian Forster [Fri, 24 Nov 2023 07:48:03 +0000 (08:48 +0100)] 
Merge pull request #4156 from octo/curl_off_t

curl_stats: fix compatibility with new versions of cURL.

5 months agocurl_stats: fix compatibility with new versions of cURL. 4156/head
Florian Forster [Fri, 24 Nov 2023 07:28:06 +0000 (08:28 +0100)] 
curl_stats: fix compatibility with new versions of cURL.

Use integer based keys for metrics if available.

cURL ≥ 7.55.0 provides additional keys that allow getting certain
metrics as integers rather than doubles, e.g. content length. In some
newer versions of cURL, the original keys (using doubles) are marked as
deprecated.

ChangeLog: cURL, cURL-JSON, cURL-XML, Write HTTP plugins: fix compatibility with new versions of cURL.

5 months agoBuild workflow: add Debian 12 ("Bookworm") and remove Debian 9 ("Stretch").
Florian Forster [Thu, 23 Nov 2023 21:55:56 +0000 (22:55 +0100)] 
Build workflow: add Debian 12 ("Bookworm") and remove Debian 9 ("Stretch").

5 months agoMerge pull request #4155 from octo/valgrind
Florian Forster [Thu, 23 Nov 2023 15:46:43 +0000 (16:46 +0100)] 
Merge pull request #4155 from octo/valgrind

Add Valgrind suppression for libvirt memory leak.

5 months agoAdd Valgrind suppression for libvirt memory leak. 4155/head
Florian Forster [Thu, 23 Nov 2023 15:17:55 +0000 (16:17 +0100)] 
Add Valgrind suppression for libvirt memory leak.

5 months agoMerge pull request #4154 from octo/intel_rdt
Florian Forster [Thu, 23 Nov 2023 15:35:56 +0000 (16:35 +0100)] 
Merge pull request #4154 from octo/intel_rdt

Intel RDT: fix compilation with libpqos < 4.4.

5 months agoIntel RDT: fix compilation with libpqos < 4.4. 4154/head
Florian Forster [Thu, 23 Nov 2023 13:14:19 +0000 (14:14 +0100)] 
Intel RDT: fix compilation with libpqos < 4.4.

5 months agoRevert "GitHub actions: upgrade to actions/checkout@v4"
Florian Forster [Thu, 23 Nov 2023 15:25:52 +0000 (16:25 +0100)] 
Revert "GitHub actions: upgrade to actions/checkout@v4"

This reverts commit 8a451bca30011fbfd249bbd3aa78922cb03aef2d.

Some older platforms use an incompatible glibc version.

5 months agoGitHub actions: upgrade to actions/checkout@v4
Florian Forster [Thu, 23 Nov 2023 14:39:58 +0000 (15:39 +0100)] 
GitHub actions: upgrade to actions/checkout@v4

5 months agoGitHub actions: include job name in artifact name.
Florian Forster [Thu, 23 Nov 2023 14:22:28 +0000 (15:22 +0100)] 
GitHub actions: include job name in artifact name.

Otherwise a random job would "win" and the entire workflow only produces one artifact.

5 months agoGitHub actions: continue on error and upload test logs.
Florian Forster [Thu, 23 Nov 2023 13:58:54 +0000 (14:58 +0100)] 
GitHub actions: continue on error and upload test logs.

When `make check` fails, continue so that the "upload logs" step is
performed. Use the `upload-artifact` action instead of just `cat`ing the
file.

5 months agoMerge pull request #3773 from drNowak/bugfix-negative-cpu
Florian Forster [Thu, 23 Nov 2023 12:44:06 +0000 (13:44 +0100)] 
Merge pull request #3773 from drNowak/bugfix-negative-cpu

Compare both PID and process start time to avoid issues with immediate PID reuse on Linux

5 months agoclang format 3773/head
Krzysztof Nowak [Thu, 12 Nov 2020 09:53:02 +0000 (10:53 +0100)] 
clang format

5 months agoCompare both PID and process start time to avoid issues with immediate PID reuse...
Krzysztof Nowak [Thu, 12 Nov 2020 09:19:14 +0000 (10:19 +0100)] 
Compare both PID and process start time to avoid issues with immediate PID reuse on Linux platform.

5 months agowrite_prometheus: don't use AI_ADDRCONFIG for resolving bind address
Wolf480pl [Tue, 21 Nov 2023 10:53:59 +0000 (11:53 +0100)] 
write_prometheus: don't use AI_ADDRCONFIG for resolving bind address

Fixes #4150

write_prometheus uses getaddrinfo to resolve the bind address.
The AI_ADDRCONFIG flag causes getaddrinfo to refuse to resolve
0.0.0.0 when the system has no non-loopback IPv4 addresses configured
and refuse to resolve :: when the system has no non-loopback IPv6 configured.

We want binding to a wildcard address (0.0.0.0 or ::) to always work,
even if the network is down.

To achieve that, don't pass the AI_ADDRCONFIG flag
when resolving a bind address.