Forum Discussion
Robert_47833
Altostratus
Apr 22, 2015call tmsh from irule for pool/monitor stuff
hi,dear irule
when lb failed triggered,and pool member is down,how can I get the info for which monitor marks pool member down and get the content of this monitor in irule?
read some posts,...
Robert_47833
Altostratus
Apr 24, 2015Hi,Nitass
Yeah,there is no straightforward way to do this.
I kind of achieve this via code below.
proc send_to_sideband { data } {
this is the sideband processing procedure (function)
set sbserver [connect -protocol TCP -timeout 500 -idle 10 -status conn_status "ip:port"]
send the sideband request
send -status send_status -timeout 500 $sbserver $data
return the sideband response
return [recv -status recv_status -timeout 300 $sbserver]
}
when LB_FAILED {
set current_pool [string range [LB::server pool] 8 end]
set pool_member [LB::server addr]
set pool_member_port [LB::server port]
set pool_member_status [LB::status]
set req "GET /mgmt/tm/ltm/pool/$current_pool/ HTTP/1.1\r\nHost: localhost\r\nAuthorization: Basic anVjYW86Q2pqNTUxNjI1OTk=\r\n\r\n"
set sb [call send_to_sideband $req]
log local0.alert "sb is $sb"
HTTP::respond 200 content [subst -nobackslashes [ifile get f5_new_txt]]
}it is sideband ,I reused code form other contributor in this forum(Thanks).
but I am not sure whehter I can use icontrol command here since RESTAPI never give me a formatted response and it is difficult to filter out which monitor cause this pool down.
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