- This topic has 1 reply, 2 voices, and was last updated 11 hours, 53 minutes ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › FABRIC General Questions and Discussion › Unable to query Prometheus metrics with token
Hello,
I would like to get information from Fabric Prometheus, but it looks like I am not able to use my token. Could you check what might be wrong? Here are the steps I executed:
1. Go to the Credential Manager site https://cm.fabric-testbed.net/
Selected a project using the “Select Project” drop-down.
Select Scope All.
Click the “Create Token” button.
2. Download the created token.
3. Validate “id_token” – it returns “Token is validated”.
3. Copy the “id_token” as an env variable:
`
export TOKEN=”eyJhbGciOiJSUzI1NiIsImtpZC….
<code></code>`
4. Execute Curl and try to get a list of all the available metric names:
curl https://infrastructure-metrics.fabric-testbed.net/metric-list -H “Authorization: fabric-token $TOKEN” -v
…
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS app data, [no content] (0):
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* TLSv1.3 (OUT), TLS app data, [no content] (0):
* TLSv1.3 (IN), TLS app data, [no content] (0):
< HTTP/2 200
< server: nginx/1.26.0
< date: Thu, 27 Mar 2025 12:45:34 GMT
< content-type: application/json
< content-length: 46
< strict-transport-security: max-age=63072000
<
{“error”:”UUID is not approved for API use.”}
* Connection #0 to host infrastructure-metrics.fabric-testbed.net left intact
Could you please check on this what could be the reason?
Thank you,
Justas
Greetings,
Users must be approved to use the Prometheus API. We will be adding a role for approved users. Currently we use the uuid to approve users. I have added you to the approved list.
You should be able to use the API now. Let me know if that is not the case.