Accepting request 782144 from server:monitoring

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/782144
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/monitoring-plugins-sar-perf?expand=0&rev=7
This commit is contained in:
Dominique Leuenberger 2020-03-06 20:29:11 +00:00 committed by Git OBS Bridge
commit b0cc8afdae
3 changed files with 16 additions and 1 deletions

View File

@ -171,38 +171,47 @@ close (IOSTAT);
my $msg = "OK";
my $status = 0;
my @reasons;
# Comparing the result and setting the correct level:
if ($tps >= $warn_tps || $kbread >= $warn_read || $kbwritten >= $warn_written) {
$msg = "WARNING";
push @reasons, "throughput";
$status = 1;
}
if ($warn_iowait && $iowait >= $warn_iowait) {
$msg = "WARNING";
push @reasons, "iowait";
$status = 1;
}
if ($warn_util && $util >= $warn_util) {
$msg = "WARNING";
push @reasons, "util";
$status = 1;
}
if ($tps >= $crit_tps || $kbread >= $crit_read || $kbwritten >= $crit_written) {
$msg = "CRITICAL";
push @reasons, "throughput";
$status = 2;
}
if ($crit_iowait && $iowait >= $crit_iowait) {
$msg = "CRITICAL";
push @reasons, "iowait";
$status = 2;
}
if ($crit_util && $util >= $crit_util) {
$msg = "CRITICAL";
push @reasons, "util";
$status = 2;
}
$msg .= " (".join(",",@reasons).")";
my $p_tps = $tps;
if ($warn_tps) {
$p_tps .= ";$warn_tps";

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 28 15:41:17 CET 2020 - ro@suse.de
- check_iostat: add reasons why state is warning or critical
to the output
-------------------------------------------------------------------
Wed Dec 11 18:10:48 CET 2019 - ro@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package monitoring-plugins-sar-perf
#
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed