Forum Discussion
soymanue
Nimbostratus
Apr 18, 2013Sideband Connection Event Context
Hello
I need to call an external Web Service From APM to report a server that certain user is connected or disconnected.
I'm trying to do it with an iRule like this:
when RULE_INIT { ...
Kevin_Stewart
Employee
Apr 18, 2013First thing, the RULE_INIT event is triggered when an iRule is updated, so it is never in context with traffic flow. That's the reason for the error message. You say that you want to send the message when a "certain user is connected or disconnected", but that this is not applied to a virtual server. How is the user connecting or disconnecting if not through a virtual server? Can you elaborate?
Otherwise, you can certainly use the HTTP_REQUEST or CLIENT_ACCEPTED events to trigger sideband calls. To be APM-specific, you can make a sideband call from the ACCESS_POLICY_AGENT_EVENT event. Add an iRule event in your access policy, give it an ID value, and then add an iRule to the virtual server that looks something like this:
when ACCESS_POLICY_AGENT_EVENT {
switch [ACCESS::policy agent_id] {
"MY_SIDEBAND_TRIGGER" {
this is where you would put your sideband call code, send the request, process the response, then arbitrarily stuff response values into access policy session values.
}
}
}
In this example, "MY_SIDEBAND_TRIGGER" is the ID value in the iRule event agent.
Second, there are probably several ways to do what you need. While capturing disconnect events is a little trickier, all of the connect events are already stored in the access policy logs, so you could potentially harvest those. Equally, it looks like you're using RADIUS, so the built-in RADIUS accounting agent may also work for you.
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