Run data retention query via telegraf

Hi,
I would like to change the data retention policy of my database, but my requirement is that i have to run the query through telegraf via which am sending data to influxdb.
Is there a way to do this?

Hello @Aritra666B,
You can’t use telegraf to query your InfluxDB instance unfortunately.
But maybe there’s another way to help you. Can you please paint a bigger picture of what you’re trying to achieve?

Hi @Anaisdg ,
We are inserting data using telegraf via MQTT. But we would also have to use a data retention policy on the database. Is it possible to do this via telegraf.conf file? Or do I have to manually set the data retention after database creation?

Hello @Aritra666B,
You can’t set retention policies with telegraf. Yes if you’re using 1.x you’d have to manually set the data retention after database creation or use the default one that you created with the database. In 2.x retention policies are mapped to databases and that combination is called a bucket.