I am trying to log the InfluxDB shard sizes from the internal database. This information is available from the _internal database with the field name
diskBytes and the measurement name
Now I am using Telegraf and the influxdb input plugin to collect the data once every 10 minutes, using the following in my telegraf.conf configuration file:
[[inputs.influxdb]] urls = ["http://localhost:8086/debug/vars"] namepass = ["influxdb_shard"] fieldpass = ["diskBytes"] taginclude = ["database","path"]
The reason for this is because
- I don’t want every single measurement from the internal database, only the disk size of the shards.
- I don’t want data every 10 seconds (as stored by the internal database by default), only every 10 min.
The problem now is that it seems if I disable the internal monitoring database as recommended in the docs (in order to reduce unecessary overhead and disk space usage), then the data is not available anymore for Telegraf to retrieve at the /debug/vars/ endpoint.
How can I store only the diskBytes from shard every 10 minutes only, without having all the other data from the _internal database been piped in as well?