Am 19.10.2011 um 07:38 schrieb Alex: > Hi,
Hi Alex > I need to monitor the clamd.amavisd binary, but having difficulty with > the check_procs command. When using the following check_procs, it > isn't able to identify any running processes: > > # /usr/lib64/nagios/plugins/check_procs -w 1: -c 1: -C clamd.amavisd -u amavis > PROCS CRITICAL: 0 processes with command name 'clamd.amavisd', UID = > 496 (amavis) append -vv to your check_procs call to get more infos about the internals. > However, the process is there: > > # ps ax|grep clam > 1066 ? Ssl 1:13 clamd.amavisd -c /etc/clamd.d/amavisd.conf > --pid /var/run/clamd.amavisd/clamd.pid > > If I change the check_procs to just look for "clamd", it matches, but > it also matches clamdscan, which also runs periodically, and I don't > want it to do that. > > Do you have any suggestions for what the problem may be? Is it because > of the dot between clamd.amavisd? Example: OMD[gearman]:~$ ps -ef | grep amavis gearman 848 32594 0 08:03 pts/1 00:00:00 grep amavis amavis 1571 1 0 Sep09 ? 00:00:39 amavisd (master) amavis 2408 1571 0 Oct18 ? 00:00:09 amavisd (ch15-avail) amavis 31143 1571 0 Oct18 ? 00:00:10 amavisd (ch16-avail) Ahh a amavisd process! OMD[gearman]:~$ ./lib/nagios/plugins/check_procs -C amavisd PROCS OK: 0 processes with command name 'amavisd' WTF? No amavisd Process? So lets be more verbose ... OMD[gearman]:~$ ./lib/nagios/plugins/check_procs -C amavisd -vvv |head -n1 CMD: /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args' Ahh check_procs use other ps option! OMD[gearman]:~$ /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args' | grep amavis Ss 106 1571 1 207404 10208 0.0 amavisd-new amavisd (master) S+ 999 1938 32594 9928 844 0.0 grep grep amavis S 106 2408 1571 213380 61968 0.0 amavisd-new amavisd (ch15-avail) S 106 31143 1571 212216 60476 0.0 amavisd-new amavisd (ch16-avail) So the process name is amavisd-new and not just amavis! Lets call check_procs again OMD[gearman]:~$ ./lib/nagios/plugins/check_procs -C amavisd-new PROCS OK: 3 processes with command name 'amavisd-new' Much better! HTH Joerg Joerg ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null