For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

N_67263's avatar
N_67263
Icon for Nimbostratus rankNimbostratus
Sep 19, 2014

Identifying hits to the iRule.

Folks, how can I check the hits to a VIP that are being handled by the configured iRule? Also, what debug steps can help me find how how the iRule is handling the traffic?

 

Thanks, Nik

 

2 Replies

  • You can use log statements in the iRule, which will send output to /var/log/ltm

     

    log local0.debug "text"

    A common method is to use a debug variable, so you can turn it on and off easily

     

    At the beginging of the rule

     

    when RULE_INIT {
        set static::debug 1
    }

    and then in your code blocks

     

    if { $static::debug >= 1 } { log local0.debug "Text" }

    change the static::debug to 0 in RULE_INIT to shut off logging, use values greater than 1 for more verbose levels and so on.

     

  • You can also view iRule event hits from the GUI on a v11 system. Go to Statistics - Module Statistics - Local Traffic. Under the Statistics Type drop down, select iRules.