Telegraf and more than one configuration

Hello,

I need support, because unfortunately I can not find anything that helps me.

I have a working configurations in Telegraf which collects via JSON http GET some shelly data. For this I have created a configuration. With the setup instructions I could start it in the terminal and since then it works.

I just can’t do anything in the terminal because the script is running.
telegraf --config http://192.168.1.190:8086/api/v2/telegrafs/09524001bcfe0000

I would like to use Telegraf for Modus and need an additional configuration. I can create another configuration. That works too.

But, how do I run both together? Or in other words, what is the best way to make multiple configurations work together?

Daniel

Hello @Daniel_E,
You can include multiple input configs in the same telegraf config.
Are you writing data from both inputs to the same InfluxDB instance?

1 Like

You mean I can address multiple Config’s via a Telegraf.conf? If that works that would be good.

For structuring I find several config files easier. And if I e.g. with extensions of the config file a change make, certain Configs start or stop. so like a service?

Yes I write everything in a DB.

Best way is to run telegraf as a service, and you can add multiple --config parameters to the command…

interesting approach. Thank you very much.
Would you have an example of how something like this is built?

Yeah, just

telegraf —config fileA —config fileB

Hello

Is it possible to have a config with opcua.input + influx2.output and another config with opcua.input + influx2.output?
I want read data from 2 or more opcua devices and write it to one influx server, but multiple buckets.

Thanks

Sure perfectly possible.

Please create your own topic or come to our Slack if you need help with that.

Okay thanks. I ask again to your Slack channel. :grinning: