Page 1 of 1

Delete a specific graph data

Posted: Fri Apr 17, 2015 11:27 am
by paulol
How can i delete a specific graph data?

For example: I want to delete Series 2;

Re: Delete a specific graph data

Posted: Fri Apr 17, 2015 12:04 pm
by abrist
Just to clarify, are you looks to remove a data source from the rrd, or remove the whole rrd itself?

Re: Delete a specific graph data

Posted: Fri Apr 17, 2015 12:05 pm
by lmiltchev
I believe you will need to modify the plugin to return only the "Total" perfdata, remove the RRD and XML file for this check and wait for them to be recreated. You will lose all of the historical data. I am not sure if there is an easier/better way of doing this.

Re: Delete a specific graph data

Posted: Fri Apr 17, 2015 12:16 pm
by paulol
Just to clarify, are you looks to remove a data source from the rrd, or remove the whole rrd itself?
I would like to remove data source from the rrd, but if its not possible, i'll remove the whole rrd.

How could i remove the RRD and XML file?

Re: Delete a specific graph data

Posted: Fri Apr 17, 2015 12:26 pm
by abrist
You need to first remove stop the datasource from returning in the check, because if it is still returning, it will get added back to the edited/new rrd.
Once you have done that, you could attempt to remove the datasource with a tool like:
https://github.com/rarylson/rrdedit
Or you can just remove the whole rrd by deleting the file:

Code: Select all

/usr/local/nagios/share/perfdata/<host>/<service description>.rrd
The rrd will be recreated and the xml overwritten on the next check.

Re: Delete a specific graph data

Posted: Fri Apr 17, 2015 2:26 pm
by paulol
I got it.

I ran the command:

find /usr/local/nagios/share/perfdata -iname Qtde_de_Processos* -exec rm -f {} \;

Thx.