Forum Discussion
Mike_73765
Nov 17, 2010Nimbostratus
Irule for remote logging
Hey guys,
I have a one are configuration, and I want to log each connection to a syslog server. I want to log client ip address along with node ip address. I'm assuming I'll have to use 2 events, http_request and lb_selected.
Could someone please help me out with the syntax?
Thanks,
Mike
- hooleylistCirrostratusHi Mike,
when CLIENT_ACCEPTED { set hsl [HSL::open -proto UDP -pool syslog_server_pool] } when SERVER_CONNECTED { Log HTTP request via syslog protocol as local7.info; see RFC 3164 for more info HSL::send $hsl "<190> Client: [IP::client_addr]:[TCP::client_port], VS: [clientside {IP::local_addr}][clientside {TCP::local_port}], SNAT: [IP::local_addr]:[TCP::local_port], Pool member [IP::server_addr]:[TCP::server_port]" }
- Mike_73765NimbostratusThanks Aaron.
- Mike_73765Nimbostratusim running version 10.0.1
- hooleylistCirrostratusSure: [IP::client_addr] is available any time after the connection from the client to the VS is established:
when SERVER_CONNECTED { log 10.10.231.1 local0.info "Client: [IP::client_addr], Pool member [IP::server_addr]:[TCP::server_port]" }
- sprashanthac_81NimbostratusEveryone is writing the irule but none of them telling what this irule is used for and how to implement it. The usage is very important
- hooleylistCirrostratusHi sprashanthac,
- sprashanthac_81NimbostratusThanks Aaron. This one is a good solution for HSL logging. will try this and get back on more issues. Seems like I need more detailed way of logging set up for each type of log. Will post the question.
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