Forum Discussion
crt_okan_385853
Nimbostratus
Mar 13, 2019i-rule question
Hi all,
This service works with "http get" and it returns values. How can I get this values in my i-rule? So I can make decisions for making the server offline or not.
It returns this...
Deb_Allen_18
Jul 11, 2007Historic F5 Account
Let me do a little digging around & see what I can find out.
In the meantime, a couple of observations:
jfroggatt:
For this test:
if {[LB::status pool $LBpool member $LBmember $LBport] eq "up"} {
you might consider using 'ne "down"' instead of 'eq "up"' if you ever want to be able to drain off connections or test the rest of the rule logic without a monitor applied. That way the status of DISABLED and UNCHECKED would pass the test.wbenetti:
As documented in the wiki page (Click here), the LB::status command didn't work as expected in 9.2.3 with this syntax:
if {[LB::status node $::BSIFNODE1 up] == 0} {
and we had to instead use the syntax as in the example above:if {[LB::status...] ne "up"} {
Let me know if you've verified that the correct boolean is returned in all cases in 9.3.0, and I'll do some further testing & update the wiki if appropriate.Also, I seem to recall difficulty in getting the "node" command to function properly without a port parameter, so you might want to try adding it to see if you get a more consistent result that way.
HTH, and I'll be circling back on this one later this week.
/deb
Hi
You could save the HTTP Host value as an APM variable when the policy first starts using something like...
when ACCESS_SESSION_STARTED { ACCESS::session data set session.custom.httphost [HTTP::host] }
Then, at the start of you policy, add in an Empty Item that makes a path decision based on the value of this variable.
Expression: expr {[mcget {session.custom.httphost}] == "portal.test.com"}
- malakibrahimOct 24, 2019
Nimbostratus
Thank you for explaining it by screenshot, nice to see how to set custom variables and match in APM policy. but also as said ""session.server.network.name" can match it.
- Yoann_Le_Corvi1Oct 24, 2019
Cumulonimbus
Hi
I thing the default built-in APM variable "session.server.network.name" should also do the trick.
Yoann