TS - Adding an ICON
list Tom Schmitt
I have a need to add a new ICON (green, red, yellow, blue, etc.) to the
existing icons for a network device.
I also need to alert on the change of colors of the icon.
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.
I need to create and change an ICON next to the device. E.g. HA
If HA for that device goes from GREEN(active server) to RED(now inactive
server) notify.
The same for a return to being the GREEN active server.
I saw something about 6 months ago on setting an ICON to a color but
have not been able to find it again.
I must also be searching on the incorrect strings in the archive.
Any assistance is greatly appreciated.
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 XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
list W.J.M. Nelis
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. *******************************************************************************************************
list Josh Luthman
Google VMware esx MIB and it will lead you here... http://downloads.vmware.com/d/details/esx40_snmp_mib_dt/ZHcqYmQqaCViZGVqdA== Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX “Success is not final, failure is not fatal: it is the courage to continue that counts.” --- Winston Churchill
▸
On Mon, Jun 7, 2010 at 3:42 AM, W.J.M. Nelis <user-f4ccfde53c0d@xymon.invalid> wrote: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. *******************************************************************************************************
list Buchan Milne
▸
On Friday, 4 June 2010 22:41:30 user-9c1ae820b621@xymon.invalid wrote:
I have a need to add a new ICON (green, red, yellow, blue, etc.) to the existing icons for a network device. I also need to alert on the change of colors of the icon. 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).
FYI, there are already templates for some Juniper devices in devmon, and there are also some examples of HA monitoring (in cisco-pix, redhat-cluster etc. You may want to consider doing this in devmon ...
list Tom Schmitt
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 XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: W.J.M. Nelis [mailto:user-f4ccfde53c0d@xymon.invalid]
Sent: Monday, June 07, 2010 1:42 AM
To: user-ae9b8668bcde@xymon.invalid
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. ************************************************************************ *******************************
list Tom Schmitt
Added the setting of the ICON to the code for the Juniper SSLVPN pair.
To set the ICON:
BB=/home/xymon/server/bin/bb
BBDISP-127.0.0.1
DEVICE=SSLVPN1 or SSLVPN2
COLUNM="online"
COLOR=green for 'online' server
=clear for 'offline' server
MSG="<the message to show when you click the icon>"
$BB $BBDISP "status $DEVICE.$COLUMN $COLOR `date`
${MSG}
"
This adds the new column called 'online' to both SSLVPN1 and 2
and sets the color to green or clear/white.
Just add the code to the code below and also use 'mutt' to send
an alert upon the change.
I have the complete code if required.
▸
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 XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (413) 480-687
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
▸
-----Original Message-----
From: Schmitt, D Tom @ CSW-SLC
Sent: Monday, June 07, 2010 8:41 AM
To: 'user-ae9b8668bcde@xymon.invalid'
Subject: RE: [hobbit] TS - Adding an ICON
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 XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: W.J.M. Nelis [mailto:user-f4ccfde53c0d@xymon.invalid]
Sent: Monday, June 07, 2010 1:42 AM
To: user-ae9b8668bcde@xymon.invalid
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. ************************************************************************ *******************************
list W.J.M. Nelis
Hello Tom,
▸
Added the setting of the ICON to the code for the Juniper SSLVPN pair.
To set the ICON:
BB=/home/xymon/server/bin/bb
BBDISP-127.0.0.1
DEVICE=SSLVPN1 or SSLVPN2
COLUNM="online"
COLOR=green for 'online' server
=clear for 'offline' server
MSG="<the message to show when you click the icon>"
$BB $BBDISP "status $DEVICE.$COLUMN $COLOR `date`
${MSG}
Nice idea: set the status to "clear" if a node in a cluster is inactive. In this way there is no need to remember the previous state in the script, while a status change does not result in a warning or error message being sent.
▸
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>" *
So the variable to be tested is "ipAdEntAddr.<Virtual-IP>".
If you find a better alternative, please let me know.
No alternative yet found; I am glad that there is an easily accessible variable at all which contains this information. Your idea's are now incorporated in my juniper (server-side) script, which started out as a measurement of the number of web users.
▸
-----Original Message----- From: W.J.M. Nelis [mailto:user-f4ccfde53c0d@xymon.invalid] Sent: Monday, June 07, 2010 1:42 AM To: user-ae9b8668bcde@xymon.invalid 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 otherof 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.
Regards, Wim Nelis. ******************************************************************************************************* The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR e-mail messages. *******************************************************************************************************
list Tom Schmitt
I would like to get the code for gathering the number of users from you if it is available.
▸
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 XXXXX
Phone (XXX) XXX-XXXX
Cell (XXX) XXX-XXXX
eFax (XXX) XXX-XXXX
user-9c1ae820b621@xymon.invalid
\\\\||////
\ ~ ~ /
| @ @ |
--oOo---(_)---oOo--
-----Original Message-----
From: W.J.M. Nelis [mailto:user-f4ccfde53c0d@xymon.invalid]
Sent: Tuesday, June 08, 2010 6:54 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: FW: [hobbit] TS - Adding an ICON
Hello Tom,
Added the setting of the ICON to the code for the Juniper SSLVPN pair.
To set the ICON:
BB=/home/xymon/server/bin/bb
BBDISP-127.0.0.1
DEVICE=SSLVPN1 or SSLVPN2
COLUNM="online"
COLOR=green for 'online' server
=clear for 'offline' server
MSG="<the message to show when you click the icon>"
$BB $BBDISP "status $DEVICE.$COLUMN $COLOR `date`
${MSG}
Nice idea: set the status to "clear" if a node in a cluster is inactive. In this way there is no need to remember the previous state in the script, while a status change does not result in a warning or error message being sent.
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>"
*
So the variable to be tested is "ipAdEntAddr.<Virtual-IP>".
If you find a better alternative, please let me know.
No alternative yet found; I am glad that there is an easily accessible variable at all which contains this information. Your idea's are now incorporated in my juniper (server-side) script, which started out as a measurement of the number of web users.
-----Original Message----- From: W.J.M. Nelis [mailto:user-f4ccfde53c0d@xymon.invalid] Sent: Monday, June 07, 2010 1:42 AM To: user-ae9b8668bcde@xymon.invalid 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 otherof 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.
Regards, Wim Nelis. ************************************************************************ ******************************* The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR e-mail messages. ************************************************************************ *******************************
list W.J.M. Nelis
Hello,
▸
I would like to get the code for gathering the number of users from you if it is available.
It is now published on xymonton, see http://xymonton.trantor.org/doku.php/monitors:rasusagepl
▸
Regards, Wim Nelis. ******************************************************************************************************* The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR e-mail messages. *******************************************************************************************************