From: Florian Forster Date: Sun, 17 Dec 2023 13:04:48 +0000 (+0100) Subject: src/daemon/plugin.c: Automatically determine the unit if possible. X-Git-Tag: 6.0.0-rc0~21^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9046d05d2c0e3a85da549fe4f40c285acc0d58bf;p=thirdparty%2Fcollectd.git src/daemon/plugin.c: Automatically determine the unit if possible. --- diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index a4d9f06d0..72ff57137 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -36,6 +36,7 @@ #include "filter_chain.h" #include "plugin.h" #include "resource.h" +#include "unit.h" #include "utils/avltree/avltree.h" #include "utils/common/common.h" #include "utils/heap/heap.h" @@ -2109,6 +2110,7 @@ EXPORT int plugin_dispatch_metric_family(metric_family_t const *fam) { } set_default_resource_attributes(fam_copy); + fam_copy->unit = default_unit(fam_copy); cdtime_t time = cdtime(); cdtime_t interval = plugin_get_interval();