system: Add stderr.nl domain to resolv.conf.
[matthijs/servers/drsnuggles.git] / etc / munin / plugins / hpasmcli2_fans
index c768cb7a715e3e5c1863c42bdcebc156c405a5cd..75e6c0d1d460662d29e1d40e7a021295b343cb23 100755 (executable)
@@ -116,7 +116,7 @@ if (defined($show_target) and $show_target eq 'temp') {
         print "graph_info This graph shows the temperatures as reported by hpasmcli.\n";
         foreach my $key (sort keys %output) {
             print "temp$key.label $output{$key}->{'location'}\n";
-            print "temp$key.warning " . ($output{$key}->{'threshold'} * 0.75) . "\n";
+            print "temp$key.warning " . ($output{$key}->{'threshold'} * 0.80) . "\n";
             print "temp$key.critical $output{$key}->{'threshold'}\n";
         }
     } else {
@@ -131,6 +131,7 @@ if (defined($show_target) and $show_target eq 'temp') {
             $line =~ s/^\s//g;
             my ($fan, $loc, $present, $speed, $rate, $redundant, $partner, $pluggable) = split(/\s/, $line);
             next if ($present ne "Yes");
+            next if ($rate eq "N/A");
             $loc =~ s/\/|#//g;
             $rate =~ s/\%//g;
             my $threshold = '100';
@@ -150,8 +151,8 @@ if (defined($show_target) and $show_target eq 'temp') {
         print "graph_info This graph shows the info of fans as reported by hpasmcli.\n";
         foreach my $key (sort keys %output) {
             print "fan$key.label FAN$key $output{$key}->{'location'}\n";
-            print "fan$key.warning " . ($output{$key}->{'threshold'} * 0.75) . "\n";
-            print "fan$key.critical $output{$key}->{'threshold'}\n";
+            print "fan$key.warning " . ($output{$key}->{'threshold'} * 0.75) .  ":\n";
+            print "fan$key.critical " . ($output{$key}->{'threshold'} * 0.5) .  ":\n";
         }
     } else {
         foreach my $key (sort keys %output) {