-
Notifications
You must be signed in to change notification settings - Fork 84
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
On documentation for batch GET metric #1057
Comments
Further to the information added initially, i have the following comments as well, where i see that GET method for gathering measures for multiple metrics is not supported.? I have found the following information
However when i tried to excute the bulk get , i get the message that GET method is not supported curl -kH"X-Auth-Token: $token" "https://10.10.192.30:8041/v1/batch/metrics/measures/metric=e4774aca-25ac-4755-baf8-3e42596863e9&metric=eb4c5eaa-3246-4c6f-a629-bd67b0dd4aae" <title>405 Method Not Allowed</title>405 Method Not AllowedThe method GET is not allowed for this resource. |
so that PR was reverted by c42848fc. it's way too long ago for me to remember why. that said, you should probably be looking at the aggregates endpoint. something along the line of
you can pass in start/stop as parameters to slice series. if that works, feel free to contribute to the docs. |
i should mention #441 as something to keep in mind. i don't think we ever looked much into it but it could be something you hit and if you do, it'd be good if you could provide details on when this becomes an issue. |
Many thanks for the reply and the suggestion to use aggregates . dateFri Mar 13 02:31:14 TZINFO 2020 openstack metric measures show 03eb4735-2655-46cd-933f-ad6749d4b716 | tail -5| 2020-03-12T12:00:00+00:00 | 600.0 | 6144.0 | openstack metric resource show 2be5b5ee-fa3f-4595-aac8-c21d8f4bcf76+-----------------------+-------------------------------------------------------------------+ cat /tmp/se.json 404 Not FoundThe resource could not be found.Not sure if you may be able to help here. Thanks again. |
i'll be honest, i'm not exactly sure what i'm looking at since the formatting is kind of wonky. are you saying both curl examples above are failing? |
Both the curl command examples are failing. Could it be reason that "operations" are not available in 3.3.1? |
that command is returning the client version, you'll need to check the packages you've installed for server version. that said, it does seem like your usage of |
I did not have a luck by changing the payload of the HTTP post request to v1/aggregates. I have searched on my installation and i find that v1/aggregates is not available in the client egrep "v1/" *.pyarchive_policy.py: url = "v1/archive_policy/" Also i tried to download the latest client from github(master) and extracted. I find a file called aggregates.py there, but it is not having the API end point v1/aggregates defined there ( like in other files metrics.py , resources.py etc) Could this be a reason why the v1/aggregates query not working ? |
you'll need to update to python-gnocchiclient>=6.0.0 if you want to use aggregates via client. that said, if you're using curl and seeing errors you'll need to do some debugging on client/server to see what exactly you're doing wrong. |
Thanks for the suggestion. I did upgrade the gnocchiclient to latest version 7.0.5. My package version are as below. Is my server gnocchi package version does not support v1/aggregates? From which version is it supported? #apt list --installed | grep gnocchi gnocchi-api/xenial,now 4.0.5-2 |
I see from documents that , v1/aggregates is available in 4.1 and 4.2 only. IF i use the v1/aggregates to fetch measures for multiple metrics, how many metric can be passed at a time, like in the example below? |
yes, that would be why. :) i don't think there's a limit. of course that request is sent to a single process so i wouldn't send it in one giant payload. you'll need to play around with minimising http requests but also parallelising requests. |
Closing as there is no new information here. |
Before reporting an issue on Gnocchi, please be sure to provide all necessary
information.
Which version of Gnocchi are you using
gnocchi 3.3.1
How to reproduce your problem
It is not clear from document (https://gnocchi.xyz/rest.html) how to query to get measures of multiple metrics in a single query ( batch mode)
What is the result that you get
I can query for single metric. But the amount of measures /metrics to be fetched are quite large and not possible to use this method due to the time it takes for a query. I dont find a sample /syntax to be used for getting measures values in batch mode
What is result that you expected
As mentioned in #104
{'id1': [(timestamp, granularity, value)],
'id2': [(timestamp, granularity, value)]}
I should be able to issues a single query where i pass a set of metric IDs and i get response from GNOCCHI with the following format
{'id1': [(timestamp, granularity, value)],
'id2': [(timestamp, granularity, value)]}
The text was updated successfully, but these errors were encountered: