Skip to content

Instantly share code, notes, and snippets.

@krams915
krams915 / haproxy.cfg
Created October 7, 2011 00:20
haproxy.cfg - Notes
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#Adds a global syslog server. Up to two global servers can be defined. They
#will receive logs for startups and exits, as well as all logs from proxies
#configured with "log global". An optional level can be specified to filter
#outgoing messages. By default, all messages are sent.
#An IPv4 address optionally followed by a colon and a UDP port. If
#no port is specified, 514 is used by default (the standard syslog port).
@krams915
krams915 / haproxy.cfg
Created October 8, 2011 05:39
haproxy.cfg (snippet) - log
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
@krams915
krams915 / 50-default.conf
Created October 8, 2011 06:00
rsyslog default rules
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
@krams915
krams915 / 50-default.conf
Created October 8, 2011 06:02
rsyslog default rules (edited)
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv,local0,local1.none -/var/log/syslog
@krams915
krams915 / rsyslog.conf
Created October 8, 2011 06:13
rsyslog.conf (snippet)
# Custom log facilities for haproxy
local0.* /var/log/haproxy0a.log
local1.* /var/log/haproxy1a.log
@krams915
krams915 / rsyslog.conf
Created October 8, 2011 06:14
rsyslog.conf (snippet)
# Custom log facilities for haproxy
local0.* -/var/log/haproxy0a.log
& ~
local1.* -/var/log/haproxy1a.log
& ~
@krams915
krams915 / logrotate.d
Created October 8, 2011 06:21
logrotate.d/haproxy
/var/log/haproxy*.log
{
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
@krams915
krams915 / rsyslog.conf
Created October 8, 2011 06:42
rsyslog.conf
# Custom log facilities for haproxy
local0.* /var/log/haproxy0a.log
local1.* /var/log/haproxy1a.log
$ModLoad imudp
# load the imudp module for rsyslog
# provides UDP syslog reception
# start UDP server on this port, "*" means all addresses
$UDPServerRun 514
@krams915
krams915 / rsyslog.conf
Created October 8, 2011 06:47
rsyslog.conf (snippet)
#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
@krams915
krams915 / haproxy.conf
Created October 8, 2011 06:49
rsyslog.d/haproxy.conf
# Custom log facilities for haproxy
local0.* /var/log/haproxy0a.log
local1.* /var/log/haproxy1a.log
$ModLoad imudp
# load the imudp module for rsyslog
# provides UDP syslog reception
# start UDP server on this port, "*" means all addresses
$UDPServerRun 514