I am running one base config in /etc/telegraf/telegraf.conf and one customized config in /etc/telegraf/telegraf.d . I want to send data to different influx servers designated to each config.
The result I am seeing is data is being duplicated in both the servers. Please guide how to resolve this.
@errishma To run both of the configs you would need to run 2 telegraf daemons. For zero data duplication the two configurations would need to not contain any of the same plugins and each would write to a separate influxdb instance.
If you need systemd or init.d to keep the process alive and start on boot then you would need to copy the service file and change some naming so that you could run:
$ sudo systemctl start telegraf1
$ sudo systemctl start telegraf2
# OR
$ sudo service telegraf1 start
$ sudo service telegraf2 start
@errishma, @jackzampolin can you report exactly how you configure the double telegraf service?
I’m on a centos server and I see all my services at /etc/init.d, telegraf included.
You report instead the content of the telegraf.service file that i locate at /usr/lib/telegraf/scripts/telegraf.service.
I’m a bit confused. What i would do is to copy and rename telegraf service under init.d directory and then modify config path to the second telegraf config file.
It is almost never need required to run multiple Telegraf’s on a single system, including in the original use case of this thread. The proper way to set this up is to use metric filtering to split the output data. Here is an example of splitting the data based on measurement name.
I have a microservice architecture so there are multiple instances for telegraf, which are sending data to one telegraf http input plugin. I need to identify the telegrafs for further processing. Can you please help me with this?
I generally discourage running multiple Telegraf instances on a single server/container. I won’t say you should never do it but its hardly ever needed. If you stick to this, the easiest way to know which Telegraf reported the metric is to use the host tag that Telegraf sends with all data by default.
My all data saved in InfluxDB, and I want to migrate or sent data to Prometheus, from the Influx database, so is there any way to migrate data or sent data to Prometheus. Please give me response it,s very urgent.