Forum Discussion

Angelo's avatar
Angelo
Icon for Nimbostratus rankNimbostratus
Aug 14, 2012

I rule not working

Hi

 

 

For some reason everything works except ServiceInstalledBase

 

 

 

when HTTP_REQUEST {

 

switch -glob [string tolower [HTTP::uri]] {

 

"/solutionsorb*" -

 

"/Servicesorb*" -

 

"/servicefileprocessor*" { pool pool_STG_domain }

 

"/ServiceInstalledBase*" -

 

"/serviceorderbase*" { pool pool_STG_provisioning_domain }

 

"/partnermaintenance*" -

 

"/servicesingleview*" -

 

"/partnermaintenance*" -

 

"/contentcatalogue*" -

 

"/msisdnmaintenance*" -

 

"/ticketing" { pool pool_STG_integration_domain}

 

}

 

}

 

 

 

 

Logs

 

 

 

Aug 14 08:47:13 tmm2 info tmm2[12149]: Rule /Common/CRM : 10.217.80.24:54925 -> 10.217.235.87:80 -> 10.217.80.24:54925 | pool: | URI: /ServiceInstalledBase

 

Aug 14 08:47:13 tmm3 info tmm3[12150]: Rule /Common/CRM : 10.217.80.24:54931 -> 10.217.235.87:80 -> 10.217.80.24:54931 | pool: | URI: /ServiceInstalledBa

 

 

 

 

 

 

2 Replies

  • in principle you can put all your switch statements in lower case as you turn you HTTP::uri to lower anyway, that might be cause of the issue also.

     

     

    if not, can you provide the code for the logging?

     

     

  • Hi Angelo,

    I believe that boneyard is correct. You might want to verify that your "/Servicesorb*" option in the switch statement is working, because it shouldn't work.

    The objects within the switch statment are literal and absolute which is why the "string tolower" option is suggested since it will put all of the text in a known state for comparison.

    Try this:

    
    when HTTP_REQUEST {
    switch -glob [string tolower [HTTP::uri]] {
    "/solutionsorb*" -
    "/servicesorb*" -
    "/servicefileprocessor*" { pool pool_STG_domain }
    "/serviceinstalledbase*" -
    "/serviceorderbase*" { pool pool_STG_provisioning_domain }
    "/partnermaintenance*" -
    "/servicesingleview*" -
    "/partnermaintenance*" -
    "/contentcatalogue*" -
    "/msisdnmaintenance*" -
    "/ticketing" { pool pool_STG_integration_domain}
    }
    }
    

    Hope this helps.