Skip to content

Instantly share code, notes, and snippets.

@garlandkr
Created January 11, 2013 18:21
Show Gist options
  • Save garlandkr/4512815 to your computer and use it in GitHub Desktop.
Save garlandkr/4512815 to your computer and use it in GitHub Desktop.
rsyslog conf for Jenkins
# Import Jenkins log files
$ModLoad imfile # Load the imfile input module
$ModLoad imklog # for reading kernel log messages
$ModLoad imuxsock # for reading local syslog messages
# Cleanup logs
#$InputFileName "/opt/jenkins/Workspace clean-up.log"
#$InputFileTag jenkins-cleanup
#$InputFileStateFile jenkins-cleanup-state
#$InputRunFileMonitor
# Backup logs
#$InputFileName /opt/jenkins/ThinBackup*.log
#$InputFileTag jenkins-backup
#$InputFileStateFile jenkins-backup-state
#$InputRunFileMonitor
# Slave logs
#$InputFileName /opt/jenkins/*slave*.log
#$InputFileTag jenkins-slaves
#$InputFileStateFile jenkins-slaves-state
#$InputRunFileMonitor
# Audit logs
$InputFileName /opt/jenkins/audit.log
$InputFileTag jenkins-audit
$InputFileStateFile jenkins-audit-state
$InputRunFileMonitor
# JSON Templating
$template enhanced,"{\"event\":{\"p_proc\":\"%programname%\",\"p_sys\":\"%hostname%\",\"time\":\"%timestamp:::date-rfc3339%\"},\"message\":{\"raw_msg\":\"%rawmsg%\"}}\n",json
# Ship logs to central logstash
*.* @@logstash:55514;enhanced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment