Skip to content

Commit

Permalink
nvme_metrics: change nvmecli metric type to Info
Browse files Browse the repository at this point in the history
This is a breaking change, as it renames the metric nvme_nvmecli to
nvme_nvmecli_info.

Signed-off-by: Daniel Swarbrick <[email protected]>
  • Loading branch information
dswarbrick committed Nov 19, 2024
1 parent a2b43e1 commit e016bbb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions nvme_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@
"Device error log entry count",
["device"], namespace=namespace, registry=registry,
),
# FIXME: The "nvmecli" metric ought to be an Info type, not a Gauge. However, making this change
# will result in the metric having a "_info" suffix automatically appended, which is arguably
# a breaking change.
"nvmecli": Gauge(
"nvmecli": Info(
"nvmecli",
"nvme-cli tool information",
["version"], namespace=namespace, registry=registry,
Expand Down Expand Up @@ -159,7 +156,7 @@ def main():
cli_version = match.group(1)
else:
cli_version = "unknown"
metrics["nvmecli"].labels(cli_version).set(1)
metrics["nvmecli"].labels(cli_version)

device_list = exec_nvme_json("list")

Expand Down

0 comments on commit e016bbb

Please sign in to comment.