Forum Discussion
Steven_87308
Jan 14, 2011Nimbostratus
Stats Profile tutorial?
I am trying to capture one client's public IP's traffic: Current, Average, and Max bandwidth & connections. It looks like using StatsProfiles would be the way to go, but I'm stuck on the iRule. I've pored over Joe's article 66, but it's a bit steep for a guy who seldom does scripting. Is there a tutorial that maps the fields in the stats profile to an iRule?
TCPDump shows a LOT of traffic, but I want to trend it. Would it be easier to skip the iRule if I have InterMapper? (Five [probes] for Free!) It can do nice charting like Cacti, and can do SNMP readily. That is, is there an OID for the fields in StatsProfiles such that SNMP could pick up those stats?
Thus far my StatsProfile is named "ClientStats" and my fields are "CPS-Current, CPS-Av, CPS-Max, BWPS-Current, BWPS-Av, BWPS-MAX.
The things that throw me in Joe's66 are the "switch string to lower" (lower what?) and the reporting: once stats are gathered, does it show up in the gui automatically, or is it called as a named page in the gui?
But to the point, where's the incrementing done? Is it in the Http_Response? I could cull the timing/clock stuff, but the line STATS::incr looks crucial.
Where to begin? I've attached my feeble attempt thus far.
-Steve in SD
- Chris_MillerAltostratusAlso, it's delivered via HTML from the actual LTM. That's the point of his switch statement in the HTTP_REQUEST event.
- Steven_87308NimbostratusAh, "toLower" makes some sense -- thanks!
- Steven, if you ware looking at capturing bandwidth, how do you go about getting that information from within an iRule? The HTTP profile can help with the "HTTP::payload length" command but I don't think storing those in a stats profile is the best route here. Also, if you want to go that route, you'll have to code your iRule to batch up all the payload into a single buffer (in most cases requests will be sent in subsequent chunks and then processing by the backend servers when all chunks are sent. An iRule is a great place if you want to keep running totals, but building a reporting system with averages, max, etc is likely going to be tough as that data isn't readily accessible from within an iRule.
- Steven_87308NimbostratusI guess that's what I am looking for; a way to get that bandwidth data. Until I get up to v10.x, I won't have an iControl to use, if I understand my versions correctly.
- iControl is our remote API that has been on every version of LTM since 4.0. Think of it like our SNMP interface except that it's web services based. You can use perl, java, .Net, Python, Ruby, and many other languages as a client toolkit. Check out the iControl Wiki for more information
- Steven_87308NimbostratusSo iControl has always been in there, eh? Hmm.. thanks for the info. I'm not seeing a lot of ASP.NET examples in there. Maybe my dev guy could put something on his back burner, who knows.
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