Skip to content

Commit e016bbb

Browse files
committed
nvme_metrics: change nvmecli metric type to Info
This is a breaking change, as it renames the metric nvme_nvmecli to nvme_nvmecli_info. Signed-off-by: Daniel Swarbrick <[email protected]>
1 parent a2b43e1 commit e016bbb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Diff for: nvme_metrics.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@
7474
"Device error log entry count",
7575
["device"], namespace=namespace, registry=registry,
7676
),
77-
# FIXME: The "nvmecli" metric ought to be an Info type, not a Gauge. However, making this change
78-
# will result in the metric having a "_info" suffix automatically appended, which is arguably
79-
# a breaking change.
80-
"nvmecli": Gauge(
77+
"nvmecli": Info(
8178
"nvmecli",
8279
"nvme-cli tool information",
8380
["version"], namespace=namespace, registry=registry,
@@ -159,7 +156,7 @@ def main():
159156
cli_version = match.group(1)
160157
else:
161158
cli_version = "unknown"
162-
metrics["nvmecli"].labels(cli_version).set(1)
159+
metrics["nvmecli"].labels(cli_version)
163160

164161
device_list = exec_nvme_json("list")
165162

0 commit comments

Comments
 (0)