Hi, Tom,
Thank you for your detailed configuration steps.
My configuration has no problem. I've verified that the "command not defined"
issue is caused by the incompatibility between the NRPE and Plugins running on
my remote client.
The version of NRPE is 2.8b1, which I downloaded from Nagios website and
compiled. When I ran "check_nrpe -H remote_client" on monitor host, it returns
the result of NRPE version of remote client. So the check_nrpe on monitor host
can talk to NRPE daemon on remote client properly.
But the plugins is the version 1.4, is the pre-compiled one which I directly
downloaded from internet, as I had problem on compiling nagios-plugins-1.4.8 on
my HP-UX box. While I compiled the package nagios-plugins-1.4.8, it's passed
the configure step, but failed at make with following error messages:
........
gcc -g -O2 -o check_swap check_swap.o utils.o popen.o
-L/tmp/nagios-plugins-1.4.8/plugins -L/opt/openssl/lib -lm
../lib/libnagiosplug.a ../gl/libgnu.a /usr/loc
al/lib/libintl.sl -L/usr/local/lib /usr/local/lib/libiconv.sl -lc -Wl,+b
-Wl,/usr/local/lib
/usr/ccs/bin/ld: Unsatisfied symbols:
floorf (code)
collect2: ld returned 1 exit status
gmake[2]: *** [check_swap] Error 1
gmake[2]: Leaving directory `/tmp/nagios-plugins-1.4.8/plugins'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/tmp/nagios-plugins-1.4.8'
gmake: *** [all] Error 2
...........
I even have problem to compile nrpe-2.8b1 on some other HP-UX boxes as well.
Does anybody have any experience on using Nagios on HP-UX platform and have any
idea on it? Thanks in advance.
Regards,
Yu Ting
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 02, 2007 5:48 PM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: RE: [Nagios-users] NRPE: Command 'check_swap' not defined
Ok Lets take it from the top.
1. About the software you have installed
1a. What OS are you using
1b. What version of Nagios and nagios Plugins are you using?
1c. What version of nrpe are you using?
1d. Is Nagios and the Plugins configured?
1e. If you run nagios -v ./nagios.cfg does it pass the pre-flight check?
1f. What user are you running the check_nrpe command as?
2. On remote nrpe box
2a. Is nrpe defined in /etc/services?
nrpe 5666/tcp Nagios Remote Plugin Executor
2b. Is nrpe defined in inetd/xinetd?
2c. Is nrpe listening to the port
Test_Server_1:~ # netstat -a |grep nrpe
tcp 0 0 *:nrpe *:*
LISTEN
2d. Can you telnet from the nagios host to the remote nrpe port?
[EMAIL PROTECTED]:~> telnet Test_Server_1 5666
Trying 132.146.185.160...
Connected to h12oiap.btvsu.net.
Escape character is '^]'
2e. Check the definition of check_swap in your nrpe.cfg file
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 30% -c 20%
If all off section 2 is working and you can telnet to the port then nrpe is
configured to listen correctly
3. Checking nagios install on local nagios monitoring host.
3a. Is nagios running?
3b. Does the nagios pre-flight check pass ok
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
---------<SNIP>--------
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight
check
---------<SNIP>--------
3c. Lets look at your /usr/local/nagios/etc/checkcommand.cfg file
Have you specified a check_load or as I like to define different local and
remote
commands check_nrpe_swap in the file above. If you haven't you will get an
error
like you are seeing.
# ' check swap space usage on remote systems
define command{
command_name check_nrpe_swap
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
I have run through the above and when I run the check_nrpe command on the
command line I get the following
[EMAIL PROTECTED]:/usr/local/nagios/libexec> ./check_nrpe -H Test_Server_1 -c
check_swap SWAP OK - 100% free (5137 MB out of 5137 MB)
|swap=5137MB;1541;1027;0;5137
And like an epiphany, I just read your post title, it looks like you need to
define the check swap in your checkcommands.cfg file first.
Hope this helps.
Tom
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 02 May 2007 10:24
To: Welsh,T,Tom,XSL4A C
Cc: [email protected]
Subject: RE: [Nagios-users] NRPE: Command 'check_swap' not defined
Hi,
No, I even can't run check_nrpe command successfully in command line.
Below is the running command and output:
-sh-3.00$ ./check_nrpe -H remote_client_name -c check_load
NRPE: Command 'check_load' not defined
I've turned on the debug in my remote client nrpe.cfg file but no message
outputs to my system log file at all - /var/adm/syslog/syslog.log. That's also
puzzle me. I'm using nrpe.cfg sample file to config and nrpe daemon is running
as below on the client.
nagios 14891 1 0 16:18:47 ? 0:00
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
Regards,
Yu Ting
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 02, 2007 5:01 PM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: RE: [Nagios-users] NRPE: Command 'check_swap' not defined
Hi
When you run the command manually does it work?
Here is what I get when I run my command
[EMAIL PROTECTED]:/usr/local/nagios/libexec> ./check_nrpe -H test_server_1 -c
check_load OK - load average: 1.09, 1.04, 1.01|load1=1.090;15.000;30.000;0;
load5=1.040;10.000;25.000;0; load15=1.010;5.000;20.000;0;
Can you run the command and post the output if you are still getting problems?
Have you turned on debugging on the nrpe.cfg file and looked at the output when
you have ran the command. This is very helpful diagnostic tool.
Here is the output from /var/log/messages with debug turned on in nrpe.cfg
May 2 09:59:34 h12oiap nrpe[4469]: Host is asking for command 'check_load' to
be run...
May 2 09:59:34 h12oiap nrpe[4469]: Running command:
/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 May 2
09:59:34 h12oiap nrpe[4469]: Command completed with return code 0 and
output: OK - load average: 0.17, 0.15, 0.10|load1=0.170;15.000;30.000;0;
load5=0.150;10.000;25.000;0; load15=0.100;5.000;20.000;0; May 2
09:59:34 h12oiap nrpe[4469]: Return Code: 0, Output: OK - load
average: 0.17, 0.15, 0.10|load1=0.170;15.000;30.000;0;
load5=0.150;10.000;25.000;0; load15=0.100;5.000;20.000;0;
What do you get when you run yours?
Regards
Tom
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 02 May 2007 09:50
To: Welsh,T,Tom,XSL4A C
Cc: [email protected]
Subject: RE: [Nagios-users] NRPE: Command 'check_swap' not defined
Hi, all,
I just manually run command for testing purpose on my monitor server:
/usr/local/nagios/check_nrpe -H remote_host_name -c check_load
I've not configured it in Nagios configuration files yet.
Regards,
Yu Ting
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 02, 2007 4:36 PM
To: [EMAIL PROTECTED]; [email protected]
Subject: RE: [Nagios-users] NRPE: Command 'check_swap' not defined
Is the check load command specified on the nagios monitoring box
Here is how my config is defined.
Remote nrpe box. /usr/local/etc/nrpe.cfg
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
>From nagios monitoring box. /usr/local/nagios/etc/checkcommands.cfg
# ' check load on remote systems using nrpe define command{
command_name check_nrpe_load
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
This works fine for me.
Regards
Tom
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: 02 May 2007 09:26
To: [email protected]
Subject: [Nagios-users] NRPE: Command 'check_swap' not defined
Hi,
I've run into following NRPE issue.
NRPE: Command 'check_load' not defined
I've checked my remote client nrpe.cfg and the command definition is properly
configured there.
command[check_load]=/usr/local/nagios/libexec/check_load -w
15,10,5 -c 30,25,20
...
Does anybody know what reason else can cause such issue? Thanks in advance.
Regards,
Yu Ting
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE
version of DB2 express and take control of your XML. No limits.
Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
[email protected]
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
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
[email protected]
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