Forum Discussion
Logging not working...
this is the irule i have but the I'm not getting hits on logging....
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/SolutionSORB*" {
pool pool_sorb_domain
}
"/ServiceSORB*" {
pool pool_sorb_domain
}
"/ServiceFileProcessor*" {
pool pool_sorb_domain
}
"/ServiceInstalledBase*" {
pool pool_sorb_provisioning_domain
}
Default { reject }
}
}
when HTTP_RESPONSE {
log local0. "[IP::client_addr]:[TCP::client_port] -> [clientside {IP::local_addr}]:[clientside {TCP::local_port}] -> [IP::remote_addr]:[TCP::remote_port] | pool: [LB::server pool]"
}
- HamishCirrocumulusAssuming you've checked the obvious bits like is the iRule saving correctly and there's no errors in /var/log/ltm saying it's getting TCL exceptions...
Also check for errors in the ltm log saying things like
The requested GTM rule (/Common/director-save-members-v001) already exists in partition Common.
(The important part is the 'already exists' for your iRule. If you see this the side effect is that your updates don't get loaded. An OLD version of the script will keep executing).
If all that passes, does the iRule ever get run? Do you see the counters incrementing in the iRule stats for the event?
- dlg_23340CirrusAngelo, if all else fails I've found that in certain high-traffic cases committing an irule does not immediately see it applied to all incoming traffic, and I've had to configsync the pair for it to be picked up across the board.
- dlg_23340CirrusAlso, just FYI the HTTP_REQUEST section of your code will never work. You're looking at the lower-cased version of [HTTP::uri], but your switch cases contain capital letters.
switch -glob [string tolower [HTTP::uri]] { "/SolutionSORB*" - "/ServiceSORB*" - "/ServiceFileProcessor*" { pool pool_sorb_domain } ...
- hoolioCirrostratusI think the issue is that you're setting the URI to lowercase for the switch, but checking URIs which are mixed case.
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