Created
September 26, 2013 22:11
-
-
Save leonsodhi/6721295 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
######################################## | |
# Global directives # | |
######################################## | |
User nxlog | |
Group nxlog | |
LogFile /var/log/nxlog/nxlog.log | |
LogLevel INFO | |
######################################## | |
# Modules # | |
######################################## | |
<Extension _syslog> | |
Module xm_syslog | |
</Extension> | |
<Extension _fileop> | |
Module xm_fileop | |
</Extension> | |
# Monitor application log file | |
<Input watchfile> | |
Module im_file | |
File "/path/to/your/*.log" | |
Exec $Message = $raw_event; | |
Exec $SourceName = file_basename(file_name()); | |
</Input> | |
<Processor filewatcher_transformer> | |
Module pm_transformer | |
# Uncomment to override the program name | |
# Exec $SourceName = 'PROGRAM NAME'; | |
# Uncomment to override the hostname | |
# Exec $Hostname = 'HOSTNAME'; | |
OutputFormat syslog_rfc5424 | |
</Processor> | |
<Output syslogout> | |
Module om_ssl | |
Host logs.papertrailapp.com | |
Port YOUR_PORT | |
CAFile /etc/syslog.papertrail.crt | |
AllowUntrusted FALSE | |
</Output> | |
<Route 1 > | |
Path watchfile => filewatcher_transformer => syslogout | |
</Route> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment