Health/config/monitor/pause/{node}: PUT

Stops the health monitoring service on a node.

Availability

Available on all IBM Storage Scale editions.

Description

The PUT /scalemgmt/v2/health/config/monitor/pause/{node} request stops the health monitoring service of a node to display the paused state. When in the paused state, the health monitoring services of the nodes are disabled. By default, a node is in a not paused state. For more information about the fields in the data structures that are returned, see mmhealth command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/health/config/monitor/pause/{node}
where
pause/{node}
Specifies the node that is paused.

Request headers

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

Parameters

Table 1. List of parameters
Parameter name Description and applicable keywords Required/Optional
node Name of the node that is paused. Required

Request data

No request data.

Response data

{
    "status": {
      "code":ReturnCode",
      "message":"ReturnMessage"
   },
   jobs: [
      {
         "result":"", 
           { 
             "commands":"String",
             "progress":"String,
             "exitCode":"Exit code",
             "stderr":"Error",
             "stdout":"String",
           },
         "request":" ",
           {
             "type":"{GET | POST | PUT | DELETE}",
             "url":"URL",
             "data":""",
           }
         "jobId":"ID",
         "submitted":"Time",
         "completed":Time",
         "status":"Job status",
         }   
        ],
   }
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.
"paging"
The URL to retrieve the next page. Paging is enabled when more than 1000 objects are returned by the query.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.
"jobs":
An array of elements that describe jobs. Each element describes one job.
"result"
"commands":"String'
Array of commands that are run in this job.
"progress":"String'
Progress information for the request.
"exitCode":"Exit code"
Exit code of command. Zero is success, and any value other than zero denotes failure.
"stderr":"Error"
CLI messages from stderr.
"stdout":"String"
CLI messages from stdout.
"request"
"type":"{GET | POST | PUT | DELETE}"
HTTP request type.
"url":"URL"
The URL through which the job is submitted.
"data":" "
Optional.
"jobId":"ID",
The unique ID of the job.
"submitted":"Time"
The time at which the job was submitted.
"completed":Time"
The time at which the job was completed.
"status":"RUNNING | COMPLETED | FAILED"
Status of the job.

Examples

The following example pauses the node rhel-41.

Request URL:
curl -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/monitor/pause/rhel-41'
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": 1000000000007,
            "status": "COMPLETED",
            "submitted": "2021-06-21 04:08:51,611",
            "completed": "2021-06-21 04:08:51,932",
            "runtime": 321,
            "request": {
                "type": "PUT",
                "url": "/scalemgmt/v2/health/config/monitor/pause/rhel-41%0A"
            },
            "result": {
                "progress": [],
                "commands": [
                    "mmhealth config monitor pause -N 'rhel-41' -Y "
                ],
                "stdout": [
                    "info: Health monitoring services have been paused on node:\nrhel-41.openstacklocal\n"
                ],
                "stderr": [],
                "exitCode": 0
            },
            "pids": []
        }
    ],
    "status": {
        "code": 200,
        "message": "The request finished successfully."
    }
}