Forum Discussion
Kai_Wilke
Feb 01, 2016MVP
Hi Ingard,
of course, you can also include other events and/or other variables to the log output.
Here is a quick sample using the LB_SELECTED event to include the [LB::server addr] of the selected pool member...
when RULE_INIT {
set static::timeout 10000 ; msec
}
when LB_SELECTED {
set debug(request_url) "[HTTP::host][HTTP::uri]"
set debug(server_addr) "[LB::server addr]"
set debug(id) [after $static::timeout {
log local0.warn "$static::timeout msec timeout reached on Node \"$debug(server_addr)\" for \"$debug(request_url)\""
}]
}
when HTTP_RESPONSE {
after cancel $debug(id)
unset -nocomplain debug
}
when CLIENT_CLOSED {
if { [info exist debug(request_url)] } then {
log local0.warn "Connection closed without HTTP response on Node \"$debug(server_addr)\" for \"$debug(request_url)\""
}
}
Cheers, Kai