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
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 \
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"
Thanks for any help