Accepting request 786621 from server:monitoring

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/786621
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/monitoring-plugins-sar-perf?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2020-03-20 22:58:33 +00:00 committed by Git OBS Bridge
commit c01d7b5735
3 changed files with 16 additions and 8 deletions

View File

@ -171,46 +171,46 @@ close (IOSTAT);
my $msg = "OK";
my $status = 0;
my @reasons;
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";
$reasons{'throughput'} = 1;
$status = 1;
}
if ($warn_iowait && $iowait >= $warn_iowait) {
$msg = "WARNING";
push @reasons, "iowait";
$reasons{'iowait'} = 1;
$status = 1;
}
if ($warn_util && $util >= $warn_util) {
$msg = "WARNING";
push @reasons, "util";
$reasons{'util'} = 1;
$status = 1;
}
if ($tps >= $crit_tps || $kbread >= $crit_read || $kbwritten >= $crit_written) {
$msg = "CRITICAL";
push @reasons, "throughput";
$reasons{'throughput'} = 2;
$status = 2;
}
if ($crit_iowait && $iowait >= $crit_iowait) {
$msg = "CRITICAL";
push @reasons, "iowait";
$reasons{'iowait'} = 2;
$status = 2;
}
if ($crit_util && $util >= $crit_util) {
$msg = "CRITICAL";
push @reasons, "util";
$reasons{'util'} = 2;
$status = 2;
}
$msg .= " (".join(",",@reasons).")";
$msg .= " (".join(",",keys(%reasons)).")" if $status != 0;
my $p_tps = $tps;
if ($warn_tps) {

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 13 00:42:48 CET 2020 - ro@suse.de
- update apparmor profile usr.lib.nagios.plugins.check_iostat
to allow reading / and /proc/$pid/mountinfo
-------------------------------------------------------------------
Fri Feb 28 15:41:17 CET 2020 - ro@suse.de

View File

@ -10,8 +10,10 @@
/sys/devices/system/cpu/ r,
/proc/meminfo r,
@{PROC}/[0-9]*/mounts r,
@{PROC}/[0-9]*/mountinfo r,
/proc/diskstats r,
/proc/uptime r,
/ r,
/etc/sysstat/sysstat.ioconf r,
}