Forum Discussion
Is there any way in an iRule to tell if APM is enabled or disabled on a connection?
Hi guys. Does anyone know if there is a way to tell if APM is enabled or disabled on a given connection? For example, I can turn APM on or off in an iRule using these commands:
ACCESS::disable
ACCESS::enable
But, if a request comes through later (say I'm using "when HTTP_REQUEST"), and I want to tell if I currently have APM turned off or on, is there any existing command that will give me the answer?
3 Replies
- Shaun_Simmons1
Altostratus
Do you want the connection to be logged, that gives you the output of Enabled or Disabled for troubleshooting purposes?
- Walter_Kacynski
Cirrostratus
If you are using ACCESS::disable then the easiest way would be to set a user defined tcl variable to indicate the state. I have found no combination of built-in commands that is completely error proof or that require complicated parameter passing.
ACCESS::disable set access_disabled 1 if {$access_disabled} { Do Stuff outside of APM }You might be able to get ACCESS::session sid working but this also requires that you code an if check to do a sting comparison which I guess would be more CPU expensive than doing an integer check with your own variable.
- Stanislas_Piro2
Cumulonimbus
Hi,
if you want to do some stuff when APM is enabled, you can do it on ACCESS_ACL_ALLOWED event.
this event raise every time the request is associated with APM session and not dropped by ACL (if no ACL is defined or explicit ACL allow the request)
you can also use this irule :
when HTTP_REQUEST { set apm_enabled 0 } when ACCESS_ACL_ALLOWED { set apm_enabled 1 } when HTTP_REQUEST_SEND { log "APM Status is $apm_enabled" }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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