Saltstack Official Logrotate Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

70 rindas
1.5KB

  1. # vim: sts=2 ts=2 sw=2 et ai
  2. logrotate:
  3. # default OS values can be overridden in 'lookup' dict
  4. #lookup:
  5. #pkg: logrotate
  6. #service: crond
  7. default_config:
  8. weekly: True
  9. rotate: 52
  10. create: True
  11. compress: True
  12. dateext: True
  13. jobs:
  14. /tmp/var/log/mysql/error:
  15. config:
  16. - weekly
  17. - missingok
  18. - rotate 52
  19. - compress
  20. - delaycompress
  21. - notifempty
  22. - create 640 root adm
  23. - sharedscripts
  24. mysql:
  25. path:
  26. - /tmp/var/log/mysql/*.log
  27. config:
  28. - weekly
  29. - missingok
  30. - rotate 52
  31. - compress
  32. - delaycompress
  33. - notifempty
  34. - create 640 root adm
  35. - sharedscripts
  36. syslog:
  37. path:
  38. - /var/log/cron
  39. - /var/log/maillog
  40. - /var/log/messages
  41. - /var/log/secure
  42. - /var/log/spooler
  43. - /var/log/slapd.log
  44. config:
  45. - sharedscripts
  46. - postrotate
  47. - /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
  48. - endscript
  49. nginx:
  50. contents: |
  51. /var/log/nginx/*.log{
  52. weekly
  53. missingok
  54. compress
  55. delaycompress
  56. notifempty
  57. create 0640 www-data adm
  58. sharedscripts
  59. prerotate
  60. if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
  61. run-parts /etc/logrotate.d/httpd-prerotate; \
  62. fi \
  63. endscript
  64. postrotate
  65. invoke-rc.d nginx rotate >/dev/null 2>&1
  66. endscript
  67. }