Last active
November 16, 2020 18:09
-
-
Save haproxytechblog/31dbe3cd0ba98e604213603c27204256 to your computer and use it in GitHub Desktop.
HAProxy Log Sampling
This file contains 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 127.0.0.1:514 sample 1:10 local0 info |
This file contains 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 127.0.0.1:514 sample 1:1 local0 info |
This file contains 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 127.0.0.1:514 sample 1:2 local0 info |
This file contains 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
# Local Syslog: | |
log 127.0.0.1:514 sample 1:1 local0 info | |
# Another Syslog: | |
log 192.168.1.100:514 sample 1:2 local0 info |
This file contains 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
# Sampled logs: | |
log 192.168.1.100:514 sample 1:10 local0 info | |
# Error logs: | |
log 192.168.1.101:514 local0 err |
This file contains 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
frontend www | |
bind :80 | |
acl failed_request status 400 401 403 404 405 408 429 500 503 | |
http-response set-log-level err if failed_request |
This file contains 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 127.0.0.1:514 sample 2-3,8-11,46,67-83:100 local0 info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment