{"action":"created","issue":{"url":"https://api.github.com/repos/graphite-project/carbon/issues/342","repository_url":"https://api.github.com/repos/graphite-project/carbon","labels_url":"https://api.github.com/repos/graphite-project/carbon/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/graphite-project/carbon/issues/342/comments","events_url":"https://api.github.com/repos/graphite-project/carbon/issues/342/events","html_url":"https://github.com/graphite-project/carbon/issues/342","id":51985818,"number":342,"title":"how to disable carbon log rotate? or force carbon log rotation hourly or by size ?","user":{"login":"toni-moreno","id":5883405,"avatar_url":"https://avatars.githubusercontent.com/u/5883405?v=3","gravatar_id":"","url":"https://api.github.com/users/toni-moreno","html_url":"https://github.com/toni-moreno","followers_url":"https://api.github.com/users/toni-moreno/followers","following_url":"https://api.github.com/users/toni-moreno/following{/other_user}","gists_url":"https://api.github.com/users/toni-moreno/gists{/gist_id}","starred_url":"https://api.github.com/users/toni-moreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toni-moreno/subscriptions","organizations_url":"https://api.github.com/users/toni-moreno/orgs","repos_url":"https://api.github.com/users/toni-moreno/repos","events_url":"https://api.github.com/users/toni-moreno/events{/privacy}","received_events_url":"https://api.github.com/users/toni-moreno/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-12-15T13:29:22Z","updated_at":"2016-05-04T07:52:00Z","closed_at":"2016-05-04T07:52:00Z","body":"Hi , we hace a graphite platform collecting aprox 200k metrics per second , and logs generated for each carbon are growing every day more than expected. Carbon daemon rotates their logs by itself once a day ( at 00:00) but it is not enought for us and right now we are using logrotate system tool.\r\n\r\nWe are rotating logs every 20 minutes with a cron process.\r\n\r\n```\r\n20 * * * * root /usr/sbin/logrotate -v /opt/graphite/conf/logrotate.graphite\r\n```\r\n\r\nwith this entry at /opt/graphite/conf/logrotate.graphite\r\n\r\n````\r\n\r\n/var/log/graphite/carbon-cache*/*.log\r\n/var/log/graphite/carbon-relay-*/*.log {\r\n        maxage 30\r\n        size 100M\r\n        copytruncate\r\n        create 0644 graphite graphite\r\n        rotate 7\r\n        compress\r\n        missingok\r\n}\r\n```\r\n\r\nThis seems to be ok  for a while but  self rotation process are also creating the following logs:\r\n\r\n```\r\n# ls -ltr *2014_??_??\r\n-rw-r--r-- 1 graphite graphite         0 Dec 10 04:04 query.log.2014_12_10\r\n-rw-r--r-- 1 root     root             0 Dec 10 04:04 console.log.2014_12_10\r\n-rw-r--r-- 1 graphite graphite     56583 Dec 10 20:50 creates.log.2014_12_10\r\n-rw-r--r-- 1 graphite graphite    151249 Dec 11 21:26 creates.log.2014_12_11\r\n-rw-r--r-- 1 graphite graphite 175524294 Dec 11 23:59 query.log.2014_12_11\r\n-rw-r--r-- 1 graphite graphite     72754 Dec 12 16:39 creates.log.2014_12_12\r\n-rw-r--r-- 1 graphite graphite 151730843 Dec 12 23:59 query.log.2014_12_12\r\n-rw-r--r-- 1 graphite graphite  87454306 Dec 13 23:59 query.log.2014_12_13\r\n-rw-r--r-- 1 graphite graphite  88012100 Dec 14 23:59 query.log.2014_12_14\r\n```\r\n\r\nAt this point we could run logrotate tool if carbon rotation could be disabled or could use carbon self rotation hability if we could configure rotation  by size or at least  by hour. \r\n\r\nAny workarround to change default carbon rotation configuration ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/graphite-project/carbon/issues/comments/216769648","html_url":"https://github.com/graphite-project/carbon/issues/342#issuecomment-216769648","issue_url":"https://api.github.com/repos/graphite-project/carbon/issues/342","id":216769648,"user":{"login":"toni-moreno","id":5883405,"avatar_url":"https://avatars.githubusercontent.com/u/5883405?v=3","gravatar_id":"","url":"https://api.github.com/users/toni-moreno","html_url":"https://github.com/toni-moreno","followers_url":"https://api.github.com/users/toni-moreno/followers","following_url":"https://api.github.com/users/toni-moreno/following{/other_user}","gists_url":"https://api.github.com/users/toni-moreno/gists{/gist_id}","starred_url":"https://api.github.com/users/toni-moreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toni-moreno/subscriptions","organizations_url":"https://api.github.com/users/toni-moreno/orgs","repos_url":"https://api.github.com/users/toni-moreno/repos","events_url":"https://api.github.com/users/toni-moreno/events{/privacy}","received_events_url":"https://api.github.com/users/toni-moreno/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T07:52:00Z","updated_at":"2016-05-04T07:52:00Z","body":"Finally fixed with ENABLE_LOGROTATE option , thanks to all"}}