ONTAP Discussions

ONTAP API: Query Node CPU metrics over past week.

cpruden
2,028 Views

My objective is to query the CPU performance of a cluster node over the past week (averaged). 

 

I've found a couple endpoints, that are close - but looking for guidance.

  • GET https://clustername/api/cluster/nodes/{uuid}?fields=metric

    ^^ This doesn't appear to accept any override to the default interval/duration of PT15S (i assume 1hr, sampled every 15 secs).  I've tried query parameters of "metrics.duration", "duration", and "interval" - none of which are accepted.

  • GET https://clustername/api/cluster/nodes/{uuid}/metrics?status=ok&interval=1w&return_timeout=60&fields=processor_utilization,duration&return_records=true

    ^^ returns a list of 336 performance samplings over the past week.  I would prefer to have a single averaged score - since I'm querying a metric endpoint, not a statistics endpoint/property.

I appreciate any guidance that can be offered.

1 ACCEPTED SOLUTION

RossC
1,928 Views

Hey @cpruden 

 

Suggest checking out the following KB Article which speaks to the "Performance Capacity" metric within Unified Manager - https://kb.netapp.com/Advice_and_Troubleshooting/Data_Infrastructure_Management/OnCommand_Suite/What_is_Performance_Capacity_in_ONTAP_9_and_Unified_Ma... 

View solution in original post

3 REPLIES 3

RossC
2,008 Views

Hi @cpruden 

 

Whilst I have no doubt someone out there from our team will be able to help you with your ONTAP API query better than I. One point I wanted to highlight to you is if you want to be pulling historical metrics (i.e data points from over a week period), then potentially deploying ActiveIQ Unified Manager and then talking to it's API may be an option for you - https://docs.netapp.com/us-en/active-iq-unified-manager/api-automation/concept_metrics_apis.html 

 

Unified Manager is designed for monitoring and managing multiple ONTAP based systems and has it's own API and stores performance data for longer periods. 

cpruden
1,953 Views

When reviewing the metrics available within AIQUM, I don't see a pure CPU% utilization value.  What I see instead is 

{ "samples":

  [

    {"performance_capacity" :

      {"used_percent": 0}

    }

  ]

}

 

Where the extra detail within the API spec model offers this description: 

Percentage of performance capacity that is being used.

Before we begin using this value, I need to know how it is calculated and what values should generally be considered normal, warning, and critical.

 

Thanks in advance.

RossC
1,929 Views

Hey @cpruden 

 

Suggest checking out the following KB Article which speaks to the "Performance Capacity" metric within Unified Manager - https://kb.netapp.com/Advice_and_Troubleshooting/Data_Infrastructure_Management/OnCommand_Suite/What_is_Performance_Capacity_in_ONTAP_9_and_Unified_Ma... 

Public