{"id":13780965,"url":"https://github.com/sous-chefs/logrotate","last_synced_at":"2025-04-06T05:17:17.718Z","repository":{"id":2725704,"uuid":"3720612","full_name":"sous-chefs/logrotate","owner":"sous-chefs","description":"Development repository for the logrotate cookbook","archived":false,"fork":false,"pushed_at":"2024-02-01T00:10:19.000Z","size":347,"stargazers_count":122,"open_issues_count":7,"forks_count":155,"subscribers_count":27,"default_branch":"main","last_synced_at":"2024-04-14T11:03:41.587Z","etag":null,"topics":["chef","chef-cookbook","chef-resource","hacktoberfest","logrotate","managed-by-terraform"],"latest_commit_sha":null,"homepage":"https://supermarket.chef.io/cookbooks/logrotate","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sous-chefs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"open_collective":"sous-chefs"}},"created_at":"2012-03-14T18:15:46.000Z","updated_at":"2023-11-27T04:29:29.000Z","dependencies_parsed_at":"2023-09-24T07:16:44.086Z","dependency_job_id":"edb048aa-6ff2-4e75-9f6b-d9e6ade80bb1","html_url":"https://github.com/sous-chefs/logrotate","commit_stats":{"total_commits":371,"total_committers":70,"mean_commits":5.3,"dds":0.7762803234501348,"last_synced_commit":"a5dd67907636efa999fd7dd2fa3a4e10fb5f82a4"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Flogrotate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Flogrotate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Flogrotate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sous-chefs%2Flogrotate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sous-chefs","download_url":"https://codeload.github.com/sous-chefs/logrotate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345850,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chef","chef-cookbook","chef-resource","hacktoberfest","logrotate","managed-by-terraform"],"created_at":"2024-08-03T18:01:21.587Z","updated_at":"2025-04-06T05:17:17.585Z","avatar_url":"https://github.com/sous-chefs.png","language":"Ruby","funding_links":["https://opencollective.com/sous-chefs"],"categories":["Cookbooks"],"sub_categories":["Logging/Monitoring"],"readme":"# logrotate Cookbook\n\n[![Cookbook Version](https://img.shields.io/cookbook/v/logrotate.svg)](https://supermarket.chef.io/cookbooks/logrotate)\n[![CI State](https://github.com/sous-chefs/logrotate/workflows/ci/badge.svg)](https://github.com/sous-chefs/logrotate/actions?query=workflow%3Aci)\n[![OpenCollective](https://opencollective.com/sous-chefs/backers/badge.svg)](#backers)\n[![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors)\n[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n\nManages the logrotate package and provides resources to manage both global and application-specific logrotate configurations. This cookbook allows you to manage the logrotate package installation and create configuration for both the main logrotate.conf file and application-specific configurations in /etc/logrotate.d/.\n\n## Maintainers\n\nThis cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.\n\n## Requirements\n\n### Platforms\n\nShould work on any platform that includes a 'logrotate' package and writes logrotate configuration to /etc/logrotate.d.\n\nTested on:\n\n- Ubuntu / Debian\n- CentOS\n- Amazon Linux\n- openSUSE Leap\n\n### Chef\n\n- Chef 15.3+\n\n## Resources\n\n- [logrotate_app](documentation/logrotate_app.md) - Manages application-specific logrotate configurations\n- [logrotate_global](documentation/logrotate_global.md) - Manages the global logrotate configuration\n- [logrotate_package](documentation/logrotate_package.md) - Manages the logrotate package installation\n\n## Usage\n\n### Package Installation\n\nBy default, the cookbook will install the logrotate package:\n\n```ruby\nlogrotate_package 'logrotate'\n```\n\n### Global Configuration\n\nTo manage the global logrotate configuration:\n\n```ruby\nlogrotate_global 'logrotate' do\n  options %w(weekly dateext)\n  parameters(\n    'rotate' =\u003e 4,\n    'create' =\u003e nil\n  )\n  paths(\n    '/var/log/wtmp' =\u003e {\n      'missingok' =\u003e true,\n      'monthly' =\u003e true,\n      'create' =\u003e '0664 root utmp',\n      'rotate' =\u003e 1\n    }\n  )\nend\n```\n\n### Application-Specific Configuration\n\nTo create application-specific logrotate configs, use the `logrotate_app` resource:\n\n```ruby\nlogrotate_app 'tomcat-myapp' do\n  path      '/var/log/tomcat/myapp.log'\n  frequency 'daily'\n  rotate    30\n  create    '644 root adm'\n  options   %w(missingok compress delaycompress copytruncate notifempty)\nend\n```\n\nFor multiple log files:\n\n```ruby\nlogrotate_app 'tomcat-myapp' do\n  path      ['/var/log/tomcat/myapp.log', '/opt/local/tomcat/catalina.out']\n  frequency 'daily'\n  create    '644 root adm'\n  rotate    7\nend\n```\n\n## Contributors\n\nThis project exists thanks to all the people who [contribute.](https://opencollective.com/sous-chefs/contributors.svg?width=890\u0026button=false)\n\n### Backers\n\nThank you to all our backers!\n\n![https://opencollective.com/sous-chefs#backers](https://opencollective.com/sous-chefs/backers.svg?width=600\u0026avatarHeight=40)\n\n### Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website.\n\n![https://opencollective.com/sous-chefs/sponsor/0/website](https://opencollective.com/sous-chefs/sponsor/0/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/1/website](https://opencollective.com/sous-chefs/sponsor/1/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/2/website](https://opencollective.com/sous-chefs/sponsor/2/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/3/website](https://opencollective.com/sous-chefs/sponsor/3/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/4/website](https://opencollective.com/sous-chefs/sponsor/4/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/5/website](https://opencollective.com/sous-chefs/sponsor/5/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/6/website](https://opencollective.com/sous-chefs/sponsor/6/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/7/website](https://opencollective.com/sous-chefs/sponsor/7/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/8/website](https://opencollective.com/sous-chefs/sponsor/8/avatar.svg?avatarHeight=100)\n![https://opencollective.com/sous-chefs/sponsor/9/website](https://opencollective.com/sous-chefs/sponsor/9/avatar.svg?avatarHeight=100)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsous-chefs%2Flogrotate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsous-chefs%2Flogrotate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsous-chefs%2Flogrotate/lists"}