diff --git a/check_iostat b/check_iostat index 29de2f2..2aadb49 100644 --- a/check_iostat +++ b/check_iostat @@ -75,6 +75,12 @@ if (-d "$disk") { # directory specified ... my $mp = `stat --format '\%m' $disk`; chomp($mp); + my $fstype = `stat --file-system --format '\%T' $mp`; + chomp($fstype); + if ($fstype eq "tmpfs") { + print "OK - $disk (mountpoint $mp is tmpfs)\n"; + exit 0; + } open(MOUNTS,"/proc/mounts"); while() { chomp($_); diff --git a/monitoring-plugins-sar-perf.changes b/monitoring-plugins-sar-perf.changes index 1c1e701..e38a303 100644 --- a/monitoring-plugins-sar-perf.changes +++ b/monitoring-plugins-sar-perf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 5 16:34:19 CET 2019 - ro@suse.de + +- check_iostat: exit with OK if running on tmpfs +- check_iostat: fix apparmor profile to allow stat call + ------------------------------------------------------------------- Thu Dec 5 14:40:38 CET 2019 - ro@suse.de diff --git a/usr.lib.nagios.plugins.check_iostat b/usr.lib.nagios.plugins.check_iostat index ba35d84..3e02b7d 100644 --- a/usr.lib.nagios.plugins.check_iostat +++ b/usr.lib.nagios.plugins.check_iostat @@ -5,6 +5,7 @@ #include /usr/bin/iostat rix, /{usr/,}bin/bash rix, + /{usr/,}bin/stat rix, /usr/bin/which rix, /sys/devices/system/cpu/ r, /proc/meminfo r,