ONTAP Discussions

What is the difference on ONTAP for the URLs"/cluster/metrics" and "/cluster"

Ruoyi
2,677 Views

When I query ONTAP cluster to get the performance metrics; dedicated URL /cluster/metrics doesn't work instead under the /cluster when explicit input of field parameter is provided it returns the data for the performance counters.

Formed URLs in both the scenarios looks as listed below :

1. https://ONTAP_CLUSTER_IP/api/cluster/metrics?interval=1h&return_timeout=15&return_records=true

     Returns 0 records

2. https://ONTAP_CLUSTER_IP/api/cluster?return_records=true&return_timeout=15&fields=metric

     Returns valid records

 

Is this expected behavior? 
If yes then what is the use of /cluster/metrics ?

1 ACCEPTED SOLUTION

elementx
1,768 Views

I also tried the OPs full link to /cluster/metrics, it also works on my ONTAP 9.12.1 as shown here.

 

elementx_0-1698593112216.png

I should add s51 is node management IP.

I also tried the link against cluster management IP - that also worked.

 

Proper (unfiltered) output for /cluster, on the other hand, reveals it's not about performance, although it does contain the latest sample.

 

elementx_0-1698593691361.png

 

 

 

So I think the OP's questions are answered:

- /cluster/metrics provides historic high-level metrics

- /cluster provides cluster state with various cluster information (not related to performance) including just the latest sampling of high-level metrics

- additional metrics are available via other API methods

 

If it doesn't work on an older version after the metrics were introduced but before 9.12.1, I suggest checking the KB or contacting Support.

View solution in original post

5 REPLIES 5

Navaneethakrishnan
1,980 Views

I am facing the same issue. Do we have any solution for this?

elementx
1,963 Views

Works fine for me.

 

Various records from the past hour (the most recent hour, sampled over 15 seconds - I got 239 of them back, which equals 59.75 minutes).

 

elementx_1-1698338617826.png

 

Individual record:

 

elementx_3-1698339192904.png

 

> Is this expected behavior?

The above is exactly what I expected to see.


> If yes then what is the use of /cluster/metrics ?

To help us retrieve historical performance metrics for the cluster. That's what the documentation says and that's what it does.

 

/cluster is not even related to metrics, although it happens to contain a set of the current performance metrics (which /cluster/metrics does not do) and some other information unrelated to performance metrics.

 

elementx_2-1698338682927.png

 

Navaneethakrishnan
1,900 Views

Hi @elementx . Thanks for the detailed explanation. 

But I didn't any records from /cluster/metrics API. I can get the current metrics from /cluster API.


do I need to enable anything in cluster level to get the historical data? 
Note:
Cluster version: 9.9.1

elementx
1,893 Views

The first difference may be I went to: https://${CLUSTER_IP}/api/cluster/metrics?interval=1h which is slightly shorter than the URL from the original post. I haven't tried the OP's full example. 

 

The second may be that my ONAP is 9.12.1 which is reasonable considering it's been around for a while and the OP doesn't specify any particular version.

 

ONTAP 9.9.1 has the same method so I think my URL should work the same but if it doesn't then it may be ONTAP 9.9.1-specific. In that case I would check the KB or ask Support.

 

Maybe someone with 9.9.1 can verify what they see on their end.

elementx
1,769 Views

I also tried the OPs full link to /cluster/metrics, it also works on my ONTAP 9.12.1 as shown here.

 

elementx_0-1698593112216.png

I should add s51 is node management IP.

I also tried the link against cluster management IP - that also worked.

 

Proper (unfiltered) output for /cluster, on the other hand, reveals it's not about performance, although it does contain the latest sample.

 

elementx_0-1698593691361.png

 

 

 

So I think the OP's questions are answered:

- /cluster/metrics provides historic high-level metrics

- /cluster provides cluster state with various cluster information (not related to performance) including just the latest sampling of high-level metrics

- additional metrics are available via other API methods

 

If it doesn't work on an older version after the metrics were introduced but before 9.12.1, I suggest checking the KB or contacting Support.

Public