Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect database size #340

Open
somik321 opened this issue Jun 18, 2024 · 0 comments
Open

Incorrect database size #340

somik321 opened this issue Jun 18, 2024 · 0 comments

Comments

@somik321
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant