Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

HSRP status from SNMP

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
Blue

Re: HSRP status from SNMP

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

New Member

Re: HSRP status from SNMP

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

}

320
Views
0
Helpful
2
Replies
CreatePlease to create content