is this script running on the primary blade?
Problem this snippet solves: Often, for example in an external monitor script, it is desirable for the script to execute only on the primary blade of a VIPRION cluster. Traditionally, in BIG-IP, a s...
Published Oct 29, 2019
Version 1.0Richard_Shuford
Ret. Employee
Joined June 03, 2019
Richard_Shuford
Ret. Employee
Joined June 03, 2019
TimRiker
Nov 15, 2019Cirrocumulus
This returns "2" on both blade 1 and blade 2 of a test cluster running 13.1.1.4, where blade 2 is currently master.
Here's the same in just awk:
/usr/sbin/bladectl -g leds | /bin/awk '/slot.*Primary LED.*solid.*Green*/ {gsub(":","",$2);print $2}'