Graphs Cisco router NBAR (Network Based Application Recognition) protocol stats (Either as Bits/Sec or Packets/Sec)
The Query finds all supported protocols on all NBAR enabled interfaces - mutiple interfaces will give many results for the query so be patient ;-). Each discovered protocol can then be graphed for Bits/Sec, Packets/Sec or Bitrate (Router caclulated bits/sec). Some IOS support high capacity (64 Bit Counters) for the Bits/Sec and Packets/Sec fields which can also be graphed.
I've also included a graph template to select 6 Data Source (e.g. 6 Protocols) to be graphed together as stacked areas. You just need to select the appropriate Data sources and name each protocol.
The query uses a combination of the ifIndex and ProtocolIndex to create a custom index of its own. Should your ifINdex change (i.e. you add interfaces) it will screw it up! - I suggest you make use of the ifIndex persist config command.
NBAR SNMP support also requires reasonably new IOS. Support can be verified by walking "1.3.6.1.4.1.9.9.244.1.8.1.1.2" which will give all supported NBAR protocols if SNMP NBAR support is present.
Thanks to EFLY for some of the MIB Decode info
Version | Notes |
1.0 - 18/12/2003 | 1st Posted |
1.1 - 26/01/2004 | CDEF for router generated bitrate template corrected |
The ZIP File contains the required files
cacti_data_query_cisco_router_nbar_all_stats.xml | Data Query Template XML Import |
cisco_nbar_all.xml | Data Query XML File |
query_cisco_nbar_all.php | Data Query Script |
cacti_graph_template_cisco_nbar_stacked_protocols.xml | Stacked Graph Template |
readme.txt | Install Notes |
Add the required files to Cacti
Copy cisco_nbar_all.xml to /cacti/resource/script_queries
Copy query_cisco_nbar_all.php to /cacti/scripts
Import cacti_data_query_cisco_router_nbar_all_stats.xml
(optional) Import cacti_graph_template_cisco_nbar_stacked_protocols.xml
Then add the query to your NBAR enabled host. The graphs created will be for a single protocol on a single interface. These data sources can if required be combined into your own more complex custom graphs or you can used the "Stacked Protocols" template to give you 6 data sources on one graph very quickly
Simply create a new graph ("add" from "graph management" screen), select your host and the template then name the sources and select the data sources required. Don't forget to edit the title to help identify the graph better.
Example Query Result

Example Protocol Graph

Example Stacked Protocol Graph Setup

Example Stacked Protocol Graph
