nrpe
Carroll, Jim P [Contractor]
jcarro10 at sprintspectrum.com
Fri Jan 17 00:38:14 CET 2003
I think we're getting closer to the problem. Somehow, nrpe is looking in
the wrong place for nrpe.cfg. Clearly it's not picking up that option from
your xinetd config file.
What happens when you simply do:
/usr/sbin/nrpe
This what I get:
$ ./nrpe
NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2002 Ethan Galstad ( nagios at nagios.org
<mailto:nagios at nagios.org> )
Version: 1.5
Last Modified: 06-03-2002
License: GPL
Usage: ./nrpe <-i | -d> <config_file>
Options:
-i Run as a service under inetd or xinetd
-d Run as a standalone daemon
Notes:
This program is designed to process requests from the check_nrpe
plugin on the host(s) running Nagios. It can run as a service
under inetd or xinetd (read the docs for info on this), or as a
standalone daemon. Once a request is received from an authorized
host, NRPE will execute the command/plugin (as defined in the
config file) and return the plugin output and return code to the
check_nrpe plugin.
As you can see, I'm running version 1.5. I seem to recall a recent thread
which requires the newer version to use a -c switch or some such to specify
the config file. If that's the case, update your xinetd config file, then
pkill -12 xinetd, do another test, and see what syslog says.
jc
-----Original Message-----
From: Justin [mailto:justin at pvamu.edu]
Sent: Thursday, January 16, 2003 5:25 PM
To: Carroll, Jim P [Contractor]
Subject: Re: [Nagios-users] nrpe
Here is the syslog errors. Below is my config
Jan 16 17:28:10 antispam nrpe[1029]: Unable to open config file '//nrpe.cfg'
for reading
Jan 16 17:28:10 antispam nrpe[1029]: Config file '//nrpe.cfg' contained
errors, bailing out...
############################################################################
#
# Sample NRPE Config File
# Written by: Ethan Galstad ( nagios at nagios.org <mailto:nagios at nagios.org> )
#
# Last Modified: 12-30-2002
#
# NOTES:
# This is a sample configuration file for the NRPE daemon. It needs to be
# located on the remote host that is running the NRPE daemon, not the host
# from which the check_nrpe client is being executed.
############################################################################
#
# PORT NUMBER
# Port number we should wait for connections on.
# NOTE: This must be a non-priviledged port (i.e. > 1024).
# NOTE: This option is ignored if NRPE is running under either inetd or
xinetd
server_port=5666
# SERVER ADDRESS
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
# NOTE: This option is ignored if NRPE is running under either inetd or
xinetd
#server_address=192.168.1.1
# ALLOWED HOST ADDRESSES
# This is a comma-delimited list of IP address of hosts that are allowed
# to talk to the NRPE daemon.
#
# NOTE: The daemon only does rudimentary checking of the client's IP
# address. I would highly recommend adding entries in your
# /etc/hosts.allow file to allow only the specified host to connect
# to the port you are running this daemon on.
#
# NOTE: This option is ignored if NRPE is running under either inetd or
xinetd
allowed_hosts=129.207.59.33 127.0.0.1
# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or
xinetd
nrpe_user=nagios
# NRPE GROUP
# This determines the effective group that the NRPE daemon should run as.
# You can either supply a group name or a GID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or
xinetd
nrpe_group=nagios
# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on
debug=1
# COMMAND TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# allow plugins to finish executing before killing them off.
command_timeout=60
# 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!
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c
30,25,20
command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p
/dev/hda1
command[check_disk2]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p
/dev/hdb1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10
-s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c
200
command[check_nrpe_status]=echo "OK - NRPE is alive"
Thanks Jim
Justin Wedeking
----- Original Message -----
From: Carroll, Jim P [Contractor] <mailto:jcarro10 at sprintspectrum.com>
To: 'Justin' <mailto:justin at pvamu.edu>
Cc: Nagios-Users (E-mail) <mailto:nagios-users at lists.sourceforge.net>
Sent: Thursday, January 16, 2003 3:31 PM
Subject: RE: [Nagios-users] nrpe
You might want to set "debug=1" in nrpe.cfg, retry some tests, then take a
look at your syslog output.
jc
-----Original Message-----
From: Justin [ mailto:justin at pvamu.edu <mailto:justin at pvamu.edu> ]
Sent: Thursday, January 16, 2003 3:29 PM
To: Carroll, Jim P [Contractor]
Subject: Re: [Nagios-users] nrpe
I ran the command.
[root at antispam src]# /usr/local/nagios/libexec/check_users -w 5 -c 10
USERS WARNING - 6 users currently logged in
[root at antispam src]# ./check_nrpe -H 127.0.0.1 -c check_nrpe_status
CHECK_NRPE: Error receiving data from host.
[root at antispam src]# ./check_nrpe -H 127.0.0.1 -c check_nrpe_status
CHECK_NRPE: Error receiving data from host.
[root at antispam src]# ./check_nrpe -H 129.207.59.33 -c check_nrpe_status
CHECK_NRPE: Error receiving data from host.
[root at antispam src]# ./check_nrpe -H 129.207.59.33 -c check_nrpe_status
CHECK_NRPE: Error receiving data from host.
I added it to the config and restart xinetd and made sure it was running
too. I made sure it was running too
[root at antispam src]# netstat -plant | grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN
6182/xinetd
[root at antispam src]# ps -aux | grep nrpe
root 6297 0.0 0.4 3276 628 pts/0 S 15:33 0:00 grep nrpe
[root at antispam src]#
Thanks for the help Jim
Justin Wedeking
Info Tech
----- Original Message -----
From: Carroll, Jim P <mailto:jcarro10 at sprintspectrum.com> [Contractor]
To: 'Justin' <mailto:justin at pvamu.edu>
Cc: Nagios-Users <mailto:nagios-users at lists.sourceforge.net> (E-mail)
Sent: Thursday, January 16, 2003 1:43 PM
Subject: RE: [Nagios-users] nrpe
And what happens when you login to the client which is running NRPE, su to
nagios, then run the following manually:
/usr/local/nagios/libexec/check_users -w 5 -c 10
While we're at it, add this to your nrpe.cfg:
command[check_nrpe_status]=echo "OK - NRPE is alive"
then at the prompt, try this:
./check_nrpe -H 127.0.0.1 -c check_nrpe_status
If you get "OK - NRPE is alive", then go to your Nagios server and try:
./check_nrpe -H 129.207.59.33 -c check_nrpe_status
and see how that goes. (I'm assuming that's the correct IP address.)
jc
-----Original Message-----
From: Justin [mailto:justin at pvamu.edu]
Sent: Thursday, January 16, 2003 1:34 PM
To: Carroll, Jim P [Contractor]
Subject: Re: [Nagios-users] nrpe
Yes.
[root at antispam src]# telnet localhost 5666
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
[root at antispam src]#
----- Original Message -----
From: Carroll, Jim P <mailto:jcarro10 at sprintspectrum.com> [Contractor]
To: 'Justin' <mailto:justin at pvamu.edu>
Cc: Nagios-Users <mailto:nagios-users at lists.sourceforge.net> (E-mail)
Sent: Thursday, January 16, 2003 12:44 PM
Subject: RE: [Nagios-users] nrpe
Can you telnet to port 5666 on your client?
-----Original Message-----
From: Justin [ mailto:justin at pvamu.edu <mailto:justin at pvamu.edu> ]
Sent: Thursday, January 16, 2003 11:46 AM
To: Carroll, Jim P [Contractor]
Subject: Re: [Nagios-users] nrpe
This is what my nrpe config looks like.
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c
30,25,20
command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p
/dev/hda1
command[check_disk2]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p
/dev/hdb1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10
-s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c
200
Here is my xinetd script
# default: on
# description: NRPE
service nrpe
{
flags = REUSE
socket_type = stream
wait = no
user = nagios
server = /usr/sbin/nrpe
server_args = -i /usr/local/nagios/etc/nrpe.cfg
log_on_failure += USERID
disable = no
only_from = 129.207.59.31 129.207.59.33 127.0.0.1
Here is the error
[root at antispam src]# ./check_nrpe -H 129.207.59.33 -p 5666 -c check_users
CHECK_NRPE: Error receiving data from host.
Thanks for the help Jim
Justin Wedeking
Info Tech
----- Original Message -----
From: Carroll, Jim P <mailto:jcarro10 at sprintspectrum.com> [Contractor]
To: 'Justin' <mailto:justin at pvamu.edu> ; Nagios
<mailto:nagios-users at lists.sourceforge.net> Users
Sent: Wednesday, January 15, 2003 5:24 PM
Subject: RE: [Nagios-users] nrpe
Do you have check_ping defined in the nrpe.cfg file of the client host?
jc
-----Original Message-----
From: Justin [ mailto:justin at pvamu.edu <mailto:justin at pvamu.edu> ]
Sent: Wednesday, January 15, 2003 8:55 AM
To: Nagios Users
Subject: [Nagios-users] nrpe
I check the recent messages to make sure my question had not been answered.
But what is the common cause ofthis error? The nrpe dameon is running on
the remote host, and plugins are up to date etc.
Thanks
snatch:/usr/local/nrpe-1.7/src# ./check_nrpe -H antispam.pvamu.edu -c
check_ping
CHECK_NRPE: Error receiving data from host.
Justin Wedeking
Info Tech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030116/bbdc0c98/attachment.html>
More information about the Users
mailing list