Page 1 of 1

Performance data removal for specific time frames

Posted: Tue Apr 12, 2016 9:59 am
by emartine
We had a server that went live not long ago and noticed that we had data in place from when we were doing performance testing so the load on the server is high, etc. We do not want our customers to see the previous loads since they will question it as being a problem with the server. How can we delete performance data from for a single server that exits before 4/11/2016?

Re: Performance data removal for specific time frames

Posted: Tue Apr 12, 2016 1:51 pm
by bheden
There isn't any elegant way to do this as far as I know.

You'll have to export the RRD file containing the performance data as XML, edit the XML, and then restore the XML to the RRD file.

It'll look something like this on the command line (using localhost/current load as an example host/service combo):

Code: Select all

cd /usr/local/nagios/share/perfdata/localhost
rrdtool dump Current_Load.rrd > rrd_to_xml
vi rrd_to_xml (edit your data here)
rrdtool restore --force-overwrite rrd_to_xml Current_Load.rrd
If you figure out a better way, please let me know!