]>
git.ipfire.org Git - thirdparty/collectd.git/log
Florian Forster [Thu, 21 Dec 2023 19:02:12 +0000 (20:02 +0100)]
.expected-plugins/debian_unstable: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 17:57:31 +0000 (18:57 +0100)]
.expected-plugins/fedora_main: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 16:22:53 +0000 (17:22 +0100)]
.github/workflows/build.yml: Add "Check expected plugins" to "experimental".
Florian Forster [Thu, 21 Dec 2023 16:21:22 +0000 (17:21 +0100)]
.expected-plugins/fedora38: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 16:20:03 +0000 (17:20 +0100)]
.expected-plugins/ubuntu20.04: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 16:19:09 +0000 (17:19 +0100)]
.expected-plugins/ubuntu22.04: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 16:16:42 +0000 (17:16 +0100)]
.expected-plugins/debian10: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 16:15:15 +0000 (17:15 +0100)]
.expected-plugins/debian11: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 15:54:19 +0000 (16:54 +0100)]
.github/workflows/build.yml: Add a "Check expected plugins" step.
Florian Forster [Thu, 21 Dec 2023 13:52:25 +0000 (14:52 +0100)]
.expected-plugins/centos9: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 13:49:26 +0000 (14:49 +0100)]
.expected-plugins/fedora39: Import expected plugin list.
Florian Forster [Thu, 21 Dec 2023 12:48:55 +0000 (13:48 +0100)]
.expected-plugins/ubuntu23.10: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 13:34:13 +0000 (14:34 +0100)]
.expected-plugins/debian12: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 13:40:01 +0000 (14:40 +0100)]
.expected-plugins: Add empty files for all distros.
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.
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
Florian Forster [Thu, 21 Dec 2023 13:06:02 +0000 (14:06 +0100)]
.github/workflows/distcheck.yml: Run on Debian12 (current stable).
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
Florian Forster [Fri, 22 Dec 2023 21:37:42 +0000 (22:37 +0100)]
Merge pull request #4210 from eero-t/min-mem-fix
[collectd 6] gpu_sysman: fix minimum memory usage calculation
Eero Tamminen [Fri, 15 Dec 2023 19:36:31 +0000 (21:36 +0200)]
gpu_sysman: fix minimum memory usage calculation
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
Florian Forster [Thu, 21 Dec 2023 17:35:17 +0000 (18:35 +0100)]
Merge pull request #4206 from octo/6/write_prometheus
[collectd 6] Write Prometheus plugin: Ensure metric and label names are properly formatted.
Florian Forster [Thu, 21 Dec 2023 17:26:52 +0000 (18:26 +0100)]
contrib/format.sh src/utils/strbuf/strbuf.c
Florian Forster [Thu, 21 Dec 2023 15:58:16 +0000 (16:58 +0100)]
src/utils/strbuf/strbuf.c: Remove unused left-over code.
Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
Florian Forster [Thu, 21 Dec 2023 15:10:55 +0000 (16:10 +0100)]
strbuf: Rewrite `strbuf_print_restricted` using a bitmap.
Instead of building the buffer piece by piece, copy the entire string into
the buffer and do the replacements there.
I think the code is quite efficient, but I haven't profiled either
version so can't say for sure that there is a speedup. The new code
*may* be easier to reason about, since the "copy and replace" approach
has a much simpler loop body than the previous approach.
Florian Forster [Thu, 21 Dec 2023 10:59:52 +0000 (11:59 +0100)]
./contrib/format.sh src/utils/strbuf/strbuf.c
Florian Forster [Thu, 21 Dec 2023 10:52:25 +0000 (11:52 +0100)]
write_prometheus plugin: Replace invalid characters in names.
Florian Forster [Thu, 21 Dec 2023 09:53:07 +0000 (10:53 +0100)]
write_prometheus plugin: Add two more simple unit test cases.
Florian Forster [Thu, 21 Dec 2023 09:29:08 +0000 (10:29 +0100)]
write_prometheus plugin: Add an initial (i.e. very simple) unit test.
Florian Forster [Thu, 21 Dec 2023 09:15:59 +0000 (10:15 +0100)]
write_prometheus plugin: Break out formatting of a single metric family.
Florian Forster [Thu, 21 Dec 2023 09:15:27 +0000 (10:15 +0100)]
configure: Report why the *write_prometheus plugin* is disabled.
Florian Forster [Thu, 21 Dec 2023 10:38:20 +0000 (11:38 +0100)]
strbuf: Add `strbuf_print_restricted`.
This new function is similar to `strbuf_print_escaped` but differs in two
important aspects:
* `strbuf_print_restricted` expects a list of acceptable characters,
i.e. an allow list. `strbuf_print_escaped` expects a deny list.
* `strbuf_print_restricted` *replaces* characters not in the allow list.
`strbuf_print_escaped` adds an escape character in front of the
denied character.
Florian Forster [Thu, 21 Dec 2023 11:59:31 +0000 (12:59 +0100)]
Merge pull request #4207 from octo/6/makefile_am
[collectd 6] Link more things into `libplugin_mock.la`.
Florian Forster [Thu, 21 Dec 2023 09:27:10 +0000 (10:27 +0100)]
Makefile.am: Add `src/daemon/{configfile,types_list}.c to `libplugin_mock`
… and remove from tests referencing these files directly.
Florian Forster [Thu, 21 Dec 2023 09:14:41 +0000 (10:14 +0100)]
Makefile.am: Link `libmetric` and `liboconfig` into `libplugin_mock`.
This allows us to remove these as direct dependencies from many tests.
Because `libmetadata` is linked into `libmetric`, it can also be removed.
Overall this will make link more things that are in the daemon into
`libplugin_mock`, making linking unit tests simpler.
Florian Forster [Wed, 20 Dec 2023 11:54:25 +0000 (12:54 +0100)]
Merge pull request #4201 from octo/6/ci
[collectd 6] .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`.
Florian Forster [Wed, 20 Dec 2023 11:29:19 +0000 (12:29 +0100)]
Merge pull request #4203 from octo/6/cpu_sysman
[collectd 6] gpu_sysman plugin: Fix double reporting of metric.
Florian Forster [Wed, 20 Dec 2023 11:09:43 +0000 (12:09 +0100)]
gpu_sysman plugin: Fix double reporting of metric.
This metric is already added to the metric family in line 1553. Adding
it twice leads to `uc_update` errors.
Fixes: #4200
Florian Forster [Wed, 20 Dec 2023 10:52:48 +0000 (11:52 +0100)]
Merge pull request #4197 from octo/6/legacy_support
[collectd 6] Generate better names and labels for legacy metrics.
Florian Forster [Tue, 19 Dec 2023 22:35:00 +0000 (23:35 +0100)]
value_list: Simplify the control flow when setting metric labels.
Eero Tamminen [Tue, 19 Dec 2023 22:20:43 +0000 (23:20 +0100)]
value_list: Simplify by adding separating "." in the first `strbuf_print()` call.
Co-authored-by: Florian Forster <octo@collectd.org>
Florian Forster [Mon, 18 Dec 2023 23:15:45 +0000 (00:15 +0100)]
./contrib/format.sh src/utils/common/*.[ch]
Florian Forster [Mon, 18 Dec 2023 10:30:33 +0000 (11:30 +0100)]
value_list: Add special handling for "utilization" and "io" metrics.
Florian Forster [Mon, 18 Dec 2023 10:26:48 +0000 (11:26 +0100)]
common: Add `string_has_suffix`.
Florian Forster [Mon, 18 Dec 2023 10:11:14 +0000 (11:11 +0100)]
value_list: Ensure that the plugin name is contained in the converted metric.
Florian Forster [Mon, 18 Dec 2023 09:19:25 +0000 (10:19 +0100)]
value_list: Improve generated metric names.
This changes `plugin_value_list_to_metric_family` to generate metric
names that are more in line with OpenTelemetry's naming guidelines.
Florian Forster [Mon, 18 Dec 2023 22:30:14 +0000 (23:30 +0100)]
Merge pull request #4195 from octo/6/value_list
[collectd 6] Move legacy code into its own package.
Florian Forster [Mon, 18 Dec 2023 22:09:47 +0000 (23:09 +0100)]
./contrib/format.sh src/utils/value_list/value_list_test.c
Florian Forster [Mon, 18 Dec 2023 22:09:29 +0000 (23:09 +0100)]
curl_json plugin: Remove `value_list` from build deps.
Florian Forster [Mon, 18 Dec 2023 18:53:02 +0000 (19:53 +0100)]
Link `value_list` into `libplugin_mock`.
This is much simpler than adding the .c and .h files into all individual
tests.
Florian Forster [Mon, 18 Dec 2023 14:20:50 +0000 (15:20 +0100)]
intel_rdt plugin: Add the `value_list` utility to the unit test.
Florian Forster [Mon, 18 Dec 2023 08:38:08 +0000 (09:38 +0100)]
value_list: Migrate `parse_values` out of `common`.
Florian Forster [Mon, 18 Dec 2023 08:30:25 +0000 (09:30 +0100)]
value_list: Migrate functions related to `value_list_t` out of `common`.
Florian Forster [Mon, 18 Dec 2023 08:26:28 +0000 (09:26 +0100)]
daemon: Move `data_set_t` and related functions to its own file.
This is part of the legacy support for collectd 5 metrics. Because "data
sets" are a global resource, this has to remain within the daemon.
Florian Forster [Mon, 18 Dec 2023 07:59:10 +0000 (08:59 +0100)]
Move functions related to `value_list_t` to a separate package.
Florian Forster [Mon, 18 Dec 2023 22:29:14 +0000 (23:29 +0100)]
Merge pull request #4196 from octo/6/resource_metrics
[collectd 6] New utility: `resource_metrics` to group metrics by resource.
Florian Forster [Sun, 17 Dec 2023 08:45:11 +0000 (09:45 +0100)]
resource_metrics: Skip duplicate metrics instead of erroring out.
The semantics have been changed to simply ignore metrics that are already
in the set. The previous semantic was optimized for a "add and if that
fails flush and try again" plugin behavior. With the support for multiple
instances of the same metric (at different times), there no longer is a
need to ensure metrics in the set are unique.
Florian Forster [Sun, 17 Dec 2023 08:19:00 +0000 (09:19 +0100)]
resource_metrics: Treat metrics with different time stamps as different metrics.
Florian Forster [Sat, 16 Dec 2023 13:29:00 +0000 (14:29 +0100)]
resource metrics: Add missing free to `resource_metrics_reset`.
Florian Forster [Sat, 16 Dec 2023 11:59:03 +0000 (12:59 +0100)]
resource_metrics: Doc comment improvements.
Florian Forster [Sat, 16 Dec 2023 11:58:37 +0000 (12:58 +0100)]
resource_metrics: Fix bugs surfaced by the unit test.
* Sort metric families after inserting.
* Dereference the pointer-pointer returned by `bsearch` in `lookup_family`.
* Delete the metrics created by `metric_family_clone`.
* Run ./contrib/format.sh
Florian Forster [Sat, 16 Dec 2023 11:53:53 +0000 (12:53 +0100)]
resource_metrics: Add unit test.
Florian Forster [Sat, 16 Dec 2023 07:26:26 +0000 (08:26 +0100)]
New utility: resource_metrics.
Resource metrics allows plugin to stage metric families, grouped by
resource. This is designed to work well with plugins that export the
OpenTelemetry protocol.
Florian Forster [Thu, 14 Dec 2023 11:54:42 +0000 (12:54 +0100)]
daemon: Add `metric_family_compare` and `label_set_compare`.
Florian Forster [Fri, 15 Dec 2023 19:37:52 +0000 (20:37 +0100)]
Merge pull request #4191 from octo/6/load
[collectd 6] Load plugin: Migrate to collectd 6 data structures.
Florian Forster [Thu, 14 Dec 2023 20:48:09 +0000 (21:48 +0100)]
src/daemon/metric.h: Improve doc comment for `metric_family_append`.
Florian Forster [Thu, 14 Dec 2023 20:56:32 +0000 (21:56 +0100)]
./contrib/format.sh src/load.c
Florian Forster [Thu, 14 Dec 2023 20:56:17 +0000 (21:56 +0100)]
Load plugin: Simplify libstatgrab implementation.
Florian Forster [Thu, 14 Dec 2023 20:55:20 +0000 (21:55 +0100)]
Load plugin: rewrite Linux implementation using `read_text_file_contents`.
Florian Forster [Thu, 14 Dec 2023 20:50:40 +0000 (21:50 +0100)]
load plugin: Migrate to collectd 6 data structures.
Florian Forster [Fri, 15 Dec 2023 19:09:50 +0000 (20:09 +0100)]
Merge pull request #4192 from octo/6/irq
[collectd 6] IRQ plugin: Migrate to collectd 6 data structures.
Florian Forster [Fri, 15 Dec 2023 19:02:24 +0000 (20:02 +0100)]
irq plugin: Remove special case for the "FIQ" interrupt.
Eero Tamminen [Fri, 15 Dec 2023 18:53:21 +0000 (19:53 +0100)]
format_json: Improve the doc comment for `irq_strsplit`.
Contrast the behavior to `strsplit`.
Co-authored-by: Florian Forster <octo@collectd.org>
Florian Forster [Fri, 15 Dec 2023 18:44:09 +0000 (19:44 +0100)]
irq plugin: Parse counters as `DS_TYPE_DERIVE`.
Eero Tamminen [Fri, 15 Dec 2023 18:36:51 +0000 (19:36 +0100)]
irq plugin: Document the return value of `irq_strsplit`.
Florian Forster [Fri, 15 Dec 2023 08:44:52 +0000 (09:44 +0100)]
common: Improve coding style of `strsplit`.
* Combine declaration and initialization.
Florian Forster [Fri, 15 Dec 2023 08:44:12 +0000 (09:44 +0100)]
irq plugin: refactor the NetBSD code.
* Declare local variables late.
* Initialize when declaring variables.
* Use `metric_family_append`.
Florian Forster [Fri, 15 Dec 2023 08:42:44 +0000 (09:42 +0100)]
irq plugin: Add additional labels to the Linux implementation.
The Linux implementation will now emit the following fields if available:
* device
* trigger
* kernel_module
* name (a human readable name, e.g. "Non-maskable interrupts")
Manuel Luis Sanmartín Rozada [Thu, 18 Feb 2021 01:43:36 +0000 (02:43 +0100)]
[collectd 6] irq: migration to v6.0
Florian Forster [Wed, 13 Dec 2023 21:46:05 +0000 (22:46 +0100)]
Merge pull request #4187 from octo/6/resource
[collectd 6] RFC: Add resource attributes.
Florian Forster [Wed, 13 Dec 2023 20:00:14 +0000 (21:00 +0100)]
Move resource attributes into `metric_family_t`.
Florian Forster [Wed, 13 Dec 2023 14:37:13 +0000 (15:37 +0100)]
src/daemon/metric.h: Fix typos in doc comment.
Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
Florian Forster [Wed, 13 Dec 2023 14:35:23 +0000 (15:35 +0100)]
Change the semantic of `label_set_clone`.
It checks to ensure that `dest` is empty and returns `EINVAL` otherwise.
Florian Forster [Wed, 13 Dec 2023 14:30:37 +0000 (15:30 +0100)]
src/daemon/metric.c: improve readability of "first_label" logic.
Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
Florian Forster [Wed, 13 Dec 2023 14:29:36 +0000 (15:29 +0100)]
src/daemon/metric.h: Fix typo.
Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
Florian Forster [Wed, 13 Dec 2023 12:53:33 +0000 (13:53 +0100)]
format_graphite: Add support for resource attributes.
Florian Forster [Wed, 6 Dec 2023 07:51:31 +0000 (08:51 +0100)]
Add resource labels to `metric_t`.
Florian Forster [Tue, 12 Dec 2023 09:55:49 +0000 (10:55 +0100)]
Merge pull request #4176 from octo/6/write_http
[collectd 6] add reference counting to plugins that register multiple callbacks with the same `user_data_t`.
Florian Forster [Fri, 8 Dec 2023 13:31:58 +0000 (14:31 +0100)]
write_riemann plugin: Unify reference counting code with other plugins.
Florian Forster [Wed, 29 Nov 2023 12:59:52 +0000 (13:59 +0100)]
write_http plugin: Unify coding style.
A few plugins implement reference counting. Ensure that they use locks
etc. consistently.
Florian Forster [Wed, 29 Nov 2023 12:55:20 +0000 (13:55 +0100)]
write_tsdb plugin: Implement reference counting.
Florian Forster [Wed, 29 Nov 2023 12:53:08 +0000 (13:53 +0100)]
write_syslog plugin: Implement reference counting.
Florian Forster [Wed, 29 Nov 2023 12:41:32 +0000 (13:41 +0100)]
write_riemann plugin: use reference counting to when freeing user data.
While reference counting was present previously, it had problems:
* The reference passed to `plugin_register_flush()` was not counted.
* If a flush plugin was registered, `free_func` was set to NULL but
the reference passed to `plugin_register_notification()` was still
counted, meaning in that case the counter never went to zero.
* Mutexes must be unlocked when calling `pthread_mutex_destroy()`.
* The code limped on after an error, returning a failure eventually.
This is unnecessarily complex control flow that has been simplified.
Florian Forster [Wed, 29 Nov 2023 12:24:00 +0000 (13:24 +0100)]
write_stackdriver plugin: Implement reference counting.
Leonard Göhrs [Fri, 24 Mar 2023 09:49:24 +0000 (10:49 +0100)]
src/write_http.c: use reference counting to decide when to free user_data
The teardown code for the wh_callback_t struct previously relied on
the order in which the different callback functions are de-initialized
to be known and to never change.
This is prone to failure and is indeed currently broken, leading to a
segmentation fault on collectd exit.
Fix this by counting the active references to the user data and freeing
it once it reaches zero.
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Florian Forster [Wed, 6 Dec 2023 12:12:27 +0000 (13:12 +0100)]
Merge pull request #4182 from octo/6/configure-write_http
configure: Disable the write_http plugin if libyajl2 is not found.
Florian Forster [Tue, 5 Dec 2023 12:30:33 +0000 (13:30 +0100)]
configure: Disable the write_http plugin if libyajl2 is not found.
Florian Forster [Wed, 6 Dec 2023 12:04:56 +0000 (13:04 +0100)]
Merge pull request #4181 from octo/6/otep119
Update standard system metric names in accordance with OpenTelemetry.
Florian Forster [Tue, 5 Dec 2023 10:27:41 +0000 (11:27 +0100)]
memory plugin: Use standard system metric names (OTEP #119)
https://github.com/open-telemetry/oteps/blob/main/text/0119-standard-system-metrics.md
Florian Forster [Tue, 5 Dec 2023 10:27:28 +0000 (11:27 +0100)]
disk plugin: Use standard system metric names (OTEP #119)
https://github.com/open-telemetry/oteps/blob/main/text/0119-standard-system-metrics.md