go-graphite / carbon-clickhouse

Graphite metrics receiver with ClickHouse as storage
MIT License
187 stars 47 forks source link

carbon-clickhouse log rotation #134

Open CMBCKSRL opened 9 months ago

CMBCKSRL commented 9 months ago

Is there any way to configure carbon-clickhouse logs pruning so that the log file doesn't grow huge?

lamaral commented 9 months ago

You can use logrotate for that. Adjust the log path in the example below and should be good:

/var/log/carbon-clickhouse/carbon-clickhouse.log
{
    maxsize 51200k
    maxage 10
    rotate 10
    daily
    missingok
    compress
    ifempty
}