change perfdata hardware ibmc huawei
This commit is contained in:
parent
a3636fdd3e
commit
590388ad26
|
@ -291,10 +291,13 @@ sub display {
|
||||||
$self->{components}->{$comp}->{total},
|
$self->{components}->{$comp}->{total},
|
||||||
$comp));
|
$comp));
|
||||||
}
|
}
|
||||||
$self->{output}->perfdata_add(label => 'count_' . $comp,
|
$self->{output}->perfdata_add(
|
||||||
value => $self->{components}->{$comp}->{total},
|
label => 'count_' . $comp,
|
||||||
warning => $warn,
|
nlabel => 'hardware.' . $comp . '.count',
|
||||||
critical => $crit);
|
value => $self->{components}->{$comp}->{total},
|
||||||
|
warning => $warn,
|
||||||
|
critical => $crit
|
||||||
|
);
|
||||||
push @{$exits}, $exit;
|
push @{$exits}, $exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,12 +77,15 @@ sub check {
|
||||||
}
|
}
|
||||||
my $perf_label = $result->{fanDevicename};
|
my $perf_label = $result->{fanDevicename};
|
||||||
$perf_label =~ s/ /_/g;
|
$perf_label =~ s/ /_/g;
|
||||||
$self->{output}->perfdata_add(label => 'speed_' . $perf_label, unit => 'rpm',
|
$self->{output}->perfdata_add(
|
||||||
value => $result->{fanSpeed},
|
label => 'speed', unit => 'rpm',
|
||||||
warning => $warn,
|
nlabel => 'hardware.fan.speed.rpm',
|
||||||
critical => $crit,
|
instances => $perf_label,
|
||||||
min => 0
|
value => $result->{fanSpeed},
|
||||||
);
|
warning => $warn,
|
||||||
|
critical => $crit,
|
||||||
|
min => 0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Fan '%s' status is '%s' [instance = %s]",
|
$self->{output}->output_add(long_msg => sprintf("Fan '%s' status is '%s' [instance = %s]",
|
||||||
|
@ -97,4 +100,4 @@ sub check {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -77,12 +77,15 @@ sub check {
|
||||||
}
|
}
|
||||||
my $perf_label = $result->{hardDiskDevicename};
|
my $perf_label = $result->{hardDiskDevicename};
|
||||||
$perf_label =~ s/ /_/g;
|
$perf_label =~ s/ /_/g;
|
||||||
$self->{output}->perfdata_add(label => 'temperature_' . $perf_label, unit => 'C',
|
$self->{output}->perfdata_add(
|
||||||
value => $result->{hardDiskTemperature},
|
label => 'temperature', unit => 'C',
|
||||||
warning => $warn,
|
nlabel => 'hardware.harddisk.temperature.celsius',
|
||||||
critical => $crit,
|
instances => $perf_label,
|
||||||
min => 0
|
value => $result->{hardDiskTemperature},
|
||||||
);
|
warning => $warn,
|
||||||
|
critical => $crit,
|
||||||
|
min => 0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Hard disk '%s' status is '%s' [instance = %s]",
|
$self->{output}->output_add(long_msg => sprintf("Hard disk '%s' status is '%s' [instance = %s]",
|
||||||
|
@ -97,4 +100,4 @@ sub check {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -60,12 +60,15 @@ sub check {
|
||||||
short_msg => sprintf("Temperature of '%s' is '%s' celsius degrees", $result->{temperatureObject}, $result->{temperatureReading} / 10));
|
short_msg => sprintf("Temperature of '%s' is '%s' celsius degrees", $result->{temperatureObject}, $result->{temperatureReading} / 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => 'temperature_' . $result->{temperatureObject}, unit => 'C',
|
$self->{output}->perfdata_add(
|
||||||
value => $result->{temperatureReading} / 10,
|
label => 'temperature', unit => 'C',
|
||||||
warning => $warn,
|
nlabel => 'hardware.temperature.celsius',
|
||||||
critical => $crit
|
instances => $result->{temperatureObject},
|
||||||
);
|
value => $result->{temperatureReading} / 10,
|
||||||
|
warning => $warn,
|
||||||
|
critical => $crit
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in New Issue