Getting alerts after deletion of hosts and services

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
wipro-nagios-service
Posts: 18
Joined: Thu Apr 22, 2021 9:49 am

Getting alerts after deletion of hosts and services

Post by wipro-nagios-service »

We have deleted the hosts and services from UI using CCM. We have checked the all server list and host list in the server machine. But we could not find any trace of the removed hosts and services. Even in many of the log files we didn't anything related to removed servers and services. But in the "/usr/local/nagios/var/objects.cache" file we could see that all the hosts were present. We have found an article where it is suggested to remove the hosts and services in that particular file. But I feel that it is not advisable to do so. And also it's a very large file .A small mistake will entirely disrupt nagios. I am providing the link to the article. https://support.nagios.com/forum/viewto ... =7&t=43668

Please provide us an alternative way to get rid of this.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Getting alerts after deletion of hosts and services

Post by gsmith »

Hi,

The /usr/local/nagios/var/objects.cache gets created every time the configuration is applied.

Is it possible you didn't do a "Apply Configuration" after making your deletes?

Either way, if you go to the Core Config Manager you will be able to hit the "Apply Configuration"
under the "Quick Tools" menu header on the left-hand side of the page. Please do that and let
me know if it resolves your issue.

Thanks
wipro-nagios-service
Posts: 18
Joined: Thu Apr 22, 2021 9:49 am

Re: Getting alerts after deletion of hosts and services

Post by wipro-nagios-service »

I have applied configuration . But No difference.
Can you provide me an alternate solution?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Getting alerts after deletion of hosts and services

Post by ssax »

Please go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Once the files are done being written, apply configuration and see if they are now gone.

If that doesn't resolve it, please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.

PM me a host_name AND service_description of an example one that you are seeing that should NOT be in there.

Additionally, please send the output of this command:
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the command if your DB is offloaded to another server and/or you've changed the root mysql password

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
Locked