Page 1 of 1

Data inconsistancy between db and config files

Posted: Fri Dec 07, 2012 1:15 pm
by gamechanger
Hey Guys,

I had to remove about 30 hosts from nagios, I went into configurations and services, removed every service associated with the hosts, then went ahead and deleted the hosts.

However, it looks like nagiosxi is still continuing to monitor those hosts. When I go back in services, I don't see those hosts there nor I see any services associated with it.

I am not able to add /delete or make any changes to nagios since configurations are out of sync...I browsing the db and considering removing those hosts from mysql manually but not sure if this is the only place I need to make changes.

Is there a way to import a good snapshot from yesterday and start from there? Hosts that I deleted were part of a host group and problems arise when I tried to delete the hostgroup after deleting all the hosts.

Thanks,

-Sunil

Re: Data inconsistancy between db and config files

Posted: Fri Dec 07, 2012 1:52 pm
by gamechanger
Anyone? I am sort of stuck here and not sure if I should be modifying the db directly.

Re: Data inconsistancy between db and config files

Posted: Fri Dec 07, 2012 2:52 pm
by slansing
Can you run the config checks from the Core Config Manager > Tools > Write Config Files... from here click on each of the buttons in order from top to bottom, you should get errors on one of them which will tell you what is going on, can you post your errors here? Not the warnings just the errors. Also, if you go to your Nagios Server's terminal do you see the hosts or services under /usr/local/nagios/etc/hosts or usr/local/nagios/etc/services?

If you do find them still there you can rm -rf the hosts and services and then re-verify the config from the Terminal with this command:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg