Forum Discussion

jsipes's avatar
jsipes
Icon for Nimbostratus rankNimbostratus
Nov 07, 2011

Redirect to Reporting Server

My redirect does not seem to be working. Does the syntax look good to you? The reporting server pool (pool_int_aprRPT_http )never gets a hit. Any help would be most appreciated. Thank you.

 

 

iRule

 

 

when HTTP_REQUEST {

 

set requested_path [string tolower [HTTP::path]]

 

if { [matchclass $requested_path starts_with $::class_Aprimo_Reports_Paths] } {

 

 

select Report Server pool

 

pool pool_int_aprRPT_http

 

} else {

 

 

select web server pool

 

pool pool_int_apr_http

 

}

 

}

 

 

 

DATA GROUP LIST

 

 

Name class_Aprimo_Reports_Paths

 

Type String

 

 

/aprimo/getmpmexportfile

 

/aprimo/getmpmreport

 

/aprimoreports

 

/crystalreports
  • Hi jsipies,

    I would suggest not using variables in iRules unless you have to. Otherwise your just wasting CPU Cycles.

    I would suggest engaging some logging inside of both events so that you can see in the log why the events are not lining up properly. Sometimes seeing what the iRule is seeing can clear up the issue.

     
    when HTTP_REQUEST {
    if { [matchclass [string tolower [HTTP::path]] starts_with $::class_Aprimo_Reports_Paths] } {
    select Report Server pool
    log local0. "Reports Match:  [HTTP::host][HTTP::uri]"
    pool pool_int_aprRPT_http
    }
    else {
    select web server pool
    log local0. "No Reports Match:  [HTTP::host][HTTP::uri]"
    pool pool_int_apr_http
    }
    }
    

    Look for these log entries in your LTM Log (/var/log/ltm) and see what the [HTTP::uri] values are and make sure that they match up with what is in the Data Group and let us know what you find.

    Hope this helps.
  • If you're on 9.4.4+ you should remove the $:: prefix from the datagroup name in the iRule.

     

     

    Aaron