Home › Forums › FABRIC General Questions and Discussion › Infrastructure-metrics query locally
Tagged: infrastructure-metrics
- This topic has 8 replies, 2 voices, and was last updated 2 weeks, 4 days ago by
Bjoern Sagstad.
-
AuthorPosts
-
February 3, 2025 at 3:24 pm #8153
Dear everyone,
I have been using the infrastructure-metrics website to query for different information, and it works really well there. However, when I run the same requests locally or through postman I get a error 500. This used to work as late as last week, however, those exact same requests now fail with error 500 as stated above. Did anything change, or is there something I can do to allow for my requests to go through?
I’m currently testing both the https://infrastructure-metrics.fabric-testbed.net/query and https://infrastructure-metrics.fabric-testbed.net/query_range queries
February 4, 2025 at 2:38 pm #8163I’m not sure I understand what the fail is that gives you the 500 error.
Are you saying that you can see the data on the website Grafana GUI but making the same calls to https://infrastructure-metrics.fabric-testbed.net/query does not work?
Or do some calls to https://infrastructure-metrics.fabric-testbed.net/query work and some do not depending on where the call is made from?
There were some updates made late Friday to the query code, but those “should” not affect the calls. I can still use the example curl calls successfully from jupyter hub or from my local laptop.
If you were trying on Friday, you may have unluckly hit the updating time.February 4, 2025 at 3:03 pm #8165Thank you for responding so quickly.
Yes. I can see the data on the graphical interface, but when I make any requests locally(using the python requests library as normal or using a postman request) I get a error 500 internal server error. I don’t believe I have changed the code on my end since it last worked.
None of the requests I have made locally has worked today or yesterday. I tested various queries such as
{"query": "rate(ifHCOutOctets[5m])"}
and more advanced ones. I tested it on the jupyter.fabric-testbed too with the same error 500 result.Would you have an example snippet of code, or the curl command you have used for it to work that you could share with me and I could test it on my end, just in case something has gone wrong on my side?
February 4, 2025 at 3:50 pm #8167Here is the code snippet.
curl https://infrastructure-metrics.fabric-testbed.net/query -H “Authorization: fabric-token YOURTOKEN” –data-urlencode ‘query=rate(ifHCOutOctets[5m])’February 4, 2025 at 4:25 pm #8168There is a minor typo in the above query should be — before data
curl https://infrastructure-metrics.fabric-testbed.net/query -H “Authorization: fabric-token xxxx” –data-urlencode ‘query=rate(ifHCOutOctets[5m])’
I did find an error in the new code that would cause a 500 error if the given token did not represent a valid user.
February 4, 2025 at 4:34 pm #8169Thank you!
When I run the same request on my end I get this response:
<!doctype html>
<html lang=en>
<title>500 Internal Server Error</title>Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
I attempted to make sure that the token was correct, and when I put in a token that is not correct I get this response:
{“error”:”Permission Denied. JWT Decode error”}
-
This reply was modified 2 weeks, 4 days ago by
Bjoern Sagstad.
-
This reply was modified 2 weeks, 4 days ago by
Bjoern Sagstad. Reason: easier to read hopefully
-
This reply was modified 2 weeks, 4 days ago by
Bjoern Sagstad.
-
This reply was modified 2 weeks, 4 days ago by
Bjoern Sagstad.
February 4, 2025 at 4:38 pm #8173It looks like the formatter is messing with the double dash and changing it to a single dash. There should be a double dash before data-urlencode in the below command.
curl https://infrastructure-metrics.fabric-testbed.net/query -H “Authorization: fabric-token xxxx” --data-urlencode ‘query=rate(ifHCOutOctets[5m])’
February 4, 2025 at 4:40 pm #8175Try again now & check your email for more information.
February 4, 2025 at 4:44 pm #8176It works! Thank you so much for all your help.
-
This reply was modified 2 weeks, 4 days ago by
-
AuthorPosts
- The topic ‘Infrastructure-metrics query locally’ is closed to new replies.