-
-
Save haproxytechblog/4f8c9be81c61062ee0bf845c6225deba to your computer and use it in GitHub Desktop.
Announcing HAProxy 2.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global | |
| log backend@mylog-rrb local0 | |
| backend mylog-rrb | |
| mode log | |
| balance roundrobin | |
| server s1 udp@10.0.0.1:514 | |
| server s2 udp@10.0.0.2:514 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| log-forward graylog | |
| # Listen on Graylog ports | |
| bind :12201 | |
| dgram-bind :12201 | |
| log backend@mylog-rrb local0 | |
| backend mylog-rrb | |
| mode log | |
| balance roundrobin | |
| server log1 udp@10.0.0.1:514 | |
| server log2 udp@10.0.0.2:514 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # get a integer value from the request body | |
| # "{"integer":4}" => 5 | |
| http-request set-var(txn.pay_int) req.body,json_query('$.integer','int'),add(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http-response set-var-fmt(txn.queue_time) %Tw | |
| http-response set-var-fmt(txn.connect_time) %Tc | |
| http-response set-var-fmt(txn.response_time) %Tr | |
| http-response set-var(txn.total_response_time) var(txn.queue_time),add(txn.connect_time),add(txn.response_time) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http-after-response set-log-level err if { txn.timer.user ge 5000 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| acl(!is_malware,goodguys,auth_ok) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment