F5 - IRule Basic troubleshooting

 

IRule For Basic troubleshooting

 

This iRule helps with basic troubleshooting via logging


when RULE_INIT {
    set static::debug 1
}

when CLIENT_ACCEPTED {
    if { $static::debug == 1 } {
        log local0. "BEGIN BEGIN"
        #logging of Client IP addres how it is accessing the F5
        log local0. "Client [IP::client_addr]"
    }
}

when HTTP_REQUEST {
    if { $static::debug == 1 } {
        log local0. "Virtual Server: [IP::local_addr]:[TCP::local_port]"
    }
}

when LB_SELECTED {
    if { $static::debug == 1 } {
        log local0. "Poolmember: [LB::server]"
        log local0. "END END END"
    }
}