Nagios client cleanup
Nagios client cleanup
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?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios client cleanup
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
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.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios client cleanup
It should, I was under the impression you just wanted to verify.
Re: Nagios client cleanup
No I have deleted clients but I still see them in that directory.
Re: Nagios client cleanup
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios client cleanup
Thanks for the info and look forward to that feature in a future release.
Re: Nagios client cleanup
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.