Skip to content

Instantly share code, notes, and snippets.

@caquino
Created November 26, 2013 16:54
Show Gist options
  • Save caquino/7661837 to your computer and use it in GitHub Desktop.
Save caquino/7661837 to your computer and use it in GitHub Desktop.
syslog nginx configuration
source s_nginx_20 { pipe("/srv/logs/access.log" program_override("nginx-access-log")); };
source s_nginx_21 { pipe("/srv/logs/error.log" program_override("nginx-error-log")); };
filter f_nginx_20 { match("nginx-access-log" value("PROGRAM")); };
filter f_nginx_21 { match("nginx-error-log" value("PROGRAM")); };
destination d_remote { tcp("central.syslog", port(514)); };
log { source(s_nginx_20); filter(f_nginx_20); destination(d_messages); };
log { source(s_nginx_21); filter(f_nginx_21); destination(d_messages); };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment