Filip Pytloun | d5d7cc4 | 2016-05-16 10:56:18 +0200 | [diff] [blame] | 1 | ====================== |
| 2 | Salt Logrotate Formula |
| 3 | ====================== |
| 4 | |
| 5 | Logrotate is designed to ease administration of systems that generate |
| 6 | large numbers of log files. It allows automatic rotation, compression, |
| 7 | removal, and mailing of log files. Each log file may be handled daily, |
| 8 | weekly, monthly, or when it grows too large. |
| 9 | |
| 10 | Example pillar |
| 11 | ============== |
| 12 | |
| 13 | Configuration for syslog from Ubuntu 14.04 (trusty): |
| 14 | |
Filip Pytloun | df5dc31 | 2016-05-16 11:46:06 +0200 | [diff] [blame] | 15 | .. code-block:: yaml |
| 16 | |
| 17 | logrotate: |
| 18 | server: |
| 19 | enabled: true |
| 20 | job: |
| 21 | rsyslog: |
| 22 | - files: |
| 23 | - /var/log/mail.info |
| 24 | - /var/log/mail.warn |
| 25 | - /var/log/mail.err |
| 26 | - /var/log/mail.log |
| 27 | - /var/log/daemon.log |
| 28 | - /var/log/kern.log |
| 29 | - /var/log/auth.log |
| 30 | - /var/log/user.log |
| 31 | - /var/log/lpr.log |
| 32 | - /var/log/cron.log |
| 33 | - /var/log/debug |
| 34 | - /var/log/messages |
| 35 | options: |
| 36 | - rotate: 4 |
| 37 | - weekly |
| 38 | - missingok |
| 39 | - notifempty |
| 40 | - compress |
| 41 | - delaycompress |
| 42 | - sharedscripts |
| 43 | - postrotate: "reload rsyslog >/dev/null 2>&1 || true" |
| 44 | - files: |
| 45 | - /var/log/syslog |
| 46 | options: |
| 47 | - rotate: 7 |
| 48 | - daily |
| 49 | - missingok |
| 50 | - notifempty |
| 51 | - delaycompress |
| 52 | - compress |
| 53 | - postrotate: "reload rsyslog >/dev/null 2>&1 || true" |
Filip Pytloun | d5d7cc4 | 2016-05-16 10:56:18 +0200 | [diff] [blame] | 54 | |
| 55 | Reference |
| 56 | ========= |
| 57 | |
| 58 | - http://www.linuxcommand.org/man_pages/logrotate8.html |
Filip Pytloun | 5b311d6 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 59 | |
| 60 | Documentation and Bugs |
| 61 | ====================== |
| 62 | |
| 63 | To learn how to install and update salt-formulas, consult the documentation |
| 64 | available online at: |
| 65 | |
| 66 | http://salt-formulas.readthedocs.io/ |
| 67 | |
| 68 | In the unfortunate event that bugs are discovered, they should be reported to |
| 69 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 70 | formula: |
| 71 | |
| 72 | https://github.com/salt-formulas/salt-formula-logrotate/issues |
| 73 | |
| 74 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 75 | use Launchpad salt-formulas project: |
| 76 | |
| 77 | https://launchpad.net/salt-formulas |
| 78 | |
| 79 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 80 | |
| 81 | https://launchpad.net/~salt-formulas-users |
| 82 | |
| 83 | Developers wishing to work on the salt-formulas projects should always base |
| 84 | their work on master branch and submit pull request against specific formula. |
| 85 | |
| 86 | https://github.com/salt-formulas/salt-formula-logrotate |
| 87 | |
| 88 | Any questions or feedback is always welcome so feel free to join our IRC |
| 89 | channel: |
| 90 | |
| 91 | #salt-formulas @ irc.freenode.net |