04-24-2003 06:52 AM - edited 03-02-2019 06:53 AM
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.
04-24-2003 10:46 AM
You can look at CISCO-HSRP-MIB available at http://www.cisco.com/public/mibs.
04-25-2003 03:50 AM
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
}
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide