Generic Nagios plugin to check if a specific process/service is running?
I use the standard NAGIOS
check_procs plugin, with the
-C flag, shown here being invoked from
nrpe.cfg via NRPE:
command[check_spamd]=/usr/lib/nagios/plugins/check_procs -c 1: -w 3: -C spamd
which will WARN if it doesn't find at least three processes with the executable name (not counting path)
spamd, and which will CRIT if it doesn't find at least one.
I am using this script to check various running processes. You can edit these two lines:
to change the red (critical) processes and yellow (warning) processes.
Also, this script checks for open ports (listening state). You can edit the line:
I even modified the script myself by defining a new variables
UDP_PORTLIST to check for UDP sockets.
The "check_procs" plugin is what you want, it is available on