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
- Kevin_Stewart
Employee
It's been awhile since I've worked with STAT profiles, but if I understand it correctly, a single STAT profile can be used across multiple VIPs. If that is the case, you need to clear a single STAT value, and iRules is the only way to do it, you could create a "Services VIP". Its sole job is to execute iRules and return a response. You would then access that VIP via command line Curl.when HTTP_REQUEST { switch [HTTP::uri] { "/FIELD_RESET" { STATS::set $statProfile $fieldName 0 HTTP::respond 200 Content "OK" } default { HTTP::respond 200 Content "Nothing selected" } } } - L4L7_53191
Nimbostratus
Kevin: Nice technique! That design could be useful for a whole bunch of things - thanks for the idea.
-Matt - Jeremy_Bridges_
Nimbostratus
I'm not following. How do you build an iRule that executes arbitrary iRules? The iRule you show doesn't do this. - Jeremy_Bridges_
Nimbostratus
I should also mention that I will not be using a stat profile across multiple VIP's. Each stat profile will be specificly designed to track the performance of the pool members in a pool behind one specific VIP. - The_Bhattman
Nimbostratus
What Kirk was saying that if you create a dummy Virtual address called Services_VIP listening on port 80 without a pool associated to it.
When you use Curl command in the BIGIP cli you can send the strings via url "curl http://VirtualIP/statesprofilename/field_name/reset"
You can parse our the URI and clear the field names. You would have to apply the irule to very vip, just one that can execute the IRule that can be applied to separate STATS profile.
I hope this helps,
CB - Jeremy_Bridges_
Nimbostratus
I got that part. What I don't follow is how to execute iRules from another iRule. Maybe that is not what was meant.
So, to clear this up, let me walk through each element of the solution:
1. A dummy Services VIP is created that operates on port 80 and has no pool.
2. An iRule is created and linked to the Services VIP that parses the URL to get the stat profile and stat profile field name. This iRule uses these to reset a stat profile's field value.
If this is the entire solution, as I said before, it won't work for my situation. My stat profiles are set up similarly to this:
stats-Server1
----------------------
over-ttl-connection-count-ip1:port1
over-ttl-connection-count-ip2:port2
over-ttl-connection-count-ip3:port3
stats-Server2
----------------------
over-ttl-connection-count-ip21:port21
over-ttl-connection-count-ip22:port22
over-ttl-connection-count-ip23:port23
Using the solution above, I would set up a dummy Services VIP, associate the "stats-Server1" profile to the Services VIP and link my stats management iRule to the Services VIP. Let's call this Services VIP "Server1-Manager". The problem is that any requests to "Server1-Manager" can only manipulate "stats-Server1". It cannot manipulate any other stat profiles. For, as best as I can tell from my testing, an iRule can only modify or view the one stat profile associated with the VIP the iRule is linked to:
Works:
http://server1.manager/stats-Server1/over-ttl-connection-count-ip1:port1/reset
Doesn't Work:
http://server1.manager/stats-Server2/over-ttl-connection-count-ip21:port21/reset
Am I in error? Can requests directed at one VIP, through an iRule, modify other stat profiles than the one stat profile associated with the VIP? If so, how can I configure the VIP, stat profile, and iRule to accomplish this? - Jeremy_Bridges_
Nimbostratus
Nevermind, we settled on just resetting every stat field with iControl. It is a bit of a blunt instrument, but it will sufficise for now. I have a feature request in to add the ability to reset just one field (C573859) using iControl. So, we will see how that goes. Thanks for the help everyone.
Forum post for the iControl feature:
http://devcentral.f5.com/Default.aspx?tabid=53&forumid=1&postid=62611&view=topic
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
