Skip to content

Instantly share code, notes, and snippets.

@philk
Created August 8, 2013 18:33
Show Gist options
  • Save philk/6187361 to your computer and use it in GitHub Desktop.
Save philk/6187361 to your computer and use it in GitHub Desktop.
json_event rsyslog forwarder template
$ModLoad imfile
$MaxMessageSize 64k
$template JSON_EVENT,"%msg:::drop-last-lf%\n"
$InputFileName /var/log/cassandra/logstash.log
$InputFileTag cassandra:
$InputFileStateFile cassandra-state
$InputRunFileMonitor
$ActionQueueType LinkedList # use asynchronous processing
$ActionQueueFileName cassandrafwd # set file name, also enables disk mode
$ActionResumeRetryCount -1 # infinite retries on insert failure
$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
:syslogtag, startswith, "cassandra:" @@192.168.1.1:55515;JSON_EVENT
& ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment