Step in the DEF statement

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

Moderators: Developers, Moderators

Post Reply
biscuit
Posts: 3
Joined: Mon Apr 08, 2013 10:34 am

Step in the DEF statement

Post by biscuit »

Hello,
Few days ago I created an rrd command wich is :

Code: Select all

rrdtool graph trafficMaxM.png --start 1359676800 --end 1362096000 DEF:traf=traffic.rrd:traffic_in:MAX:step=86400 LINE1:traf#FF0000:"Traffic in" VDEF:max=traf,MAXIMUM LINE2:max#0000FF:"Maximum du mois" AREA:traf#FF0000:"" COMMENT:"\:" GPRINT:max:%lg%s
It gives the max of a day and do it for a month. I don't know if I'm very clear... Here is the result :
Image

And now I want to do it in CACTI. I managed to do the Data source :

Code: Select all

/usr/bin/rrdtool create \
/var/www/cacti/rra/traffic.rrd \
--step 60  \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
But when I create the graph I don't know where to put my "step=86400" (which is not the same as the --step 60 in the Data source above, or is it ?) with consolidation MAX, and the VDEF MAX line... :roll:
Here is what I've done:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="Maximum journalier sur un mois" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/traffic.rrd":traffic_in:MAX \
DEF:b="/var/www/cacti/rra/traffic.rrd":traffic_out:MAX \
CDEF:cdefa=a,8,* \
CDEF:cdefb=b,8,* \
AREA:cdefa#CAF100FF:"Inbound"  \
AREA:cdefb#DA4725FF:"Outbound"  \
LINE1:cdefa#6EA100FF:"Maximum inbound"  \
LINE1:cdefb#B90054FF:"Maximum outbound" 
I think I'm not really far from the wished result.

Thanks for any help :)
biscuit
Posts: 3
Joined: Mon Apr 08, 2013 10:34 am

Re: Step in the DEF statement

Post by biscuit »

Up please :)
biscuit
Posts: 3
Joined: Mon Apr 08, 2013 10:34 am

Re: Step in the DEF statement

Post by biscuit »

Answering to myself :
I found the solution, you must create a new RRA and select MAX, calculate the good steps according to the number of polling you want before taking the MAX value of the steps.

Yup ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests