NetApp® ONTAP REST has emerged as a pivotal part of automation in day-to-day NetApp ONTAP® management with new API endpoints in releases covering the range of new innovation and existing capabilities, from ONTAP for IT admin to automate ONTAP storage operations.

One key enhancement in the ONTAP REST API 9.11.1 release is bringing back the capability of the performance counter manager for an initial set of objects. Users can access counter manager objects as a table (for example, volume). Each counter manager object is represented as its own table, while instances of that counter manager object (such as individual volumes) each become accessible as a row in that table. Each row contains a number of individual performance counters for that instance. Users can access a single performance counter for an instance as a field in that table row. The following table shows the available ONTAP API endpoints.


ZAPI

REST APIs
Endpoint

Description
perf-object-list-info /api/cluster/counter/tables Returns name and description text for REST-ified CM objects on the system. Also returns the unit, type, name, and description of all the REST-ified counters within each CM object.
perf-object-counter-list-info /api/cluster/counter/tables/{name} Returns the unit, type, name, and description of all the REST-ified counters within the specified CM object.
perf-object-get-instances /api/cluster/counter/tables/(name}
/rows
Returns all of the instance data for a specified CM object. 
perf-object-instance-list-info-iter /api/cluster/counter/tables/{name}
/rows/{id}
Returns the instance data for a specified CM object and specified instance.


ONTAP REST APIs only support exporting of kernel space counter manager objects. No support is provided for user space objects. Only up to 10,000 counter manager object instances can be returned by any REST request. Wild cards can be used in CM R-ZR REST queries for filtering on CM object instance names or for filtering on other string counter values:

  • curl -siku "admin: netapp1!" "https://10.2.1.2/api/cluster/counter/tables?name=b*"
  • curl -siku "admin: netapp1!" "https://10.2.1.2/api/cluster/counter/tables/asup/rows?id=inst*"

REST queries with filtering on properties (string counters and metadata) are  supported. REST queries with filtering on scalar counter values are supported. REST queries with filtering on array counter values are not  supported. There is a maximum of 20 concurrent REST requests.

In the following example, the host_adapter counter manager object is represented in table format to illustrate how to access each performance counter using the ONTAP REST API. There are several host adapters in the system, and each host adapter has its own performance counters.

Instance name REST counters
host_adapter_1 total_read_ops total_write_ops bytes_read bytes_written max_link_data_rate rscn_count
host_adapter_2 total_read_ops total_write_ops bytes_read bytes_written max_link_data_rate rscn_count
host_adapter_3 total_read_ops total_write_ops bytes_read bytes_written max_link_data_rate rscn_count


To learn more about enhancements to performance counters in ONTAP REST, read accessing performance counters using the ONTAP REST API  and ONTAP 9.11.1 ONTAPI-to-REST Counter Manager Mapping.
Visit https://devnet.netapp.com/restapi.php for ONTAP REST related public resources. For queries, write to #api slack channel.

About Mahalakshmi G

Mahalakshmi works as Subject Matter Expert at NetApp with over 6 years of experience in Data Storage Industry. She is part of ONTAP Manageability Product Management team. She currently focuses on Automation and Tools portfolio such as ONTAP REST APIs, NetApp Manageability SDK and PSTK. She loves solving real-world customer issues and always looks for a way to automate complex storage management operations. Apart from work, Mahalakshmi is keen on music, an opacarophile, avid-book reader and enjoys traveling to historical places.

Pin It on Pinterest