nagios-nrpe service don't start automatically after reboot

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mroter
Posts: 80
Joined: Sun Apr 29, 2012 12:43 pm

nagios-nrpe service don't start automatically after reboot

Post by mroter »

After reboot the nagios-nrpe service on a linux server don't start automatically.
We have to run the following to get it up again:

Code: Select all

 /etc/init.d/nagios-nrpe-server restart
I found some info on the net regarding this issue. The service is started before the network is ready.
How can should we resolve this?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios-nrpe service don't start automatically after rebo

Post by slansing »

What document did you use to install NRPE? Did you follow this one?:

http://assets.nagios.com/downloads/nagi ... _Agent.pdf

If you used an off-site document could you please link it?
mroter
Posts: 80
Joined: Sun Apr 29, 2012 12:43 pm

Re: nagios-nrpe service don't start automatically after rebo

Post by mroter »

We did not used the suggested document above :cry:
We where installing a zen-lb plugin and followed the instruction in it:
3. Install nagios NRPE
apt-get install nagios-nrpe-server
(accepted WORKGROUP)
4. Edit /etc/nagios/nrpe_local.cfg
allowed_hosts=<ip>
command[<command name>]=<full path to plugin and any arguments>

// E.g.
allowed_hosts=<nagios_server_ip>
server_address=<local_bind_ip>
server_port=<local_bind_port>
command_timeout=60
connection_timeout=300
command[check_status_carp]=/etc/nagios/EKHScripts/check_zenlb_carp.php
command[check_status_penfarms]=/etc/nagios/EKHScripts/check_zenlb_penfarms.php

5. Restart NRPE daemon
/etc/init.d/nagios-nrpe-server restart
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios-nrpe service don't start automatically after rebo

Post by scottwilkerson »

Run

Code: Select all

chkconf nagios-nrpe-server on
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mroter
Posts: 80
Joined: Sun Apr 29, 2012 12:43 pm

Re: nagios-nrpe service don't start automatically after rebo

Post by mroter »

I assume you were referring to chkconfig command, right?
Anyway the box I'm monitoring is running Debian and don't have this command:
cat /proc/version
Linux version 2.6.32-5-686 (Debian 2.6.32-41squeeze2) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Mar 26 05:20:33 UTC 2012


Can you advise on the equivalent? Manual fix...
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: nagios-nrpe service don't start automatically after rebo

Post by GldRush98 »

mroter wrote:I assume you were referring to chkconfig command, right?
Anyway the box I'm monitoring is running Debian and don't have this command:
cat /proc/version
Linux version 2.6.32-5-686 (Debian 2.6.32-41squeeze2) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Mar 26 05:20:33 UTC 2012


Can you advise on the equivalent? Manual fix...
Debian uses update-rc.d instead of chkconfig. Check the syntax on it as I know it is a bit different than the chkconfig syntax.
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
mroter
Posts: 80
Joined: Sun Apr 29, 2012 12:43 pm

Re: nagios-nrpe service don't start automatically after rebo

Post by mroter »

I ran the following and got this reply. Is it OK?
root@ZLB-104-QA:~# update-rc.d nagios-nrpe-server defaults
update-rc.d: using dependency based boot sequencing
mroter
Posts: 80
Joined: Sun Apr 29, 2012 12:43 pm

Re: nagios-nrpe service don't start automatically after rebo

Post by mroter »

After few reboots I got a networking error (see below). After restart its OK => Problem not solved
Dec 25 15:19:59 ZLB-104-QA nrpe[948]: Starting up daemon
Dec 25 15:19:59 ZLB-104-QA nrpe[948]: Network server bind failure (99: Cannot assign requested address)
Dec 25 15:23:23 ZLB-104-QA nrpe[1229]: Starting up daemon
Dec 25 15:23:23 ZLB-104-QA nrpe[1229]: Warning: Daemon is configured to accept command arguments from clients!
Dec 25 15:23:23 ZLB-104-QA nrpe[1229]: Listening for connections on port 5666
Dec 25 15:23:23 ZLB-104-QA nrpe[1229]: Allowing connections from: 172.20.1.106
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios-nrpe service don't start automatically after rebo

Post by slansing »

This is generally caused by having the wrong IP defined in nrpe.cfg, make sure the IP set in the server_address= field, are you running NRPE under a daemon, or under xinetd/inetd? If you are forcing it to bind to an address it has to be one available to that server. Once you have made the changes restart NRPE and then:

Code: Select all

tail -f /var/log/messages
Locked