Health/config/{interval}: PUT

Configures the interval at which the node health data needs to be collected.

Availability

Available on all IBM Storage Scale editions.

Description

The PUT scalemgmt/v2/health/config/{interval} request configures the interval at which the health data for the nodes and services needs to be collected. For more information about the fields in the data structures that are returned, see the mmhealth command.

Request URL

https://<IP address or host name of API server>:<port> scalemgmt/v2/health/config/{interval}
where
interval
Specifies the monitoring interval for the whole cluster. The interval values are shown in the following list. Required.
OFF
The monitoring is disabled for the whole cluster.
LOW
The monitoring time is equivalent to the default monitoring multiplied by10 seconds.
MEDIUM
The monitoring time is equivalent to the default monitoring multiplied by 5 seconds.
DEFAULT
Monitoring is set for every 15 - 30 seconds based on the service that is being monitored.
HIGH
Monitoring time is equivalent to the default monitoring time divided by 2 seconds.

Request headers

Accept: application/json

Request data

No request data.

Response data

{
  "jobs": [
    {
      "jobId": ID of the job,
      "status": "Job status",
      "submitted": "Time",
      "completed": "Time",
      "runtime": Duration,
      "request": {
        "type": "Request Type",
        "url": "Resource URL"
      },
      "result": {},
      "pids": []
    }
  ],
  "status": {
    "code": return status code,
    "message": "Return message."
  }
}

For more information about the fields in the following data structures, see the link at the end of the topic.

"jobs":
An array of elements that describe jobs. Each element describes one job.
"jobId": "ID",
Specifies the unique ID of the job.
"submitted": "Time"
Specifies the time at which the job was submitted.
"completed": "Time"
Specifies the time at which the job was completed.
"runtime": "Time"
Specifies the duration for which the job ran.
"status": "RUNNING | COMPLETED | FAILED"
Specifies the status of the job.
"result"
The request results.
"pids": list
A list of pids for this job.
"request"
"type": "{GET | POST | PUT | DELETE}"
Specifies the HTTP request type.
"url": "URL"
The URL through which the job is submitted.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.

Examples

The following example sets the monitoring interval to LOW.

Request data:
curl -k -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic YWRtaW46YWRtaW4wMDE=' ' https://198.51.100.1:443/scalemgmt/v2/health/config/LOW'
 

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.
{
  "jobs": [
    {
      "jobId": 1000000000001,,
      "status": "RUNNING",
      "submitted": "2021-04-26 03:17:14,944",
      "completed": "N/A",
      "runtime": 4,
      "request": {
        "type": "PUT",
        "url": "/scalemgmt/v2/health/config/LOW"

      },
      "result": {},
      "pids": []
    }
  ],
  "status": {
    "code": 202,
    "message": "The request was accepted for processing."
  }
}