nagios xi renaming services

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

nagios xi renaming services

Post by kendallchenoweth »

I noticed that when renaming a service, the host service summary now shows the old service name AND the new service name. The old service does not exist in the CCM any more. I've restarted the nagios application services (and the mysql database) and the old services names still exist.

How can I 1) remove the old services, e.g. in a test enviroment or 2) migrate the history from the old service name to the new service name e.g in a production environment? Is there something else I need to restart?

Thanks in advance!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios xi renaming services

Post by lmiltchev »

How did you rename your host/service? Did you use the Bulk Renaming Tool?
Be sure to check out our Knowledgebase for helpful articles and solutions!
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

Re: nagios xi renaming services

Post by kendallchenoweth »

I renamed the services using the CCM interface. I changed the config file as well as the service description and display name. All other attributes (unless two services with the same check_command were merged) stayed the same.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios xi renaming services

Post by lmiltchev »

Apply configuration one more time, then list the contents of the "hosts" and "services" directories to see if you have only the new config or both, the new and the old one.

Code: Select all

ls -la /usr/local/nagios/etc/hosts
ls -la /usr/local/nagios/etc/services
What are the timestamps on these configs?

I would recommend using the "Renaming Tool" instead. It's part of Nagios XI Enterprise, but you can start 60-day, free, fully functional trial and get the job done. The good thing about the tool is that you can rename hosts/services in bulk, and that you won't lose historical data.
Be sure to check out our Knowledgebase for helpful articles and solutions!
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

Re: nagios xi renaming services

Post by kendallchenoweth »

I have enterprise and will use the renaming tool in the future. In the meantime, to resolve the mess I got myself into...

I see the service files in /usr/local/nagios/etc/services (after refreshing /usr/local/nagios/etc with a web write config files action), but the config names aren't in the view in the CCM on the Nagios XI web page. For this time around, I don't mind losing the history on the renamed services. How do get rid of these ghost entries?

Thanks in advance!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios xi renaming services

Post by lmiltchev »

See which configs are not updating (take a look at the timestamps):

Code: Select all

ls -la /usr/local/nagios/etc/services
You can remove the "ghost" services manually:

Code: Select all

cd /usr/local/nagios/etc/services
rm -f <ghost-service>.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

Re: nagios xi renaming services

Post by kendallchenoweth »

that fixes it. Thanks!
Locked