Forum Discussion
External Monitor script rewrite from 10.2.1 to 12.1.2
I have external Monitor configuration for the Version10.2.1. can someone help me to convert the script into 12.1.2 version Here is the script
!/bin/bash This version certified for use with LTM v10.2.1IP=
echo $1 | sed 's/::ffff://'
output="$(/usr/bin/curl -s -m 15 -A "BigIP Prober" -H "Host: $4" -H "Connection: close" http://$1:$2$3 2>/dev/null)"
case $output in
Server\ Up)
if [ -f "/var/tmp/disabled/disabled.$5.$IP.$2" ]; then
b pool $5 member ${IP}.${2} session enable >> /tmp/enable 2>&1
rm /var/tmp/disabled/disabled.$5.$IP.$2
fi
echo "UP"
;; Server\ Drain) status=$(b pool $5 member ${IP}.${2} session show | awk '{print $6}') if [ "$status" != "disable" ]; then b pool $5 member ${IP}.${2} session disable >> /tmp/test 2>&1 > /var/tmp/disabled/disabled.$5.$IP.$2 fi echo "DRAIN" ;; Server\ Down) Do Nothing Here ;; esac
- Muthu_108845
Nimbostratus
Here is the script
!/bin/bash This version certified for use with LTM v10.2.1IP=
output="$(/usr/bin/curl -s -m 15 -A "BigIP Prober" -H "Host: $4" -H "Connection: close" http://$1:$2$3 2>/dev/null)" case $output in Server\ Up)echo $1 | sed 's/::ffff://'
if [ -f "/var/tmp/disabled/disabled.$5.$IP.$2" ]; then b pool $5 member ${IP}.${2} session enable >> /tmp/enable 2>&1 rm /var/tmp/disabled/disabled.$5.$IP.$2 fi echo "UP"
;; Server\ Drain) status=$(b pool $5 member ${IP}.${2} session show | awk '{print $6}') if [ "$status" != "disable" ]; then b pool $5 member ${IP}.${2} session disable >> /tmp/test 2>&1 > /var/tmp/disabled/disabled.$5.$IP.$2 fi echo "DRAIN" ;; Server\ Down) Do Nothing Here ;; esac
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com