Deleted Total All Data Sources cdef

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

Moderators: Developers, Moderators

Post Reply
WPEric
Posts: 5
Joined: Fri Feb 22, 2008 2:46 pm

Deleted Total All Data Sources cdef

Post by WPEric »

I accidentally erased it trying to get load graphs to work.
How do I get it back? Load and CPU graphs show up as a broken image now.
Thanks.
E
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Data is stored in the rrd files. Edit the data sources and put back the old rrd files.
WPEric
Posts: 5
Joined: Fri Feb 22, 2008 2:46 pm

Post by WPEric »

Thanks for the reply. I'm not sure I understand what you mean.
In console, graph management, cdef's there used to be one named "Total All Data Sources". I edited it in hopes that the load graphs for all of my machines would work. Unfortunately, my edit caused cacti to hang everytime I tried to go back in to revert it to how it was originally.
So I figured I'd delete it and try to re-create it with the same name.
"Total All Data Sources" with one cdef item "Special Data Source: ALL_DATA_SOURCES_NODUPS"
I did notice that this now uses an id of 19 instead of 12. Everything probably references the old one as id 12.
Would changing the id # back to 12 in the cdef table of the database take care of it?
Thanks again.
WPEric
Posts: 5
Joined: Fri Feb 22, 2008 2:46 pm

Post by WPEric »

Also, here is the output next to the broken image

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=1203631927 \
--end=1203718327 \
--title="RARP VMWare Server - Load Average" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent=0 \
COMMENT:"From 2008/02/21 14\:12\:07 To 2008/02/22 14\:12\:07\c" \
COMMENT:" \n" \
--vertical-label="processes in the run queue" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/rarp_vmware_server_load_1min_2126.rrd":load_1min:AVERAGE \
DEF:b="/var/www/html/cacti/rra/rarp_vmware_server_load_5min_2128.rrd":load_5min:AVERAGE \
DEF:c="/var/www/html/cacti/rra/rarp_vmware_server_load_15min_2127.rrd":load_15min:AVERAGE \
CDEF:cdefg= \
AREA:a#EACC00:"1 Minute Average" \
GPRINT:a:LAST:" Current\:%8.2lf\n" \
AREA:b#EA8F00:"5 Minute Average":STACK \
GPRINT:b:LAST:" Current\:%8.2lf\n" \
AREA:c#FF0000:"15 Minute Average":STACK \
GPRINT:c:LAST:"Current\:%8.2lf\n" \
LINE1:cdefg#000000:"Total"


"CDEF:cdefg= \" doesn't seem right?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Correct. So you accidentally deleted a specific CDEF? Do you remember it's name? Try to find it in cacti.sql file
Reinhard
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

as Reinhard said, can you try this :

Code: Select all

INSERT INTO `cdef` VALUES (12,'f1ac79f05f255c02f914c920f1038c54','Total All Data Sources');
INSERT INTO `cdef_items` VALUES (12,'4355c197998c7f8b285be7821ddc6da4',3,2,6,'-1');
Or, more simple, rename your new CDEF to '12' using PhpMyAdmin.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
WPEric
Posts: 5
Joined: Fri Feb 22, 2008 2:46 pm

Post by WPEric »

Thanks for your help. I renamed it cdef 12 and changed the hash in cdef_items but still no joy. The prior admin had set this up and the load graphs weren't working anyway so I've decided to just rebuild with the latest version.

After the changes, one cdef show up but there is still one that is blank.

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="ACK (VMWare Server) - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="percent" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/ack_vmware_server_cpu_system_378.rrd":cpu_system:AVERAGE \
DEF:b="/var/www/html/cacti/rra/ack_vmware_server_cpu_user_379.rrd":cpu_user:AVERAGE \
DEF:c="/var/www/html/cacti/rra/ack_vmware_server_cpu_nice_377.rrd":cpu_nice:AVERAGE \
CDEF:cdefa=TIME,1203959095,GT,a,a,UN,0,a,IF,IF,TIME,1203959095,GT,b,b,UN,0,b,IF,IF,TIME,1203959095,GT,c,c,UN,0,c,IF,IF,+,+ \
CDEF:cdefbc= \
AREA:cdefa#FF0000:"System" \
GPRINT:a:LAST:"Current\:%8.2lf%s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n" \
AREA:b#0000FF:"User":STACK \
GPRINT:b:LAST:" Current\:%8.2lf%s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:b:MAX:"Maximum\:%8.2lf%s\n" \
AREA:c#00FF00:"Nice":STACK \
GPRINT:c:LAST:" Current\:%8.2lf%s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:c:MAX:"Maximum\:%8.2lf%s\n" \
LINE1:cdefbc#000000:"Total" \
GPRINT:cdefbc:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf%s"
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

WPEric wrote:Thanks for your help. I renamed it cdef 12 and changed the hash in cdef_items but still no joy. The prior admin had set this up and the load graphs weren't working anyway so I've decided to just rebuild with the latest version.
How did you rebuild? From scratch or by updating?
Reinhard
WPEric
Posts: 5
Joined: Fri Feb 22, 2008 2:46 pm

Post by WPEric »

From scratch.
I figured it would be a better way to learn anyway ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest