How to monitor the _internal database shard sizes only?

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 shard.

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

  1. I don’t want every single measurement from the internal database, only the disk size of the shards.
  2. 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?

Hello @teeeeee,
I don’t think that is possible. I don’t think there is a way to keep that endpoint available while not automatically writing to that database. Sorry to be the bearer of bad news. :frowning:

Hi @Anaisdg

I have disabled the internal monitoring database in the configuration file, and restarted the containers. In fact, it actually seems like telegraf is indeed able to still retrieve the correct shard values every 10 minutes from the debug/vars endpoint - even though the internal storage every 10 seconds has now stopped.

So it appears the behaviour I was looking for is there all along - is this not what you expect? Or do you think I’m measuing something different actually?

Hello @teeeeee,
Oh wonderful. I was mistaken/misunderstood. No you’re right.