From 67dbf646f686dac08419cad521a178a793be2c22 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 21 Sep 2023 18:37:34 +0200 Subject: fix smartctl text collector and add some alerts for nvme metrics --- .../exporter/node/templates/textfile-collector-scripts/smartmon.j2 | 1 + 1 file changed, 1 insertion(+) (limited to 'roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/smartmon.j2') 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"] -- cgit v1.2.3