Last active
August 29, 2015 14:11
-
-
Save Alambador/dbe55a510769daf694a3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# /etc/rsyslog.conf Configuration file for rsyslog. | |
# | |
# For more information see | |
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html | |
# | |
# Default logging rules can be found in /etc/rsyslog.d/50-default.conf | |
################# | |
#### MODULES #### | |
################# | |
$ModLoad imuxsock # provides support for local system logging | |
$ModLoad imklog # provides kernel logging support (previously done by rklogd) | |
#$ModLoad immark # provides --MARK-- message capability | |
# provides UDP syslog reception | |
#$ModLoad imudp | |
#$UDPServerRun 514 | |
# provides TCP syslog reception | |
#$ModLoad imtcp | |
#$InputTCPServerRun 514 | |
########################### | |
#### GLOBAL DIRECTIVES #### | |
########################### | |
# | |
# Use traditional timestamp format. | |
# To enable high precision timestamps, comment out the following line. | |
# | |
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat | |
# Filter duplicated messages | |
$RepeatedMsgReduction on | |
# | |
# Set the default permissions for all log files. | |
# | |
$FileOwner syslog | |
$FileGroup adm | |
$FileCreateMode 0640 | |
$DirCreateMode 0755 | |
$Umask 0022 | |
$PrivDropToUser syslog | |
$PrivDropToGroup adm | |
# | |
# | |
# | |
# Apache access file: | |
$ModLoad imfile | |
$InputFileName /var/log/apache2/access.log | |
$InputFileTag apache-access: | |
$InputFileStateFile stat-apache-access | |
$InputFileSeverity info | |
$InputRunFileMonitor | |
#Apache Error file: | |
$InputFileName /var/log/apache2/error.log | |
$InputFileTag apache-errors: | |
$InputFileStateFile stat-apache-error | |
$InputFileSeverity error | |
$InputRunFileMonitor | |
$InputFilePollInterval 10 | |
if $programname == 'apache-access' then @@logs.loggly.com:<port> | |
if $programname == 'apache-errors' then @@logs.loggly.com:<port> | |
# Forward to syslog messages to Loggly | |
*.* @@logs.loggly.com:<port> | |
# | |
# | |
# Include all config files in /etc/rsyslog.d/ | |
# | |
$IncludeConfig /etc/rsyslog.d/*.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment