Hello I run nagios under linux, since few days ago the service nagios start correctly (when i verify the configuration no problems appear), but after one or two minutes the service go down.
What must i do to solve this problem ?
The mysql service is up and there is a lot of disk space in the computer running nagios.
There is more than one symptom in those logs, I’m not sure they are all related or not.
For the NDO service, verify your login information.
Make sure you can login to MYSQL with the credentials you’ve supplied, and that user can SELECT, INSERT, UPDATE and DELETE on the tables.
NDO shouldn’t be knocking over the main Nagios. Seeing as Nagios falls over in a couple mins, try running it on the command line (non deamon mode).
The output of that might give you a better hint as to what is going on.
Post the output back here for more help.
For the services, check you can ping them from the command line. If you can’t, I’d suggest temporarily removing them from your config (add a “register 0” in the config). Simplify your problems, and work on one at a time.
[quote=“litos79”][1271752164] Nagios 3.2.0 starting… (PID=31781)
…
[1271752164] Lockfile ‘/usr/local/nagios/var/nagios.lock’ looks like its already held by another instance of Nagios (PID 31673). Bailing out…
[1271752164] ndomod: Shutdown complete.
[1271752164] Event broker module ‘/usr/local/nagios/bin/ndomod.o’ deinitialized successfully.
[/quote]
this means you start Nagios before stopping another running instance of Nagios.
Try service nagios restart instead of service nagios start
[quote=“litos79”][1271752244] Error: Cannot open main configuration file ‘/usr/local/nagios/.v’ for reading!
[1271752244] Nagios 3.2.0 starting… (PID=31948)
[1271752244] Local time is Tue Apr 20 10:30:44 CEST 2010
[1271752244] LOG VERSION: 2.0
[1271752244] Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=31948)
[/quote]
‘/usr/local/nagios/.v’ ? typo?
Have you tried the suggestion of the log file? Can you provide the last few line when verify the config?
[quote=“litos79”][1271752865] Nagios 3.2.0 starting… (PID=32027)
[1271752865] Local time is Tue Apr 20 10:41:05 CEST 2010
[1271752865] LOG VERSION: 2.0
…
[1271753006] SERVICE ALERT: AP0114IT;PING;CRITICAL;HARD;1;CRITICAL - 10.172.57.90 is down (lost 100%)
[1271753006] SERVICE ALERT: AP0089IT;PING;CRITICAL;HARD;1;CRITICAL - 10.172.33.90 is down (lost 100%)
[1271753231] Nagios 3.2.0 starting… (PID=32343)
[1271753231] Local time is Tue Apr 20 10:47:11 CEST 2010
[1271753231] LOG VERSION: 2.0
…
[1271753371] SERVICE ALERT: AP0092IT;PING;OK;HARD;3;OK - 10.172.52.90: rta 54.0 ms, lost 0%
[1271753371] SERVICE ALERT: AP0089IT;PING;CRITICAL;SOFT;1;CRITICAL - 10.172.33.90 is down (lost 100%)[/quote]
Like luca said, if there wasn’t a line of log stating Nagios exitting, it’s difficult to understand how it failed.
And btw, how did you know Nagios failed?
Also, investigate /var/log/messages may give you a clue, if nagios.log doesn’t have more useful hints.
The NDO problem, probably should be considered later, since it can’t make Nagios fail, like groth said.