--auth-protocol md5 ./check_snmp_procs.pl --mode state \
--match ‘mysqld.+basedir:mysql’ \
--warning runnable,gt,30 --critical total,gt,100 \
--snmp-max-msg-size 50000
SNMP-PROCS WARNING - runnable (97 > 30) OK - invalid 0, notRunnable 0, running 1, total 98 | ‘invalid’=0;0;0 ‘notRunnable’=0;0;0 ‘runnable’=97;30;0 ‘running’=1;0;0 ‘total’=98;0;100
And the code for the script:
#!/usr/local/bin/perl
=pod
=head1 NAME
check_snmp_procs.pl - check process numbers by process state or by number of processes by process name
=head1 DESCRIPTION
This script allows you to check the process table on an SNMP agent that implements the HOST-RESOURCES-MIB. This script lets you monitor processes by process state or by number of processes running by process ...
Get Nagios 3 Enterprise Network Monitoring now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.