michbeck100 / pv-monitoring

Contains configuration and Grafana dashboard for monitoring PV inverters
Apache License 2.0
43 stars 11 forks source link

Influxdb container storage inflation #13

Closed dmindfuse closed 4 months ago

dmindfuse commented 4 months ago

Hi @michbeck100 . I've been running your project for just over a year and I love it. It's deployed on a very small server. I have the issue that the influxdb container is inflating its storage footprint continuously to the point where I have to recreate the container every 6 months to recover from 100% storage used. I suspect it is the influxdb log chatter that is gradually filling up the space.

I tried adding INFLUXD_LOG_LEVEL=error to the docker-compose.yml section for influx_db ENV: https://docs.influxdata.com/influxdb/v2/reference/config-options/#log-level

But I still see "lvl=info" in the log window in portainer. Is this not supported (yet)?

Thanks

michbeck100 commented 4 months ago

The project is still using InfluxDB 1.x so the env variable for this is INFLUXDB_LOGGING_LEVEL (see https://docs.influxdata.com/influxdb/v1/administration/config/#logging-settings)

michbeck100 commented 4 months ago

Apart from that you can also configure docker to rotate logs regularly: https://docs.docker.com/config/containers/logging/configure/

dmindfuse commented 4 months ago

Thanks! That helped.