Forum Discussion
Simon_Wright_85
Nimbostratus
Jul 13, 2007iRule failing on earlier version of Big IP
Hi all
I am using the following iRule on an LTM running 9.4.0 without any problems but as soon as i use it on one thats running 9.2.3 i end up getting problems.
It compiles fine and i have made sure the correct Data Groups and Statistics Profiles are present. I have added .asp and .asmx to be included in the active stats but i get a page cannot be displayed message when i access and asp page. Strangely enough an aspx page will work with out any problems.
Am i trying to use functionality in the rule that is not compatible with 9.2.3?
many thanks in advance
Simon
when HTTP_REQUEST {
Set the variable names in one place.
set ::StatProfileName Test_Stats
Set the the start time of the request.
set t0 [clock clicks -milliseconds]
Load the list of IP addresses to identify monitoring servers.
set excludeIPStat [matchclass [IP::client_addr] equals $::Test_StatsIPExclude]
Check if the request comes from an monitoring server.
if { 0 != $excludeIPStat}
{
The request is from a monitoring server so it is for monitoring content.
set ::page_type 2
}
else
{
Load the list of URIs to include as active content.
set includeStat [matchclass [string tolower [HTTP::uri]] contains $::Test_StatsInclude]
Check to see if the request is on the included list.
if { 0 != $includeStat}
{
Load the list of URIs to exclude from active content.
set excludeStat [matchclass [string tolower [HTTP::uri]] contains $::Test_StatsExclude ]
Check to see if the request is on the excluded list.
if { 0 != $excludeStat}
{
The request is for monitoring content.
set ::page_type 2
}
else
{
The request is for active user content.
set ::page_type 1
}
}
else
{
The request is for static content.
set ::page_type 3
}
}
}
when HTTP_RESPONSE {
Set the the finish time of the request and work out the total time the request took.
set t1 [clock clicks -milliseconds]
set total_time [expr $t1 - $t0]
if { $::page_type == 1 } {
if { [expr $total_time <= 500] } {
STATS::incr $::StatProfileName "active_requests_500ms" 1
STATS::incr $::StatProfileName "active_requests_500ms_time" $total_time
}
elseif { [expr $total_time >= 501 and <=1000] } {
STATS::incr $::StatProfileName "active_requests_1000ms" 1
STATS::incr $::StatProfileName "active_requests_1000ms_time" $total_time
}
elseif { [expr $total_time >= 1001 and <=1500] } {
STATS::incr $::StatProfileName "active_requests_1500ms" 1
STATS::incr $::StatProfileName "active_requests_1500ms_time" $total_time
}
elseif { [expr $total_time >= 1501 and <=2000] } {
STATS::incr $::StatProfileName "active_requests_2000ms" 1
STATS::incr $::StatProfileName "active_requests_2000ms_time" $total_time
}
elseif { [expr $total_time >= 2001 and <=2500] } {
STATS::incr $::StatProfileName "active_requests_2500ms" 1
STATS::incr $::StatProfileName "active_requests_2500ms_time" $total_time
}
elseif { [expr $total_time >= 2501 and <=3000] } {
STATS::incr $::StatProfileName "active_requests_3000ms" 1
STATS::incr $::StatProfileName "active_requests_3000ms_time" $total_time
}
elseif { [expr $total_time >= 3001] } {
STATS::incr $::StatProfileName "active_requests_over_3000ms" 1
STATS::incr $::StatProfileName "active_requests_over_3000ms_time" $total_time
}
}
elseif { $::page_type == 2 } {
Update the statistics for monitoring requests.
STATS::incr $::StatProfileName "tot_monitoring_requests" 1
STATS::incr $::StatProfileName "tot_monitoring_page_time" $total_time
}
elseif { $::page_type == 3 } {
Update the statistics for static requests.
STATS::incr $::StatProfileName "tot_static_requests" 1
STATS::incr $::StatProfileName "tot_static_page_time" $total_time
}
}
4 Replies
Sort By
- Deb_Allen_18Historic F5 AccountI don't see anything specific to 9.4 in your iRule.
- Simon_Wright_85
Nimbostratus
Hi Deb thanks for the reply.elseif { [expr $total_time >= 501 ] and [expr $total_time <= 1000 ] }
elseif { [expr $total_time >= 501 and <= 1000 ] }
- Deb_Allen_18Historic F5 AccountI dont know why it only affected asp pages and not aspx but its working now and i am happy.Most likely they hit one of the conditions not containing that bad comparison. Glad I could help.
- Simon_Wright_85
Nimbostratus
Hi Deb
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