add 2nd data source to rrd

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tepindo
Posts: 2
Joined: Mon Jul 05, 2010 9:38 pm

add 2nd data source to rrd

Post by tepindo »

we recently (accidentally) add 2nd datasource to the plugin output, but apparently this 2nd datasource, is not created automatically to the rrd file, so the performance image is broken, is there any change to create 2nd datasource to the rrd file without recreate the rrd file, since it holds 5 months performance data of our critical system. error of the pnp is:

RRDTool exits with errors -> ERROR: No DS called '2' in '/usr/local/nagios/share/perfdata/xxxx/xxxxx.rrd'
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: add 2nd data source to rrd

Post by admin »

Anyone sure how to do this?

One workaround would be to change the plugin output to only output one data source. That might make RRD update the graph again. You might be able to use the rrdaddsource command to add a new data source to the existing RRD. Before trying this, I would check the rrdtool mailing lists/FAQs for information on how best to do this, and make a backup copy of the RRD file in case things go wrong.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: add 2nd data source to rrd

Post by mmestnik »

I would move this file out of the way and let PnP create the rrd file *correctly* then using the rrdtool dump the new XML. You could then use these settings with rrdaddsource or combine this XML with the XML dump with all your data fixing it up enough so an XML restore would succeed.

If you wanted you could attach both rrd files and I could attempt this maneuver and then document it for every one.
Locked