Use the CDAP Monitor Microservices to examine the CDAP system services used internally by CDAP. Additional details on monitoring can be found in the Logging and Monitoring.
All methods or endpoints described in this API have a base URL (typically http://<host>:11015
or https://<host>:10443
) that precedes the resource identifier, as described in the Microservices Conventions. These methods return a status code, as listed in the Microservices Status Codes.
For the detailed information of all available CDAP system services, use:
GET /v3/system/services |
The response body will contain a JSON-formatted list of the existing system services:
[ { "name": "appfabric", "description": "Service for managing application lifecycle.", "status": "OK", "logs": "OK", "min": 1, "max": 1, "requested": 1, "provisioned": 1 } ... ] |
Status Codes | Description |
---|---|
| The event successfully called the method, and the body contains the results |
To check the status of all the CDAP system services, use:
GET /v3/system/services/status |
Status Codes | Description |
---|---|
| The event successfully called the method, and the body contains the results |
To check the status of a specific CDAP system service, use:
GET /v3/system/services/<service-id>/status |
The status of these CDAP system services can be checked:
Service | Service ID | Description of the service |
---|---|---|
|
| Service that handles metrics related HTTP requests |
|
| Service that handles transactions |
|
| Service that handles application fabric requests |
|
| Service that aggregates all system and application logs |
|
| Service that aggregates all system and application metrics |
|
| Service that handles all data-related HTTP requests |
|
| Service that handles all HTTP requests for ad-hoc data exploration |
Note: The service status checks are more useful when CDAP is running in a distributed cluster mode.
Note: The service status checks are more useful when CDAP is running in a distributed cluster mode.
Status Codes | Description |
---|---|
| The service is up and running |
| The service is either not running or not found |
HTTP Method |
|
---|---|
Description | Returns the status of the metrics service |
To check the status of a CDAP system upgrade, use:
GET /v3/system/upgrade/status |
Note: This returns useful information only for Distributed CDAP installation upgrades.
Status Codes | Description |
---|---|
| The event successfully called the method, and the body contains the results |
The response body will contain a JSON-formatted list of upgraded components:
{ "metadata":true, } |
If you are trying to debug a CDAP system service, you can retrieve container info for a system service with:
GET /v3/system/services/<service-id>/live-info |
where
Parameter | Description |
---|---|
| Name (ID) of the system service |
Note: This returns useful information only for Distributed CDAP installations.
Note: This returns useful information only for Distributed CDAP installations.
For example, to retrieve the list of CDAP Master services, issue an HTTP GET request to the URL:
GET /v3/system/services/appfabric/live-info |
The response body will contain a JSON-formatted list of CDAP Master services, with the first container listed being the active CDAP Master in an HA deployment:
{ "containers":[ { "host":"host1.example.com", "name":"appfabric", "type":"system_service" }, { "host":"host2.example.com", "name":"appfabric", "type":"system_service" } ] } |
To restart all instances of a CDAP system service, you can issue an HTTP POST request to the URL:
POST /v3/system/services/<service-id>/restart |
You can restart a particular instance of a system service in CDAP, using its instance id, by issuing an HTTP POST request to the URL:
POST /v3/system/services/<service-id>/instances/<instance-id>/restart |
Parameter | Description |
---|---|
| Name (ID) of the system service whose instances are to be restarted |
| Specific instance of a service that needs to be restarted; |
Status Codes | Description |
---|---|
| The service is unavailable because it was not enabled |
| The service name is not valid |
| Internal error encountered when processing the request |
| The service is unavailable. For example, it may not yet have been started |
To retrieve details of the last restart attempt made for a particular service, issue an HTTP GET request to the URL:
GET /v3/system/services/<service-id>/latest-restart |
The response body will contain a JSON-formatted status of the last restart attempt for that service:
{ "instanceIds": [0], "serviceName": "dataset.executor", "startTimeInMs": 1437070039984, "endTimeInMs": 1437070039992, "status": "SUCCESS" } |
Parameter | Description |
---|---|
| Name (ID) of the system service for which details of last restart are to be retrieved |
Status Codes | Description |
---|---|
| The service name is not valid |
| Internal error encountered when processing the request |
In distributed CDAP installations, the number of instances for CDAP system services can be queried and changed by using these commands:
GET /v3/system/services/<service-id>/instances PUT /v3/system/services/<service-id>/instances |
with the arguments as a JSON string in the body:
{ "instances" : <quantity> } |
Parameter | Description |
---|---|
| Name (ID) of the system service |
| Number of instances to be used |
Note: In the CDAP Sandbox, trying to set the instances of system services will return a Status Code 400 Bad Request
.
Note: In the CDAP Sandbox, trying to set the instances of system services will return a Status Code 400 Bad Request
.
HTTP Method |
|
---|---|
Description | Determine the number of instances being used for the metrics HTTP service |
HTTP Method |
with the arguments as a JSON string in the body:
|
Description | Sets the number of instances of the metrics HTTP service to 2 |