I am trying to integrate Grafana in Graylog. I have installed Telegraf, Grafana, and Influxdb.

I get the error below when testing the conf file using (telegraf --config telegraf.conf --test ) and also in the journal for the telegraf service.

E! Error in plugin [inputs.graylog]: Response from url “https://X.X.X.X:9000/api/system/metrics/multiple has status code 401 (Unauthorized), expected 200 (OK)

I have created access tokens for user, created a role with the privileges to read metrics and assigned the role to the user but i still get the error above. I even tried assigning admin privileges to the user.

I tested the token by using the “curl get” to extract a metric value and it worked and the token is working.

The links I have referenced are below:

Any help is appreciated.

what does your telegraf configuration look like?

I created a conf file under telegraf.d called graylog.conf - i didnt’ edit the default telegraf.conf file most of the lines are hashed out. Below is the conf file under telegraf.d

servers = [
metrics = [
username = “test_token_name”
password = “test_token”

Thank you

you notice the part where you actually need to place your token?

The important is

 username = "Your token here"
 password = "token"

The Password token does not need a change - the username needs to be the token.

Thanks Jan, it worked. I miss interpreted the instructions. :grinning:


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.