I am using Telegraf to write a value of a temperature sensor to Influxdb from an MQTT-broker. About every two seconds the value of the temperature sensor creates a new entry in the database. Every entry contains the following data:
This is a lot of data, when I only need the value, the timestamp and the MQTT-topic, which I want to display in a chart via Grafana.
So here are my questions:
- Is there a way to configure Telegraf in order to reduce the data that is written to a database?
- Is there a way to calculate or to show the data size that every entry in the database requires on my harddisk? I am planning to log a lot of sensors in a database, so I am interested in the file size that is required to log - let’s say - 1000 sensors that write a value every 2 seconds over the course of two years.