Outbound Data Sources - lost after template import
Moderators: Developers, Moderators
Outbound Data Sources - lost after template import
Hi,
Few days ago I have imported new Graph Template which has overwritten my customized version of Interface - Traffic (bits/sec). After that I have realized that on some of the graphs the Outbound Data Source is missing or it's the same as Input Data Source. All data sources seems to be intact. To correct this issue I have to check every graph and manually set the proper outbound data source again.
Is there a way to set it automagically by runnig some SQL update or at least select and display the list of the graphs which are affected by this issue?
I've attached the screenshot which gives a better overview of the problem.
Thanks in advance
Paul
Few days ago I have imported new Graph Template which has overwritten my customized version of Interface - Traffic (bits/sec). After that I have realized that on some of the graphs the Outbound Data Source is missing or it's the same as Input Data Source. All data sources seems to be intact. To correct this issue I have to check every graph and manually set the proper outbound data source again.
Is there a way to set it automagically by runnig some SQL update or at least select and display the list of the graphs which are affected by this issue?
I've attached the screenshot which gives a better overview of the problem.
Thanks in advance
Paul
- Attachments
-
- cacti.JPG (64.37 KiB) Viewed 2358 times
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Restore from your last backup. No backup. Likely not next time....
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: bump
How do you do it, then? Click wrench next to graph and post results.praxis wrote:^ bump
I'm having the exact same issue and re-importing doesnt seem to help (or perhaps I'm not doing it correctly). I have thousands of graphs in this state and would really hate to have to re-create them.
Ideas?
R.
Most of my interface graphs seem to be using the same rra for inbound and outbound...some of the graphs are using "None" for data sources. All necessary data sources exist, but I cant manually adjust the drop down on thousands of graphs.
I have found a default "interface - traffic (bits/sec)" template - if I import it, is there a chance that it will correct the existing graphs? I guess I'll give it a try, and just re-create the lot if it doesnt work.
I have found a default "interface - traffic (bits/sec)" template - if I import it, is there a chance that it will correct the existing graphs? I guess I'll give it a try, and just re-create the lot if it doesnt work.
hrmm
Bad news, the import didnt fix anything.
Good news, the import made all my graphs consistently broken.
All graphs are now using the outbound data source for each graph item field...since all data sources were created in pairs, I simply need a script that can walk all graphs of this template and decrement the inbound rra by 1 in the database...since all data sources were created in pairs, it's safe to assume that for each outbound data source x, the inbound data source is x - 1.
I would like to know however why updating a template mixes up the data sources in the graph item fields...I can reproduce this behavior fairly easily now.
I'm good with php, but suck at mysql and dont understand the cacti db structure, is there anyone that can get me started towards creating a fixit script as described above? even just a schema for the cacti db?
Good news, the import made all my graphs consistently broken.
All graphs are now using the outbound data source for each graph item field...since all data sources were created in pairs, I simply need a script that can walk all graphs of this template and decrement the inbound rra by 1 in the database...since all data sources were created in pairs, it's safe to assume that for each outbound data source x, the inbound data source is x - 1.
I would like to know however why updating a template mixes up the data sources in the graph item fields...I can reproduce this behavior fairly easily now.
I'm good with php, but suck at mysql and dont understand the cacti db structure, is there anyone that can get me started towards creating a fixit script as described above? even just a schema for the cacti db?
Re: hrmm
How come you haven't restored from your weekly backup?praxis wrote:Bad news, the import didnt fix anything.
http://docs.cacti.net/manual:087:99_ref ... ase_designpraxis wrote: even just a schema for the cacti db?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Thanks for the schema. A large number of these graphs have been broken for an unknown period of time (months ago when the template was changed presumably)...even if I could figure out when the Graph Field items were modified, I dont believe I have a backup that far in the past. If I did, I would still risk losing a lot of graph definitions that happened since.
Looking at my graph debug, there's only minor differences between a broken graph and a fixed one:
I'm still determined to fix this with a script if at all possible...I just need some clues to get started. Any ideas?
Looking at my graph debug, there's only minor differences between a broken graph and a fixed one:
Code: Select all
# broke
DEF:a="/www/html/cacti-0.8.7e/rra/128/12018.rrd":traffic_in:AVERAGE \
DEF:b="/www/html/cacti-0.8.7e/rra/128/12018.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefc=b,8,* \
CDEF:cdefd=a,8,* \
LINE1:cdefa#00CF00FF:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefc#002A97FF:"Outbound" \
GPRINT:cdefd:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefd:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf %s\n"
# fixed
DEF:a="/www/html/cacti-0.8.7e/rra/128/12018.rrd":traffic_in:AVERAGE \
DEF:b="/www/html/cacti-0.8.7e/rra/128/12018.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
LINE1:cdefa#00CF00FF:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefe#002A97FF:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"
Who is online
Users browsing this forum: No registered users and 1 guest