Config files still show up after deleting host and services
Posted: Mon Apr 20, 2015 11:34 am
I had a couple of switches in my Nagios XI environment (Nagios XI 2012r1.2) that I removed from Nagios using Core Config Manager. After deleting the services and then the host I clicked "Apply Configuration" but received the following error message in the config log:
So grep'ed my config files for the hostname and I see where I still have config files for this host even though it does not come up when I search for it in the Nagios web interface.
Shouldn't those files have been deleted?
I went back into Core Config Manager and clicked on "Write Config Files" from the "Tools" menu on the left hand side. The configs seem fine no, I no longer get the error. But I was curious about the host that was mentioned in the error (kvlustream.lamar.edu) because this host and it's services were deleted sometime ago.Checking services...
Checked 2146 services.
Checking hosts...
Error: 'SW - University Theatre Closet .194' is not a valid parent for host 'kvlustream.lamar.edu'!
Checked 403 hosts.
So grep'ed my config files for the hostname and I see where I still have config files for this host even though it does not come up when I search for it in the Nagios web interface.
[root@nagios01r6v etc]# grep kvlu /usr/local/nagios/etc/hosts/*
/usr/local/nagios/etc/hosts/kvlustream.lamar.edu.cfg: host_name kvlustream.lamar.edu
[root@nagios01r6v etc]# grep kvlu /usr/local/nagios/etc/services/*
/usr/local/nagios/etc/services/kvlustream.lamar.edu.cfg: host_name kvlustream.lamar.edu
Shouldn't those files have been deleted?