Hass.io Logs - Where are the actual log files please? - Solved

I have set up SSH to connect to my Hass.io server (0.52.1), and I know I can run “hassio homeassistant logs” from the command line, but where are these logs coming from? Where is the flat file that stores them?

I would like to be able to monitor the log output during a hassio restart using “tail -f”, and I would like to look at and filter the whole log file for certain messages, but I can’t do that due to “hassio homeassistant logs” limitations. I basically need something like this:

tail -f /home/homeassistant/.homeassistant/home-assistant.log

On another note, how do I manually update Hass.io as the option to update isn’t appearing?

Thanks.

1 Like

/config/home-assistant.log

1 Like

Apologies, I knew about that log (I should have said), but it only includes the errors and not the rest of the information that “hassio homeassistant logs” shows

Figured out that I can show full log details in /config/home-assistant.log by including “logger:” in my configuration.yaml. Result is that I can now use tail -f on that file for real-time monitoring and ability to see full log history. :slight_smile:

5 Likes

if i installed hassio in docker, (ubuntu), where would the log file be…?

2 Likes

this is irrelevant now since i use unraid

can someone answer this?

From what I understand reading the docs https://www.home-assistant.io/integrations/logger/

  • To enable logging, add this to your configuration.yaml
logger:
  default: info

The default log level is “debug” (too verbose!); best to set the default level variable to “info” https://www.home-assistant.io/integrations/logger/#log-levels


  • Home Assistant stores logs in the configuration directory (same place as your configuration.yaml file), for example the file is found in /config/home-assistant.log.
  • You can monitor the Home Assistant log with tail -f /config/home-assistant.log
  • If using Docker, on the host command line you can follow logs with docker logs --follow MY_CONTAINER_ID
1 Like

This is still very unclear. There are MANY logs.

The regular “home assistant” log is in /config/home-assistant.log
If i want that log, I know where it is.

But there are many more in Home Assistant OS; e.g. the:

Those logs are not the same as the home-assistant.log. Where are they located? How are they managed? Where do I specify the logging level for those? They are spamming useless messages and fills around 500mb/day wrecking the SD card.

These are two different type of logs:
The one you see in logbook are made with recorder: and stored in database of your choice. For example postgres or influxdb.
Please do note that commit_interval is 5 seconds so only accumulated data written to SD card. There is an opinion that this interval can be increased up to 1200 seconds, but for my use case it proved inconvenient.
Here’s sample of my config:

recorder:
  commit_interval: 5
  purge_keep_days: 7
  db_url: postgresql://homeassistant:SuperStrongAndReliablePasswordForMyDataBaseNotReally@localhost/homeassistant
  include:
    domains:
      - sensor
      - switch
      - fan
      - weather
      - automation
      - input_boolean
      - input_number
  exclude:
    domains:
      - updater

Now the other log (/config/home-assistant.log) is done with logger:. This will write only critical information if you don’t have logger: directive configured in configuration.yaml.

Then there are other places stuff is being logged, too. The total size of the /config folder, including both the log/db mentioned above, is 600mb for me. Yet, the SD card is filled with around 500mb per day (again, please note, this is not the home-assitant.log nor the database home-assistant_v2.db, as they are both contained in that folder taking up 600mb in total).

I recently, around 30 days ago, switched to a fresh install on a 256gb SD card. This is the last 30 days of disk usage:

Screenshot 2021-09-19 at 17.20.57

This is a completely managed install. I just installed Home Assistant OS and it manages the entire installation. I have not done any configuration of the OS or Home Assistant. I have only a few standard integrations, and no custom ones.

So I still argue that the Home Assistant OS (not necessarily Home Assistant itself) is not properly configured to be used on an SD card. It will fill it quickly, and it will cause premature wear. The OS is not configurable by adding anything in configuration.yaml.

Also, it is NOT the journal directory, it is capped to around 4 GB worth of logs. Those 4GB only accounts for 1.5% of my SD card. And those capped out in less than a week due to hoem assistant logging a million of these per day (and this, again, is not home-assistant.log nor possible to configure with the logger or recorder, it is more “core” than that and not possible to stop):

[INFO] 127.0.0.1:46963 - 56201 "PTR IN 205.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.017398739s
[INFO] 172.30.32.1:32808 - 56201 "PTR IN 205.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.03401719s
[INFO] 127.0.0.1:46963 - 54793 "PTR IN 206.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.019428702s
[INFO] 172.30.32.1:32808 - 54793 "PTR IN 206.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.056229735s
[INFO] 127.0.0.1:46963 - 44310 "PTR IN 207.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.02200662s
[INFO] 172.30.32.1:32808 - 44310 "PTR IN 207.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.028401523s
[INFO] 127.0.0.1:46963 - 8981 "PTR IN 208.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.017190315s
[INFO] 172.30.32.1:32808 - 8981 "PTR IN 208.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.040225168s
[INFO] 127.0.0.1:46963 - 57744 "PTR IN 209.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.028037081s
[INFO] 172.30.32.1:32808 - 57744 "PTR IN 209.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.034251336s
[INFO] 127.0.0.1:46963 - 55446 "PTR IN 210.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.021985491s
[INFO] 172.30.32.1:32808 - 55446 "PTR IN 210.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.028331542s
[INFO] 127.0.0.1:46963 - 56500 "PTR IN 211.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.028844537s
[INFO] 172.30.32.1:32808 - 56500 "PTR IN 211.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.038552498s
[INFO] 127.0.0.1:46963 - 4628 "PTR IN 212.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.020270934s
[INFO] 172.30.32.1:32808 - 4628 "PTR IN 212.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.030908183s
[INFO] 127.0.0.1:46963 - 61829 "PTR IN 213.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.018694876s
[INFO] 172.30.32.1:32808 - 61829 "PTR IN 213.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.032563574s
[INFO] 127.0.0.1:46963 - 32449 "PTR IN 214.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.019923734s
[INFO] 172.30.32.1:32808 - 32449 "PTR IN 214.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.027972397s
[INFO] 127.0.0.1:46963 - 65129 "PTR IN 215.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.024288173s
[INFO] 172.30.32.1:32808 - 65129 "PTR IN 215.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.032108764s
[INFO] 127.0.0.1:46963 - 37070 "PTR IN 216.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.036590721s
[INFO] 172.30.32.1:32808 - 37070 "PTR IN 216.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.053929924s
[INFO] 127.0.0.1:46963 - 34765 "PTR IN 217.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.02170005s
[INFO] 172.30.32.1:32808 - 34765 "PTR IN 217.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.031686324s
[INFO] 127.0.0.1:46963 - 10327 "PTR IN 218.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.022227767s
[INFO] 172.30.32.1:32808 - 10327 "PTR IN 218.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.043171713s
[INFO] 127.0.0.1:46963 - 34994 "PTR IN 219.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.028921795s
[INFO] 172.30.32.1:32808 - 34994 "PTR IN 219.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.043613246s
[INFO] 127.0.0.1:46963 - 60193 "PTR IN 220.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.017783458s
[INFO] 172.30.32.1:32808 - 60193 "PTR IN 220.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.03398158s
[INFO] 127.0.0.1:46963 - 30011 "PTR IN 221.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.045099417s
[INFO] 172.30.32.1:32808 - 30011 "PTR IN 221.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.059843885s
[INFO] 127.0.0.1:46963 - 34067 "PTR IN 222.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.020059306s
[INFO] 172.30.32.1:32808 - 34067 "PTR IN 222.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.034894792s
[INFO] 127.0.0.1:46963 - 30733 "PTR IN 223.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.017007336s
[INFO] 172.30.32.1:32808 - 30733 "PTR IN 223.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.032401577s
[INFO] 127.0.0.1:46963 - 22448 "PTR IN 224.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.017954586s
[INFO] 172.30.32.1:32808 - 22448 "PTR IN 224.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.032953015s
[INFO] 127.0.0.1:46963 - 53800 "PTR IN 225.0.168.192.in-addr.arpa. udp 55 true 2048" NXDOMAIN qr,rd,ra 44 0.028582076s
[INFO] 172.30.32.1:32808 - 53800 "PTR IN 225.0.168.192.in-addr.arpa. udp 44 false 512" NXDOMAIN qr,rd,ra 44 0.042659144s

and

[45991.087946] IPv6: MLD: clamping QRV from 1 to 2!
[46116.090941] IPv6: MLD: clamping QRV from 1 to 2!
[46241.093935] IPv6: MLD: clamping QRV from 1 to 2!
[46366.097440] IPv6: MLD: clamping QRV from 1 to 2!
[46491.100273] IPv6: MLD: clamping QRV from 1 to 2!
[46616.103397] IPv6: MLD: clamping QRV from 1 to 2!
[46741.107066] IPv6: MLD: clamping QRV from 1 to 2!
[46866.110166] IPv6: MLD: clamping QRV from 1 to 2!
[46991.113832] IPv6: MLD: clamping QRV from 1 to 2!
[47116.117135] IPv6: MLD: clamping QRV from 1 to 2!
[47241.119917] IPv6: MLD: clamping QRV from 1 to 2!
[47366.123420] IPv6: MLD: clamping QRV from 1 to 2!
[47491.125889] IPv6: MLD: clamping QRV from 1 to 2!
[47616.129080] IPv6: MLD: clamping QRV from 1 to 2!
[47741.131697] IPv6: MLD: clamping QRV from 1 to 2!
[47866.135123] IPv6: MLD: clamping QRV from 1 to 2!
[47991.138212] IPv6: MLD: clamping QRV from 1 to 2!
[48116.141547] IPv6: MLD: clamping QRV from 1 to 2!
[48241.144431] IPv6: MLD: clamping QRV from 1 to 2!
[48366.147568] IPv6: MLD: clamping QRV from 1 to 2!
[48491.150588] IPv6: MLD: clamping QRV from 1 to 2!
[48616.153531] IPv6: MLD: clamping QRV from 1 to 2!
[48741.156409] IPv6: MLD: clamping QRV from 1 to 2!
[48866.159156] IPv6: MLD: clamping QRV from 1 to 2!
[48991.162102] IPv6: MLD: clamping QRV from 1 to 2!
[49116.165058] IPv6: MLD: clamping QRV from 1 to 2!
[49241.167972] IPv6: MLD: clamping QRV from 1 to 2!
[49366.170887] IPv6: MLD: clamping QRV from 1 to 2!
[49491.173823] IPv6: MLD: clamping QRV from 1 to 2!
[49616.177548] IPv6: MLD: clamping QRV from 1 to 2!

I was going to point at the max 4 Gb, but if you say it is not, then I really don’t know.