Filtered by telegraf according to 3 different influx databases data and sent according to database and data

Hi ,

I am trying to filter by telegraph according to 3 different influx databases data and will send according to database and data and when data comes from outsite to Telegraf and I want to Telegraf will filter data according to database .

For instance , Influx db1 , db2 and db3 and when db1’s data comes Telegraf and Telegraf send data to db1 not db or db3.

Is it possible ?

Thanks

Welcome to the Community!
Your question is a bit abstract, but basically this is possible in Telegraf with Metric filtering - in your case probably best with the namepass filter. Details and examples see in the docs:

so , my question is this syntax is ok . Isn’t it ? What do you think for telegraf.conf ?

[[outputs.db1]]
urls = [“https://localhost:8087”]
database = “db1”
retention_policy = “autogen”
write_consistency = “any”
timeout = “5s”
namepass = [“db1”]
[[outputs.db2]]
urls = [“https://localhost:8088”]
database = “db2”
retention_policy = “autogen”
write_consistency = “any”
timeout = “5s”
namepass = [“db2”]
[[outputs.db3]]
urls = [“localhost:8089”]
database = “db3”
retention_policy = “autogen”
write_consistency = “any”
timeout = “5s”
namepass = [“db3”]

thank you @Franky1 for your answer :slight_smile: