Route log file to different measurements in different databases


I am currently sending metrics to two different databases using two [[outputs.influxdb]] and it works well. I am also trying to send the data in log files to different measurements in those two databases. Is it possible to do it in [[inputs.logparser]] or [inputs.logparser.grok]? I don’t seem to see a way to specify database in [[inputs.logparser]] or [inputs.logparser.grok].

Thanks in advance!

Hi @newli, so you could create a tag called bucket within telegraf and use that for bucket routing within the InfluxDB output plugin: Telegraf Best Practices: Config Recommendations and Performance Monitoring | InfluxData

Thanks @Jay_Clifford. Does bucket_tag still works if the databases/buckets are in different InfluxDB instances (i.e. two [[outputs.influxdb_v2]])? Sorry that I failed to mention that at first.