Forum Discussion
Any way to get traffic data from virtual server that has no pool and no nodes ?
Alternatively you can add a one line iRule.
when CLIENT_ACCEPTED {
log local0. "Connection from [IP::client_addr]"
}
This will log an entry for every connection. If you have many thousands of connections then you can use the rule below to store connection information in session tables which can be retrieved later with a reporting iRule.
when CLIENT_ACCEPTED {
table incr client-[IP::client_addr]
table timeout client-[IP::client_addr] 3600
table add -subtable client-tracking client-[IP::client_addr] 3600
}
Client connection information is stored for up to an hour, adjust this with the 3600 seconds above. If we don't see that client come back in an hour then it is automatically expired from the session table.
The reporting iRule below gives you the output from the collected stats above. It can be attached to any virtual server on the same F5. You trigger it with and it will display a page of collected connection information.
when HTTP_REQUEST {
if {[HTTP::uri] ne "/connections" } { return }
set response "Connections\r\n"
foreach key [table keys -subtable client-tracking] {
append response "$key = [table lookup $key]\r\n"
}
HTTP::respond 200 content $response Content-Type "text/plain" Connection Close
event disable
}
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