Forum Discussion
John_Mwaura_193
Nimbostratus
Oct 25, 2016F5 irule - Failing to include the key from subtable in the generated log message
Borrowing ideas from other iRule posts, I have created an iRule that is supposed to generate an alert when a user (MSISDN) performs more that four requests per minute. The alert is triggered as expec...
Stanislas_Piro2
Cumulonimbus
Oct 26, 2016Hi,
if the header is not found, all the irule is useless. that's why ekailado asked to log the key value first.
your irule format is wrong:
instead of using
if { condition } {
actions
} else {
if {other conditions} {
other actions
} else {
if {another condition }
...
}
}
}
use:
if { condition } {
actions
} elseif {other conditions} {
other actions
} elseif {another condition }
...
}
another optimization is the last condition is wrong...
if there is more than 5 requests, there is no more logs. is it the expected behavior?
key is not the only string not in log... [clock seconds] result does dot appears.
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