Skip to content

Instantly share code, notes, and snippets.

@gerhardqux
Created April 20, 2018 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerhardqux/3605f9abf54b4845e450f9f8e19584f7 to your computer and use it in GitHub Desktop.
Save gerhardqux/3605f9abf54b4845e450f9f8e19584f7 to your computer and use it in GitHub Desktop.
# Auditd logging
# Log linux audit log on original format:
$template Audit_log, "/var/log/hosts/%$year%/%$month%/%$day%/%fromhost-ip%/audit.log"
$template auditFormat, "%msg%\n"
:programname, isequal, "audispd" -?Audit_log;auditFormat
& ~
:programname, isequal, "audispd" ~
& ~
$template Auth_log,"/var/log/hosts/%$year%/%$month%/%$day%/%fromhost-ip%/auth.log"
$template Kern_log,"/var/log/hosts/%$year%/%$month%/%$day%/%fromhost-ip%/kern.log"
$template Mail_log,"/var/log/hosts/%$year%/%$month%/%$day%/%fromhost-ip%/mail.log"
$template Info_log,"/var/log/hosts/%$year%/%$month%/%$day%/%fromhost-ip%/info.log"
$template Misc_log,"/var/log/hosts/%$year%/%$month%/%$day%/%fromhost-ip%/misc.log"
auth,authpriv.* -?Auth_log
& ~
kern.* -?Kern_log
& ~
mail.* -?Mail_log
& ~
*.info -?Info_log
& ~
*.* -?Misc_log
& ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment