Forum Discussion
11 Replies
Sort By
- What exactly are you looking to log? iRules has the "log" command that will pass the values given to it to syslog.
when HTTP_REQUEST { log local0. "Request received: Host -> [HTTP::host], URI -> [HTTP::uri]" }
- Albert__Tase_70NimbostratusThe client is looking to log http and http connections to the vips and reals to verify persistence. They wanted to use the loadbalncers logging options until I explian that the traffic they are looing for would not be in those logs so will the above irule log http and which vip and real the request gose too ?
- unRuleY_95363Historic F5 AccountTry this one:
when HTTP_REQUEST { set uri [HTTP::uri] set host [HTTP::host] } when SERVER_CONNECTED { log local0. "[IP::client_addr]:[TCP::client_port] -> [IP::server_addr]:[TCP::server_addr] for http://$host$uri" } when LB_FAILED { log local0. "[IP::client_addr]:[TCP::client_port] -> FAILED for http://$host$uri" }
- unRuleY_95363Historic F5 AccountAlso note you can change the "local0." to a different facility that you can then configure syslog-ng to route to a different file or even a remote host. You can also configure syslog-ng to route based on some text in the message and leave the facility local0.
- Albert__Tase_70Nimbostratus
- Albert__Tase_70Nimbostratusplease help ne to irules and ithe above rule errored out. Thanks
- rapmaster_c_127Historic F5 AccountTCP::server_port , not TCP::server_addr .
- Albert__Tase_70Nimbostratusok really stupid how do I apply it ???
- Richard__HarlanHistoric F5 AccountWe worked on Syslog-ng for a log time to get it to send e-mail out from the unit when when certin iRules log information. What we found out is you can not add new facilities to syslog due to the fact they are aready defined in RFC 3164. Because of this the only why we found to get syslog to do what we want was to setup regex on local0. and then push it to another log file of to the e-mail program.
- Posted By atase on 12/17/2005 7:43 PM