Skip to content

Instantly share code, notes, and snippets.

@rmetzler
Forked from soloradish/vault_logrotate
Created July 3, 2019 18:10
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 rmetzler/eea0ac1d0cae4c2803d4bce5c6d4b9f8 to your computer and use it in GitHub Desktop.
Save rmetzler/eea0ac1d0cae4c2803d4bce5c6d4b9f8 to your computer and use it in GitHub Desktop.
logrotate setting file for HashiCorp's Vault audit file
# Change the path below to your own audit log path.
/var/log/vault/audit.log {
rotate 30
daily
# Do not execute rotate if the log file is empty.
notifempty
missingok
compress
# Set compress on next rotate cycl to prevent entry loss when performing compression.
delaycompress
postrotate
# If you do not use systemctl. you can send SIGHUP to vault's process to achieve same goal.
/usr/bin/systemctl reload vault 2> /dev/null || true
endscript
extension log
dateext
dateformat %Y-%m-%d.
}
# Use this setting, your audit folder will like
# .
# ├── audit.2018-09-10.log.gz
# ├── audit.2018-09-11.log
# └── audit.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment