I just started working with cacti, and so far am *very* pleased. however, i've encountered some odd behavior when trying to build a graph similar to MRTG style. i'm pulling data from an existing rrd file, 2 ds (ds0 and ds1). i built a graph of 4 graph items (ds0 AVE, ds1 AVE, ds0 MAX, and ds1 MAX). everything looks good until i try to use "Turn bytes to bits" CDEF function on all 4 graph items. From the resulting RRD command, cacti still has 4 DEFs, one for each graph item, but its only doing 2 CDEFs and graphing each CDEF twice. as a result, 2 of my graph items vanish. I've gone over this and i cant see where im doing anything wrong, but i'm sure i cant be the first to try and do this. If anyone wants acutal access to view this i can set it up. Here is the resulting rrdtool source:
/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start="-604800" \
--title="UUNet" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="" \
DEF:a="/var/content/cricket/data/cricket-data/router-interfaces/core1.ric/uunet.rrd":ds0:AVERAGE \
DEF:b="/var/content/cricket/data/cricket-data/router-interfaces/core1.ric/uunet.rrd":ds0:MAX \
DEF:c="/var/content/cricket/data/cricket-data/router-interfaces/core1.ric/uunet.rrd":ds1:AVERAGE \
DEF:d="/var/content/cricket/data/cricket-data/router-interfaces/core1.ric/uunet.rrd":ds1:MAX \
CDEF:cdefa=b,8,* \
CDEF:cdefc=d,8,* \
AREA:cdefa#00694A:"" \
AREA:cdefa#00BF47:"" \
LINE1:cdefc#A150AA:"" \
LINE1:cdefc#0000FF:""
weirdness with bytes to bits CDEF
Moderators: Developers, Moderators
-
- Posts: 2
- Joined: Fri Dec 13, 2002 8:14 am
problem resolved
Just a note in case anyone else stumbles on this and has problems. The problem looks to be that cacti doesn't take into consideration the consolidation function when figuring out what graph item to apply a CDEF to. IE, if i use the same data source 2x on the the same graph (as separate graph items) but with different consolidation functions, the CDEF will only be applied to one of the graph items, not both. cacti must track things internally by the data source, and not the graph item. in my config im not using cacti's collector but cricket, so i was able to work around this. I just created 2 duplicate data sources, both sourcing of the same RRD file and ds name, source_1 and source_2. Then on my graphs i use source_1 for my AVERAGE graph item and source_2 for my MAX item. as the the same data is now represented by 2 *different* data sources, it works like a charm. Its a bit of a hack and more work, but i'm (slowly) working on a cricket -> cacti autoconfig which should make this a non issue.
Who is online
Users browsing this forum: No registered users and 0 guests