How to check InfluxDB is collecting HA data

First off all, I feel dumb.
I’m not a database expert, but still…

I installed the InfluxDB add-on with default config, created a home_assistant db in it en added influxdb: (without options) to the configuration yaml and restarted.

I could not find any error, so I guess all is okay:-)

But how do I check that HA data is flowing into the InFluxDB home_assistant database, because the next step is to use Grafana and I need to be sure that the integration is working before I go on…

Thanks for answering my dumb question

Open the influxdb addon webui and use the data explorer. Here’s an example:

Also you can add this sensor to home assistant to see the size of your database and if it is growing:

- platform: influxdb
  host: a0d7b954-influxdb
  port: 8086
  username: homeassistant
  password: !secret influxdb_pssword
  queries:
    - name: InfluxDb DB Size
      unit_of_measurement: MB
      value_template: '{{ (value | float / 1024 /1024) | round(1) }}'
      group_function: sum
      measurement: '"monitor"."shard"'
      database: _internal
      where: 'time > now() - 10s'
      field: diskBytes

Don’t be surprised if the sensor decreases in the short term (even shorter than your purge interval) InfluxDB does some weird compression or something

Screenshot_2020-07-13 Administration - Home Assistant

In the long term it will continue to grow:

Also note that occasionally the sensor will become unavaiable for some reason. I have not worked out why yet.

6 Likes

I don’t see a unit to choose from (step 3)

Then it is not collecting data.

Watch frenk’s video and make sure you have it set up correctly:

For anybody following this thread, here are some amazing Chronograf dashboards for you to use: https://github.com/robcowart/influx_dashboards

I just found it on Reddit while looking for dashboards.

That image with the arrows pointing around is precisely what my “not running on all cylinders today” mind needed. Thank you, lol

1 Like