Bucket_Tag to direct metrics to different buckets


I’ve just setup an InfluxDB v2 server for some testing and I’m trying to configure Telegraf to default metrics to a default bucket or send specific metrics from inputs to a specific bucket. There seems to be absolutely no info on this in the Telegraf documentation. As an example, I have SNMP info I want to go to one bucket while Syslog info goes to another. I just can’t find how to setup the inputs for this or the Influxdb_v2 outputs. I see in the telegraf.conf file references this…

The value of this tag will be used to determine the bucket. If this

## tag is not set the ‘bucket’ option is used as the default.

# bucket_tag = “”

I created two instances of the InfluxDB_v2 outputs, one with this not set so that bucket identified is default. The other instance is set to a different bucket then I add the bucket_tag=“database” in my input, but that didn’t work.

Any info on how to take input sources and direct them to their own buckets would be greatly appreciated.

This is absolutely possible, go for measurement filtering


Hi @Franky1 , thanks for the response. Is this supported for Influxdb_v2? The examples just show [[outputs.influxdb]], also I don’t see any references to the use of buckets. TIG stack is fairly new to me so still learning.

Yes of course.
But for InfluxDB 2.x.x you have to use the output plugin [[outputs.influxdb_v2]] :wink:

@Franky1 I’m not having any luck with this, I even tried with info on this link…
(telegraf/CONFIGURATION.md at master · influxdata/telegraf · GitHub)

…which references the info on your link without any success. Anything I add fails to start the Telegraf service. I even found that just enabling input.syslog by uncommenting…

server = “tcp://:6514”

…and allow it to default to the default bucket doesn’t allow the Telegraf service to start.

Enable the debug option.
What ist the error message of the Telegraf log?

I uncommented the “debug = false” and changed it to “debug = true”. I had commented out all the tagging I’m trying to do as well as the syslog "server = “tcp://6514” and I am able to start the Telegraf service.

I then just uncommented the syslog entry and the Telegraf service won’t start, checking the logs has no information other then the last successful start.

Afaik you need at least one input and one output plugin in the telegraf conf to start the telegraf agent.

Please post your telegraf.conf file here in the forum in markdown format:

put your telegraf conf here