Greetings,
On 12/7/2019 4:48 PM, Björn Jacke wrote:
Hi,
I would like to compare two different stick-table values in an ACL.
What I tried to do was an obvious comparison like this:
http-request deny if { sc_conn_rate(0) le sc_http_req_rate(1) }
The following should do what you seek:
http-request set-var(req.request_rate) sc_http_req_rate(1)
http-request deny if { sc_conn_rate(0),sub(req.request_rate) lt 0 }
Thanks,
Chad
but this results in:
[ALERT] 340/213554 (9804) : parsing [/etc/haproxy/haproxy.cfg:203] :
error detected while parsing an 'http-request deny' condition :
'sc_http_req_rate(1)' is neither a number nor a supported operator.
is that an intended limitations that are there no variables allowed on
the right hand side here?
Is there a different way to do something like this?
Thanks
Björn