Hi!
I’ve got an issue that every once in a while at random times my log files start to explode in size, I have about 20GBs free on Hass drive and it gets filled in an hour.
What’s the best strategy to combat this? I know that best way to do this it to read logs and figure out what’s wrong (in my case it’s Mikrotik’s integration, not sure whats up with it yet), but that still means that there’s a chance it will basically break the system.
I do have sensors that watch filesizes of log files. Could not make CLI commands to remove them to work from hass though. But even if I SSH and delete files manually they still are held by some processes and space wont be freed until a reboot.
So the question is what can\should I do about it to prevent log files eating all space if some error occurs?
Here are my scripts
shell_command:
remove_home_assistant_log: "rm -f /usr/share/hassio/homeassistant/home-assistant.log"
remove_docker_container_log: "rm -f /var/lib/docker/containers/*/*.log"
I’m running Hass Supervised on Debian.
Best solution for me would be to turn on log rotation based on file size.
And while we’re at it, here’s whats going on in the log file:
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
<REPEAT: over9000>
async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 137, in async_update
await self.hub.request_update()
File "/usr/src/homeassistant/homeassistant/components/mikrotik/hub.py", line 355, in request_update
await self.progress
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update