How can I invoke remotely (through NRPE) check_procs?

Unai Rodriguez me at u-journal.org
Fri Nov 21 02:53:05 CET 2008


>>  ./check_nrpe -H 10.123.16.103 -c check_procs -a 100 -a 200
>> check_procs: Critical Process Count must be an integer!
>> Usage: check_procs -w <range> -c <range> [-m metric] [-s state] [-p
>> ppid] [-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
>>  [-C command] [-t timeout] [-v]
>>
>> The issue seems trivial, but I have not found the proper syntax yet.
>> Any ideas where could I get this information?
>  
> [-a argument-array] -> so, -a ARG1 ARG2 ARG3 .... 
> 
> don't repeat the -a flag and post the result
> 
> greetings, 
> 
> dani

Dear Dani,

-------------------------------------------------------------------------
./check_nrpe -H 10.123.16.103 -c check_procs -a 100 200
Usage: check_procs -w <range> -c <range> [-m metric] [-s state] [-p ppid]
 [-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
 [-C command] [-t timeout] [-v]
-------------------------------------------------------------------------
./check_nrpe -H 10.123.16.103 -c check_procs -a -a 100 200
check_procs: Warning Process Count must be an integer!
Usage: check_procs -w <range> -c <range> [-m metric] [-s state] [-p ppid]
 [-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
 [-C command] [-t timeout] [-v]
-------------------------------------------------------------------------
./check_nrpe -H 10.123.16.103 -c check_procs -a -w 100 -c 200
NRPE: Command '200' not defined
-------------------------------------------------------------------------
./check_nrpe -H 10.123.16.103 -c check_procs -a w 100 c 200
check_procs: Warning Process Count must be an integer!
Usage: check_procs -w <range> -c <range> [-m metric] [-s state] [-p ppid]
 [-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
 [-C command] [-t timeout] [-v]
-------------------------------------------------------------------------
./check_nrpe -H 10.123.16.103 -c check_procs -a w100 c200
check_procs: Warning Process Count must be an integer!
Usage: check_procs -w <range> -c <range> [-m metric] [-s state] [-p ppid]
 [-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
 [-C command] [-t timeout] [-v]
-------------------------------------------------------------------------
 ./check_nrpe -H 10.123.16.103 -c check_procs -a "w 100 c 200"
check_procs: Warning Process Count must be an integer!
Usage: check_procs -w <range> -c <range> [-m metric] [-s state] [-p ppid]
 [-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
 [-C command] [-t timeout] [-v]
-------------------------------------------------------------------------
./check_nrpe -H 10.123.16.103 -c check_procs -a "-w 100 -c 200"
check_procs: Warning Process Count must be an integer!
Usage: check_procs -w <range> -c <range> [-m metric] [-s state] [-p ppid]
 [-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
 [-C command] [-t timeout] [-v]
-------------------------------------------------------------------------

If I run the script locally on 10.123.16.103:


-------------------------------------------------------------------------
./check_procs
PROCS OK: 51 processes
-------------------------------------------------------------------------
./check_procs -w 100 -c 200
PROCS OK: 51 processes
-------------------------------------------------------------------------\

What I wanted to raise before (and it might not been stated clearly,
sorry...) is that it seems to be some sort of syntax mapping/difference
while calling a script through NRPE which I do not understand. It may also
been caused because there is something wrong with my system.

I do call other scripts using NRPE with no problems. E.g.:

(on the remote computer):
./check_nrpe -H 10.123.16.103 -c check_disk -a 2% 1% /dev/sda1
DISK OK - free space: / 2793 MB (76% inode=87%);| /=841MB;3752;3790;0;3829

(on the local computer 10.123.16.103) - syntax error:
./check_disk -a 2% 1% /dev/sda1
./check_disk: invalid option -- a
Unknown argument
Usage: check_disk -w limit -c limit [-W limit] [-K limit] {-p path | -x
device}
[-C] [-E] [-e] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]

(on the local computer 10.123.16.103) - good one:
./check_disk  -w 2% -c 1% /dev/sda1
DISK OK - free space: / 2793 MB (76% inode=87%);| /=841MB;3752;3790;0;3829

Also, I am not making use of the thresholds. I am invoking scripts remotely
using perl then parsing the output so I only get the actual value no the
threshold status (OK, WARNING, CRITICAL...) that is why the thresholds
posted do not make sense.

I did read about what LOAD means, etc. I am using NAGIOS as well to monitor
a number of servers (where I do use thresholds and they make sense) but I
want to re-use the NRPE approach since the NRPE daemon is already running
on all the machines I want to graph.

Thank you so much,
unai


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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