Skip to content

Commit

Permalink
in_node_exporter_metrics: fix referencing wrong interval (#8019)
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 authored and leonardo-albertovich committed Nov 3, 2023
1 parent 2b27f02 commit cd7def9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/in_node_exporter_metrics/ne.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit cd7def9

Please sign in to comment.