top of page

Pulling Datastore Metrics from VCF Operations API

  • Writer: Brock Peterson
    Brock Peterson
  • Nov 1
  • 1 min read

The VCF Operations API surface exposes metrics, for reference here are a few blogs related to this:


Today we'll discuss how to capture Datastore metrics, let's go.


First, let's authenticate. I'm going to authenticate with local credentials, but there are other ways to do this as well.


ree

Once authenticated you can find your Datastores here.


ree

Output (and accompanying curl commands) will look like this.


ree

Scroll down in the Response Body to find the identifier of the Datastore you're looking for.


ree

We can now use the GET /api/resources/{id}/stats endpoint to get metrics for this Datastore.


ree

Scrolling down you'll notice we can specify the id and execute, which will give us our metrics (and the associated curl command).


ree

As you can see we get all the metric values and their "key". Say for example you're looking for IOPS, Latency, and Throughput metrics for your Datastore. We can query the same endpoint for just those metrics, but first need to find their "keys". To do that, we'll use GET /api/resources/{id}/statkeys.


ree

In the Response Body you can see the stat keys. Looking for Latency metrics we find these.


ree

We can use these stat keys in our call to get just these metrics, like this.


ree

Scrolling down, you'll see the Datastore id and what the execution looks like.


ree

These are your Datastore metrics! The beauty of Swagger is that it has also provides us with all relevant curl command to be used programatically. Hope this helps!

Comments


    bottom of page