Created
December 10, 2014 14:25
-
-
Save KensoDev/b483d07dbe17f40e0767 to your computer and use it in GitHub Desktop.
Ship Logs to logstash using Rsyslog
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
$ModLoad imfile # Load the imfile input module | |
# <syslog-tag> Tag you give to syslog in order to identigy the input coming from this file eg: nginx-access/rails/some_other_name | |
# <statefile-name> What do you want the state file to be called eg: nginx-access-state | |
# use @@ if you want to send logs over TCP | |
# use @ if you want to send logs over UDP | |
$InputFileName /path/to_log_location.log | |
$InputFileTag <syslog-tag>: | |
$InputFileStateFile <statefile-name> | |
$InputRunFileMonitor | |
:syslogtag , isequal , "<syslog-tag>:" @@<logstash-location>:<logstash-port> | |
& ~ # Don't handle this anymore down the chain... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment