HELP: Removed data source item from data template by mistake

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
stickman
Posts: 9
Joined: Tue Mar 09, 2010 11:41 pm

HELP: Removed data source item from data template by mistake

Post by stickman »

Hi,
I'm not 100% how it happen but I think while I was browsing through the Interface - Traffic data template I must have hit the red x next to traffic_in data source by mistake.

Now any graph using the graph template which uses the Interface - Traffic data template all showing inbound traffic at the same level as outbound traffic.

I've attempted to readd data source item traffic_in back in and also have update all the Interface - Traffic graph templates to use the traffic_in data source but the traffic graphs are still stuffed.

Hope people can give me some quick tips on restoring my traffic graphs sources. Hope no data will actually be lost :(
stickman
Posts: 9
Joined: Tue Mar 09, 2010 11:41 pm

Post by stickman »

Ok I've fixed up the data source, data template, graph template and data queries. Any new graph does graph correctly with both inbound and outbound data.

However, any existing graph still only contain outbound data. See screen capture of one example of a graph where the Inbound Data Source requires re-adding in.

Is there a way to do populate the Inbound Data Source field for ALL traffic graphs using this graph template in cacti? I assume it might be able to be done via MYSQL but can someone confirm?

Any tips on how would be much appreciated as there are hundreds and hundreds of graphs requiring updating.
Attachments
graph.jpg
graph.jpg (243.29 KiB) Viewed 1030 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please see the related data source. Take the rrd file and run "rrdtool info" against that file.
If both data sources are in, there's a solution.
If not, please delete the rrd file. Cacti will re-create it on the next polling interval using the CURRENT definitions.
R.
stickman
Posts: 9
Joined: Tue Mar 09, 2010 11:41 pm

Post by stickman »

The RRD file does contain all historical data prior to my mistake. If I take an existing graph and select the correct Inbound Data Source under the Graph Item Field in Graph Mgmt then it will show all historical data then a gap from the time when I made the mistake then it will start graphing all inbound traffic again when the source is put back in.

Now I rather not have to do this manually for 1000+ traffic graphs in our system.

At the moment I'm manually updating the few important graphs while still looking at any viable soultion.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

If you do not care about loosing historical data for the "less important" data sources, the easiest way would be to delete the rrd files as already stated.
Else, you will have to create some complex update SQL to solve this. I'm not aware of any existing solution
R.
stickman
Posts: 9
Joined: Tue Mar 09, 2010 11:41 pm

Post by stickman »

Thanks, that's what I have also realised after looking at possible options via sql.

I wish there was a confirmation before any data source deletion. :)
stickman
Posts: 9
Joined: Tue Mar 09, 2010 11:41 pm

Post by stickman »

http://forums.cacti.net/viewtopic.php?t=35816

I think the above would have been really helped me. Since I've already fixed up my issue before discovering this I cannot confirm the script is 100% working
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests