fix last change
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-sar-perf?expand=0&rev=24
This commit is contained in:
parent
2be02b9d41
commit
1f718b7799
16
check_iostat
16
check_iostat
@ -171,46 +171,46 @@ close (IOSTAT);
|
|||||||
|
|
||||||
my $msg = "OK";
|
my $msg = "OK";
|
||||||
my $status = 0;
|
my $status = 0;
|
||||||
my @reasons;
|
my %reasons;
|
||||||
|
|
||||||
# Comparing the result and setting the correct level:
|
# Comparing the result and setting the correct level:
|
||||||
if ($tps >= $warn_tps || $kbread >= $warn_read || $kbwritten >= $warn_written) {
|
if ($tps >= $warn_tps || $kbread >= $warn_read || $kbwritten >= $warn_written) {
|
||||||
$msg = "WARNING";
|
$msg = "WARNING";
|
||||||
push @reasons, "throughput";
|
$reasons{'throughput'} = 1;
|
||||||
$status = 1;
|
$status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($warn_iowait && $iowait >= $warn_iowait) {
|
if ($warn_iowait && $iowait >= $warn_iowait) {
|
||||||
$msg = "WARNING";
|
$msg = "WARNING";
|
||||||
push @reasons, "iowait";
|
$reasons{'iowait'} = 1;
|
||||||
$status = 1;
|
$status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($warn_util && $util >= $warn_util) {
|
if ($warn_util && $util >= $warn_util) {
|
||||||
$msg = "WARNING";
|
$msg = "WARNING";
|
||||||
push @reasons, "util";
|
$reasons{'util'} = 1;
|
||||||
$status = 1;
|
$status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($tps >= $crit_tps || $kbread >= $crit_read || $kbwritten >= $crit_written) {
|
if ($tps >= $crit_tps || $kbread >= $crit_read || $kbwritten >= $crit_written) {
|
||||||
$msg = "CRITICAL";
|
$msg = "CRITICAL";
|
||||||
push @reasons, "throughput";
|
$reasons{'throughput'} = 2;
|
||||||
$status = 2;
|
$status = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($crit_iowait && $iowait >= $crit_iowait) {
|
if ($crit_iowait && $iowait >= $crit_iowait) {
|
||||||
$msg = "CRITICAL";
|
$msg = "CRITICAL";
|
||||||
push @reasons, "iowait";
|
$reasons{'iowait'} = 2;
|
||||||
$status = 2;
|
$status = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($crit_util && $util >= $crit_util) {
|
if ($crit_util && $util >= $crit_util) {
|
||||||
$msg = "CRITICAL";
|
$msg = "CRITICAL";
|
||||||
push @reasons, "util";
|
$reasons{'util'} = 2;
|
||||||
$status = 2;
|
$status = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
$msg .= " (".join(",",@reasons).")";
|
$msg .= " (".join(",",keys(%reasons)).")" if $status != 0;
|
||||||
|
|
||||||
my $p_tps = $tps;
|
my $p_tps = $tps;
|
||||||
if ($warn_tps) {
|
if ($warn_tps) {
|
||||||
|
Loading…
Reference in New Issue
Block a user