Created
April 2, 2013 19:33
-
-
Save jdutton/5295456 to your computer and use it in GitHub Desktop.
Rsyslog conf file to send rsyslog output to logstash as a native json logstash event. For more info - see blog post at http://untergeek.com/2012/10/11/using-rsyslog-to-send-pre-formatted-json-to-logstash/
This file contains 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
# Send a native logstash json event to the logstash server | |
$template ls_json,"{%timestamp:::date-rfc3339,jsonf:@timestamp%,\"@message\":\"%msg:::json%\",\"@fields\":{%fromhost:::jsonf:host%,%syslogfacility-text:::jsonf:syslog_facility%,%syslogfacility:::jsonf:syslog_facility_code%,%syslogseverity-text:::jsonf:syslog_severity%,%syslogseverity:::jsonf:syslog_severity_code%,%app-name:::jsonf:program%,%procid:::jsonf:pid%}}" | |
*.* @@mylogstashhost:5543;ls_json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment