$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';
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) {