Forum Discussion
dyobbs_25515
Nimbostratus
Apr 17, 2017DNS Requests / Sec per IP
Is there a way to get the number of DNS requests per sec in a BIG-IP on a per IP basis?
What command to use get have it on chronological order?
Kevin_Davies_40
Nacreous
Apr 17, 2017Attached this to your DNS listener
when CLIENT_DATA {
table set -subtable [IP::client_addr] [TMM::cmp_unit][clock clicks] 0 1
table set -subtable tracking [IP::client_addr] 0 5
}
Attached this to a HTTP virtual server with HTTP profile
when HTTP_REQUEST {
if {[HTTP::uri] eq "/stats"} {
set response ""
foreach IP [table keys -subtable tracking] {
append response "$IP Count [table keys -subtable tracking -count]\r\n"
}
HTTP::respond 200 content $response Content-Type "text/plain" Connection Close
}
}
The first collects the statistics, the second allows you to see them from a virtual server.
- dyobbs_25515Apr 19, 2017
Nimbostratus
Thanks Kevin, put the first irule on my DNS listener and created a VS with HTTP profile and put in the 2nd irule. Pardon me. How to see the stats per IP? I went into the browser . Is that how to see results?
- Kevin_Davies_40Apr 19, 2017
Nacreous
Yes however their is a typo. Inside the foreach loop the subtable name needs to be $IP and not tracking.
append response "$IP count [table keys -subtable $IP ....
- Kevin_Davies_40Apr 24, 2017
Nacreous
How did you go?
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