Cacti graph ADSL

From Ever changing code
Jump to navigation Jump to search

WIP

  • I need to load MIBs to either Cacti DB or Cisco device - [not necessary, tbc]
  • [not working]Loading template from Cisco 877 Cacti Template enabled that graphs are being graph - but the router does not have VDSL card installed so cannot fully test.

xDSLLineStat

Load 4x templates from Cisco ISR ADSL interface graph Cacti forum. OID values are working with snmpwalk. See test below. Files to import templates:

cacti_data_query_xdsl_line_statistics.xml
cacti_data_template_xdsl_interface_statistics.xml
cacti_graph_template_xdsl_interface_statistics.xml

File to copy to /usr/share/cacti/resource/snmp_queries/ if you run Ubuntu.

xDSLLineStat.xml

Then go to Console>Devices change SNMP Version to 1, make sure the community string is correct, Save the device. Then add xDSL Line Statistics to Associated Data Queries and press Save again. You should see Success [2 Items, 1 Row] . Then go to Console>Devices>*Graph List. For each Graph you need to do following:

  1. Open Cisco 877 - Line Attenuation
  2. In section Cisco 877 - Line Attenuation select from drop down menu Data Source [down_att] and Data Source [up_att]
  3. Press save, you will see graph underneath.
  4. Repeat for others Graphs Templates.

Install ADSLine MIB data query

  • Dowload ADSL Line Data script file from Cacti templates website.
  • Un-tar, then copy adslLine.xml file to (in Ubuntu) /usr/share/cacti/resource/snmp_queries/ directory
sudo cp adslLine.xml /usr/share/cacti/resource/snmp_queries/
  • Import XML template following Console > Import templates > Open cacti087d_data_query_adsl_line_mib.xml > press Import

Following errors/missing dependencies found during the import process:

Cacti has imported the following items:

CDEF
[success] Make Stack Negative [update]

GPRINT Preset
[success] Normal [update] 

Data Input Method
[success] Get SNMP Data (Indexed) [update]

Data Template
[success] ADSL Line - Signal/Noise [new]
[success] ADSL Line - Attentuation [new]
[success] ADSL Line - Power [new] 

Graph Template
[success] ADSL Line - Noise Margin [new]
  + Unmet Dependency: (Data Template Item)
  + Found Dependency: (GPRINT Preset) Normal
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Found Dependency: (CDEF) Make Stack Negative
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
[success] ADSL Line - Attenuation [new]
[success] ADSL Line - Output Power [new]
  + Found Dependency: (Data Template Item) adslAtucCurrOutputP
  + Found Dependency: (GPRINT Preset) Normal
  + Unmet Dependency: (Data Template Item)
  + Found Dependency: (CDEF) Make Stack Negative
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)

Data Query
[success] ADSL Line MIB [new]
  + Found Dependency: (Data Input Method) Get SNMP Data (Indexed)
  + Found Dependency: (Graph Template) ADSL Line - Output Power
  + Found Dependency: (Data Template) ADSL Line - Power
  + Unmet Dependency: (Data Template Item)
  + Found Dependency: (Data Template Item) adslAtucCurrOutputP
  + Found Dependency: (Graph Template) ADSL Line - Noise Margin
  + Found Dependency: (Data Template) ADSL Line - Signal/Noise
  + Unmet Dependency: (Data Template Item)
  + Unmet Dependency: (Data Template Item)
  + Found Dependency: (Graph Template) ADSL Line - Attenuation
  + Found Dependency: (Data Template) ADSL Line - Attentuation
  + Found Dependency: (Data Template Item) adslAtucCurrAtn
  + Found Dependency: (Data Template Item) adslAturCurrAtn

Then go to Console > Devices > YourSNMPenabledDevice (Router1941) > scroll at the bottom Associated Data Queries section and select 'ADSL Line MIB' > press ADD > SAVE. Unfortunately the script results with no SNMP data returned when I run 'Verbose Query', here is output:

There is no ADSL EHWIC card installed at this router output
Data Query Debug Information
+ Running data query [10].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/adslLine.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.10.94.1.1.3.1.1' Index Count: 0
+ No SNMP data returned
Expected working output
+ Running data query [10].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/adslLine.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.10.94.1.1.3.1.1' Index Count: 1
+ Index found at OID: 'iso.3.6.1.2.1.10.94.1.1.3.1.1.17' value: 'FOC####### 1941/K9 15.2(4)M'
+ index_parse at OID: 'iso.3.6.1.2.1.10.94.1.1.3.1.1.17' results: '17'
+ Located input field 'adslIfIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.10.94.1.1.3.1.1'
+ Found item [adslIfIndex='17'] index: 17 [from regexp oid parse]
+ Located input field 'adslAtucInvSerialNumber' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.10.94.1.1.3.1.1'
+ Found item [adslAtucInvSerialNumber='FOC17279G17 1941/K9 15.2(4)M'] index: 17 [from value]
+ Located input field 'adslAtucInvVendorID' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.10.94.1.1.3.1.2'
+ Found item [adslAtucInvVendorID='B500BDCM'] index: 17 [from value]

SNMP test

Get a device info

snmpstatus -c communitystring -v2c DEV_IP_ADDRESS

List of interfaces

snmpwalk -c communitystring -v2c 10.0.99.100 .1.3.6.1.2.1.2.2.1.2
iso.3.6.1.2.1.2.2.1.2.1 = STRING: "Embedded-Service-Engine0/0"
iso.3.6.1.2.1.2.2.1.2.2 = STRING: "GigabitEthernet0/0"
iso.3.6.1.2.1.2.2.1.2.3 = STRING: "GigabitEthernet0/1"
<-- output ommited -->
iso.3.6.1.2.1.2.2.1.2.15 = STRING: "Vlan20"
iso.3.6.1.2.1.2.2.1.2.16 = STRING: "Vlan99"
iso.3.6.1.2.1.2.2.1.2.17 = STRING: "Dialer1"

Uptime

snmpget -M MIBs -v1 -c communitystring 10.0.99.100 .1.3.6.1.2.1.1.3.0
iso.3.6.1.2.1.1.3.0 = Timeticks: (591121) 1:38:31.21

Cisco AP current client assosiation count

snmpwalk -c communitystring -v2c AP_IP_ADDRESS .1.3.6.1.4.1.9.9.273.1.1.2.1.1.1
iso.3.6.1.4.1.9.9.273.1.1.2.1.1.1 = Gauge32: 15

Cisco VDSL specific MIBs

These are specific MIB objects that Cacti need to pull run on Linux below:

SNR value
$ snmpwalk -v2c -c communitystring 10.0.99.100 .1.3.6.1.2.1.10.94.1.1.3.1.4
iso.3.6.1.2.1.10.94.1.1.3.1.4.17 = Gauge32: 34
Attenuation value
$ snmpwalk -v2c -c communitystring 10.0.99.100 .1.3.6.1.2.1.10.94.1.1.3.1.5
iso.3.6.1.2.1.10.94.1.1.3.1.5.17 = Gauge32: 550
Verified on Cisco 1941 router here
#show controllers vDSL 0/0/0  
Controller VDSL 0/0/0 is UP

Daemon Status:		 Up 

			XTU-R (DS)		XTU-C (US)
Chip Vendor ID:		'BDCM'			 'IFTN'
Chip Vendor Specific:   0x0000			 0x71C8
Chip Vendor Country:    0xB500			 0xB500
Modem Vendor ID:	'CSCO'			 '    '
Modem Vendor Specific:  0x4602			 0x0000
Modem Vendor Country:   0xB500			 0x0000
Serial Number Near:    ********* 1941/K9 15.2(4)M   
Serial Number Far:     
Modem Version Near:    15.2(4)M
Modem Version Far:     0x71c8

Modem Status:		 TC Sync (Showtime!) 
DSL Config Mode:	 AUTO 
Trained Mode:		 G.992.3 (ADSL2) Annex A 
TC Mode:		 ATM 
Selftest Result:	 0x00 
DELT configuration:	 disabled 
DELT state:		 not running 
Trellis:		 ON			  ON
SRA: 			 disabled			 disabled
 SRA count: 		 0			 0
Bit swap: 		 enabled			 enabled
 Bit swap count:	 28726			 1047
Line Attenuation:	 55.0 dB		 29.1 dB
Signal Attenuation:	 61.3 dB		 29.0 dB
Noise Margin:		  3.4 dB		  6.2 dB
Attainable Rate:	5308 kbits/s		 876 kbits/s
Actual Power:		  0.0 dBm		 12.7 dBm
Total FECC:		9404708			 20142
Total ES:		3786			 884
< -- output obmitted -- >

Example graph of ADSL - Line SNR & Attenuation

Cacti-settings-plugin

Reference

MIB browser
  • SNMP MIB Browser for Linux platforms Qt based, *.deb package provided
  • SnmpB SnmpB is an SNMP MIB browser written in QT. It supports SNMPv1, SNMPv2c & SNMPv3. SnmpB can browse/edit/load/add MIB files and can query SNMP agents. It also supports agent discovery, trap events, and graph plotting.