SK_121993
Oct 17, 2013Nimbostratus
Geolocation iRule email alerts
Hi - I have an iRule in place (see below) and would like to enable alerts that will send emails every time it is triggered. Is this possible and what is the best way to set up (i.e. within the same iRule)? Thanks in advance!
when CLIENT_ACCEPTED {
set default_pool [LB::server pool] switch [whereis [IP::client_addr] country] {
CN {
log local0. "Geo Client ([IP::client_addr]) detected as China"
reject }
DE {
log local0. "Geo Client ([IP::client_addr]) detected as Germany"
reject }
AU { log local0. "Geo Client ([IP::client_addr]) detected as Australia"
pool $default_pool }
GB { log local0. "Geo Client ([IP::client_addr]) detected as UK"
pool $default_pool }
default {
log local0. "Geo Client ([IP::client_addr]) not detected"
pool $default_pool }
}
}