%docentities; ] >
Functions
<function>cnt_inc([group.]name)</function> Increments the counter group.name. The counter must be defined using the script_counter module parameter. If the group name is missing, the group specified by the script_cnt_grp_name modparam will be used. <function>cnt_inc</function> usage ... modparam("counters", "script_counter", "reqs") modparam("counters", "script_counter", "out.reqs forwarded requests") ... route { cnt_inc("reqs"); if (forward(uri:host, uri:port)) cnt_inc("out.reqs"); ... }
<function>cnt_add([group.]name, number)</function> Adds number the counter group.name. The counter must be defined using the script_counter module parameter. If the group name is missing, the group specified by the script_cnt_grp_name modparam will be used. <function>cnt_add</function> usage ... modparam("counters", "script_counter", "reqs10 reqs times 10") ... route { cnt_add("reqs10", 10); ... }
<function>cnt_reset([group.]name)</function> Resets the counter group.name. The counter must be defined using the script_counter module parameter. If the group name is missing, the group specified by the script_cnt_grp_name modparam will be used. <function>cnt_reset</function> usage ... modparam("counters", "script_counter", "reqs") ... route { if (...) cnt_reset("reqs"); ... }