cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1123
Views
0
Helpful
2
Replies

HSRP status from SNMP

wiwells
Level 1
Level 1

At one time I had a small script that would query the HSRP status of a particular group on a router. I can't locate this now and was wondering if anyone had a quick snmp get that would allow me to query the HSRP state of a router.

2 Replies 2

rmushtaq
Level 8
Level 8

You can look at CISCO-HSRP-MIB available at http://www.cisco.com/public/mibs.

Thank you. I finally reconstructed it. In the following example I'm using a Cisco 2621 with two ethernet interfaces. I'm interested in HSRP group one (regardless of which interface it might show up on). We are also using the Emanate SNMP agent from SNMP Research.

getHSRPstat() {

## getHSRPstat -- Get the HSRP stataus of a device.

# Arguments:

# 1 - target router

${ESNMP_PATH}/getmany -v1 $1 ${SNMP_RW_community} \

1.3.6.1.4.1.9.9.106.1.2.1.1.15 | grep "15\.[12]\.1 =" | cut -d= -f2

}