prometheus-node-exporter-lua: handle empty lines in all_sta output correctly
An empty line has a name and value that is nil and setting a table index to nil breaks metrics for every vif after the first one. Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
This commit is contained in:
parent
6d85547f24
commit
0a9d2b818d
|
@ -129,7 +129,9 @@ local function scrape()
|
|||
current_station_values = {}
|
||||
else
|
||||
local name, value = string.match(line, "(.+)=(.+)")
|
||||
current_station_values[name] = value
|
||||
if name ~= nil then
|
||||
current_station_values[name] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
labels.station = current_station
|
||||
|
|
Loading…
Reference in New Issue