SV: Check that a process is running!

lennart.kvam at softronic.se lennart.kvam at softronic.se
Thu May 25 21:56:29 CEST 2006


That's IT:-) Tanks Marc!

Btw... That help I get when I do  check_procs --help is not evev cloes to what you get:-) 

Thanks!
//Lelle

-----Ursprungligt meddelande-----
Från: Marc Powell [mailto:marc at ena.com] 
Skickat: den 24 maj 2006 16:32
Till: nagios-users at lists.sourceforge.net
Kopia: Kvam Lennart
Ämne: RE: [Nagios-users] Check that a process is running!

Please always respond on-list so that others may benefit from your experience.

> -----Original Message-----
> From: lennart.kvam at softronic.se [mailto:lennart.kvam at softronic.se]
> Sent: Wednesday, May 24, 2006 2:35 AM
> To: Marc Powell
> Subject: SV: [Nagios-users] Check that a process is running!
> 
> Hi!
> 
> I cant get it to work:-(
> I have a process "qdaemon" that is very critical for us! That procs
must
> run...it has 2 instances running!
> 
> First, how do you tell nagios/check_procs to send a warning/critical
alarm
> when one or two dies?
> 
> I try
> ./check_nrpe -H 157.180.140.xxx -n -c check_procs -w2 -c3  -u root -C 
> qdaemon But still, it wont tell me if it dies, only if it starts more 
> than 2!
> 
> Sorry for my stupid question but my brain cant seems to get it:-)
> 
> Would be thankful if you can guide me at the right way!

>From check_procs --help --

Examples:
 check_procs -w 2:2 -c 2:1024 -C portsentry
   Warning if not two processes with command name portsentry. Critical
   if < 2 or > 1024 processes

So that's almost what you are looking for. It will warn if there not two processes named portsentry. You want that to go strait to critical instead and check for "qdaemon"  --

  check_procs -c 2:2 -C qdaemon

testing it (using different process names that match my testing
criteria) --

$ ./check_procs -c 2:2 -C sendmail
PROCS OK: 2 processes with command name 'sendmail'

$ ./check_procs -c 2:2 -C sendmailbad
PROCS CRITICAL: 0 processes with command name 'sendmailbad' 

$ ./check_procs -c 2:2 -C init
PROCS CRITICAL: 1 process with command name 'init'

$ ./check_procs -c 2:2 -C nsca
PROCS CRITICAL: 14 processes with command name 'nsca'

--
Marc


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list