Skip to content

Commit

Permalink
in_node_exporter_metrics: fix referencing wrong interval
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 committed Oct 9, 2023
1 parent a397936 commit c5a1229
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 @@ -422,7 +422,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 @@ -442,7 +442,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 c5a1229

Please sign in to comment.