request failed, status: 401 Unauthorized
See original GitHub issueDescribe 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
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:
- Created 2 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.