summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-09-21 18:37:34 +0200
committerChristian Pointner <equinox@spreadspace.org>2023-09-21 18:37:34 +0200
commit67dbf646f686dac08419cad521a178a793be2c22 (patch)
tree8bacf331cb0fe01656427a3428f0ed3f148d3562 /roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j2
parentuacme: eab hmac key is most likely already encoded and doesn't need additiona... (diff)
fix smartctl text collector and add some alerts for nvme metrics
Diffstat (limited to 'roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j2')
-rw-r--r--roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j21
1 files changed, 1 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j2 b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j2
index c6bfba28..f564cc22 100644
--- a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j2
+++ b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j2
@@ -491,6 +491,7 @@ def collect_nvme_metrics(device):
attribute_lines = attributes.strip().split('\n')[6:]
for line in attribute_lines:
label, value = line.split(':')
+ value = value.replace(',', '')
if label == 'Available Spare':
metrics['available_spare_ratio'].labels(
device.base_labels["device"], device.base_labels["disk"]