Delete a specific graph data

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Delete a specific graph data

Post by paulol »

How can i delete a specific graph data?

For example: I want to delete Series 2;
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Delete a specific graph data

Post by abrist »

Just to clarify, are you looks to remove a data source from the rrd, or remove the whole rrd itself?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Delete a specific graph data

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Delete a specific graph data

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Delete a specific graph data

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Re: Delete a specific graph data

Post by paulol »

I got it.

I ran the command:

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

Thx.
Locked