diff options
-rwxr-xr-x | munin/snmp__supplies | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/munin/snmp__supplies b/munin/snmp__supplies index 9bfab87..f1976d7 100755 --- a/munin/snmp__supplies +++ b/munin/snmp__supplies @@ -104,8 +104,10 @@ if(defined $ARGV[0] and $ARGV[0] eq "config") { # Values if (keys(%supplies) > 0) { foreach my $supply (keys(%supplies)) { - printf "supply%s.value %.2f\n",$supply, - ($supplies{$supply}{level}/$supplies{$supply}{max})*100; + my $v = ($supplies{$supply}{max} == -2) ? + $supplies{$supply}{level} : # TOSHIBA e-STUDIO3510c + ($supplies{$supply}{level}/$supplies{$supply}{max})*100; # HP 3800 + printf "supply%s.value %.2f\n",$supply, $v; } } |