diff --git a/modules/user_data/templates/install.sh.tftpl b/modules/user_data/templates/install.sh.tftpl index 1d617055..97afa670 100644 --- a/modules/user_data/templates/install.sh.tftpl +++ b/modules/user_data/templates/install.sh.tftpl @@ -35,6 +35,17 @@ Unattended-Upgrade::Automatic-Reboot-WithUsers "true"; Unattended-Upgrade::Automatic-Reboot-Time "now"; EOF +cp /etc/cron.daily/logrotate /etc/cron.hourly/logrotate +cat < /etc/logrotate.d/datadog +/var/log/datadog/*.log { + hourly + rotate 12 + compress + missingok + notifempty +} +EOF + %{ if site == "datad0g.com" } cat <> /etc/datadog-agent/datadog.yaml remote_configuration: