Ask Your Question
0

Can I get metrics displayed on the dashboard via REST?

asked 2019-05-21 15:48:38 -0500

pinkstone gravatar image

updated 2019-05-22 13:29:26 -0500

Hi Folks, I am an openstack newbie, so my question might be a naive one. The dashboard of a project has a good overview of the resource usage allocated for a given project. Is there a REST API to get the same details programmatically? Looking at the source of the webpage, it's some javascript, so I didn't dig much deeper; however it doesn't seem to do any ceilometer stats aggregation, since the same set of metrics are displayed even without ceilometer running.

Just to give some details, the openstack in question is Queens release.

Thank you, P

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2019-05-21 21:49:39 -0500

updated 2019-05-21 21:50:09 -0500

Your question is a bit confusing. The title asks for displaying metrics on the dashboard, then the question itself asks for obtaining quota data via API.

There are APIs for displaying current quota and current resource usage. Separate APIs exist for server, volume and network quota. By default, normal users are able to view the quota of a project that they are a member of, but of course they can't modify them.

The CLI has quota commands as well; tryopenstack quota show PROJECT_ID.

edit flag offensive delete link more

Comments

Thanks, I fixed the question to reflect that I actually wan REST :)

pinkstone gravatar imagepinkstone ( 2019-05-22 13:30:18 -0500 )edit
0

answered 2019-05-21 18:31:23 -0500

pinkstone gravatar image

I think I found my answer, but experts, don't hesitate to correct me if it's not accurate.

Looks like the metrics available on the dashboard are the ones you can get with http get on: "https://<ip_of_openstack>:8774/v2/limits", so it's just a function of compute. I think it's useful basic utilization stats, which seemingly nowhere to be found on the interwebs.

edit flag offensive delete link more

Comments

True. The Block Storage API also has a limits API, but I don't see anything equivalent in the Network API.

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-21 21:53:52 -0500 )edit

By the way, the correct compute limits API is http://<ip_of_openstack>:8774/v2.1/$PROJECT_ID/limits. Also note that the URL does not necessarily include a port number but could be something like http://ip-address/compute.

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-21 21:55:47 -0500 )edit

Thanks Bernard. Looking at the api reference: https://developer.openstack.org/api-ref/compute/?expanded=show-rate-and-absolute-limits-detail#limits-limits (https://developer.openstack.org/api-r...) From the API looks like the project is is part of the query rather than part of the URL path, but I'll try out the API path you suggested.

pinkstone gravatar imagepinkstone ( 2019-05-22 13:28:59 -0500 )edit

The API strings come after the Nova endpoint, which includes the project ID. To see that, you can run openstack catalog list. Cinder is another example for a service that includes the project in the endpoint.

Many APIs include a project ID as well, either the caller’s project or another one.

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-22 19:00:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-05-21 15:48:38 -0500

Seen: 48 times

Last updated: May 22