@tonic8 the correct solution would be to add a new plugin for the NVidia DLS server. You can add a feature request or, even better, provide a pull-request…
while waiting for this very gentle person. i try ti work on a workarround
tehcnically i could execute the request for the bearer token outside telegraf and save it in a file (through a cron the token have a lifetime, so i will need to update it regularly).
as in the inputs.http there is an option for bearer token :
## Optional Bearer token settings to use for the API calls.
## Use either the token itself or the token file if you need a token.
# token = "eyJhbGc...Qssw5c"
# token_file = "/path/to/file"
i did some tests:
using the token setting with the bearer token in the telegraf config it’s working
using the **token_file ** setting with the bearer token in a file it’s not working
i checked in case i mispelled the path (and telegraf telle me it can find the file.
so the location is good and inside the file there is only the same string than using “token” i got a status code 401
and i checked the token is not expired.
i don’t see any specific details on the file in the documentation (specific format or else), so i presume is a simple line file.