Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4753

Use global variable in condition

$
0
0

Hi,

I’m trying to set up this type of a check:

global
...
    set-var proc.max_conn_cur int(300)

frontend lb-useast
...
  tcp-request connection track-sc0 src
  stick-table type ip size 500k expire 30s store conn_cur,conn_rate(10s),http_req_rate(10s),http_err_rate(10s)

  http-request add-header X-Haproxy-ACL %[req.fhdr(X-Haproxy-ACL,-1)]over-%[var(proc.max_conn_cur,300)]-active-connections, if { sc0_conn_cur gt var(proc.max_conn_cur) }

and this does not work, the error comes up:

error detected while parsing an 'http-request add-header' condition : 'var(proc.max_conn_cur)' is neither a number nor a supported operator.

Is it ever possible to make such a comparison?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4753

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>