I have modified one of my Graph templates to combine useful features into one graph - I want traffic in bytes with total, in and out all plotted together, a 95th percentile line, and total data over the graph period all shown on the same template.
I have the graphs looking exactly how I want, but on closer inspection the total value being calculated consists of (outbound + outbound + inbound) and I cannot find where the extra data is coming from. The total graph is drawn using the Total All Data Sources CDEF (cdef=ALL_DATA_SOURCES_NODUPS) and the graph template only lists 2 data sources which are only used where expected. Given this value is obviously incorrect I am not sure I can trust the 95th percentile value either.
Also when I try to add a Total Data item for the combined plot it will always show either the inbound or outbound Total Data, but this is less of an issue as adding two numbers together in my head is fairly easy really :-)
If anyone has any pointers to where I am going wrong I would be greatful.
Version:
0.8.6j
Operating System: unix
PHP SNMP Support: yes
Patches:
ping_php_version4_snmpgetnext.patch
thumbnail_graphs_not_working.patch
tree_console_missing_hosts.patch
RRDtool Command:
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Public Switch - Port 24 - Uplink" \
--base=1000 \
--height=200 \
--width=625 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
DEF:a="/var/www/cacti/htdocs/rra/public_switch_traffic_in_31.rrd":traffic_out:AVERAGE \
DEF:b="/var/www/cacti/htdocs/rra/public_switch_traffic_in_31.rrd":traffic_in:AVERAGE \
CDEF:cdefa=TIME,1172740250,GT,a,a,UN,0,a,IF,IF,TIME,1172740250,GT,a,a,UN,0,a,IF,IF,TIME,1172740250,GT,b,b,UN,0,b,IF,IF,+,+ \
AREA:cdefa#96E78A:"Combined" \
GPRINT:cdefa:LAST:"Current\:%8.2lf%s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf%s\n" \
LINE2:a#6EA100:"Outbound" \
GPRINT:a:LAST:"Current\:%8.2lf%s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:a:MAX:"Maximum\:%8.2lf%s" \
COMMENT:"Total Data: 8.53 GB\n" \
LINE2:b#FFAB00:"Inbound" \
GPRINT:b:LAST:" Current\:%8.2lf%s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:b:MAX:"Maximum\:%8.2lf%s" \
COMMENT:"Total Data: 2.71 GB\n" \
COMMENT:"\n" \
HRULE:509075.6#FF0000:"95th Percentile" \
COMMENT:"509.08 kB/s (in+out)\n"