Created
January 12, 2014 03:40
-
-
Save vnisor/8380493 to your computer and use it in GitHub Desktop.
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
#Only needs to be loaded once, like most rsyslog modules | |
$ModLoad imfile | |
#path to the file which you want to monitor | |
$InputFileName /var/log/apache2/access.log | |
#The tag apache can be changed to whatever you'd like | |
$InputFileTag apache: | |
#the name of file within rsyslogs working directory | |
$InputFileStateFile stat-apache-access | |
#By default this is set to 'notice' | |
$InputFileSeverity info | |
#This is necessary for file monitoring (no parameters) | |
$InputRunFileMonitor | |
#Set to how often the file should be polled. (default = 10s) | |
$InputFilePollInterval 10 | |
# This is a template for Loggly. Substitute your Customer Token for TOKEN | |
$template LogglyFormatApache,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [TOKEN@41058 tag=\"apache\"] %msg%\n" | |
# Make sure the template above is on one line. | |
if $programname == 'apache' then @@logs-01.loggly.com:514;LogglyFormatApache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment