Forum Discussion
Jeremy_Bridges_
Sep 11, 2009Nimbostratus
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?