/ August 21, 2018/ Articles, Home Assistant, Uncategorized/ 0 comments

With the following code you can add a sensor to keep track of your Influx Database Size:

- platform: influxdb
    host: yourinfluxdbhost
    queries:
    - name: InfluxDb Database 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
Share this Post

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*