mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-03 18:09:25 +00:00
Sometimes conditions to decide of an anomaly are not as easy to define as just an error or a success. One example use case would be to monitor the transfer time and fix a threshold. An idea suggested by Tristan would be to make permit the "when" converter to refer to a more variable or dynamic condition. Here we make this possible by making "when" rely on a named ACL. The ACL then needs to be specified in either the proxy or the defaults section. Since it is evaluated inline, it may even refer to information available at the end (at log time) such as the data transfer time. If the ACL evalutates to true, the converter passes the data. Example: log "dbg={-}" when fine, or "dbg={... debug info ...}" on slow transfers: acl slow_xfer res.timer.data ge 10000 # more than 10s is slow log-format "$HAPROXY_HTTP_LOG_FMT \ fsdbg={%[fs.debug_str,when(acl,slow_xfer)]} \ bsdbg={%[bs.debug_str,when(acl,slow_xfer)]}" |
||
---|---|---|
.. | ||
design-thoughts | ||
internals | ||
lua-api | ||
51Degrees-device-detection.txt | ||
acl.fig | ||
coding-style.txt | ||
configuration.txt | ||
cookie-options.txt | ||
DeviceAtlas-device-detection.txt | ||
gpl.txt | ||
haproxy.1 | ||
HAProxyCommunityEdition_60px.png | ||
intro.txt | ||
lgpl.txt | ||
linux-syn-cookies.txt | ||
lua.txt | ||
management.txt | ||
netscaler-client-ip-insertion-protocol.txt | ||
network-namespaces.txt | ||
peers-v2.0.txt | ||
peers.txt | ||
proxy-protocol.txt | ||
queuing.fig | ||
regression-testing.txt | ||
seamless_reload.txt | ||
SOCKS4.protocol.txt | ||
SPOE.txt | ||
WURFL-device-detection.txt |