From 3ddf3aaa74330cfe33b8c35a3c9f114f4da490d9 Mon Sep 17 00:00:00 2001 From: Takahiro Yamashita Date: Tue, 17 Oct 2023 23:19:15 +0900 Subject: [PATCH] in_node_exporter_metrics: fix referencing wrong interval (#8019) Signed-off-by: Takahiro Yamashita --- plugins/in_node_exporter_metrics/ne.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/in_node_exporter_metrics/ne.c b/plugins/in_node_exporter_metrics/ne.c index 475422f3d0a..81d71384426 100644 --- a/plugins/in_node_exporter_metrics/ne.c +++ b/plugins/in_node_exporter_metrics/ne.c @@ -441,7 +441,7 @@ static int in_ne_init(struct flb_input_instance *in, if (ret == FLB_FALSE) { if (strncmp(entry->str, "cpufreq", 7) == 0) { - if (ctx->cpu_scrape_interval == 0) { + if (ctx->cpufreq_scrape_interval == 0) { flb_plg_debug(ctx->ins, "enabled metrics %s", entry->str); metric_idx = 0; } @@ -461,7 +461,7 @@ static int in_ne_init(struct flb_input_instance *in, ne_cpufreq_init(ctx); } else if (strncmp(entry->str, "cpu", 3) == 0) { - if (ctx->cpufreq_scrape_interval == 0) { + if (ctx->cpu_scrape_interval == 0) { flb_plg_debug(ctx->ins, "enabled metrics %s", entry->str); metric_idx = 1; }