Ad Widget

Collapse

Cisco/SNMP Help (Hopefully)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jonnjonzzn
    Junior Member
    • Sep 2007
    • 18

    #1

    Cisco/SNMP Help (Hopefully)

    OK, I am actually getting information off of our Cisco load balancer. I am not an SNMP expert nor a Cisco expert so please jump in and add clarification to this thread if able. It seems as if I was never giving Zabbix the correct OID or key for the items I wanted to retrieve.

    Here are links to similar discussions here in the forums:




    I figured it out by a process similar to below:

    First, download the MIBs from Cisco and place them whevever the rest of your MIBs are located. On Red Hat/CentOS that is: /usr/share/snmp/mibs

    I am going to give an example for an item we are capturing which gives the number of TCP Connections to one of the clustered application servers behind it.
    We grab this value for each of the app servers to verify our load is being properly balanced among the app cluster members. If you don't know what you're looking for start small like "conn" hoping to get back some connection related parameters and drill down from there. Eventually I find out I want this:

    Code:
    [root]# cd /usr/share/snmp/mibs
    Code:
    [root@wraith mibs]# grep -i 'currentconn' CISCO*
    CISCO-ENHANCED-SLB-MIB.my:        cesServerFarmRserverCurrentConns   Counter64,
    CISCO-ENHANCED-SLB-MIB.my:cesServerFarmRserverCurrentConns OBJECT-TYPE         
    CISCO-ENHANCED-SLB-MIB.my:        cesServerFarmRserverCurrentConns,
    CISCO-SLB-EXT-MIB.my:        cslbxRuleCurrentConnections               Gauge32,
    CISCO-SLB-EXT-MIB.my:cslbxRuleCurrentConnections               OBJECT-TYPE
    CISCO-SLB-EXT-MIB.my:                cslbxRuleCurrentConnections,
    Code:
    [root@wraith mibs]# snmptranslate -m ALL -On -IR cesServerFarmRserverCurrentConns 2>/dev/null
    .1.3.6.1.4.1.9.9.470.1.1.3.1.14
    Code:
    [root@wraith mibs]# snmpwalk 192.168.1.5 -c public -v 2c .1.3.6.1.4.1.9.9.470.1.1.3.1.14 2> /dev/null
    SNMPv2-SMI::enterprises.9.9.470.1.1.3.1.14.12.10.66.76.65.67.75.66.79.65.82.68.4.68.85.83.84.0 = Counter64: 21
    SNMPv2-SMI::enterprises.9.9.470.1.1.3.1.14.12.10.66.76.65.67.75.66.79.65.82.68.5.67.72.65.76.75.0 = Counter64: 23
    SNMPv2-SMI::enterprises.9.9.470.1.1.3.1.14.12.10.66.76.65.67.75.66.79.65.82.68.6.83.84.89.76.85.83.0 = Counter64: 47
    Code:
    [root@wraith mibs]# snmptranslate -m ALL -On -IR SNMPv2-SMI::enterprises.9.9.470.1.1.3.1.14.12.10.66.76.65.67.75.66.79.65.82.68.4.68.85.83.84.0 2>/dev/null
    .1.3.6.1.4.1.9.9.470.1.1.3.1.14.12.10.66.76.65.67.75.66.79.65.82.68.4.68.85.83.84.0
    OK, we have all we need.

    The OID for this item is:

    .1.3.6.1.4.1.9.9.470.1.1.3.1.14.12.10.66.76.65.67. 75.66.79.65.82.68.4.68.85.83.84.0

    and the key is:

    enterprises.9.9.470.1.1.3.1.14.12.10.66.76.65.67.7 5.66.79.65.82.68.4.68.85.83.84.0

    Here is the associated zabbix item configuration:

    Code:
    <item type="4" key="enterprises.9.9.470.1.1.3.1.14.12.10.66.76.65.67.75.66.79.65.82.68.4.68.85.83.84.0" value_type="3">
    	<description>Load Balancer Active TCP Connections - Dust</description>
    	<delay>30</delay>
    	<history>90</history>
    	<trends>365</trends>
    	<formula>1</formula>
    	<snmp_community>public</snmp_community>
    	<snmp_oid>.1.3.6.1.4.1.9.9.470.1.1.3.1.14.12.10.66.76.65.67.75.66.79.65.82.68.4.68.85.83.84.0</snmp_oid>
    	<snmp_port>161</snmp_port>
    </item>
    Repeat this procedure for other items. To get a list of generic SNMP items do this:

    Code:
    [root]# snmpwalk 192.168.1.5 -c public -v 2c 2> /dev/null
    and then repeat process above.

    Example:

    Code:
    [root@wraith mibs]# snmpwalk 192.168.1.5 -c public -v 2c 2> /dev/null | grep -i octets
    IF-MIB::ifInOctets.16777231 = Counter32: 2861642552
    IF-MIB::ifInOctets.16777753 = Counter32: 1203117344
    IF-MIB::ifInOctets.33554447 = Counter32: 0
    IF-MIB::ifOutOctets.16777231 = Counter32: 388385046
    IF-MIB::ifOutOctets.16777753 = Counter32: 2551396700
    IF-MIB::ifOutOctets.33554447 = Counter32: 0
    IP-MIB::ipSystemStatsInOctets.ipv4 = Counter32: 2586604045
    IP-MIB::ipSystemStatsHCInOctets.ipv4 = Counter64: 3352661094925
    IP-MIB::ipSystemStatsOutOctets.ipv4 = Counter32: 2194988618
    IP-MIB::ipSystemStatsHCOutOctets.ipv4 = Counter64: 6489955914
    IP-MIB::ipIfStatsInOctets.ipv4.16777231 = Counter32: 1650052595
    IP-MIB::ipIfStatsInOctets.ipv4.16777753 = Counter32: 936551450
    IP-MIB::ipIfStatsInOctets.ipv4.33554447 = Counter32: 0
    IP-MIB::ipIfStatsHCInOctets.ipv4.16777231 = Counter64: 1221420764659
    IP-MIB::ipIfStatsHCInOctets.ipv4.16777753 = Counter64: 2131240330266
    IP-MIB::ipIfStatsHCInOctets.ipv4.33554447 = Counter64: 0
    IP-MIB::ipIfStatsOutOctets.ipv4.16777231 = Counter32: 330506628
    IP-MIB::ipIfStatsOutOctets.ipv4.16777753 = Counter32: 1864481990
    IP-MIB::ipIfStatsOutOctets.ipv4.33554447 = Counter32: 0
    IP-MIB::ipIfStatsHCOutOctets.ipv4.16777231 = Counter64: 4625473924
    IP-MIB::ipIfStatsHCOutOctets.ipv4.16777753 = Counter64: 1864481990
    IP-MIB::ipIfStatsHCOutOctets.ipv4.33554447 = Counter64: 0
    IF-MIB::ifHCInOctets.16777231 = Counter64: 1222632354616
    IF-MIB::ifHCInOctets.16777753 = Counter64: 2131506896160
    IF-MIB::ifHCInOctets.33554447 = Counter64: 0
    IF-MIB::ifHCOutOctets.16777231 = Counter64: 4683352342
    IF-MIB::ifHCOutOctets.16777753 = Counter64: 2551396700
    IF-MIB::ifHCOutOctets.33554447 = Counter64: 0
    Code:
    [root@wraith mibs]# snmptranslate -m ALL -On -IR IF-MIB::ifInOctets.16777231 2>/dev/null
    .1.3.6.1.2.1.2.2.1.10.16777231
    Now, we're ready to create item.

    OID: .1.3.6.1.2.1.2.2.1.10.16777231
    key: ifInOctets.16777231

    -Mike
    Last edited by jonnjonzzn; 19-10-2007, 18:07.
Working...