Telegraf debian package and configuration with url+token

assuming the new automatic configuration is done to semplify things I cannot understand how I can installl the telegraf debian/ubuntu package and use the url+token combo. Obviously I need it to start at boot.

Hello Mario,
To install telegraf in ubuntu you can find instructions here and you can see from the plugin page how to configure the output.influxdb_v2


1 Like

Sorry reading again my message I understand I have not explained myself enough.
I know how to install telegraf. I am used to “old style” configuration where I have to put a local config file.
But so I have to deploy config file to all my servers.
New config seems very cool: the config file is on server and I can install a configless telegraf.
It seems “so simple”. But when you will try to really install and run at boot a telegraf with an url loaded config you see that is very difficult:

  • how you specify url?
  • where do you put secret key?
    And so on.

I ask again. Imagine you have tried this:

telegraf --config

Now you want to put that in production, you want to start it automatically at boot on ubuntu/debian.
Which steps are needed?

You need to create a service file to run it as a background startup service, like

1 Like

So it is incredible, so what is the purpose of debian package if I have to do it by hand?

I do not think this is incredible.
The package is there to install all the required binaries in the right place and it has a service that starts at boot, looking for configuration files in /etc/telegraf/telegraf.d/, which works fine.
If you need something to start at book that reads a custom URL, being this custom, you have a lot of different options, one of which is to create a dedicated service (but not limited to that).

What you are doing by hand is just the last (custom) part. Not all of it :wink:

Last, check this feature that is supposed to be in Telegraf 1.19