Start of change

Perfmon/data: GET

Gets the performance data from the cluster.

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The GET perfmon request gets performance details from the cluster with the help of queries. The query is written in the performance monitoring tool query language format. For example, query copu_user metric for last 10 seconds. For more information about the fields in the data structures that are returned, see the topic mmperfmon command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/perfmon/get
where
perfmon/data
Specifies the performance monitoring tool as the resource of this GET call. Required.

Request headers

Content-Type: application/json
Accept: application/json

Request parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of request parameters
Parameter name Description and applicable keywords Required/optional
query Query to fetch the performance details. The query is written in the performance monitoring tool query language format. Required.

Request data

No request data.

Response data

{  
  "status": {
      "code":ReturnCode",
      "message":"ReturnMessage"
   },
   "performanceData": {}
}
For more information about the fields in the following data structures, see the links at the end of this topic.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.
"performanceData":
The performance data that is returned from the performance monitoring tool based on the query that you entered.

Examples

The following example shows how to use the API command to get the performance details when you use the following query: metrics avg(cpu_user) last 30 bucket_size 1

Request URL:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 
'https://198.51.100.1:443/scalemgmt/v2/perfmon/data?query=metrics%20avg(cpu_user)%20last%2030%20bucket_size%201'
Response data:
Note: In the JSON data that is returned, the return code indicates whether the command is successful. The response code 200 indicates that the command successfully retrieved the information. Error code 400 represents an invalid request and 500 represents internal server error.
{
  "status": {
    "code": 200,
    "message": "..."
  },
  "performanceData": "null"
}
End of change