Cisco HSRP monitoring using SNMP

Cisco HSRP MIB is defined in CISCO-HSRP-MIB and CISCO-HSRP-EXT-MIB; for a basic SNMP monitoring the first MIB is more than enough.

The most important table in order to get HSRP status information is cHsrpGrpTable, where we can find as many cHsrpGrpEntry objects as HSRP groups configured in the router. Each cHsrpGrpEntry object represents the HSRP configuration and status for a given HSRP group number on a given interface; it has, so, a double index: SNMP interface ID and HSRP group number.

Here is an example of a snmpwalk over a router:

root@NMS:~# snmpwalk -v 2c -c public .
iso. = STRING: "cisco"
iso. = Gauge32: 255
iso. = INTEGER: 1
iso. = Gauge32: 0
iso. = INTEGER: 2
iso. = Gauge32: 0
iso. = Gauge32: 0
iso. = Gauge32: 3000
iso. = Gauge32: 10000
iso. = IpAddress:
iso. = INTEGER: 1
iso. = IpAddress:
iso. = IpAddress:
iso. = INTEGER: 6
iso. = Hex-STRING: 00 00 0C 07 AC 0A
iso. = INTEGER: 1

The first highlighted value is the SNMP interface ID: you can get the SNMP ID for a given interface using the show snmp mib ifmib ifindex command:

CiscoRouter#show snmp mib ifmib ifindex FastEthernet 0/1
Interface = GigabitEthernet0/1, Ifindex = 2.

The second highlighted value is the HSRP group, the one you use while configuring HSRP:

interface FastEthernet0/1
 standby 10 ip
 standby 10 priority 255

In order to monitor the HSRP group state you just have to grab the cHsrpGrpStandbyState parameter (OID iso., which can have one of the following values:

1: initial
2: learn
3: listen
4: speak
5: standby
6: active

In my previous example the router was in the active state.

References Hot Standby Router Protocol Features and Functionality CISCO-HSRP-MIB CISCO-HSRP-EXT-MIB

Wikipedia: HSRP

The following two tabs change content below.
Italian, born in 1980, I started working in the IT/telecommunications industry in the late '90s; I'm now a system and network engineer with a deep knowledge of the global Internet and its core architectures, and a strong focus on network automation.

Latest posts by Pier Carlo Chiodi (see all)


  1. […] Uncategorized ← Cisco HSRP monitoring using SNMP […]

  2. Ganter Blarsch says:

    There’s a video on Nagios & HSRP:

  3. […] the basis of my previous post Cisco HSRP monitoring using SNMP I decided to extend the Zabbix lightweight dynamic template for SNMP routers by adding a new […]

Leave a Reply