Telegraf Integration with ZincObserve and Token Authentication Fix

TLDR Joe shared a config to add Telegraf data to ZO and reported an issue with token authentication. Hengfei acknowledged the issue and provided a fixed version. Joe confirmed the fix works, and it was added to the docs.

Photo of Joe
Joe
Tue, 21 Mar 2023 15:49:46 UTC

I managed to get Telegraf to report in data to ZO, here's the config I used. Could this be added to ingestion page next release? ```[[outputs.elasticsearch]] urls = [""] username = "" password = "Complexpass#123" index_name = "default" health_check_interval = 0```

Photo of Joe
Joe
Tue, 21 Mar 2023 15:50:30 UTC

And you can use `namepass = ["list", "of", "inputs"]` to filter inputs

Photo of Prabhat
Prabhat
Wed, 22 Mar 2023 01:43:59 UTC

Cool. I have never used telegraf. Let me check it out. Thanks.

Photo of Joe
Joe
Wed, 29 Mar 2023 10:18:53 UTC

Hi, I noticed after 0.3.0, Telegraf can no longer communicate using the token and requires the password to work properly. I diagnosed that the /api/<org_name>/ endpoint which usually returns ES version and other basic info is no longer allowed to be accessed via token. My temporary workaround was to add an exception in the proxy to return the version when that endpoint is hit and it works now with token. Will the ability to query /api/<org_name>/ using a token be re-added soon?

Photo of Hengfei
Hengfei
Wed, 29 Mar 2023 10:52:58 UTC

checking

Photo of Hengfei
Hengfei
Wed, 29 Mar 2023 10:58:31 UTC

got it, we changed the authentication, ingest token will only work for ingest, but it looks need more API with ingest token, we will fix it. thanks for report.

Photo of Joe
Joe
Wed, 29 Mar 2023 10:58:51 UTC

Ah I see, thanks for looking in to it

Photo of Hengfei
Hengfei
Wed, 29 Mar 2023 16:42:48 UTC

Can you try this version: `public.ecr.aws/zinclabs/zincobserve-dev:v0.3.1-83f1286`

Photo of Hengfei
Hengfei
Wed, 29 Mar 2023 16:43:10 UTC

we fixed the issue ingest token with API `/api/<org>/`

Photo of Joe
Joe
Wed, 29 Mar 2023 16:43:50 UTC

I'll give it a try when I get home, thanks!

Photo of Hengfei
Hengfei
Mon, 03 Apr 2023 07:17:15 UTC

we released v0.3.2 it includes this fix. maybe you can try.

Photo of Joe
Joe
Tue, 04 Apr 2023 11:40:40 UTC

I have updated and can confirm that it is now working correctly :+1:

Photo of Hengfei
Hengfei
Tue, 04 Apr 2023 11:55:43 UTC

thanks, we added this in documents: