Page 2 of 2

Re: Error: No handler for that command

Posted: Thu Jul 19, 2012 12:03 pm
by lce411
slansing wrote:Have you tried the SSL check yet? Just to make sure can you post what you have defined for the command in your nrpe.cfg?

Example:

Code: Select all

# COMMAND DEFINITIONS
# Command definitions that this daemon will run. Definitions
# are in the following format:
#
# command[<command_name>]=<command_line>
I've checked a number of config files but can't seem to find where you enable/disable SSL for Nagios. Which file is that in?

Here are the contents of the Commands section, of my nrpe.cfg file:
# COMMAND DEFINITIONS
# Command definitions that this daemon will run. Definitions
# are in the following format:
#
# command[<command_name>]=<command_line>
#
# When the daemon receives a request to return the results of <command_name>
# it will execute the command specified by the <command_line> argument.
#
# Unlike Nagios, the command line cannot contain macros - it must be
# typed exactly as it should be executed.
#
# Note: Any plugins that are used in the command lines must reside
# on the machine that this daemon is running on! The examples below
# assume that you have plugins installed in a /usr/local/nagios/libexec
# directory. Also note that you will have to modify the definitions below
# to match the argument format the plugins expect. Remember, these are
# examples only!


# The following examples use hardcoded command arguments...

command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200


# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# 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/lib64/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/lib64/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
command[check_procs]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

# MEMORY Check
# check_mem <WARN%> <CRIT%> = MEMORY at defined warning and critical use %.
command[check_mem]=/usr/local/nagios/libexec/check_mem.sh 85 95

command[check_swap]=/usr/lib64/nagios/plugins/check_swap -w 20 -c 10
command[check_syslog]=/usr/lib64/nagios/plugins/check_procs -w 1: -c :2 -s RSZDT -C syslog-ng
command[check_ntpd]=/usr/lib64/nagios/plugins/check_procs -w 1:1 -c 1: -p 1 -C ntpd

Re: Error: No handler for that command

Posted: Thu Jul 19, 2012 1:13 pm
by slansing
Okay here we are, give this little guy a shot:

Code: Select all

./check_nrpe -H IP -p PORT -t 20 -c checkCPU -a warn=80 crit=95
checkCPU is built into NSClient++.


There are also a few more at:

http://www.nsclient.org/nscp/wiki/CheckSystem/checkCPU

Re: Error: No handler for that command

Posted: Thu Jul 19, 2012 1:18 pm
by lce411
slansing wrote:Okay here we are, give this little guy a shot:

Code: Select all

./check_nrpe -H IP -p PORT -t 20 -c checkCPU -a warn=80 crit=95
checkCPU is built into NSClient++.


There are also a few more at:

http://www.nsclient.org/nscp/wiki/CheckSystem/checkCPU
This is the response I got:

[root@ustc-nagios libexec]# ./check_nrpe -H ustc-winmgmt -p 5666 -t 20 checkCPU -a warn=80 crit=95
I (0.3.9.328 2011-08-16) seem to be doing fine...

I tried the same command with -n (without SSL) and got: CHECK_NRPE: Error receiving data from daemon.

Re: Error: No handler for that command

Posted: Thu Jul 19, 2012 2:15 pm
by lce411
lce411 wrote:
slansing wrote:Okay here we are, give this little guy a shot:

Code: Select all

./check_nrpe -H IP -p PORT -t 20 -c checkCPU -a warn=80 crit=95
checkCPU is built into NSClient++.


There are also a few more at:

http://www.nsclient.org/nscp/wiki/CheckSystem/checkCPU
This is the response I got:

[root@ustc-nagios libexec]# ./check_nrpe -H ustc-winmgmt -p 5666 -t 20 checkCPU -a warn=80 crit=95
I (0.3.9.328 2011-08-16) seem to be doing fine...

I tried the same command with -n (without SSL) and got: CHECK_NRPE: Error receiving data from daemon.
slansing,

I was able to get the error to clear. I noticed the ini file had some extra lines in it that another server didn't have. Even though the same lines were un-commented, I decided to copy and past the working ini into the one I have been t/sing. Once I did that the errors started to clear. I don't know what the difference was, but it worked. Thanks for all your help

Re: Error: No handler for that command

Posted: Thu Jul 19, 2012 2:49 pm
by slansing
Hmm interesting, any possibility you could post those lines here in case someone has a similar issue? Glad you got it working!

Re: Error: No handler for that command

Posted: Fri Jul 20, 2012 11:40 am
by lce411
slansing wrote:Hmm interesting, any possibility you could post those lines here in case someone has a similar issue? Glad you got it working!
Well it seems I'm not out of the woods yet. Yesterday when errors on the checks cleared, the host name remained red. I could ping from the Windows server to the Nagios server, but not from the Nagios server to the Windows server. Obviously a firewall issue with ICMP, right? So I enabled ICMP from command line (netsh firewall set icmpsetting 8). That fixed the ping problem and the hostname turned green again, but now the checks are not working again. Any thoughts on what would have caused this latest issue?