Nagios nrpe on Remote host

Atul Kamat atulk at world2web.com
Tue Oct 5 08:10:12 CEST 2004


Hi Vincent,

 I`m stuck with the same error....i tried recompiling nrpe and
reinstalling nagios-plugins from source on the remote machine but to no
avail.Followed all the things u mentioned very closely.
The error when i run the command "/usr/local/nagios/libexec/check_nrpe -H
nyx -n -c check_ssh -a nyx" is
CHECK_NRPE: Error receiving data from daemon.

In the nagios interface i get "(No output returned from plugin)"
Regards
Atul Kamat
Linux Network Engineer,
World2Web Soft Technologies Private Ltd,
26, Koramangala Industrial Layout,
Bangalore - 560095,
INDIA
Phone :98860 24705
e-mail: atulk at world2web.com

> Atul,
> I guess you should use:
> /usr/local/nagios/libexec/check_nrpe -H nyx -n -c check_ssh -a nyx
>
> To pass arguments, NRPE should be compiled with correct option
> (--enable-command-args), your nrpe conf file should have
> "dont_blame_nrpe=1", and your nrpe.conf shoud have this line:
> command[check_ssh]=/usr/local/nagios/libexec/check_ssh $ARG1$
>
> In your checkcommands.cfg, you can use:
>
> define command {
> command_name                   check_nrpe
> command_line                   $USER1$/check_nrpe -n -t 10 -H
> $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$
> }
>
> Regards,
>
> Vincent Alloo
> TI France Design Systems Operations Manager
> Europe and Middle East IT Services
> Texas Instruments France
>
> E-Mail: v-alloo at ti.com
> Phone: +33 4 93 22 26 97
> Mobile: +33 6 82 13 00 80
>
>> -----Original Message-----
>> From: Atul Kamat [mailto:atulk at world2web.com]
>> Sent: Thursday, September 30, 2004 12:49 PM
>> To: Alloo, Vincent
>> Cc: atulk at world2web.com; nagios-users at lists.sourceforge.net
>> Subject: RE: [Nagios-users] Nagios nrpe on Remote host
>>
>> Hi Vincent!
>>
>> The xinetd -nrpe file was exactly the same..so i tried running nrpe as
> a
>> daemon..tried telnetting from the nagios host inot the remote machine
> and
>> it was successful after i fixed the nrpe.cfg file .
>> Now my nagios web interface gives the following error
>>
>> CHECK_NRPE: Error receiving data from daemon.
>>
>> if i try to run check_nrpe from the command prompt with something like
>>
>>  /usr/local/nagios/libexec/check_nrpe -H nyx -n
>> /usr/local/nagios/libexec/check_ssh -H nyx
>>
>> i get the same error.
>>
>> Help wanted!!
>>
>> Atul Kamat
>> Linux Network Engineer,
>> World2Web Soft Technologies Private Ltd,
>> 26, Koramangala Industrial Layout,
>> Bangalore - 560095,
>> INDIA
>> Phone :98860 24705
>> e-mail: atulk at world2web.com
>> > Atul,
>> > I don't know if it can help, but here my nrpe xinetd conf:
>> >
>> > % cat /etc/xinetd.d/nrpe
>> > # default: on
>> > # description: The rshd server is the server for the rcmd(3) routine
and, \
>> > #       consequently, for the rsh(1) program.  The server provides \
#       remote execution facilities with authentication based on \ # 
     privileged port numbers from trusted hosts.
>> > service nrpe
>> > {
>> >         flags                   = REUSE
>> >         disable                 = no
>> >         socket_type             = stream
>> >         wait                    = no
>> >         user                    = nagios
>> >         log_on_failure          += USERID
>> >         server                  =  /apps/nagios/nrpe/nrpe
>> >         server_args             =  -c /db/sysadmin/nagios/nrpe.cfg
>> > --inetd
>> > }
>> >
>> > Regards,
>> >
>> > Vincent Alloo
>> > TI France Design Systems Operations Manager
>> > Europe and Middle East IT Services
>> > Texas Instruments France
>> >
>> > E-Mail: v-alloo at ti.com
>> > Phone: +33 4 93 22 26 97
>> > Mobile: +33 6 82 13 00 80
>> >> -----Original Message-----
>> >> From: Atul Kamat [mailto:atulk at world2web.com]
>> >> Sent: Wednesday, September 29, 2004 2:15 PM
>> >> To: Alloo, Vincent
>> >> Cc: nagios-users at lists.sourceforge.net
>> >> Subject: RE: [Nagios-users] Nagios nrpe on Remote host
>> >>
>> >> Hi Vincent!
>> >>
>> >>  I made the change as u per your advice . But i`ve got a feeling
> that
>> > the
>> >> preoblem is with the xinetd configuration on the remote host.if i
>> > check
>> >> the /var/log/messages i get the following error:
>> >>
>> >> Sep 29 17:32:44 phoenix nagios: SERVICE NOTIFICATION:
>> > Atul;nyx;/dev/hda1
>> >> Free Space;CRITICAL;notify-by-epager;Connection refused by host Sep
29 17:32:44 phoenix nagios: SERVICE NOTIFICATION:
>> > Atul;nyx;/dev/hda1
>> >> Free Space;CRITICAL;notify-by-email;Connection refused by host
>> >>
>> >> The following is what`s in the /etc/xinetd.d/nrpe file
>> >>
>> >> # default:on
>> >> # description:NRPE
>> >> service nrpe
>> >> {
>> >>     flags = REUSE
>> >>     socket_type= stream
>> >>     wait = no
>> >>     user = nagios
>> >>     server = /usr/local/nagios/nrpe
>> >>     server_args = -i /usr/local/nagios/nrpe.cfg
>> >>     log_on_failure+=USERID
>> >>     disable = no
>> >> }
>> >> I also tried changing the user to root...but that didnt help
>> > either.The
>> >> user nagios exists on the machine
>> >>
>> >> I havent made ne changes to the nrpe.cfg file except enabled
> debugging
>> > .
>> >> Shud i make ne changed to the nrpe.cfg file??
>> >>
>> >> the following are the excerpts of the nrpe.cfg file on the remote
> host
>> >> # 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=127.0.0.1
>> >>
>> >> does this thing have nething to do with the problem ..
>> >> Please Advice
>> >>
>> >> Atul Kamat
>> >> Linux Network Engineer,
>> >> World2Web Soft Technologies Private Ltd,
>> >> 26, Koramangala Industrial Layout,
>> >> Bangalore - 560095,
>> >> INDIA
>> >> Phone :98860 24705
>> >> e-mail: atulk at world2web.com
>> >>
>> >>
>> >> > You should use:
>> >> > define command{
>> >> >         command_name    check_nrpe
>> >> >         command_line    /usr/local/nagios/libexec/check_nrpe  -H
>> >> > $HOSTADDRESS$ -c $ARG1$
>> >> >         }
>> >> >
>> >> > Notice the -H ...
>> >> >
>> >> > Regards,
>> >> >
>> >> > Vincent Alloo
>> >> > TI France Design Systems Operations Manager
>> >>
>> >> > Europe and Middle East IT Services
>> >> > Texas Instruments France
>> >> >
>> >> > E-Mail: v-alloo at ti.com
>> >> > Phone: +33 4 93 22 26 97
>> >> > Mobile: +33 6 82 13 00 80
>> >> >> -----Original Message-----
>> >> >> From: nagios-users-admin at lists.sourceforge.net
>> > [mailto:nagios-users-
>> >> admin at lists.sourceforge.net] On Behalf Of Atul Kamat
>> >> >> Sent: Wednesday, September 29, 2004 7:57 AM
>> >> >> To: nagios-users at lists.sourceforge.net
>> >> >> Subject: [Nagios-users] Nagios nrpe on Remote host
>> >> >> Hi!
>> >> >>   I installed and configured nagios to monitor our servers and
> it
>> > took
>> >> > me
>> >> >> a whole day thanx to an error in the documentation.
>> >> >>   I installed a utility called NRPE so that i cud execute
> commands
>> > on
>> >> >> remote machine.i setup xinetd and installed the plugins on the
>> > remote
>> >> host as well.Below are the excerpts of the:::
>> >> >> services.cfg file:
>> >> >> define service{
>> >> >> 	use				generic-service
> ; Name
>> >> > of service
>> >> >> template to use
>> >> >> 	host_name			nyx
>> >> >> 	service_description		/dev/hda1 Free Space
>> >> >> 	is_volatile			0
>> >> >> 	check_period			24x7
>> >> >> 	max_check_attempts		3
>> >> >> 	normal_check_interval		5
>> >> >> 	retry_check_interval		1
>> >> >> 	contact_groups			linux-admins
>> >> >> 	notification_interval		120
>> >> >> 	notification_period		24x7
>> >> >> 	notification_options		w,u,c,r
>> >> >> 	check_command			check_nrpe!check_disk1
>> >> >> 	}
>> >> >> checkcommands.cfg file::
>> >> >> define command{
>> >> >>         command_name    check_nrpe
>> >> >>         command_line    usr/local/nagios/libexec/check_nrpe
>> >> > $HOSTADDRESS$
>> >> >> -c $ARG1$
>> >> >>         }
>> >> >> nrpe.cfg file on the remote machine::
>> >> >> #command i want to execute
>> >> >> command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20
> -c
>> > 10
>> >> > -p
>> >> >> /dev/hda1
>> >> >> could neone tell me what`s going wrong.
>> >> >> Nagios display the disk space data of the local machine rather
> than
>> >> > the
>> >> >> remote machine.
>> >> >> Thanx,
>> >> >> Warm Regards
>> >> >> Atul Kamat
>> >> >> Linux Network Engineer,
>> >> >> World2Web Soft Technologies Private Ltd,
>> >> >> 26, Koramangala Industrial Layout,
>> >> >> Bangalore - 560095,
>> >> >> INDIA
>> >> >> Phone :98860 24705
>> >> >> e-mail: atulk at world2web.com
>> >> >> -------------------------------------------------------
>> >> >> This SF.net email is sponsored by: IT Product Guide on
>> >> > ITManagersJournal
>> >> >> Use IT products in your business? Tell us what you think of
> them.
>> > Give
>> >> > us
>> >> >> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to
> find
>> > out
>> >> more
>> >> >> http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
>> >> >> 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
>> >> >
>> >> >
>> >> >
>> >> > -------------------------------------------------------
>> >> > This SF.net email is sponsored by: IT Product Guide on
>> > ITManagersJournal
>> >> Use IT products in your business? Tell us what you think of them.
> Give
>> >> us
>> >> > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to
> find
>> > out
>> >> more
>> >> > http://productguide.itmanagersjournal.com/guidepromo.tmpl
>> >> > _______________________________________________
>> >> > 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
>> >> >
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>> > -------------------------------------------------------
>> > This SF.net email is sponsored by: IT Product Guide on
> ITManagersJournal
>> > Use IT products in your business? Tell us what you think of them.
> Give
>> us
>> > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
> out
>> > more
>> > http://productguide.itmanagersjournal.com/guidepromo.tmpl
>> > _______________________________________________
>> > 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
>> >
>>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give
us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find
out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> 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
>





Linux Systems Engineer,
World2Web Soft Technologies Private Ltd,
26, Koramangala Industrial Layout,
Bangalore - 560095,
INDIA
Phone :98860 24705
e-mail: atulk at world2web.com


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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