Forum Discussion
Anthony_Hatch_3
Nimbostratus
Mar 27, 2011External class and class command
I recently came across the 2009 iRule Winner by Chetan Bhatt, Click Here, and wanted to implement it on our v10.2.0 LTMs. I have modified the cron job to write the external class file in the appropr...
Anthony_Hatch_3
Nimbostratus
Mar 28, 2011I just realized something that I had completely missed before. I could probably cut out much of the code from the iRule by not using the switch statements to test against the result of the LB::status commands for each pool member. I hadn't noticed that the b pool all member all command actually gives the status of the pool member. So if I change up how the class file gets written when the cron job is run, I can get the pool name, pool member, service port, and status all at once and just use the iRule to parse the data out properly. An an example of the command to get the output would now look like:
b pool all member all | grep POOL | awk '{print "\""$3"\""" \:\= ""\""$4"\""","}' | sort
With the resulting output now in the format of:
"test_http-pool/172.20.75.151:http" := "active,up",
"test_http-pool/172.20.75.152:http" := "active,up",
"test_http-pool/172.20.75.153:http" := "active,up",
This solves the original issue of the keys having to all be unique and allows for a shorter iRule. I'll try and post the finished iRule once I have it completed.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects