Created
October 28, 2014 17:30
Sending JSON Format Logs From Syslog-ng - Snippet 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parser p_db { | |
db-parser(file("/etc/syslog-ng/ssh.xml")); | |
}; | |
template LogglyFormat { template("<${PRI}>1 ${ISODATE} ${HOST} ${PROGRAM} ${PID} ${MSGID} [abcd1234-aaaa-bbbb-1234-1234abcd1234@41058] $MSG $(format_json --scope nv_pairs)\n");}; | |
destination d_loggly { tcp("logs-01.loggly.com" port(514) template(LogglyFormat)); }; | |
log { source(src); parser(p_db); destination(d_loggly); }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment