Page 1 of 1
nagios xi renaming services
Posted: Tue Mar 25, 2014 2:36 am
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!
Re: nagios xi renaming services
Posted: Tue Mar 25, 2014 10:27 am
by lmiltchev
How did you rename your host/service? Did you use the Bulk Renaming Tool?
Re: nagios xi renaming services
Posted: Tue Mar 25, 2014 10:32 am
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.
Re: nagios xi renaming services
Posted: Tue Mar 25, 2014 1:25 pm
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.
Re: nagios xi renaming services
Posted: Wed Mar 26, 2014 3:46 pm
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!
Re: nagios xi renaming services
Posted: Wed Mar 26, 2014 4:24 pm
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
Re: nagios xi renaming services
Posted: Thu Mar 27, 2014 8:54 am
by kendallchenoweth
that fixes it. Thanks!