Skip to content

Instantly share code, notes, and snippets.

@faxm0dem
Created November 28, 2015 21:24
Show Gist options
  • Select an option

  • Save faxm0dem/ef8eea30a3cd913f6b20 to your computer and use it in GitHub Desktop.

Select an option

Save faxm0dem/ef8eea30a3cd913f6b20 to your computer and use it in GitHub Desktop.
syslog-ng file destination
template t_logformat {
template("$ISODATE $HOST <$FACILITY.$PRIORITY> $LEGACY_MSGHDR$MSG\n");
template_escape(no);
};
destination d_remote_by_host {
file("/var/syslog-ng/remote/$YEAR/$MONTH/$DAY/by-host/${HOST}" template(t_logformat));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment