diff --git a/check_iostat b/check_iostat index 1b88c98..df08bc9 100644 --- a/check_iostat +++ b/check_iostat @@ -210,6 +210,12 @@ if ($crit_util && $util >= $crit_util) { $status = 2; } +if ($util == 100 && $kbread == 0 && $kbwritten == 0) { + $msg = "CRITICAL"; + $reasons{'stuck'} = 2; + $status = 2; +} + $msg .= " (".join(",",keys(%reasons)).")" if $status != 0; my $p_tps = $tps; diff --git a/monitoring-plugins-sar-perf.changes b/monitoring-plugins-sar-perf.changes index 479ecf5..80c696d 100644 --- a/monitoring-plugins-sar-perf.changes +++ b/monitoring-plugins-sar-perf.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 24 12:24:59 CEST 2024 - ro@suse.de + +- check_iostat: report as critical and as "stuck" if read and + write are at 0 and util is at 100 percent + ------------------------------------------------------------------- Fri Feb 23 08:37:18 UTC 2024 - pgajdos@suse.com diff --git a/monitoring-plugins-sar-perf.spec b/monitoring-plugins-sar-perf.spec index 6359d43..55e21f6 100644 --- a/monitoring-plugins-sar-perf.spec +++ b/monitoring-plugins-sar-perf.spec @@ -1,7 +1,7 @@ # # spec file for package monitoring-plugins-sar-perf # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,13 @@ Name: monitoring-plugins-sar-perf -Summary: Get performance data from sar +Summary: Get performance data from sar License: BSD-2-Clause Group: System/Monitoring Version: 0.1 Release: 0 -URL: https://github.com/nickanderson/check-sar-perf -Source0: nickanderson-check-sar-perf-4878d0c.tar.gz +URL: https://github.com/nickanderson/check-sar-perf +Source0: nickanderson-check-sar-perf-4878d0c.tar.gz Source1: check_iostat Source2: usr.lib.nagios.plugins.check_iostat Patch0: monitoring-plugins-sar-perf-output.patch @@ -53,7 +53,6 @@ check_sar_perf disk sda sar OK| DEV=sda tps=0.00 rd_sec/s=0.00 wr_sec/s=0.00 avgrq-sz=0.00 avgqu-sz=0.00 await=0.00 svctm=0.00 util=0.00 - %prep %autosetup -p0 -n nickanderson-check-sar-perf-4878d0c @@ -78,7 +77,7 @@ fi %clean rm -rf %{buildroot} -%files +%files %defattr(-,root,root) # avoid build dependecy of nagios - own the dirs %dir %{nagios_libdir}