Skip to content

Instantly share code, notes, and snippets.

View morissette's full-sized avatar
💻
Hack it, push it, test it, fix it, repeat, refactor, optimize, merge, deploy

Matthew Harris morissette

💻
Hack it, push it, test it, fix it, repeat, refactor, optimize, merge, deploy
View GitHub Profile
@ahmadalli
ahmadalli / 49-haproxy.conf
Last active October 4, 2023 19:36
Json Logging in HAProxy: The Right Way
# Create an additional socket in haproxy's chroot in order to allow logging via
# /dev/log to chroot'ed HAProxy processes
$AddUnixListenSocket /var/lib/haproxy/dev/log
# Send HAProxy messages to a dedicated logfile
:programname, startswith, "haproxy"
:syslogfacility-text, startswith, "local0" {
/var/log/haproxy.log
@@<graylog host>:<syslog input port>;RSYSLOG_SyslogProtocol23Format
stop