Forum Discussion
uni
Altostratus
Oct 16, 2006Stop event processing for multiple rules
I have virtuals defined with two rules: one rule which is common to all, and one customised for each virtual. All the rule processing is done within the HTTP_REQUEST event.
Can anyone suggest a simple way of stopping the HTTP_REQUEST event from firing in the second rule if certain conditions are met within the first rule's HTTP_REQUEST event?
I've tried the
return
statement, but this goes on to process the second rule.- hoolio
Cirrostratus
Hi Stephen, - uni
Altostratus
Thanks hoolio. This is pretty much the answer I was looking for. - hoolio
Cirrostratus
That's a good point...rule log_events_rule_1 { when CLIENT_ACCEPTED { log local0. "[clock clicks -milliseconds]" } when HTTP_REQUEST { event HTTP_REQUEST disable log local0. "[clock clicks -milliseconds]" } when HTTP_RESPONSE { log local0. "[clock clicks -milliseconds]" } when CLIENT_CLOSED { log local0. "[clock clicks -milliseconds]" } }
rule log_events_rule_2 { when CLIENT_ACCEPTED { log local0. "[clock clicks -milliseconds]" } when HTTP_REQUEST { log local0. "[clock clicks -milliseconds]" } when HTTP_RESPONSE { log local0. "[clock clicks -milliseconds]" } when CLIENT_CLOSED { log local0. "[clock clicks -milliseconds]" } }
- hoolio
Cirrostratus
One other quick note:when HTTP_REQUEST { log local0. "hit HTTP_REQUEST event" return log local0. "This will never be triggered!" } when HTTP_RESPONSE { log local0. "hit HTTP_RESPONSE event" }
- Deb_Allen_18Historic F5 AccountHi Stephen --
- Deb_Allen_18Historic F5 AccountEdited above for clarity.
- unRuleY_95363Historic F5 AccountYou could also re-enable the event on the subsequent response.
- uni
Altostratus
Thanks Deb and hoolio for your replies. - unRuleY_95363Historic F5 AccountNope, requests and responses are serialized.
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