Skip to content

Commit

Permalink
in_node_exporter_metrics: Plug undefined value for netif name
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Oct 16, 2023
1 parent 9a20f0b commit a826eac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/in_node_exporter_metrics/ne_netdev_darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ static int netdev_update(struct flb_ne *ctx)

if (!if_indextoname(i, ifname)) {
flb_plg_debug(ctx->ins, "failed to if_index_toname for %d", i);
snprintf(ifname, IF_NAMESIZE, "(unknown %i)", i);
}

cmt_gauge_set(ctx->darwin_receive_packets, ts,
Expand Down

0 comments on commit a826eac

Please sign in to comment.