[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to get a list of projects from origin-metrics



----- Original Message -----
> From: "David Dimas" <david dimas333 gmail com>
> To: dev lists openshift redhat com, "Matt Wringe" <mwringe redhat com>
> Sent: Friday, April 1, 2016 11:40:19 AM
> Subject: How to get a list of projects from origin-metrics
> 
> Hello, How are you?
> 
> The openshift API does provide us a Rest API that will allow us to get a
> list of projects under a given user account.
> https://docs.openshift.com/enterprise/3.0/rest_api/openshift_v1.html#v1-project
> 
> However, I am going to get this from origin-metrics.
> 
> Finally, I am going to pull back the metrics of each project under a given
> user account with origin-metrics.
> 
> so, can I get the project list from origin-metrics directly? Is it possible?

Origin-metrics is only meant to store the metrics, what projects have been created or are currently running should be gathered from the OpenShift server.

You can get the list of tenants in Hawkular Metrics, which currently correspond to the projects in the OpenShift cluster (as well as a special _system one which stores cluster/node level metrics) but this really isn't the best way to do it and we may have additional tenants in the future which don't correspond to projects.

> 
> If no, how can I connect openshif API with origin-metrics?

If you want a list of all the projects (eg namespaces) then you can do that using this https://docs.openshift.com/enterprise/3.0/rest_api/kubernetes_v1.html#list-or-watch-objects-of-kind-namespace


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]