Forum Discussion
Jeremy_Bridges_
Nimbostratus
Sep 08, 2009Stats Profiles and bigpipe
I would like to access statistics profiles using the bigpipe utility. What command do I need to use to get the value of "field1" on a stats profile called "stats-MyServer"? Maybe like this?
bigpipe stats "stats-MyServer" "field1"
- The_Bhattman
Nimbostratus
Here are some commands in for STATS - hoolio
Cirrostratus
Yep... but I'm not sure you can get the value for a specific field. If you guys figure that one out, can you reply here? - Jeremy_Bridges_
Nimbostratus
I haven't been able to find a way yet. The one that looks the closest is:bigpipe profile stats "stats-BNSServer-DEV" field1
PROFILE STATS stats-BNSServer-DEV - Field1: over-ttl-connection-count-10.41.53.53:17898
bigpipe profile stats "stats-BNSServer-DEV"
- JRahm
Admin
Alternatively you could get the first field through snmpget using the F5-BIGIP-LOCAL-MIB::ltmUserStatProfileStatFieldValue."stats-BNSServer-DEV".1 oid. - JRahm
Admin
or pipe your bigpipe data to grep and awk/cut to refine the output. - Jeremy_Bridges_
Nimbostratus
Thanks for the input. I ended up using grep and awk to parse the bigpipe output:fieldName="over-ttl-connection-count-${ip}:${port}" overTtlConnectionCount=`bigpipe profile stats $statProfileName | grep $fieldName | awk '{print $3}'`
STATS::set "stats-BNSServer-DEV" "over-ttl-connection-count-10.41.53.53:17898" 0
- The_Bhattman
Nimbostratus
You mean the following won't reset the stats? - Jeremy_Bridges_
Nimbostratus
I'm sure that will reset the stats. But, I just want to reset one field's value. That command looks like it will reset all of the fields for the given stat profile. Is there some variation that can reset just one field? - The_Bhattman
Nimbostratus
I don't think there is way from the b pipe to reset stats in field. However, that isn't to say you can't right up an irule that can reset the stats - Jeremy_Bridges_
Nimbostratus
I created the iRule as you suggested:when HTTP_REQUEST { parse URL set urlParts [split [HTTP::uri] /] if {[lindex $urlParts 1] == "F5Stats"} { pull out the statistics profile and field name set statProfile [lindex $urlParts 2] set fieldName [lindex $urlParts 3] check for reset flag if {[lindex $urlParts 4] == "reset"} { STATS::set $statProfile $fieldName 0 HTTP::respond 200 content "$statProfile/$fieldName was reset to 0" } else { set currentStatValue [STATS::get $statProfile $fieldName] HTTP::respond 200 content "$statProfile/$fieldName = $currentStatValue" } } }
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