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!
nagios xi renaming services
Re: nagios xi renaming services
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
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.
Re: nagios xi renaming services
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.
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.
Code: Select all
ls -la /usr/local/nagios/etc/hosts
ls -la /usr/local/nagios/etc/servicesI 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
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!
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!
Re: nagios xi renaming services
See which configs are not updating (take a look at the timestamps):
You can remove the "ghost" services manually:
Code: Select all
ls -la /usr/local/nagios/etc/servicesCode: Select all
cd /usr/local/nagios/etc/services
rm -f <ghost-service>.cfgBe 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
that fixes it. Thanks!