Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uptime.com-authentication issue #879

Open
alandreasyans opened this issue Jun 14, 2024 · 1 comment
Open

Uptime.com-authentication issue #879

alandreasyans opened this issue Jun 14, 2024 · 1 comment

Comments

@alandreasyans
Copy link

Describe the bug

I want to connect to uptime.com to be able to get the status of my services and visualize in the grafana, however getting an issue error getting data frame. 401 Unauthorized. As for the prefix it uses not a bearer token I've used the API key value pair type for the authentication and specified "Token" as the key and the token itself as value.
With a usual curl command I was able to get details from uptime.com

Below is the official documentation of uptime.com how the token can be used.

API Access
To access our API programatically, you must pass one of the below API keys via a HTTP Header with a key name of "Authorization" and a key prefix of "Token" with the below API Key.

Raw HTTP Example:

GET /api/v1/
Authorization: Token token_value
CURL Example:

curl -H "Authorization: Token token_value" https://uptime.com/api/v1/

Steps to reproduce

Provide steps to reproduce the issue.

Register for uptime.com(it has a trial option) then by using a token try to visualize some data with it by providing the https://uptime.com/api/v1/ as the URL and authentication mechanism as described.

Screenshots

image

Version Details:

  • Grafana version : Grafana v10.4.1
  • Plugin version : 2.7.0 and 2.7.1

Additional context

Thanks in advance!!

@wezlu
Copy link

wezlu commented Jun 20, 2024

The Authorization: Token token_value is missing in the query options of Grafana data source based from the shared screenshot. This is likely the cause of the 401 unauthorized error result.

Configuring/adding the API key authentication settings in the Grafana query options would solve this:

Key:   Token
Value: <token_value>
In:    header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants