diff options
Diffstat (limited to 'roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts')
-rw-r--r-- | roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.j2 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.j2 b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.j2 index 1e769389..0ab806c9 100644 --- a/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.j2 +++ b/roles/monitoring/prometheus/exporter/node/templates/textfile-collector-scripts/sensors.j2 @@ -11,8 +11,13 @@ local units = { gpio = "status", } +local _typestring_printed = {} + local function metric(name, mtype, labels, value) - print("# TYPE " .. name .. " " .. mtype) + if nil == _typestring_printed[name] then + print("# TYPE " .. name .. " " .. mtype) + _typestring_printed[name] = 1 + end local label_string = "" if labels then |