Forum Discussion
scott_sams_8256
Nimbostratus
Feb 20, 2009content tracking
we found an irule here by Kirk (thanks Kirk) that breaks content down by count. any genius out there that can take this and add total bytes for each category? our ecomm group wants to see the breakd...
JRahm
Admin
Feb 20, 2009Ah, been a while for stats profile and I don't have the means to test right now, but how about under each switch match:
STATS::incr "ContentType" "Images_bytes" [HTTP::payload length]
or another profile:
STATS::incr "ContentLength" "Images" [HTTP::payload length]
So the rule would expand to:
when HTTP_RESPONSE {
switch -glob [HTTP::header "Content-type"] {
"image/*" {
STATS::incr "ContentType" "Images"
STATS::incr "ContentLength" "Images" [HTTP::payload length]
}
...and so on. I assumed another profile for the content length, but you could keep in the same profile with different fields as long as you don't exceed the max. Untested, but it just might work! HTH
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
