Forum Discussion
playfair039_320
Nimbostratus
Jul 19, 2017Boolean operation for iRule
I have an iRule which makes a call to a REST API to raise an alert when there are no active members within the pool, ie pool monitor reports negative for all members. The problem is: I have a meta he...
playfair039_320
Nimbostratus
Jul 24, 2017The code block looks something like this Patrick. I just need something that wraps around it so that when one alert is raised when the pool is empty. Thanks in advance
if {[active_members [LB::server pool]] < 1 } {
set conn [connect -timeout 100 -idle 30 -status conn_status x.x.x.x:x]
set postdata "POST /whatever/whatever/ HTTP/1.1\r\n"
append postdata "Content-Type: application/json;charset=UTF-8\r\n"
append postdata "Accept: */*\r\n"
append postdata "Host: x.x.x.x:x\r\n"
append postdata "accept-encoding: gzip, deflate\r\n"
append postdata "content-length: $jsonlen\r\n\r\n"
set send_info [send -timeout 100 -status send_status $conn $postdata]
set recv_2kbytes [recv -timeout 300 20 $conn]
set length_recv [string length $recv_2kbytes]
close $conn Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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