Build precise queries to find exactly what you need
Press ESC to close
@[email protected]
Favorites0
Views
Projects0
Nice plugin. I added a check to paging statistics to check for major faults. diff follows. --- check_linux_stats.pl 2015-09-11 12:22:42.977785368 -0500 +++ check_linux_stats.pl.orig 2015-08-21 09:11:02.000000000 -0500 @@ -533,22 +533,21 @@ if(defined($stat->pgswstats)) { $status = "OK"; my $page = $stat->pgswstats; - my ($warn_in,$warn_out,$warn_flt) = split(/,/,$o_warning); - my ($crit_in,$crit_out,$crit_flt) = split(/,/,$o_critical); - if((($page->{pgpgin}>=$crit_in)&&($page->{pgpgout}>=$crit_out))||($page->{pgmajfault}>=$crit_flt)) { + my ($warn_in,$warn_out) = split(/,/,$o_warning); + my ($crit_in,$crit_out) = split(/,/,$o_critical); + if(($page->{pgpgin}>=$crit_in)||($page->{pgpgout}>=$crit_out)) { $status = "CRITICAL"; } - elsif((($page->{pgpgin}>=$warn_in)&&($page->{pgpgout}>=$warn_out))||($page->{pgmajfault}>=$warn_flt)) { + elsif(($page->{pgpgin}>=$warn_in)||($page->{pgpgout}>=$warn_out)) { $status = "WARNING"; } my $perfdata = "|" ."pgpgin=$page->{pgpgin};$warn_in;$crit_in;0 " ."pgpgout=$page->{pgpgout};$warn_out;$crit_out;0 " - ."pgmajfault=$page->{pgmajfault};$warn_flt;$crit_flt;0 " ."pswpin=$page->{pswpin} pswpout=$page->{pswpout}"; - print "Paging $status : in:$page->{pgpgin},out:$page->{pgpgout},flt:$page->{pgmajfault} $perfdata"; + print "Paging $status : in:$page->{pgpgin},out:$page->{pgpgout} $perfdata"; } else { print "No data"; @@ -627,7 +626,7 @@ Cpu usage : perl check_linux_stats.pl -C -w 90 -c 95 -s 5 Disk usage : perl check_linux_stats.pl -D -w 95 -c 100 -u % -p /tmp,/usr,/var Load average : perl check_linux_stats.pl -L -w 10,8,5 -c 20,18,15 - Paging statistics : perl check_linux_stats.pl -W -w 10,1000,1 -c 20,2000,20 -s 3 + Paging statistics : perl check_linux_stats.pl -W -w 10,1000 -c 20,2000 -s 3 Process statistics : perl check_linux_stats.pl -P -w 100 -c 200 I/O statistics on disk device : perl check_linux_stats.pl -I -w 10 -c 5 -p sda1,sda4,sda5,sda6 Network usage : perl check_linux_stats.pl -N -w 10000 -c 100000000 -p eth0
Reviewed 10 years ago