Monitor Microservices
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.
Listing all System Services and their Details
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
}
...
]
HTTP Responses
Status Codes | Description |
---|---|
| The event successfully called the method, and the body contains the results |
Checking the Status of all System Services
To check the status of all the CDAP system services, use:
GET /v3/system/services/status
HTTP Responses
Status Codes | Description |
---|---|
| The event successfully called the method, and the body contains the results |
Checking the Status of a System Service
To check the status of a specific CDAP system service, use:
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.
HTTP Responses
Status Codes | Description |
---|---|
| The service is up and running |
| The service is either not running or not found |
Example
HTTP Method |
|
---|---|
Description | Returns the status of the metrics service |
Checking the Status of a System Upgrade
To check the status of a CDAP system upgrade, use:
Note:Â This returns useful information only for Distributed CDAP installation upgrades.
HTTP Responses
Status Codes | Description |
---|---|
| The event successfully called the method, and the body contains the results |
Example
The response body will contain a JSON-formatted list of upgraded components:
Container Information of a System Service
If you are trying to debug a CDAP system service, you can retrieve container info for a system service with:
where
Parameter | Description |
---|---|
| Name (ID) of the system service |
Note:Â This returns useful information only for Distributed CDAP installations.
Example
For example, to retrieve the list of CDAP Master services, issue an HTTP GET request to the URL:
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:
Restarting System Service Instances
To restart all instances of a CDAP system service, you can issue an HTTP POST request to the URL:
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:
Parameter | Description |
---|---|
| Name (ID) of the system service whose instances are to be restarted |
| Specific instance of a service that needs to be restarted;Â |
HTTP Responses
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:
The response body will contain a JSON-formatted status of the last restart attempt for that service:
Parameter | Description |
---|---|
| Name (ID) of the system service for which details of last restart are to be retrieved |
HTTP Responses
Status Codes | Description |
---|---|
| The service name is not valid |
| Internal error encountered when processing the request |
Scaling System Services
In distributed CDAP installations, the number of instances for CDAP system services can be queried and changed by using these commands:
with the arguments as a JSON string in the body:
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
.
Examples
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 |
Â
Created in 2020 by Google Inc.