Apply configuration doesn't work

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Apply configuration doesn't work

Post by Frédéric GRANAT »

Hi,
Since a few time, "Apply configuration" doesn't terminate.
Please help me.

Could it be linked with the fact my 50 nodes licence needs to be upgraded (please see the file attached).

I restarted my Nagios server and now I've got : Monitoring engine is not running (No lock file found in /usr/local/nagios/var/nagios.lock )

Frederic
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Apply configuration doesn't work

Post by abrist »

Unfortunately, there was no file attached. If "apply configuration" just spins (dots forever), you may be hitting a php limit. See the FAQ for possible solutions:
http://support.nagios.com/wiki/index.ph ... _Completes
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.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Apply configuration doesn't work

Post by Frédéric GRANAT »

I restarted my Nagios server and now I've got : Monitoring engine is not running (No lock file found in /usr/local/nagios/var/nagios.lock )

What can I do ?

Frederic
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Apply configuration doesn't work

Post by abrist »

From the CLI:

Code: Select all

service nagios start
And lets check the other services:

Code: Select all

service ndo2db status
service mysqld status
service npcd status
service httpd status
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.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Apply configuration doesn't work

Post by Frédéric GRANAT »

[root@nagiosxi libexec]# find /usr/local/nagios/libexec -user 500 -exec chown nagios.nagios {} \;
[root@nagiosxi libexec]# service nagios start
Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.
[root@nagiosxi libexec]#
[root@nagiosxi libexec]#
[root@nagiosxi libexec]# service ndo2db status
ndo2db (pid 4362) is running...
[root@nagiosxi libexec]# service mysqld status
mysqld (pid 3990) is running...
[root@nagiosxi libexec]# service npcd status
NPCD running (pid 4219).
[root@nagiosxi libexec]# service httpd status
httpd (pid 4143) is running...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Apply configuration doesn't work

Post by abrist »

Your config verification is failing, lets find out why:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
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.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Apply configuration doesn't work

Post by Frédéric GRANAT »

Error: Could not find any host matching 'OND_MT_DIGNE.cg.ahp' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 48)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 48)
Error processing object config files!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Apply configuration doesn't work

Post by abrist »

Looks like you have the host "OND_MT_DIGNE.cg.ahp" added to a hostgroup somewhere even though the host does not exist. Lets find out which hostgroup:

Code: Select all

grep OND_MT_DIGNE.cg.ahp /usr/local/nagios/etc/hostgroups.cfg -25 | grep "hostgroup_name\|alias\|members"
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.
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Apply configuration doesn't work

Post by Frédéric GRANAT »

I removed OND_MT_DIGNE from the hostgroups.cfg, and service nagios start doesn' work.
What do I have to do ?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration doesn't work

Post by lmiltchev »

Do you have more errors? Can you run again the following command and show us the output?

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked