cacti total bandwidth - plembo/onemoretech GitHub Wiki
Cacti Total Bandwidth
October 1, 2016
There are a lot of links on the Internet that purport to give a solution to a simple problem: Graphing total bandwidth consumed in Cacti. The problem is that most of those links are to solutions that are either: outdated, too clever by half or simply incomprehensible due to their cryptic nature.
After trying a couple of plugins and a recommended template I discovered that most unofficial plugins are incompatible with the latest version of Cacti that I have (currently the v0.8.8h for CentOS 7). They not only don't work, but they break some of the shipping features of Cacti core.
Another few days of searching turned up one post that finally gave me a clue:
http://serverfault.com/questions/359918/how-to-add-total-to-cacti-graph
Upon reading it and then some experimentation, I came up with this recipe for my home network's Cacti installation, which pulls SNMP data from my Mikrotik router:
A. Graph Templates... check "Interface - Traffic (bits/sec, Total Bandwidth)" and then Duplicate.
B. Edit template to rename:
Name: Interface - Total Bandwidth Consumed
Title: [host_description - Total Bandwidth Consumed
C. Click "Add" on taskbar at top.
D. Fill in fields as follows:
Data Source: None
Color: None
Opacity: Grayed out
Graph Item Type: GPRINT
Consolidation Function: AVERAGE
CDEF Function: Total All Data Sources
Value: blank
GPRINT Type: Normal
Text Format: Total Amount
Insert Hard Return: checked
E. Click "Create".
F. New Graphs... Graph Templates
Create: Interface - Total Bandwidth Consumed
"Create"
G. Graph Management... Interface - Total Bandwidth Consumed. Configure data sources:
Inbound Data Source: yourgatewayinterface* (traffic_in)
Outbound Data Source: yourgatewayinterface (traffic_out)
H. Check Graphs.
*On my Mikrotik router the factory default name for the first GB ethernet port, which is connected to the cable modem, is "ether1-gateway".
Copyright 2004-2019 Phil Lembo