Forum Discussion
irule to check node connection
I want to make an irule which checks to see which node a server is connecting to. the following irule doesnt seem to write to /var/log/ltm.
log_node_connection
when CLIENT_ACCEPTED { log local0.info "--- Node IP address: [IP::server_addr]" } when HTTP_REQUEST { log local0.info "Client IP address: [HTTP::host] " }
How can I change this irule to accomplish the task?
thanks,
Eric
We use this which gives a complete picture of the connection from client to server:
when SERVER_CONNECTED { This logs information about the TCP connections on *both* sides of the proxy set client_remote "[IP::client_addr]:[TCP::client_port]" set client_local "[IP::local_addr clientside]:[TCP::local_port clientside]" set server_local "[IP::local_addr]:[TCP::local_port]" set server_remote "[IP::server_addr]:[TCP::server_port]" log local0. "Got connection: Client($client_remote)<->($client_local)LTM($server_local)<->($server_remote)Server" }
- Cory_50405Noctilucent
We use this which gives a complete picture of the connection from client to server:
when SERVER_CONNECTED { This logs information about the TCP connections on *both* sides of the proxy set client_remote "[IP::client_addr]:[TCP::client_port]" set client_local "[IP::local_addr clientside]:[TCP::local_port clientside]" set server_local "[IP::local_addr]:[TCP::local_port]" set server_remote "[IP::server_addr]:[TCP::server_port]" log local0. "Got connection: Client($client_remote)<->($client_local)LTM($server_local)<->($server_remote)Server" }
- nitassEmployee
I want to make an irule which checks to see which node a server is connecting to.
server ip will be shown in SERVER_CONNECT or HTTP_RESPONSE event.
e.g. Log Http Tcp Udp To Syslogng
https://devcentral.f5.com/wiki/iRules.LogHttpTcpUdpToSyslogng.ashx
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