Error in request on API

Hello everybody,

I’m trying to configure a Graylog dashboard for Grafana and in the settings they ask for the API credentials.

Graylog Metrics | Grafana Labs

username = "Your token here"
  password = "token"
  insecure_skip_verify = true

When I insert the url localhost:9000, and try to auth with username “my token generated here” and password token, I can’t access and view the informations in the panel.

I tested in Postman and when I try to request this endpoint with username “the token from Graylog API” and password “token” I receive a 405 method not authorized.

What this can be?

Thank you!

your link contains a graylog docs link.
Have your read it?

Yes… I created the role to metrics for the token user, tested through telegraf --config telegraf.conf --test if is this working, read about two other messages in this forum:

I tested in curl with the endpoint http://localhost:9000/api/cluster and it returns me a correct JSON… but in Grafana I can´’t get the data and the graphics.

how does your configuration part of telegraf look like? what is the actuall error you have?

What means “I can’t get data” Did you understand that the data is stored in influx and Grafana pull that data from influx?

Looks like:

(… all input graylog blah blah blah)
username = “my token from graylog”
password = “token”
insecure_skip_verify = true

inside “/etc/telegraf/telegraf.d/graylog.conf”

I saw after a “show measurement on grafana” that I don´t have nothing inside my influx database. I don´t know if a need to config the auth part in grafana or if only username and password is enough…


But every other steps were made. I just can´t get the logs from Graylog inside influxdb.

did you create a token in graylog and use that as username in the config like the dashboard readme advice?

yes, i created a user grafana and got the token, used that in the .conf and applied some roles of read metrics that i saw in a message of the forum.

but that was not reflected by the given answer of yours

when you have nothing in influx, check your telegraf logs …

That´s what I have in the logs…

2019-02-06T14:39:13Z I! Starting Telegraf 1.9.4
2019-02-06T14:39:13Z I! Loaded inputs: inputs.cpu inputs.disk inputs.diskio inputs.kernel inputs.mem inputs.processes inputs.swap inputs.system
2019-02-06T14:39:13Z I! Loaded aggregators:
2019-02-06T14:39:13Z I! Loaded processors:
2019-02-06T14:39:13Z I! Loaded outputs: influxdb
2019-02-06T14:39:13Z I! Tags enabled: host=graylog
2019-02-06T14:39:13Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:“graylog”, Flush Interval:10s

Seems to be correct. No?

come on - if that looks ‘ok-ish’ to you - check the next part in the chain. Influx - did you see the ingest? Did you have access to the data. You migh want to raise the log level of the telegraf to check if the scrapping of information happens…

Just follow that, debug each piecen in the chain if it works. BTW that question is now more linux debugging related and not Graylog …

I’m going to check this logs inside InfluxDB and Telegraf. Thank you

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