Forum Discussion
Tabish_Mirza_12
Nimbostratus
Jun 24, 2014F5 LTM 11.3.1 session connection logs
Hello Folks,
We have VS configured with SNAT. We can see users connection session logs on BIGIP but we want to forwards these log to remote syslog server. How can we achieve this? We have alread...
Kevin_Stewart
Employee
Jun 24, 2014Not sure if you need to log everything from tmsh show connection, but the following iRule will log client, VIP, and server IP/port to a remote syslog server:
when CLIENT_ACCEPTED {
set vs [IP::local_addr]:[TCP::local_port]
set hsl [HSL::open -proto UDP -pool syslog-ubuntu-pool]
}
when SERVER_CONNECTED {
set client [IP::client_addr]:[TCP::client_port]
set srv [IP::remote_addr]:[TCP::remote_port]
HSL::send $hsl "<134>Client: $client established a connection to $vs and load balanced to server $srv at [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S"]"
}
This will trigger a log on every server side connection. If you want to actually log per-request traffic, you can still use an iRule, but you also have the Request Logging profile, which would be applied to the virtual server and log every request and/or response.
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