Skip to content

Commit

Permalink
DEV-21564 documented monitoring API
Browse files Browse the repository at this point in the history
  • Loading branch information
jeloba committed Sep 19, 2019
1 parent 392741b commit d0f5c57
Showing 1 changed file with 78 additions and 3 deletions.
81 changes: 78 additions & 3 deletions apiary.apib
Expand Up @@ -2081,6 +2081,84 @@ Retrieves active notifications from the platform.



# Group Monitoring API

**Since Core Platform 2019.10**

The resources in this group provide information about the health and performance of the Acrolinx Platform.
Accessing this information requires the permission "Access monitoring API." This privilege isn’t granted
to all users. Make sure the user associated with your API token has the requisite roles.

For a quick check of your permissions see if the [metrics index](#monitoring-api-get-available-metrics)
contains links. More information about permission management can be found in the
[Acrolinx documentation](https://docs.acrolinx.com/coreplatform/latest/en/user-management).

## Get Available Metrics [GET /api/v1/monitoring]

Lists available metrics according to the permissions of the API user. If access is granted a link to
the metrics resource will be added to the links hash. The following relations are currently available:

|Key | Target
|----------------|-----------------
|`checkMetrics` |[check monitoring resource](#monitoring-api-get-check-metrics)
|`healthMetrics` |[server health monitoring resource](#monitoring-api-get-health-metrics)

+ Response 200 (application/json)

{
"links": {
"checkMetrics": "/api/v1/monitoring/checks",
"healthMetrics": "/api/v1/monitoring/health"
}
}

## Get Check Metrics [GET /api/v1/monitoring/checks]

Provides a summary of the check activity on the Acrolinx Platform.

|Field |Contents
|-------------------------|-------------------
|`receivedChecks` |Total number of checks received by the platform.
|`successfulChecks` |Total number of completed checks that didn’t result in an error.
|`failedChecks` |Total number of completed checks that resulted in an error.
|`unparseableDocuments` |Total number of checks that failed due to parsing errors.
|`currentQueueLength` |Current number of checks waiting for a free language server.
|`totalQueueTime` |Total time, in seconds, check requests waited for a free language server.


+ Response 200 (application/json)

+ Attributes (object)
+ data (object)
+ receivedChecks: 54132 (number) - Total number of checks received
+ successfulChecks: 54130 (number) - Total number of successful checks
+ failedChecks (number): 2 - Total number of failed checks
+ unparseableDocuments: 2 (number) - Total number of checks failed due to parsing errors
+ currentQueueLength: 0 (number) - Current number of waiting checks
+ totalQueueTime: 1563 (number) - Total time checks spent waiting


## Get Health Metrics [GET /api/v1/monitoring/health]

A general summary of the health of the Acrolinx Platform.

|Field |Contents
|-------------------------|-------------------
|`languagesReady` |A hash containing all configured languages as keys. If Acrolinx is ready to check in a language its value will be true.

+ Response 200 (application/json)

{
"data": {
"languagesReady": {
"en": true,
"fr": true,
"ja": false
}
}



# Group Other Methods in Existing API - DRAFT

Checking API:
Expand Down Expand Up @@ -2109,6 +2187,3 @@ Reuse API:

Debug API:
* not needed for now - special use case

Monitoring API:
* not needed for now - special use case

0 comments on commit d0f5c57

Please sign in to comment.