1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

temperature_: fix for F units

Closes #371
This commit is contained in:
Steve Schnepp 2013-09-04 18:18:15 +02:00
parent 538cdc9359
commit 211ec3afdb

View file

@ -79,10 +79,11 @@ if (defined $ARGV[0] and $ARGV[0] eq "config") {
} }
if ($response->content =~ /Temperature:\s*(.*)\s+F\s*\(\s*(.*)\s+C/) { if ($response->content =~ /Temperature:\s*(.*)\s+F\s*\(\s*(.*)\s+C/) {
my ($f, $c) = ($1, $2);
if ($unit =~ /F/) { if ($unit =~ /F/) {
print "temperature.value $1\n"; print "temperature.value $f\n";
} else { } else {
print "temperature.value $2\n"; print "temperature.value $c\n";
} }
} else { } else {
print "temperature.value U\n"; print "temperature.value U\n";