Check Cisco HSRP State

I got tired of not having an HSRP monitor to check the state of my routers so I went ahead and modified this wonderful VRRP monitor to do HSRP instead.

The only HSRP monitor I’ve found here had some issues and was limited in the way I could check for my router status.

Download the script

Usage: ./check_snmp_hsrp.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) -s <master|backup|num,%> [-p <port>] [-t <timeout>] [-V]

Check if router is the master:
./check_snmp_hsrp.pl -H <hostname> -C <snmpcommunity> -s master

Check if router is the backup:
./check_snmp_hsrp.pl -H <hostname> -C <snmpcommunity> -s backup

  1 comment for “Check Cisco HSRP State

  1. November 6, 2017 at 14:56

    Hi,

    I was getting error:
    Argument “v6.0.1” isn’t numeric in numeric lt (VERSION VERSION lt 4) {

    And all works fine.

    Issues with libexec pass can also happen.

    Thanks for your great work.

Leave a Reply