Skip to content

Commit

Permalink
in_node_exporter_metrics: Align the collecting metrics of unit status…
Browse files Browse the repository at this point in the history
…es (#9134)

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored Aug 3, 2024
1 parent 3d4ad31 commit a6aac45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/in_node_exporter_metrics/ne_systemd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static int ne_systemd_update_unit_state(struct flb_ne *ctx)
}

for(index = 0 ; index < 5 ; index++) {
cmt_gauge_add(ctx->systemd_unit_state,
cmt_gauge_set(ctx->systemd_unit_state,
timestamp,
0,
3,
Expand All @@ -469,8 +469,9 @@ static int ne_systemd_update_unit_state(struct flb_ne *ctx)
});
}

cmt_gauge_inc(ctx->systemd_unit_state,
cmt_gauge_set(ctx->systemd_unit_state,
timestamp,
1,
3,
(char *[]){ unit.name,
unit.active_state,
Expand Down

0 comments on commit a6aac45

Please sign in to comment.