Skip to content

Commit

Permalink
in_node_exporter_metrics: Suppress error log when NVMe is not mounted…
Browse files Browse the repository at this point in the history
… in the node

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Dec 12, 2023
1 parent e3dcc14 commit 11f31b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/in_node_exporter_metrics/ne_nvme_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ static int nvme_update(struct flb_ne *ctx)
.firmware_revision = ""
};

if (access(nvme_class_path, F_OK) == -1 &&
errno == ENOENT) {
flb_plg_debug(ctx->ins, "NVMe storage is not mounted");

return 0;
}

mk_list_init(&nvme_class_list);

ts = cfl_time_now();
Expand Down

0 comments on commit 11f31b6

Please sign in to comment.