Skip to content

Instantly share code, notes, and snippets.

@actionjack
Forked from jdutton/rsyslog-to-logstash.conf
Last active August 29, 2015 14:10
Show Gist options
  • Save actionjack/584d3ac5ef506817d2ff to your computer and use it in GitHub Desktop.
Save actionjack/584d3ac5ef506817d2ff to your computer and use it in GitHub Desktop.
# 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