Generic Nagios plugin to check if a specific process/service is running?

I see on http://exchange.nagios.org that there are not plugins to check if sendmail, xinetd, automount, ypserv, ypbind, mailscanner, mcafee, clamav, samba server, and openvpn are running.

Of course all these should be stable programs, but they are critical, so I would like to check if they are running.

Question

Does there exist a generic plugin to check for specific processes?


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:

PROCLIST_RED="sshd"
PROCLIST_YELLOW="syslogd"

to change the red (critical) processes and yellow (warning) processes.

Also, this script checks for open ports (listening state). You can edit the line:

PORTLIST="22"

I even modified the script myself by defining a new variables UDP_PORTLIST to check for UDP sockets.