]> git.ipfire.org Git - thirdparty/collectd.git/log
thirdparty/collectd.git
17 months agomemory plugin: Align metrics with OpenTelemetry recommendations. 4219/head
Florian Forster [Sun, 17 Dec 2023 14:04:59 +0000 (15:04 +0100)] 
memory plugin: Align metrics with OpenTelemetry recommendations.

* The "state" label has been renamed to "system.memory.state".
* Metric descriptions and units have been added.

17 months agoMerge pull request #4220 from octo/6/write_prometheus
Florian Forster [Fri, 29 Dec 2023 16:55:45 +0000 (17:55 +0100)] 
Merge pull request #4220 from octo/6/write_prometheus

write_prometheus plugin: Use the `unit` field to create metric names.

17 months agowrite_prometheus plugin: Remove invalid characers from the unit. 4220/head
Florian Forster [Fri, 29 Dec 2023 16:07:24 +0000 (17:07 +0100)] 
write_prometheus plugin: Remove invalid characers from the unit.

17 months agocontrib/format.sh src/write_prometheus.c
Florian Forster [Fri, 29 Dec 2023 16:00:50 +0000 (17:00 +0100)] 
contrib/format.sh src/write_prometheus.c

17 months agowrite_prometheus plugin: Use the `unit` field to create metric names.
Florian Forster [Fri, 29 Dec 2023 15:58:37 +0000 (16:58 +0100)] 
write_prometheus plugin: Use the `unit` field to create metric names.

Reference:
https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#metric-metadata-1

17 months agoMerge pull request #4194 from octo/6/unit
Florian Forster [Thu, 28 Dec 2023 19:55:41 +0000 (20:55 +0100)] 
Merge pull request #4194 from octo/6/unit

[collectd 6] Add a `unit` field to the `metric_family_t` struct.

17 months agocontrib/format.sh src/daemon/unit.h 4194/head
Florian Forster [Thu, 28 Dec 2023 19:18:47 +0000 (20:18 +0100)] 
contrib/format.sh src/daemon/unit.h

17 months agosrc/daemon/unit.h: Reference OpenTelemetry docs.
Florian Forster [Thu, 28 Dec 2023 08:04:57 +0000 (09:04 +0100)] 
src/daemon/unit.h: Reference OpenTelemetry docs.

Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
17 months agosrc/daemon/unit.c: Use `string_has_suffix()` from `common`.
Florian Forster [Mon, 18 Dec 2023 14:04:13 +0000 (15:04 +0100)] 
src/daemon/unit.c: Use `string_has_suffix()` from `common`.

17 months agosrc/daemon/unit.c: Add reference link to metric names and units.
Florian Forster [Mon, 18 Dec 2023 14:02:08 +0000 (15:02 +0100)] 
src/daemon/unit.c: Add reference link to metric names and units.

17 months agosrc/daemon/metric.h: Add doc comment for the `unit` field.
Florian Forster [Mon, 18 Dec 2023 14:01:38 +0000 (15:01 +0100)] 
src/daemon/metric.h: Add doc comment for the `unit` field.

17 months agosrc/daemon/plugin.c: Automatically determine the unit if possible.
Florian Forster [Sun, 17 Dec 2023 13:04:48 +0000 (14:04 +0100)] 
src/daemon/plugin.c: Automatically determine the unit if possible.

17 months agosrc/daemon/unit.[ch]: Add utility for determining the unit.
Florian Forster [Sun, 17 Dec 2023 12:47:44 +0000 (13:47 +0100)] 
src/daemon/unit.[ch]: Add utility for determining the unit.

17 months agosrc/daemon/metric.[ch]: Add `unit` to `metric_family_t`.
Florian Forster [Sun, 17 Dec 2023 12:20:28 +0000 (13:20 +0100)] 
src/daemon/metric.[ch]: Add `unit` to `metric_family_t`.

17 months agoMerge pull request #4212 from octo/6/names
Florian Forster [Thu, 28 Dec 2023 19:39:36 +0000 (20:39 +0100)] 
Merge pull request #4212 from octo/6/names

[collectd 6] Allow arbitrary UTF-8 strings as label names.

17 months agoMakefile.am: Fix inconsistent indentation. 4212/head
Florian Forster [Thu, 28 Dec 2023 19:25:04 +0000 (20:25 +0100)] 
Makefile.am: Fix inconsistent indentation.

17 months agoMerge branch 'collectd-6.0' into 6/names
Florian Forster [Thu, 28 Dec 2023 19:23:33 +0000 (20:23 +0100)] 
Merge branch 'collectd-6.0' into 6/names

17 months agoMerge pull request #4213 from octo/6/write_prometheus
Florian Forster [Thu, 28 Dec 2023 19:20:12 +0000 (20:20 +0100)] 
Merge pull request #4213 from octo/6/write_prometheus

[collectd 6] Improve Write Prometheus' handling of resource attributes.

17 months agowrite_prometheus plugin: Emit a single `target_info` metric family. 4213/head
Florian Forster [Tue, 26 Dec 2023 07:27:43 +0000 (08:27 +0100)] 
write_prometheus plugin: Emit a single `target_info` metric family.

With this change, the *write_promtheus plugin* will emit a single
`target_info` metric family with one metric per resource.

17 months agowrite_prometheus plugin: Insert a newline between metric families.
Florian Forster [Tue, 26 Dec 2023 07:14:39 +0000 (08:14 +0100)] 
write_prometheus plugin: Insert a newline between metric families.

17 months agoresource_metrics: Compile into a library.
Florian Forster [Mon, 25 Dec 2023 20:47:17 +0000 (21:47 +0100)] 
resource_metrics: Compile into a library.

17 months agoresource_metrics: Fix an incorrect pointer type.
Florian Forster [Sun, 24 Dec 2023 20:44:59 +0000 (21:44 +0100)] 
resource_metrics: Fix an incorrect pointer type.

It's only ever used for a NULL comparison, so it doesn't really matter,
but it is unnecessarily confusing to use an incorrect type.

17 months agowrite_prometheus plugin: Emit the "target info" label as a gauge by default.
Florian Forster [Mon, 25 Dec 2023 22:00:18 +0000 (23:00 +0100)] 
write_prometheus plugin: Emit the "target info" label as a gauge by default.

Prometheus doesn't know the "info" type metrics that OpenMetrics talks
about. Instead, is has a *convention* of using a gauge metric named
"target_info".

17 months agowrite_prometheus plugin: Improve label sanitation.
Florian Forster [Sat, 23 Dec 2023 19:27:44 +0000 (20:27 +0100)] 
write_prometheus plugin: Improve label sanitation.

This copies the behavior of the OpenTelemetry Prometheus translator:

1.  Replace all invalid characters with underscores.
2.  If the name starts with a single underscore, add the prefix `key`.
3.  If the name stars with a digit, add the prefix `key_`.

17 months agosrc/daemon/metric.[ch]: Export `label_set_get` and `label_set_update`.
Florian Forster [Sat, 23 Dec 2023 19:30:05 +0000 (20:30 +0100)] 
src/daemon/metric.[ch]: Export `label_set_get` and `label_set_update`.

17 months agowrite_prometheus plugin: Improve metric family name generation.
Florian Forster [Sat, 23 Dec 2023 14:51:00 +0000 (15:51 +0100)] 
write_prometheus plugin: Improve metric family name generation.

17 months agowrite_prometheus plugin: Emit resource attributes only, if they differ from the default.
Florian Forster [Fri, 22 Dec 2023 22:44:09 +0000 (23:44 +0100)] 
write_prometheus plugin: Emit resource attributes only, if they differ from the default.

17 months agowrite_prometheus plugin: Translate between resource attributes and target labels.
Florian Forster [Fri, 22 Dec 2023 22:39:58 +0000 (23:39 +0100)] 
write_prometheus plugin: Translate between resource attributes and target labels.

* `service.name` → `job`
* `service.instance.id` → `instance`

17 months agowrite_prometheus plugin: Emit special a "target info" metric.
Florian Forster [Fri, 22 Dec 2023 22:18:01 +0000 (23:18 +0100)] 
write_prometheus plugin: Emit special a "target info" metric.

17 months agosrc/daemon/metric_test.c: Add invalid inputs for `metric_parse_identity`.
Florian Forster [Thu, 28 Dec 2023 08:51:47 +0000 (09:51 +0100)] 
src/daemon/metric_test.c: Add invalid inputs for `metric_parse_identity`.

17 months agosrc/daemon/metric.c: Allow arbitrary UTF-8 strings are label name.
Florian Forster [Fri, 22 Dec 2023 21:12:53 +0000 (22:12 +0100)] 
src/daemon/metric.c: Allow arbitrary UTF-8 strings are label name.

17 months agosrc/daemon/metric_test.c: Add test for `metric_parse_identity`.
Florian Forster [Fri, 22 Dec 2023 16:18:22 +0000 (17:18 +0100)] 
src/daemon/metric_test.c: Add test for `metric_parse_identity`.

17 months agoutf8: Handle `NULL` inputs gracefully.
Florian Forster [Fri, 22 Dec 2023 14:44:56 +0000 (15:44 +0100)] 
utf8: Handle `NULL` inputs gracefully.

17 months agoutf8: Make `decode` idempotent by returning the new state.
Florian Forster [Fri, 22 Dec 2023 14:37:57 +0000 (15:37 +0100)] 
utf8: Make `decode` idempotent by returning the new state.

17 months agoutf8: Remove the unused `codep` argument.
Florian Forster [Fri, 22 Dec 2023 14:35:09 +0000 (15:35 +0100)] 
utf8: Remove the unused `codep` argument.

17 months agoutf8: Iterate over the input string using a for loop.
Florian Forster [Fri, 22 Dec 2023 14:33:00 +0000 (15:33 +0100)] 
utf8: Iterate over the input string using a for loop.

This is arguably easier to read.

17 months agoutf8: Make `decode` a void function -- its return value is always ignored.
Florian Forster [Fri, 22 Dec 2023 14:32:30 +0000 (15:32 +0100)] 
utf8: Make `decode` a void function -- its return value is always ignored.

17 months agoutf8: Change return value to `bool`.
Florian Forster [Fri, 22 Dec 2023 14:26:53 +0000 (15:26 +0100)] 
utf8: Change return value to `bool`.

17 months agoutf8: Change argument from `uint8_t *` to `char const *`.
Florian Forster [Fri, 22 Dec 2023 14:26:11 +0000 (15:26 +0100)] 
utf8: Change argument from `uint8_t *` to `char const *`.

17 months agoutf8: Rename `IsUTF8` to `utf8_valid` to match collectd's naming schema.
Florian Forster [Fri, 22 Dec 2023 14:23:21 +0000 (15:23 +0100)] 
utf8: Rename `IsUTF8` to `utf8_valid` to match collectd's naming schema.

17 months agoutf8: Add unit test.
Florian Forster [Fri, 22 Dec 2023 14:21:21 +0000 (15:21 +0100)] 
utf8: Add unit test.

17 months agoutf8: Add a header file.
Florian Forster [Fri, 22 Dec 2023 13:41:44 +0000 (14:41 +0100)] 
utf8: Add a header file.

17 months agoutf8: Make utility build.
Florian Forster [Fri, 22 Dec 2023 13:38:28 +0000 (14:38 +0100)] 
utf8: Make utility build.

*   Import `"collectd.h"` for `<stdint.h>`.
*   Make `decode` static, otherwise GCC complains about it reading from a
    static variable.

17 months agocontrib/format.sh src/utils/utf8/utf8.c
Florian Forster [Fri, 22 Dec 2023 13:20:55 +0000 (14:20 +0100)] 
contrib/format.sh src/utils/utf8/utf8.c

17 months agoutf8: Import code from http://bjoern.hoehrmann.de/utf-8/decoder/dfa/.
Florian Forster [Fri, 22 Dec 2023 13:04:46 +0000 (14:04 +0100)] 
utf8: Import code from http://bjoern.hoehrmann.de/utf-8/decoder/dfa/.

Co-authored-by: Bjoern Hoehrmann <bjoern@hoehrmann.de>
17 months agoMerge pull request #4214 from octo/label_set_delete
Florian Forster [Thu, 28 Dec 2023 08:40:12 +0000 (09:40 +0100)] 
Merge pull request #4214 from octo/label_set_delete

[collectd 6] src/daemon/metric.c: Fix memory corruption in `label_set_delete`.

17 months agosrc/daemon/metric.[ch]: Export `label_set_format`. 4214/head
Florian Forster [Thu, 28 Dec 2023 08:32:00 +0000 (09:32 +0100)] 
src/daemon/metric.[ch]: Export `label_set_format`.

This is now also used in the metric test, replacing the custom
implementation there.

17 months agosrc/daemon/metric.c: Fix memory corruption in `label_set_delete`.
Florian Forster [Mon, 25 Dec 2023 21:57:10 +0000 (22:57 +0100)] 
src/daemon/metric.c: Fix memory corruption in `label_set_delete`.

The size parameter passed to `memmove` was in number of pairs, not bytes.

17 months agosrc/daemon/metric_test.c: Test the integrity of `metric_label_set`.
Florian Forster [Tue, 26 Dec 2023 17:50:07 +0000 (18:50 +0100)] 
src/daemon/metric_test.c: Test the integrity of `metric_label_set`.

The previous test only checked whether the added/removed value could be
retrieved. Also verify that the remainder of the label set is intact.

17 months agoMerge pull request #4199 from octo/6/resource
Florian Forster [Thu, 28 Dec 2023 08:12:37 +0000 (09:12 +0100)] 
Merge pull request #4199 from octo/6/resource

[collectd 6] Add an option to configure resource attributes.

17 months agosrc/daemon/resource.c: Allow default resource attributes to be empty. 4199/head
Florian Forster [Fri, 22 Dec 2023 07:13:22 +0000 (08:13 +0100)] 
src/daemon/resource.c: Allow default resource attributes to be empty.

To achieve this, track whether or not the struct has been initialized
separately, so that users can remove all the attributes if they wish.

17 months agosrc/collectd.conf.pod: Describe "resources" in more detail.
Florian Forster [Fri, 22 Dec 2023 07:08:44 +0000 (08:08 +0100)] 
src/collectd.conf.pod: Describe "resources" in more detail.

17 months agolibplugin_mock: Add `src/daemon/resource.[ch]`.
Florian Forster [Tue, 19 Dec 2023 13:51:13 +0000 (14:51 +0100)] 
libplugin_mock: Add `src/daemon/resource.[ch]`.

Since `configfile` now refers to `resource`, this needs to be linked into
tests.

17 months agoconfigfile: Avoid allocating a buffer for the resource type.
Florian Forster [Tue, 19 Dec 2023 13:18:30 +0000 (14:18 +0100)] 
configfile: Avoid allocating a buffer for the resource type.

Mostly to avoid an uninformed compiler warning ;)

17 months agoresource: Add an option to configure resource attributes.
Florian Forster [Tue, 19 Dec 2023 13:04:44 +0000 (14:04 +0100)] 
resource: Add an option to configure resource attributes.

17 months agoMerge pull request #4208 from octo/6/built-plugins
Florian Forster [Wed, 27 Dec 2023 14:20:21 +0000 (15:20 +0100)] 
Merge pull request #4208 from octo/6/built-plugins

.cirrus.yml: Provide expected plugin list to `check-built-plugins.sh` if present.

17 months ago.expected-plugins/debian_unstable: Import expected plugins list. 4208/head
Florian Forster [Thu, 21 Dec 2023 19:02:12 +0000 (20:02 +0100)] 
.expected-plugins/debian_unstable: Import expected plugins list.

17 months ago.expected-plugins/fedora_main: 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.

17 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".

17 months ago.expected-plugins/fedora38: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 16:21:22 +0000 (17:21 +0100)] 
.expected-plugins/fedora38: Import expected plugins list.

17 months ago.expected-plugins/ubuntu20.04: 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.

17 months ago.expected-plugins/ubuntu22.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.

17 months ago.expected-plugins/debian10: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 16:16:42 +0000 (17:16 +0100)] 
.expected-plugins/debian10: Import expected plugins list.

17 months ago.expected-plugins/debian11: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 16:15:15 +0000 (17:15 +0100)] 
.expected-plugins/debian11: Import expected plugins list.

17 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.

17 months ago.expected-plugins/centos9: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 13:52:25 +0000 (14:52 +0100)] 
.expected-plugins/centos9: Import expected plugins list.

17 months ago.expected-plugins/fedora39: Import expected plugin list.
Florian Forster [Thu, 21 Dec 2023 13:49:26 +0000 (14:49 +0100)] 
.expected-plugins/fedora39: Import expected plugin list.

17 months ago.expected-plugins/ubuntu23.10: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 12:48:55 +0000 (13:48 +0100)] 
.expected-plugins/ubuntu23.10: Import expected plugins list.

17 months ago.expected-plugins/debian12: Import expected plugins list.
Florian Forster [Thu, 21 Dec 2023 13:34:13 +0000 (14:34 +0100)] 
.expected-plugins/debian12: Import expected plugins list.

17 months ago.expected-plugins: Add empty files for all distros.
Florian Forster [Thu, 21 Dec 2023 13:40:01 +0000 (14:40 +0100)] 
.expected-plugins: Add empty files for all distros.

17 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.

17 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

17 months ago.github/workflows/distcheck.yml: Run on Debian12 (current stable).
Florian Forster [Thu, 21 Dec 2023 13:06:02 +0000 (14:06 +0100)] 
.github/workflows/distcheck.yml: Run on Debian12 (current stable).

17 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

17 months agoMerge pull request #4210 from eero-t/min-mem-fix
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

17 months agogpu_sysman: fix minimum memory usage calculation 4210/head
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>
17 months agoMerge pull request #4206 from octo/6/write_prometheus
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.

17 months agocontrib/format.sh src/utils/strbuf/strbuf.c 4206/head
Florian Forster [Thu, 21 Dec 2023 17:26:52 +0000 (18:26 +0100)] 
contrib/format.sh src/utils/strbuf/strbuf.c

17 months agosrc/utils/strbuf/strbuf.c: Remove unused left-over code.
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>
17 months agostrbuf: Rewrite `strbuf_print_restricted` using a bitmap.
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.

17 months ago./contrib/format.sh src/utils/strbuf/strbuf.c
Florian Forster [Thu, 21 Dec 2023 10:59:52 +0000 (11:59 +0100)] 
./contrib/format.sh src/utils/strbuf/strbuf.c

17 months agowrite_prometheus plugin: Replace invalid characters in names.
Florian Forster [Thu, 21 Dec 2023 10:52:25 +0000 (11:52 +0100)] 
write_prometheus plugin: Replace invalid characters in names.

17 months agowrite_prometheus plugin: Add two more simple unit test cases.
Florian Forster [Thu, 21 Dec 2023 09:53:07 +0000 (10:53 +0100)] 
write_prometheus plugin: Add two more simple unit test cases.

17 months agowrite_prometheus plugin: Add an initial (i.e. very simple) unit test.
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.

17 months agowrite_prometheus plugin: Break out formatting of a single metric family.
Florian Forster [Thu, 21 Dec 2023 09:15:59 +0000 (10:15 +0100)] 
write_prometheus plugin: Break out formatting of a single metric family.

17 months agoconfigure: Report why the *write_prometheus plugin* is disabled.
Florian Forster [Thu, 21 Dec 2023 09:15:27 +0000 (10:15 +0100)] 
configure: Report why the *write_prometheus plugin* is disabled.

17 months agostrbuf: Add `strbuf_print_restricted`.
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.

17 months agoMerge pull request #4207 from octo/6/makefile_am
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`.

17 months agoMakefile.am: Add `src/daemon/{configfile,types_list}.c to `libplugin_mock` 4207/head
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.

17 months agoMakefile.am: Link `libmetric` and `liboconfig` into `libplugin_mock`.
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.

17 months agoMerge pull request #4201 from octo/6/ci
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.

17 months ago.github/workflows/build.yml: Remove Ubuntu Bionic. 4201/head
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`.

17 months agoMerge pull request #4203 from octo/6/cpu_sysman
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.

17 months agogpu_sysman plugin: Fix double reporting of metric. 4203/head
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
17 months agoMerge pull request #4197 from octo/6/legacy_support
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.

17 months agovalue_list: Simplify the control flow when setting metric labels. 4197/head
Florian Forster [Tue, 19 Dec 2023 22:35:00 +0000 (23:35 +0100)] 
value_list: Simplify the control flow when setting metric labels.

17 months agovalue_list: Simplify by adding separating "." in the first `strbuf_print()` call.
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>
17 months ago./contrib/format.sh src/utils/common/*.[ch]
Florian Forster [Mon, 18 Dec 2023 23:15:45 +0000 (00:15 +0100)] 
./contrib/format.sh src/utils/common/*.[ch]

17 months agovalue_list: Add special handling for "utilization" and "io" metrics.
Florian Forster [Mon, 18 Dec 2023 10:30:33 +0000 (11:30 +0100)] 
value_list: Add special handling for "utilization" and "io" metrics.

17 months agocommon: Add `string_has_suffix`.
Florian Forster [Mon, 18 Dec 2023 10:26:48 +0000 (11:26 +0100)] 
common: Add `string_has_suffix`.