Nagios service will not start after reboot
Nagios service will not start after reboot
I am running Nagios Core 3.5.0 on a Turnkey LAMP server (Debian)
Everything works beautifully until I have to reboot the machine.
Upon reboot, the Nagios service never starts. I can start it manually using the command - service nagios start
I ran through the quick start guide and used the command - ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
to configure it to start Nagios on reboot.
We have a Nagios server running on Ubuntu 10.04 LTS
It started on reboot until we upgraded Nagios to 3.5.0, not it also fails to start Nagios on reboot
Everything works beautifully until I have to reboot the machine.
Upon reboot, the Nagios service never starts. I can start it manually using the command - service nagios start
I ran through the quick start guide and used the command - ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
to configure it to start Nagios on reboot.
We have a Nagios server running on Ubuntu 10.04 LTS
It started on reboot until we upgraded Nagios to 3.5.0, not it also fails to start Nagios on reboot
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios service will not start after reboot
I'd add nagios via chkconfig like so:
Code: Select all
chkconfig --add nagios
chkconfig nagios on
Re: Nagios service will not start after reboot
Lets check your logs for potential errors on startup:
Code: Select all
cat /var/log/messages | grep -5 "Nagios "
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Nagios service will not start after reboot
chkconfig is not installed on the server
Re: Nagios service will not start after reboot
abrist wrote:Lets check your logs for potential errors on startup:Code: Select all
cat /var/log/messages | grep -5 "Nagios "
Code: Select all
Aug 12 08:45:06 nagios nagios: Auto-save of retention data completed successfully.
Aug 12 08:47:16 nagios nagios: SERVICE ALERT: oasbld1;Memory Usage;WARNING;SOFT;1;Memory usage: total:4457.52 Mb - used: 3790.29 Mb (85%) - free: 667.23 Mb (15%)
Aug 12 08:48:16 nagios nagios: SERVICE ALERT: oasbld1;Memory Usage;OK;SOFT;2;Memory usage: total:4457.52 Mb - used: 3738.02 Mb (84%) - free: 719.50 Mb (16%)
Aug 12 08:48:29 nagios nagios: EXTERNAL COMMAND: RESTART_PROGRAM;1376315309
Aug 12 08:48:30 nagios nagios: PROGRAM_RESTART event encountered, restarting...
Aug 12 08:48:30 nagios nagios: Nagios 3.5.0 starting... (PID=2254)
Aug 12 08:48:30 nagios nagios: Local time is Mon Aug 12 08:48:30 CDT 2013
Aug 12 08:48:30 nagios nagios: LOG VERSION: 2.0
Aug 12 08:48:30 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 08:48:30 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 08:48:30 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 08:48:30 nagios nagios: Warning: Duplicate definition found for service 'D:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/development-d.cfg', starting
on line 14)
Aug 12 08:48:30 nagios nagios: Warning: Duplicate definition found for service 'W3SVC' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/infrastructure-webservers.cfg', starti
ng on line 14)
Aug 12 08:48:49 nagios nagios: EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;sensatronics;Temperature;1376315327
Aug 12 08:52:31 nagios nagios: EXTERNAL COMMAND: RESTART_PROGRAM;1376315551
Aug 12 08:52:31 nagios nagios: PROGRAM_RESTART event encountered, restarting...
Aug 12 08:52:31 nagios nagios: Nagios 3.5.0 starting... (PID=2254)
Aug 12 08:52:31 nagios nagios: Local time is Mon Aug 12 08:52:31 CDT 2013
Aug 12 08:52:31 nagios nagios: LOG VERSION: 2.0
Aug 12 08:52:31 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 08:52:31 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 08:52:31 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 08:52:31 nagios nagios: Warning: Duplicate definition found for service 'D:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/development-d.cfg', starting
on line 14)
Aug 12 08:52:31 nagios nagios: Warning: Duplicate definition found for service 'W3SVC' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/infrastructure-webservers.cfg', starti
ng on line 14)
Aug 12 08:52:55 nagios nagios: EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;sensatronics;Temperature;1376315574
Aug 12 09:10:49 nagios nagios: EXTERNAL COMMAND: RESTART_PROGRAM;1376316649
Aug 12 09:10:50 nagios nagios: PROGRAM_RESTART event encountered, restarting...
Aug 12 09:10:50 nagios nagios: Nagios 3.5.0 starting... (PID=2254)
Aug 12 09:10:50 nagios nagios: Local time is Mon Aug 12 09:10:50 CDT 2013
Aug 12 09:10:50 nagios nagios: LOG VERSION: 2.0
Aug 12 09:10:50 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 09:10:50 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 09:10:50 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 09:10:50 nagios nagios: Warning: Duplicate definition found for service 'W3SVC' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/infrastructure-webservers.cfg', starti
ng on line 14)
Aug 12 09:11:05 nagios nagios: EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;sensatronics;Temperature;1376316663
Aug 12 09:11:10 nagios nagios: Warning: Return code of 127 for check of service 'Temperature' on host 'sensatronics' was out of bounds. Make sure the plugin you're trying to run actually exi
sts.
Aug 12 09:12:17 nagios nagios: EXTERNAL COMMAND: RESTART_PROGRAM;1376316737
Aug 12 09:12:17 nagios nagios: PROGRAM_RESTART event encountered, restarting...
Aug 12 09:12:17 nagios nagios: Nagios 3.5.0 starting... (PID=2254)
Aug 12 09:12:17 nagios nagios: Local time is Mon Aug 12 09:12:17 CDT 2013
Aug 12 09:12:17 nagios nagios: LOG VERSION: 2.0
Aug 12 09:12:17 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 09:12:17 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 09:12:17 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 09:12:17 nagios nagios: Warning: Duplicate definition found for service 'D:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/development-d.cfg', starting
on line 14)
Aug 12 09:12:17 nagios nagios: Warning: Duplicate definition found for service 'W3SVC' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/infrastructure-webservers.cfg', starti
ng on line 14)
Aug 12 09:12:33 nagios nagios: EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;sensatronics;Temperature;1376316752
Aug 12 09:23:10 nagios nagios: EXTERNAL COMMAND: RESTART_PROGRAM;1376317390
Aug 12 09:23:10 nagios nagios: PROGRAM_RESTART event encountered, restarting...
Aug 12 09:23:10 nagios nagios: Nagios 3.5.0 starting... (PID=2254)
Aug 12 09:23:10 nagios nagios: Local time is Mon Aug 12 09:23:10 CDT 2013
Aug 12 09:23:10 nagios nagios: LOG VERSION: 2.0
Aug 12 09:23:10 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 09:23:10 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 09:23:10 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 09:23:10 nagios nagios: Warning: Duplicate definition found for service 'D:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/development-d.cfg', starting
on line 14)
Aug 12 09:23:10 nagios nagios: Warning: Duplicate definition found for service 'W3SVC' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/infrastructure-webservers.cfg', starti
ng on line 14)
Aug 12 09:23:25 nagios nagios: EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;sensatronics;Temperature;1376317403
Aug 12 09:25:27 nagios nagios: EXTERNAL COMMAND: RESTART_PROGRAM;1376317526
Aug 12 09:25:27 nagios nagios: PROGRAM_RESTART event encountered, restarting...
Aug 12 09:25:27 nagios nagios: Nagios 3.5.0 starting... (PID=2254)
Aug 12 09:25:27 nagios nagios: Local time is Mon Aug 12 09:25:27 CDT 2013
Aug 12 09:25:27 nagios nagios: LOG VERSION: 2.0
Aug 12 09:25:27 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 09:25:27 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 09:25:27 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 09:25:27 nagios nagios: Warning: Duplicate definition found for service 'D:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/development-d.cfg', starting
on line 14)
Aug 12 09:25:27 nagios nagios: Warning: Duplicate definition found for service 'W3SVC' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/infrastructure-webservers.cfg', starti
ng on line 14)
Aug 12 09:25:45 nagios nagios: EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;sensatronics;Temperature;1376317543
Aug 12 09:27:42 nagios nagios: EXTERNAL COMMAND: RESTART_PROGRAM;1376317662
Aug 12 09:27:42 nagios nagios: PROGRAM_RESTART event encountered, restarting...
Aug 12 09:27:42 nagios nagios: Nagios 3.5.0 starting... (PID=2254)
Aug 12 09:27:42 nagios nagios: Local time is Mon Aug 12 09:27:42 CDT 2013
Aug 12 09:27:42 nagios nagios: LOG VERSION: 2.0
Aug 12 09:27:42 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 09:27:42 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 09:27:42 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 09:27:42 nagios nagios: Warning: Duplicate definition found for service 'D:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/development-d.cfg', starting
on line 14)
Aug 12 09:27:42 nagios nagios: Warning: Duplicate definition found for service 'W3SVC' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/infrastructure-webservers.cfg', starti
ng on line 14)
Aug 12 10:27:42 nagios nagios: Auto-save of retention data completed successfully.
Aug 12 11:27:42 nagios nagios: Auto-save of retention data completed successfully.
Aug 12 11:49:40 nagios nagios: Caught SIGHUP, restarting...
Aug 12 11:49:40 nagios nagios: Nagios 3.5.0 starting... (PID=2254)
Aug 12 11:49:40 nagios nagios: Local time is Mon Aug 12 11:49:40 CDT 2013
Aug 12 11:49:40 nagios nagios: LOG VERSION: 2.0
Aug 12 11:49:41 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 11:49:41 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 11:49:41 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 11:50:32 nagios kernel: [ 7.343983] Adding 3141624k swap on /dev/mapper/turnkey-swap_1. Priority:-1 extents:1 across:3141624k
Aug 12 11:50:32 nagios kernel: [ 8.346445] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 12 11:50:34 nagios kernel: [ 11.820163] b44: eth0: Link is up at 100 Mbps, full duplex.
Aug 12 11:50:34 nagios kernel: [ 11.820167] b44: eth0: Flow control is off for TX and off for RX.
Aug 12 11:50:34 nagios kernel: [ 11.820986] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 12 12:02:32 nagios nagios: Nagios 3.5.0 starting... (PID=2426)
Aug 12 12:02:32 nagios nagios: Local time is Mon Aug 12 12:02:32 CDT 2013
Aug 12 12:02:32 nagios nagios: LOG VERSION: 2.0
Aug 12 12:02:32 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 12:02:32 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 12:02:32 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
--
Aug 12 12:25:45 nagios kernel: [ 7.052919] Adding 3141624k swap on /dev/mapper/turnkey-swap_1. Priority:-1 extents:1 across:3141624k
Aug 12 12:25:45 nagios kernel: [ 8.055127] ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 12 12:25:46 nagios kernel: [ 10.816168] b44: eth0: Link is up at 100 Mbps, full duplex.
Aug 12 12:25:46 nagios kernel: [ 10.816172] b44: eth0: Flow control is off for TX and off for RX.
Aug 12 12:25:46 nagios kernel: [ 10.816998] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 12 12:49:44 nagios nagios: Nagios 3.5.0 starting... (PID=2259)
Aug 12 12:49:44 nagios nagios: Local time is Mon Aug 12 12:49:44 CDT 2013
Aug 12 12:49:44 nagios nagios: LOG VERSION: 2.0
Aug 12 12:49:44 nagios nagios: Warning: Duplicate definition found for service 'C:\ Drive Space' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastru
cture.cfg', starting on line 14)
Aug 12 12:49:44 nagios nagios: Warning: Duplicate definition found for service 'CPU Load' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructure.c
fg', starting on line 32)
Aug 12 12:49:44 nagios nagios: Warning: Duplicate definition found for service 'Memory Usage' on host 'gfifaxmaker' (config file '/usr/local/nagiosql/services/domain-controllers_infrastructu
re.cfg', starting on line 50)
Re: Nagios service will not start after reboot
What init system are you using on 10 - systemd, upstart, or openrc?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Nagios service will not start after reboot
I'm sorry to say I do not know and Im unsure how to check.abrist wrote:What init system are you using on 10 - systemd, upstart, or openrc?
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios service will not start after reboot
If you are running 9.x or greater you should be able to do the following:
"example"
Otherwise we will need to go abrist's rout, or install the chkconfig package which will automatically symlink and do this for you.
"example"
Code: Select all
update-rc.d dhcp3-server enable
Re: Nagios service will not start after reboot
These are the results I got from this command:slansing wrote:If you are running 9.x or greater you should be able to do the following:Otherwise we will need to go abrist's rout, or install the chkconfig package which will automatically symlink and do this for you.Code: Select all
update-rc.d dhcp3-server enable
update-rc.d: using dependency based boot sequencing
update-rc.d: error: cannot find a LSB script for dhcp3-server
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios service will not start after reboot
That was an example for another service, use nagios instead as that is what you are trying to do here.