Forum Discussion

gh0std0g_79292's avatar
gh0std0g_79292
Icon for Nimbostratus rankNimbostratus
May 29, 2012

iRule: log local0 error showing up in ltm logs

Here's the error in my logs:

 

 

 

tmm2 err tmm2[7592]: 01220001:3: TCL error: /Common/signal-redirect-irule - can't read "url": no such variable while executing "log local0. "$url""

 

 

 

 

 

Here's the iRule:

 

when HTTP_REQUEST {

 

set hostname variable in lower case

 

set hostname [string tolower [HTTP::host]]

 

check if the hostname variable is in the first Data Group

 

if { [class match $hostname equals signal-fqdn-class] } {

 

set the HTTP::uri to the value found in the data group

 

HTTP::uri [class lookup $hostname signal-fqdn-class]

 

HTTP::redirect ]

 

check if the hostname variable is in the second Data Group

 

} elseif { [class match $hostname equals signal4test-fqdn-class] } {

 

set the HTTP::uri to the value found in the data group

 

HTTP::uri [class lookup $hostname signal4test-fqdn-class]

 

HTTP::redirect ]

 

}

 

log local0. "$hostname"

 

log local0. "$url"

 

}

 

 

 

 

 

 

 

 

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus
    gh0std0g,

     

    Is it simply that you don't set the url variable in the irule? You've set uri and hostname but no url.

     

     

    Hope that helps,

     

    N