Add logrotate meta configuration for Aodh
- parametrize interval and rotate
Related: PROD-29848
Change-Id: If030a42f80836bcebfebfd3f3224674cffbc3d15
diff --git a/aodh/meta/logrotate.yml b/aodh/meta/logrotate.yml
new file mode 100644
index 0000000..98ce83f
--- /dev/null
+++ b/aodh/meta/logrotate.yml
@@ -0,0 +1,17 @@
+## Default: Daily rotation with 28 rotations kept
+{%- from "aodh/map.jinja" import server with context %}
+
+{%- if server.get('enabled', False) %}
+job:
+ aodh-common:
+ - files:
+ - /var/log/aodh/*.log
+ options:
+ - {{ server.get('logrotate', {}).get('interval', 'daily') }}
+ - rotate: {{ server.get('logrotate', {}).get('rotate', 28) }}
+ - missingok
+ - compress
+ - delaycompress
+ - notifempty
+ - copytruncate
+{%- endif %}