Last active
December 31, 2015 12:49
-
-
Save RaphaelAudet/7988631 to your computer and use it in GitHub Desktop.
80-senttoci.conf
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
$LocalHostName myhost | |
# load module to read from local files | |
$ModLoad imfile | |
# for each local log file path, duplicate the 6 lines below and edit lines 2-4 | |
$RuleSet sendtoci # use a non-default ruleset (keeps logs out of /var/log/) | |
$InputFileName /var/www/app/shared/log/production.log | |
$InputFileTag unicorn: | |
$InputFileStateFile sendtoci-unicorn | |
$InputFilePersistStateInterval 100 # update state file every 100 lines | |
$InputRunFileMonitor | |
$InputFileName /var/www/app/shared/log/unicorn-stderr.log | |
$InputFileTag unicornerr: | |
$InputFileStateFile sendtoci-unicornerr | |
$InputFilePersistStateInterval 100 # update state file every 100 lines | |
$InputRunFileMonitor | |
$InputFileName /var/www/app/shared/log/unicorn-stdout.log | |
$InputFileTag unicornout: | |
$InputFileStateFile sendtoci-unicornout | |
$InputFilePersistStateInterval 100 # update state file every 100 lines | |
$InputRunFileMonitor | |
# destination | |
*.* @xx.xx.xx.XX #udp forwarding 514 | |
# for clarity, explicitly discard everything (this is typically not necessary) | |
*.* ~ | |
# all done. change to default ruleset (RSYSLOG_DefaultRuleset) for any following config | |
$RuleSet RSYSLOG_DefaultRuleset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment