[HOWTO] Color coded percent utilization

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
jay
Cacti User
Posts: 390
Joined: Wed Aug 31, 2005 8:55 am
Location: Bristol, England

Post by jay »

Hi

I have just added the following line to all my cdefs for BW utilisation in and outbound |query_ifSpeed|,/,100,*,

I have created a new graph and also checked the status of another graph. It seems to have compressed the data now on the graph. See attached screenshot.

I have also attached the graph properties so you can see where i have added the above command to the cdef.

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="brazw01 - Circuit Utilization - Se0/0" \
--base=1000 \
--height=120 \
--width=550 \
--upper-limit=1000 \
--lower-limit=0 \
--vertical-label="Percent" \
--slope-mode \
DEF:a="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:b="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:c="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:d="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:e="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:f="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:g="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:h="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:i="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:j="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:ba="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_in:LAST \
DEF:bb="C\:/Apache2/htdocs/Cacti/rra/brazw01_traffic_in_1115.rrd":traffic_out:LAST \
CDEF:cdefa=ba,2048000,/,100,*,8,* \
CDEF:cdefc=a,2048000,/,100,*,8,*,10,LE,a,2048000,/,100,*,8,*,0,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefd=a,2048000,/,100,*,8,*,20,LE,a,2048000,/,100,*,8,*,10,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefe=a,2048000,/,100,*,8,*,30,LE,a,2048000,/,100,*,8,*,20,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdeff=a,2048000,/,100,*,8,*,40,LE,a,2048000,/,100,*,8,*,30,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefg=a,2048000,/,100,*,8,*,50,LE,a,2048000,/,100,*,8,*,40,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefh=a,2048000,/,100,*,8,*,60,LE,a,2048000,/,100,*,8,*,50,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefi=a,2048000,/,100,*,8,*,70,LE,a,2048000,/,100,*,8,*,60,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefj=a,2048000,/,100,*,8,*,80,LE,a,2048000,/,100,*,8,*,70,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefba=a,2048000,/,100,*,8,*,90,LE,a,2048000,/,100,*,8,*,80,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefbb=a,2048000,/,100,*,8,*,5000,LE,a,2048000,/,100,*,8,*,90,GT,a,2048000,/,100,*,8,*,UNKN,IF,UNKN,IF \
CDEF:cdefbc=bb,2048000,/,100,*,8,* \
CDEF:cdefbe=b,2048000,/,100,*,8,*,10,LE,b,2048000,/,100,*,8,*,0,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefbf=b,2048000,/,100,*,8,*,20,LE,b,2048000,/,100,*,8,*,10,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefbg=b,2048000,/,100,*,8,*,30,LE,b,2048000,/,100,*,8,*,20,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefbh=b,2048000,/,100,*,8,*,40,LE,b,2048000,/,100,*,8,*,30,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefbi=b,2048000,/,100,*,8,*,50,LE,b,2048000,/,100,*,8,*,40,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefbj=b,2048000,/,100,*,8,*,60,LE,b,2048000,/,100,*,8,*,50,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefca=b,2048000,/,100,*,8,*,70,LE,b,2048000,/,100,*,8,*,60,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefcb=b,2048000,/,100,*,8,*,80,LE,b,2048000,/,100,*,8,*,70,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefcc=b,2048000,/,100,*,8,*,90,LE,b,2048000,/,100,*,8,*,80,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefcd=b,2048000,/,100,*,8,*,5000,LE,b,2048000,/,100,*,8,*,90,GT,b,2048000,/,100,*,8,*,-1,*,UNKN,IF,UNKN,IF \
CDEF:cdefcg=ba,8,* \
CDEF:cdefdg=bb,8,* \
LINE1:cdefa#C0C0C0:"" \
COMMENT:"InBound" \
AREA:cdefc#009000:" 0 - 10%" \
AREA:cdefd#00C000:"10 - 20%" \
AREA:cdefe#00F800:"20 - 30%" \
AREA:cdeff#FFFF58:"30 - 40%" \
AREA:cdefg#FFF000:"40 - 50%" \
AREA:cdefh#FFB800:"50 - 60%" \
AREA:cdefi#FFA000:"60 - 70%" \
AREA:cdefj#FF6000:"70 - 80%" \
AREA:cdefba#D80000:"80 - 90%" \
AREA:cdefbb#B80000:"90 - 100%\n" \
LINE2:cdefbc#C0C0C0:"" \
COMMENT:"OutBound" \
AREA:cdefbe#009000:"0 - 10%" \
AREA:cdefbf#00C000:"10 - 20%" \
AREA:cdefbg#00F800:"20 - 30%" \
AREA:cdefbh#FFFF58:"30 - 40%" \
AREA:cdefbi#FFFF00:"40 - 50%" \
AREA:cdefbj#FFB800:"50 - 60%" \
AREA:cdefca#FFA000:"60 - 70%" \
AREA:cdefcb#FF6000:"70 - 80%" \
AREA:cdefcc#D80000:"80 - 90%" \
AREA:cdefcd#B80000:"90 - 100%\n" \
COMMENT:"CIRCUIT SPEED\: 2048000 bits per second\n" \
COMMENT:"INBOUND TRAFFIC RATE" \
GPRINT:cdefcg:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefcg:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefcg:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefcg:MAX:"Max\:%8.2lf %s\n" \
COMMENT:"INBOUND TRAFFIC %" \
GPRINT:cdefa:LAST:" Current\:(%5.2lf %%)" \
GPRINT:cdefa:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefa:MIN:" Min\:(%5.2lf %%)" \
GPRINT:cdefa:MAX:"Max\:(%5.2lf %%)\n" \
COMMENT:"OUTBOUND TRAFFIC RATE" \
GPRINT:cdefdg:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefdg:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefdg:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefdg:MAX:"Max\:%8.2lf %s\n" \
COMMENT:"OUTBOUND TRAFFIC %" \
GPRINT:cdefbc:LAST:" Current\:(%5.2lf %%)" \
GPRINT:cdefbc:AVERAGE:"Avg\:(%5.2lf %%)" \
GPRINT:cdefbc:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefbc:MAX:"Max\:(%5.2lf %%)\n" \
COMMENT:"TOTAL DATA MOVED" \
COMMENT:" Inbound\: 161.05 MB" \
COMMENT:"Outbound\: 165.35 MB\n" \
COMMENT:"Last Poll\: Wed 29 Mar 15\:31\:01 BST 2006"



I have a feeling either my templates are foooked or the template needs to be redesigned. It should be picking up both data sources when you create a new graph. When you add the outbound traffic DS to the graph it then seems to replicate the data from the inbound traffic and either uses this DS or just uses the same data. If you leave the template to use one DS then the graphs seem to show the data correctly.

SRY can you look at your templates and see if they are showing duplicate data in the graphs. I wonder if maybe u have the same issue as myself but haven't noticed it.

Could you post your template on the forum so i can have a look and see what differences there are between mine and yours. If you could add the CDEFS and all as well please. I will test this on my development server i now have set up.

Jay
Attachments
Updated-circ-utilisation.JPG
Updated-circ-utilisation.JPG (54.88 KiB) Viewed 12519 times
Cacti Version 0.8.7e, Spine 0.8.7e, Apache 2.2.15, Mysql 5.0.88, PHP 5.2.13, RRDTool 1.2.30, NET-SNMP 5.5
Quad Core AMD Opteron Processor 2384, 2.70Ghz, 2GB RAM , 1 CPU used
Windows Server 2003 (X64), VMWARE ESX
Plugins: Aggregate 0.75

SYSTEM STATS: Time:12.5140 Method:spine Processes:2 Threads:15 Hosts:400 HostsPerProcess:200 DataSources:2909 RRDsProcessed:1384
jay
Cacti User
Posts: 390
Joined: Wed Aug 31, 2005 8:55 am
Location: Bristol, England

Post by jay »

Hi

Have you had a chance to look at this yet????

Jay
Cacti Version 0.8.7e, Spine 0.8.7e, Apache 2.2.15, Mysql 5.0.88, PHP 5.2.13, RRDTool 1.2.30, NET-SNMP 5.5
Quad Core AMD Opteron Processor 2384, 2.70Ghz, 2GB RAM , 1 CPU used
Windows Server 2003 (X64), VMWARE ESX
Plugins: Aggregate 0.75

SYSTEM STATS: Time:12.5140 Method:spine Processes:2 Threads:15 Hosts:400 HostsPerProcess:200 DataSources:2909 RRDsProcessed:1384
barracuda
Posts: 9
Joined: Fri May 12, 2006 11:09 am

need help with graph creation

Post by barracuda »

I'm having a hard time trying to figure out this out. Does anyone know what can cause this? Doesn't the order of this come from the graph templates?

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="JJC Router - Circuit Utilization Summary - Tunnel0" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Percent" \
DEF:a="/var/www/html/cacti/rra/jjc_router_traffic_in_195.rrd":traffic_in:LAST \
DEF:b="/var/www/html/cacti/rra/jjc_router_traffic_in_195.rrd":traffic_out:LAST \
CDEF:cdefa=a,10000000,/,100,*,8,*\ \
CDEF:cdefb=a,10000000,/,100,*,8,*\ \
CDEF:cdefc=a,b,+,10000000,/,100,*,8,*,10,LE,a,b,+,10000000,/,100,*,8,*,0,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefd=a,b,+,10000000,/,100,*,8,*,30,LE,a,b,+,10000000,/,100,*,8,*,20,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefe=a,b,+,10000000,/,100,*,8,*,50,LE,a,b,+,10000000,/,100,*,8,*,40,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdeff=a,b,+,10000000,/,100,*,8,*,70,LE,a,b,+,10000000,/,100,*,8,*,60,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefg=a,b,+,10000000,/,100,*,8,*,90,LE,a,b,+,10000000,/,100,*,8,*,80,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefh=a,b,+,10000000,/,100,*,8,*,20,LE,a,b,+,10000000,/,100,*,8,*,10,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefi=a,b,+,10000000,/,100,*,8,*,40,LE,a,b,+,10000000,/,100,*,8,*,30,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefj=a,b,+,10000000,/,100,*,8,*,60,LE,a,b,+,10000000,/,100,*,8,*,50,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefba=a,b,+,10000000,/,100,*,8,*,80,LE,a,b,+,10000000,/,100,*,8,*,70,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefbb=a,b,+,10000000,/,100,*,8,*,5000,LE,a,b,+,10000000,/,100,*,8,*,90,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefbc=a,10000000,/,100,*,8,*\ \
CDEF:cdefbe=a,8,* \
CDEF:cdefbj= \
CDEF:cdefce=b,8,* \
CDEF:cdefcj= \
AREA:cdefa:"" \
AREA:cdefb:"" \
AREA:cdefc#00E800:" 0 - 10%" \
AREA:cdefd#B8FF00:"20 - 30%" \
AREA:cdefe#FFFF00:"40 - 50%" \
AREA:cdeff#FF8800:"60 - 70%" \
AREA:cdefg#FF3000:"80 - 90%\n" \
AREA:cdefh#00FF00:"10 - 20%" \
AREA:cdefi#FFFF80:"30 - 40%" \
AREA:cdefj#FFA000:"50 - 60%" \
AREA:cdefba#FF5800:"70 - 80%" \
AREA:cdefbb#FF0000:"90 - 100%\n" \
COMMENT:"CIRCUIT SPEED: 10000000 bits per second\n" \
COMMENT:"INBOUND TRAFFIC RATE" \
GPRINT:cdefbe:AVERAGE:" Avg\:%8.2lf%s" \
GPRINT:cdefbe:MIN:"Min\:%8.2lf%s" \
GPRINT:cdefbe:MAX:"Max\:%8.2lf%s" \
GPRINT:cdefbe:LAST:"Current\:%8.2lf%s\n" \
COMMENT:"INBOUND TRAFFIC %" \
GPRINT:cdefbj:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefbj:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefbj:MAX:"Max\:(%5.2lf %%)" \
GPRINT:cdefbj:LAST:"Current\:(%5.2lf %%)\n" \
COMMENT:"OUTBOUND TRAFFIC RATE" \
GPRINT:cdefce:AVERAGE:"Avg\:%8.2lf%s" \
GPRINT:cdefce:MIN:"Min\:%8.2lf%s" \
GPRINT:cdefce:MAX:"Max\:%8.2lf%s" \
GPRINT:cdefce:LAST:"Current\:%8.2lf%s\n" \
COMMENT:"OUTBOUND TRAFFIC %" \
GPRINT:cdefcj:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefcj:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefcj:MAX:"Max\:(%5.2lf %%)" \
GPRINT:b:LAST:"Current\:(%5.2lf %%)\n" \
COMMENT:"TOTAL DATA MOVED" \
COMMENT:" Inbound: 2.66 MB" \
COMMENT:"Outbound: 1.21 MB"
RRDTool Says:

ERROR: can't parse CDEF 'cdefbj='
Thanks for any help with this!
jay
Cacti User
Posts: 390
Joined: Wed Aug 31, 2005 8:55 am
Location: Bristol, England

Post by jay »

Hi

Go to your graph template and look at your grpints for the inbound traffic %. Check all the fields are filled in correctly and that your cdefs are correct. The error you see normally indicates a field is filled in incorrectly.

Jay
Cacti Version 0.8.7e, Spine 0.8.7e, Apache 2.2.15, Mysql 5.0.88, PHP 5.2.13, RRDTool 1.2.30, NET-SNMP 5.5
Quad Core AMD Opteron Processor 2384, 2.70Ghz, 2GB RAM , 1 CPU used
Windows Server 2003 (X64), VMWARE ESX
Plugins: Aggregate 0.75

SYSTEM STATS: Time:12.5140 Method:spine Processes:2 Threads:15 Hosts:400 HostsPerProcess:200 DataSources:2909 RRDsProcessed:1384
barracuda
Posts: 9
Joined: Fri May 12, 2006 11:09 am

Post by barracuda »

jay wrote:Hi

Go to your graph template and look at your grpints for the inbound traffic %. Check all the fields are filled in correctly and that your cdefs are correct. The error you see normally indicates a field is filled in incorrectly.

Jay
Sorry for the slow response. Got caught up in other projects. I looked at the settings in the inbount traffic% under the graph template labeled "Interface - Circuit Utilization Summary". the CDEF function was set to "Turn Bytes to Bits" but I changed it to "None" based on the other graph templates are set to "None".
And I'm not sure what exactly the settings are suppose to be.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: need help with graph creation

Post by gandalf »

barracuda wrote:
....
CDEF:cdefbc=a,10000000,/,100,*,8,*\ \
CDEF:cdefbe=a,8,* \
CDEF:cdefbj= \
CDEF:cdefce=b,8,* \
CDEF:cdefcj= \
AREA:cdefa:"" \
AREA:cdefb:"" \
AREA:cdefc#00E800:" 0 - 10%" \
...
COMMENT:"CIRCUIT SPEED: 10000000 bits per second\n" \
COMMENT:"INBOUND TRAFFIC RATE" \
GPRINT:cdefbe:AVERAGE:" Avg\:%8.2lf%s" \
...
COMMENT:"INBOUND TRAFFIC %" \
GPRINT:cdefbj:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefbj:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefbj:MAX:"Max\:(%5.2lf %%)" \
GPRINT:cdefbj:LAST:"Current\:(%5.2lf %%)\n" \
COMMENT:"OUTBOUND TRAFFIC RATE" \
GPRINT:cdefce:AVERAGE:"Avg\:%8.2lf%s" \
...
COMMENT:"OUTBOUND TRAFFIC %" \
GPRINT:cdefcj:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefcj:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefcj:MAX:"Max\:(%5.2lf %%)" \
GPRINT:b:LAST:"Current\:(%5.2lf %%)\n" \
COMMENT:"TOTAL DATA MOVED" \
...
The failing cdefs (Cdefbj and cdefcj) are associated with inbound/outbound traffic %. Both cdef's seem to be empty. You'll want to correct that. The "Turn bytes into bits" cdef's were correct! ANd see, that the last Graph Item GPRINT:b:LAST:"Current\:(%5.2lf %%)\n" \ references the wrong cdef. I suppose, it must reference cdefcj (the same cdef as the 3 items before).
Reinhard
barracuda
Posts: 9
Joined: Fri May 12, 2006 11:09 am

Post by barracuda »

I think I fixed the other problem. I deleted all references to circuit utilizations, CDEFs, etc. I imported the cir_util.xml that is posted in this thread. I don't have anymore problems with cdefcj being empty. But I got other problem: graph debug (when creating a utilization graph) now says "ERROR: RPN final stack size != 1". Here is the output from Cacti
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Circuit Utilization Summary - Se0/0.1" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Percent" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/pcs_router_traffic_in_201.rrd":traffic_in:LAST \
DEF:b="/var/www/html/cacti/rra/pcs_router_traffic_in_201.rrd":traffic_out:LAST \
CDEF:cdefa=a,1544000,/,100,*,8,* \
CDEF:cdefb=b,1544000,/,100,*,8,* \
CDEF:cdefc=a,b,+,1544000,/,100,*,8,*,10,LE,a,b,+,1544000,/,100,*,8,*,0,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefd=a,b,+,1544000,/,100,*,8,*,30,LE,a,b,+,1544000,/,100,*,8,*,20,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefe=a,b,+,1544000,/,100,*,8,*,50,LE,a,b,+,1544000,/,100,*,8,*,40,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdeff=a,b,+,1544000,/,100,*,8,*,70,LE,a,b,+,1544000,/,100,*,8,*,60,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefg=a,b,+,1544000,/,100,*,8,*,90,LE,a,b,+,1544000,/,100,*,8,*,80,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefh=a,b,+,1544000,/,100,*,8,*,20,LE,a,b,+,1544000,/,100,*,8,*,10,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefi=a,b,+,1544000,/,100,*,8,*,40,LE,a,b,+,1544000,/,100,*,8,*,30,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefj=a,b,+,1544000,/,100,*,8,*,60,LE,a,b,+,1544000,/,100,*,8,*,50,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefba=a,b,+,1544000,/,100,*,8,*,80,LE,a,b,+,1544000,/,100,*,8,*,70,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefbb=a,b,+,1544000,/,100,*,8,*,5000,LE,a,b,+,1544000,/,100,*,8,*,90,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefbe=a,8,*,a,8,* \
CDEF:cdefce=b,8,*,b,8,* \
AREA:cdefa:"" \
AREA:cdefb:"":STACK \
AREA:cdefc#3ACE0C:" 0 - 10%":STACK \
AREA:cdefd#99FF99:"20 - 30%":STACK \
AREA:cdefe#FFFF00:"40 - 50%":STACK \
AREA:cdeff#FF8C1A:"60 - 70%":STACK \
AREA:cdefg#FF3333:"80 - 90%\n":STACK \
AREA:cdefh#00FF00:"10 - 20%":STACK \
AREA:cdefi#FFFF80:"30 - 40%":STACK \
AREA:cdefj#FFA54C:"50 - 60%":STACK \
AREA:cdefba#FF5F00:"70 - 80%":STACK \
AREA:cdefbb#FF0000:"90 - 100%\n":STACK \
COMMENT:"CIRCUIT SPEED\: 1544000 bits per second\n" \
COMMENT:"INBOUND TRAFFIC RATE" \
GPRINT:cdefbe:AVERAGE:" Avg\:%8.2lf%s" \
GPRINT:cdefbe:MIN:"Min\:%8.2lf%s" \
GPRINT:cdefbe:MAX:"Max\:%8.2lf%s" \
GPRINT:cdefbe:LAST:"Current\:%8.2lf%s\n" \
COMMENT:"INBOUND TRAFFIC %" \
GPRINT:cdefa:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefa:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefa:MAX:"Max\:(%5.2lf %%)" \
GPRINT:cdefa:LAST:"Current\:(%5.2lf %%)\n" \
COMMENT:"OUTBOUND TRAFFIC RATE" \
GPRINT:cdefce:AVERAGE:"Avg\:%8.2lf%s" \
GPRINT:cdefce:MIN:"Min\:%8.2lf%s" \
GPRINT:cdefce:MAX:"Max\:%8.2lf%s" \
GPRINT:cdefce:LAST:"Current\:%8.2lf%s\n" \
COMMENT:"OUTBOUND TRAFFIC %" \
GPRINT:cdefb:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefb:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefb:MAX:"Max\:(%5.2lf %%)" \
GPRINT:cdefb:LAST:"Current\:(%5.2lf %%)\n" \
COMMENT:"TOTAL DATA MOVED" \
COMMENT:" Inbound\: 1.51 GB" \
COMMENT:"Outbound\: 3.71 GB"
RRDTool Says:

ERROR: RPN final stack size != 1
I also recently upgraded rrdtool to 1.2.13 to see if this would help too. But don't know if this is the cause for this particular problem or not. All of my regular graphs work fine, it's just trying to do these utilization graphs.

Thanks Jay for all of your help with this! and everyone else too!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

cdefbe and cdefce are looking weird. For more debugging, please copy those statements to some file you may want to run from cli. Then it is easier to omit some lines to narrow the problems
Reinhard
barracuda
Posts: 9
Joined: Fri May 12, 2006 11:09 am

Post by barracuda »

Thanks Reinhard for the post:

But i'm not sure what your talking about with "copy those statements to some file you may want to run from cli". Which statements are you talking about?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

In fact, it's only one loooong statement extending over "some" lines. If you copy this to a .sh file, you may play around with it until you get the results wanted. Then, it's time to put it into cacti. As I said already, those cdef's are weird, so start omitting them and see if everythings fine up to this point
Reinhard
barracuda
Posts: 9
Joined: Fri May 12, 2006 11:09 am

Post by barracuda »

lvm wrote:cdefbe and cdefce are looking weird. For more debugging, please copy those statements to some file you may want to run from cli. Then it is easier to omit some lines to narrow the problems
Reinhard
Where is this stored in cacti? Are cdefs in the database? or are these in xml files? or somewhere else?

Also, is the output from "Graph Debug mode" in the same order as your Graph template structure? It sure does look like it.
barracuda
Posts: 9
Joined: Fri May 12, 2006 11:09 am

The great mistery is over

Post by barracuda »

Found the problem and Reinhard was right. It was a cdef. Somehow the cdef labeled "Turn Bytes into Bits" got a double entry into it. It showed it had "cdef=CURRENT_DATA_SOURCE,8,*,CURRENT_DATE_SOURCE,8,*". Removed one half of the statement and bandwidth utilization graph started to work.
KMC
Posts: 10
Joined: Fri Oct 27, 2006 4:45 pm

Trouble with template

Post by KMC »

I imported the template onto a Windows Cacti install. I am having trouble getting it to produce a graph. I tried to put the graph into debug mode, but it locks cacti up to the point I have to restart the WWW service. I am a NOOB, help please.
I noticed it doesn't have a cdefb, in this graph output, but when I look at the CDEF's they are all there.
c:/cacti/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=1161898799 \
--end=1161985199 \
--title="Circuit - Utilization Summary - KC_7204 Mu1 FastEthernet0/0" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2006/10/26 16\:39\:59 To 2006/10/27 16\:39\:59\c" \
COMMENT:" \n" \
--vertical-label="Percent" \
--slope-mode \
DEF:a="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:b="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_out:LAST \
DEF:c="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:d="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:e="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:f="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:g="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:h="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:i="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:j="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:ba="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
DEF:bb="c\:/Inetpub/wwwroot/cacti/rra/kc_7204_traffic_in_57.rrd":traffic_in:LAST \
CDEF:cdefa= \
CDEF:cdefd=a,b,+,100000000,/,100,*,8,*,30,LE,a,b,+,100000000,/,100,*,8,*,20,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefe=a,b,+,100000000,/,100,*,8,*,50,LE,a,b,+,100000000,/,100,*,8,*,40,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdeff= \
CDEF:cdefh=a,b,+,100000000,/,100,*,8,*,20,LE,a,b,+,100000000,/,100,*,8,*,10,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefi= \
CDEF:cdefj=a,b,+,100000000,/,100,*,8,*,60,LE,a,b,+,100000000,/,100,*,8,*,50,GT,NEGINF,UNKN,IF,UNKN,IF \
CDEF:cdefba= \
CDEF:cdefbb= \
CDEF:cdefbe=bb,8,* \
CDEF:cdefce=b,8,* \
CDEF:cdefcj= \
AREA:cdefa:"" \
AREA:b:"" \
AREA:bb#3ACE0C:" 0 - 10%":STACK \
AREA:cdefd#99FF99:"20 - 30%":STACK \
AREA:cdefe#FFFF00:"40 - 50%":STACK \
AREA:cdeff#FF8C1A:"60 - 70%":STACK \
AREA:bb#FF3333:"80 - 90%":STACK \
AREA:cdefh#00FF00:"10 - 20%":STACK \
AREA:cdefi#FFFF80:"30 - 40%":STACK \
AREA:cdefj#FFA54C:"50 - 60%":STACK \
AREA:cdefba#FF5F00:"70 - 80%":STACK \
AREA:cdefbb#FF0000:"90 - 100%\n":STACK \
COMMENT:"CIRCUIT SPEED\: 100000000 bits per second\n" \
COMMENT:"INBOUND TRAFFIC RATE" \
GPRINT:cdefbe:AVERAGE:" Avg\:%8.2lf%s" \
GPRINT:cdefbe:MIN:"Min\:%8.2lf%s" \
GPRINT:cdefbe:MAX:"Max\:%8.2lf%s" \
GPRINT:cdefbe:LAST:"Current\:%8.2lf%s\n" \
COMMENT:"INBOUND TRAFFIC %" \
GPRINT:cdefa:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefa:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefa:MAX:"Max\:(%5.2lf %%)" \
GPRINT:cdefa:LAST:"Current\:(%5.2lf %%)\n" \
COMMENT:"OUTBOUND TRAFFIC RATE" \
GPRINT:cdefce:AVERAGE:"Avg\:%8.2lf%s" \
GPRINT:cdefce:MIN:"Min\:%8.2lf%s" \
GPRINT:cdefce:MAX:"Max\:%8.2lf%s" \
GPRINT:cdefce:LAST:"Current\:%8.2lf%s\n" \
COMMENT:"OUTBOUND TRAFFIC %" \
GPRINT:cdefcj:AVERAGE:" Avg\:(%5.2lf %%)" \
GPRINT:cdefcj:MIN:"Min\:(%5.2lf %%)" \
GPRINT:cdefcj:MAX:"Max\:(%5.2lf %%)" \
GPRINT:cdefcj:LAST:"Current\:(%5.2lf %%)\n" \
COMMENT:"TOTAL DATA MOVED" \
COMMENT:" Inbound\: 21.05 GB" \
COMMENT:"Outbound\: 12.86 GB"
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Is there any error message when running this command? you may have a look at Graph management as well. Latest cacti will show errors there, at least in DEBUG mode
Reinhard
KMC
Posts: 10
Joined: Fri Oct 27, 2006 4:45 pm

Post by KMC »

How do I run this from the command line (I've never run a command this long from the Windows command prompt) ? Do I include all the \ in the command?
How do I put Cacti in debug mode so I could see those error messages?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests