From 7f1877f760a5ecdd0356010dd14c7606d44abfb0 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Sat, 30 Aug 2025 14:18:42 +0200 Subject: check_snmp: Fix number processing (offset + multiplier) --- plugins/check_snmp.d/check_snmp_helpers.c | 2 ++ plugins/check_snmp.d/config.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'plugins/check_snmp.d') diff --git a/plugins/check_snmp.d/check_snmp_helpers.c b/plugins/check_snmp.d/check_snmp_helpers.c index 7725cc18..8f4bcb9c 100644 --- a/plugins/check_snmp.d/check_snmp_helpers.c +++ b/plugins/check_snmp.d/check_snmp_helpers.c @@ -97,7 +97,9 @@ check_snmp_config check_snmp_config_init() { .string_cmp_value = "", .multiplier = 1.0, + .multiplier_set = false, .offset = 0, + .offset_set = false, .use_perf_data_labels_from_input = false, }; diff --git a/plugins/check_snmp.d/config.h b/plugins/check_snmp.d/config.h index e96dff5c..e68986e2 100644 --- a/plugins/check_snmp.d/config.h +++ b/plugins/check_snmp.d/config.h @@ -58,7 +58,9 @@ typedef struct check_snmp_config { // Modify data double multiplier; + bool multiplier_set; double offset; + bool offset_set; // Modify output bool use_perf_data_labels_from_input; -- cgit v1.2.3-74-g34f1