Incorrect database size
somik321 opened this issue · 1 comments
Problem/Motivation
Query in influxdb Explorer
SELECT mean("diskBytes") AS "mean_diskBytes" FROM "_internal"."monitor"."tsm1_filestore" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND "database"='home_assistant' GROUP BY time(:interval: ) FILL(null)
or
SELECT mean("diskBytes") AS "mean_diskBytes" FROM "_internal"."monitor"."shard" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND "database"='home_assistant' GROUP BY time(:interval:) FILL(null)
shows 47 mb
Sensor in Home Assistant:
sensor:
- platform: influxdb
username: homeassistant
password: xxxxxxxxxxx
scan_interval: 10 #3600
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() - 5m'
where: '"database"=''homeassistant'' AND time > now() - 5m'
field: diskBytes
shows 32 195,6 MB
The actual size of the database on disk is 1.17 Gb
Expected behavior
The actual size of the database on disk is 1.17 Gb
Before the addon influxdb update, the sensor showed the correct database size
Actual behavior
shows 47 mb or 32 gb
Steps to reproduce
Rpi 3, 1 Mb RAM, 32 Gb SD
Swap 1 gb
HA Supervisor 2024.06.0
Core 2024.4.2
InfluxDB addon 5.0.0
DB influxdb ~1.2 gb, duration 1200d
Proposed changes
(If you have a proposed change, workaround or fix,
describe the rationale behind it)
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!