Can I query the size of a database in influx db 2

I looked through the influx nodes and I can’t find an example of how to get the total size of a particular bucket. Is this possible, I’m using 2.x databases.

Hello @Vishal,
What do you mean by total size?
Series number?
Storage?
Are you using OSS or Cloud? If you’re using Cloud, I’d recommend looking at the following blog:

and installing the cloud usage template theres a query in that dashboard that graphs storage/bucket

I am using OSS (docker hub Image URI: influxdb:2.0.7). I’ve created a bucket named ‘TelemetryData’ and have ingested data into it. I would like to know how much disk space this bucket has taken using flux query.
For now, I am using below shell command to get bucket size:
du -sh /var/influxdb/engine/data/Bucket ID/

Hello @Vishal,
Unfortunately the usage.from() function can only query Cloud instances.
https://docs.influxdata.com/influxdb/v2.0/reference/flux/stdlib/experimental/usage/from/

Thanks for sharing your solution.