[hobbit] TS - Adding an ICON
d.tom.schmitt at L-3com.com
d.tom.schmitt at L-3com.com
Mon Jun 7 16:40:37 CEST 2010
Hope this helps!
FYI: I found that the Primary server has all the information if you do
an
snmpbulkwalk -v2c -c public IP-of-server1 or 2 .1 >FILENAME
The size of the file is very large for the online server compared to the
offline server.
I did the command above for both servers and then did a diff of the 2
files.
I then looked for the Virtual IP address using: grep -I "<virtual-IP>"
*
If you find a better alternative, please let me know.
I currently use the Juniper .cgi web page in the Xymon bb-hosts line to
verify that there is a response.
Both return the identical screen so you cannot tell which is online from
this testing.
This is what I am looking to do and then I want to toggle
RED/YELLOW/GREEN icons on the same Xymon display line.
The only device that seems to have the virtual IP address in the MIB is
the live device.
STRING=public # Set to your RO string
#----------------------------------
# Loop through each Juniper SSL-VPN
#----------------------------------
for IP in IP-of-server1 IP-of-server2
do
#--------------------------------------
# Get the sysName - either IVE1 or IVE2
#--------------------------------------
NAME=`/usr/bin/snmpget -v2c -c $STRING $IP SNMPv2-MIB::sysName.0
2>&1 | \
awk -F'=' '{print $2}'
| \
awk -F':' '{print $2}'`
#-------------------------------------------------------------
# Get the ipAdEntAddr - <Virtual-IP> or 'No Such Instance ...'
#-------------------------------------------------------------
VIRT=`/usr/bin/snmpget -v2c -c $STRING $IP
IP-MIB::ipAdEntAddr.<Virtual-IP> 2>&1 | \
awk -F'=' '{print $2}'
| \
awk -F':' '{print $2}'`
if [ "$VIRT" = "" ]; then
VIRT=" off-line"
fi
echo -e "IP: $IP NAME: $NAME Virtual IP: $VIRT"
done
Thanks,
Tom Schmitt
Senior IT Staff - R&D
L-3 Communication Systems West
640 North 2200 West
P.O. Box 16850
Salt Lake City, UT 84116
Phone (801) 594-3030
Cell (801) 231-7230
eFax (413) 480-6873
D.Tom.Schmitt at L-3Com.com
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: W.J.M. Nelis [mailto:nelis at nlr.nl]
Sent: Monday, June 07, 2010 1:42 AM
To: hobbit at hswn.dk
Subject: Re: [hobbit] TS - Adding an ICON
Hello Tom,
> I am using a MIB check to verify that a device (in a set of HA
> devices) is the current one using the virtual IP address.
>
> I can tell from my scripting that the device has switched to the other
> of the HA pair.
>
> (A Juniper SSL-VPN pair).
>
> I will be using NET-SNMP on the XYMON server to gather the info using
> a crontab script.
>
Which MIB variable (OID) can be used to determine which device is the
one using the virtual IP address?
Regards,
Wim Nelis.
************************************************************************
*******************************
The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR
e-mail messages.
************************************************************************
*******************************
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk
More information about the Xymon
mailing list