Page 1 of 1
Nagios client cleanup
Posted: Fri Feb 08, 2013 1:17 pm
by kruserm
Is there a good way to clean up old servers that were in nagios and no longer are? I am looking in /usr/local/nagios/share/perfdata and there are several servers listed that are no longer valid. What is the best way to clean this up?
Re: Nagios client cleanup
Posted: Fri Feb 08, 2013 1:28 pm
by slansing
I would remove the old performance data completely, and also comb though their contacts and make sure that the old services and host definitions did not get trapped within them. Additionally if you have the time you could grep the XI directories and config files for mentions of these old configurations.
Re: Nagios client cleanup
Posted: Fri Feb 08, 2013 1:33 pm
by kruserm
Why is it not cleaning up these files when I delete the client/host? To comb through the files is going to be a pain to see which ones are still valid.
Re: Nagios client cleanup
Posted: Fri Feb 08, 2013 1:47 pm
by slansing
It should, I was under the impression you just wanted to verify.
Re: Nagios client cleanup
Posted: Fri Feb 08, 2013 2:55 pm
by kruserm
No I have deleted clients but I still see them in that directory.
Re: Nagios client cleanup
Posted: Fri Feb 08, 2013 4:01 pm
by lmiltchev
Yes, we don't delete these files when we remove the host/services, because many users need historical data. I agree that there should be an option to remove these files if you don't need them. This is not implemented, yet in Nagios XI but I will add it to our todo list as a feature request.
Re: Nagios client cleanup
Posted: Mon Feb 11, 2013 8:10 am
by kruserm
Thanks for the info and look forward to that feature in a future release.
Re: Nagios client cleanup
Posted: Mon Feb 11, 2013 10:23 am
by mguthrie
The home-grown solution for this would be to use the find command to look for rrd file modification times older than X number of days, and then prune them if they're older than the threshold.