Skip to content

Instantly share code, notes, and snippets.

Created October 7, 2013 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6863632 to your computer and use it in GitHub Desktop.
Save anonymous/6863632 to your computer and use it in GitHub Desktop.
syslog-ng.conf
#syslog client's /etc/syslog-ng/syslog-ng.conf
source s_src {
system();
internal();
};
destination d_logServer {udp("syslog server's IP" port(514));};
log { source(s_src); destination(d_logServer); };
#syslog server's /etc/syslog-ng/syslog-ng.conf
source s_netU { udp(ip("syslog server's IP")port(514)); };
destination d_remote { file("/var/log/HOSTS/$HOST.$YEAR.$MONTH.$DAY"); };
filter f_remote { host( "syslog client's IP" ); };
log { source(s_netU); filter(f_remote); destination(d_remote); };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment