Questions about check_procs

Subhendu Ghosh sghosh at sghosh.org
Sun Apr 6 00:51:36 CEST 2003


On Fri, 4 Apr 2003, Jeff Lane wrote:

> Hello everyone...  I have a couple questions about check_procs.
> 
> First off, I have it set up as a remote check on a host using nrpe... 
> Now, nrpe seems to be working fine, and I DO get checks back, BUT I dont 
> get the correct information back...
> 
> For example:
> 
> [root at xwing libexec]# ./check_nrpe -H www.pinehurst.net -p 42374 -c 
> check_portsentry
> 
> CRITICAL - 77 processes running
> 
> Instead of giving me the total number of portsentry processes running, I 
> am getting the total number of all processes on the machine.
> 
> Heres how the command is set up in nrpe.cfg on the target machine:
> 
> command[check_portsentry]=/usr/local/nagios/libexec/check_procs -w 1: -c 
> :3 portsentry
> 

check_procs -h ---  you need to use the "-C portsentry" arg, without -C it 
checks for all processes

> I think the issue is in how I have the warning and critical flags set... 
> but not sure about that.
> 
> That leads me to the second question...  I need a different threshold... 
> I need a < or > threshold, instead of a > > threshold... In other words, 
> I want to get warnings if the number of processes for portsentry is 
> anything other than 2.
> 
> If one process dies, I want a critical warning, and if there are three 
> or more running processes, I want a warning notice.

check_procs -w 2:2 -c 2:1024 -C portsentry

The above will warn if 2<x<=1024, crit if x<2 or x>1024

picked 1024 as an arbitrary large number

> 
> Is that doable???Or at the very least, I want it to let me know if the 
> total ever falls below 2...
> 
> I can try setting warn and critical to 1, but that will give me a 
> warning every time because the good total (2) will always be greater 
> than the warning level (1).
> 
> I have looked at the help for check_procs but that doesnt seem to tell 
> me anything useful... so, does anyone have any ideas on how to do this??
> 
> Thanks
> Jeff
> 
> 
> 

-- 

-sg



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
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