check_hsrp?

Andreas Ericsson ae at op5.se
Sat Mar 19 10:37:32 CET 2005


Harper Mann wrote:
> Has anyone created a plugin, or a technique using existing plugins, to check
> Cisco HSRP?
> 
>  
> 
> I need to detect when HSRP has switched routes and detect other HSRP errors,
> assuming there are any.
> 

Assuming the secondary route is longer than the primary one to any 
designated target, you can use check_icmp's -l flag to set TTL on 
outgoing packets.

This is only known to work on Linux (and known to fail on *bsd), where 
setsockopt(2) is only limited by the permissions used when the socket 
was created. It would be unsafe to drop privileges in check_icmp after 
parsing arguments, so that's not an option.

If this feature ever becomes widely requested I could rewrite check_icmp 
to send raw IP-headers as well, and just skip mucking about with 
setsockopt(2).

Example;
check_icmp -l 15 www.google.com
When ttl is enough to make all the hops, you'd get
"OK - www.google.com blahblah"
When it isn't, you'll get
"CRITICAL - www.google.com :: Time to live exceeded in transit @ <ip>"

>  
> 
> Any help would be much appreciated.
> 
>  
> 
> - Harper
> 
>  
> 
> Harper Mann
> 
> Groundwork Open Source Solutions
> 
> 510-599-2075 (cell)
> 
> http://itgroundwork.com
> 
>  
> 
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list