| ## Default: Weekly rotation with 12 rotations kept |
| {%- from "redis/map.jinja" import server with context %} |
| |
| {%- if server.get('enabled', False) %} |
| job: |
| redis-sentinel: |
| - files: |
| - /var/log/redis/redis-sentinel*.log |
| options: |
| - {{ server.get('logrotate', {}).get('interval', 'weekly') }} |
| - rotate: {{ server.get('logrotate', {}).get('rotate', 12) }} |
| - missingok |
| - compress |
| - notifempty |
| redis-server: |
| - files: |
| - /var/log/redis/redis-server*.log |
| options: |
| - {{ server.get('logrotate', {}).get('interval', 'weekly') }} |
| - rotate: {{ server.get('logrotate', {}).get('rotate', 12) }} |
| - missingok |
| - compress |
| - notifempty |
| {%- endif %} |