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"17 Replies
- The_Bhattman
Nimbostratus
Here are some commands in for STATS
bigpipe profile stats help
bigpipe profile stats {}
bigpipe profile stats ( | all) [{] [}]
::=
bigpipe profile stats ( | all) delete
bigpipe profile stats [ | all] stats reset
bigpipe profile stats [ | all] [show [all]]
bigpipe profile stats [ | all] list [all]
bigpipe profile stats [ | all] defaults from [show]
bigpipe profile stats [ | all] field [show]
I hope this helps
CB - 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?
b profile stats test_stats show
PROFILE STATS test_stats parent stats
| virtual servers: test_tcp_vs
| counter1: 1
| counter2: 10
Thanks,
Aaron - 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
But that just returns the field's name:PROFILE STATS stats-BNSServer-DEV - Field1: over-ttl-connection-count-10.41.53.53:17898
So, I will just use the general stats show command:bigpipe profile stats "stats-BNSServer-DEV"
Thank you both for your help. - 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}'`
However, I now have a different problem. I would like to reset the stats value here to zero. I know I can do this through an iRule using the STATS::set command:STATS::set "stats-BNSServer-DEV" "over-ttl-connection-count-10.41.53.53:17898" 0
But, I don't know if there is any way to reset this outside of an iRule. Can this be done through bigpipe or any other command-line app? What about iControl? - The_Bhattman
Nimbostratus
You mean the following won't reset the stats?
bigpipe profile stats [ | all] stats reset - 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
I suppose you can write up an irule that would take information from URI and apply it
For example
http://ip.address.com/profilename/fieldname/reset. Then pass the information to STATS::set $profilename $fieldname 0
I hope that helps
CB - 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" } } }
Unfortunately, in order to use the STATS commands in the iRule you have to associate a statistics profile with the VIP. As a consequence of this, you cannot change or view any values that are not on the associated profile. So, to set this up, I would need to set up a different VIP for every statistics profile I wanted to manipulate. Not very easy to manage.
Is there some way around this limitation?
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
