question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

request failed, status: 401 Unauthorized

See original GitHub issue

Describe the bug I updated to Grafana 8.1.6 + grafana-zabbix 4.2.4. After that I am getting the message “request failed, status: 401 Unauthorized” both in the dashboard and in datasource settings.

Expected behavior Instedad of error “request failed, status: 401 Unauthorized” I expect to get Zabbix alerts in my dashboard and no error in datasource settings when I do “Save & Test”.

Screenshots

image

image

Log data grafana.log:

t=2021-10-06T16:39:58 lvl=eror msg="Error querying Zabbix version" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource error="request failed, status: 401 Unauthorized"
t=2021-10-06T16:39:58 lvl=eror msg="Zabbix API request error" logger=plugins.backend pluginId=alexanderzobnin-zabbix-datasource error="request failed, status: 401 Unauthorized"
t=2021-10-06T16:39:58 lvl=eror msg="Request Completed" logger=context userId=3 orgId=1 uname=<REDACTED> method=POST path=/api/datasources/26/resources/zabbix-api status=500 remote_addr=<REDACTED> time_ms=142 size=86 referer=https://<REDACTED>:<REDACTED>/datasources/edit/000000026/

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
8.1.6 4.0.34 4.2.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alexanderzobnincommented, Apr 29, 2022

Looks like it was bug in SDK and when http client created, basic auth settings was ignored. This PR solves the issue, so I just updated dependency and checked out that basic auth should be enabled.

0reactions
kuPyxacommented, Apr 1, 2022

I generated the Authorization header by myself and added it to the Custom HTTP Headers in the Datasource. But it’s kind of a crutch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Quickly Fix the 401 Unauthorized Error (5 Methods)
The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the ...
Read more >
How to Fix a 401 Unauthorized Error? - GeeksforGeeks
The 401 Unauthorized Error is an HTTP status code error that represented the request sent by the client to the server that lacks...
Read more >
401 Unauthorized Error: What It Is and How to Fix It
The 401 Unauthorized Error is an HTTP response status code indicating that the client could not authenticate a request.
Read more >
401 Error: 5 Ways to Troubleshoot and Fix It - Hostinger
The 401 Unauthorized error indicates that the server's request was not verified because it lacks valid authentication credentials for the target ...
Read more >
The request failed with HTTP status 401: Unauthorized
You need to set the credentials in you application when you initialise the webService object. Something like webService.UseDefaultCredentials = true.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found