IMHO this is over-thinking the issue..I already identified the problem (the fan under the router)...I'm just looking at continued temp reports that show if I am over nominal operating range.
the original answer does everything I want it to do...(obviously if you want to submit your own fix as an addendum (with your reasons why this is better) then I would appreciate the input)
local function scrape()
thermal_metric = metric("thermal_zone", "gauge" )
local fd = io.popen("find /sys/class/thermal/*/ -name temp")
local lines = fd:read("*all")
fd:close()
-- Report thermal per zone
for line in lines:gmatch("([^\r\n]*)[\r\n]") do
if line then
local zone = string.match(line, "zone%d+")
local temp = string.gsub(get_contents(line), "n", "")
local labels = { zone = zone }
thermal_metric(labels, temp)
end
end
end
return { scrape = scrape }