Page 2 of 2

Re: check_proc_age.sh not connecting to remote host

Posted: Thu Sep 12, 2013 8:05 pm
by wspackaging
Now worries on the rush reply. believe me I understand. Been there, Done that, got the T-shirt.
I'm going to give up for the night too.

here is where I'm at. I'm not getting the error:

[root@dc1ux086 ~]# /usr/local/nagios/libexec/check_nrpe -H 10.100.6.182 -c check_proc_age -a '-p java! -w 21600 -c 43200'
Missing argument
try \'/usr/local/nagios/libexec/check_proc_age.sh --help\' for help

I'm thinking back in Core I have the ARG# out of sync.

thanks for your help.

Re: check_proc_age.sh not connecting to remote host

Posted: Fri Sep 13, 2013 5:03 am
by wspackaging
I still am missing something.

CLIENT
tail /usr/local/nagios/etc/nrpe.cfg

# config file is set to '1'. This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.
#command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
#command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
# command[check_proc_age.sh]=/usr/local/nagios/libexec/check_proc_age.sh -p $ARG1$ -w $ARG2$ -c $ARG3$
# command[check_proc_age]=/usr/local/nagios/libexec/check_proc_age.sh -p $ARG1$ -w $ARG2$ -c $ARG3$
command[check_java]=/usr/local/nagios/libexec/check_proc_age.sh -p java!-w 21600 -c 43200

ls -l /usr/local/nagios/libexec/check_proc_age.sh
-rwxr-xr-x 1 root root 3119 Sep 12 16:12 /usr/local/nagios/libexec/check_proc_age.sh

Then I restart xinetd
/etc/init.d/xinetd restart

Nagios Server
# /usr/local/nagios/libexec/check_nrpe -H 10.100.6.182 -c check_java
Missing argument
try \'/usr/local/nagios/libexec/check_proc_age.sh --help\' for help

the -p -c -w are the only options in the check_proc_age.

Re: check_proc_age.sh not connecting to remote host

Posted: Fri Sep 13, 2013 5:34 am
by wspackaging
Solved!!!!

I removed the "!" from the nrpe.cfg entry.
Your Suggestion:
command[check_java]=/usr/local/nagios/libexec/check_proc_age.sh -p java!-w 21600 -c 43200

What I changed it too.
command[check_java]=/usr/local/nagios/libexec/check_proc_age.sh -p java -w 21600 -c 43200

Working as designed now.

thanks you for your help.

-pete