Health Check API¶
The CPQD ASR Server provides a health check API, by means of a HTTP request to URL http://ASR_HOST:8081/healthcheck
, where ASR_HOST is the IP of the ASR Server to be checked.
As an example, open a console on the ASR Server machine and run:
curl http://localhost:8081/healthcheck?pretty=true
The result should be something like this:
$ curl http://localhost:8081/healthcheck?pretty=true
{
"asr-engine" : {
"healthy" : true,
"message" : "CPqD ASR Server: 2.6.0 [Engine: 3.2.0]"
},
"deadlocks" : {
"healthy" : true
},
"direct-memory" : {
"healthy" : true,
"message" : "directMemoryUsed: 72.13429832458496 MB, totalCapacity: 72.13429832458496 MB, maxDirectMemory: 512.0 MB"
},
"license-manager-visibility" : {
"healthy" : true
},
"license-status" : {
"healthy" : true,
"message" : "ONLINE"
}
}
The main fields of the returned JSON are explained below:
asr-engine.healthy
Indicates that the ASR engine was successfully loaded (‘true’).
asr-engine.message
Indicates the ASR server and engine versions.
license-manager-visibility.healthy
Indicates that the license server is accessible (‘true’).
license-status.healthy
Indicates that the license control is working properly (‘true’).
license-status.message
Details regarding the ASR license control status.
ONLINE: Working. The ASR server can perform recognitions.
OFFLINE: ASR server is operating in off-line mode and is performing recognitions temporarily. Check the connectivity between the ASR server and the license server. If the problem persists, after working off-line for a period, the ASR server will no longer do recognitions.
BLOCKED: The ASR server has been blocked due to license issues. Details regarding the block is also returned in this field. In this status, the ASR server will not perform recognitions.
UNEXPECTED_STATE: The ASR server found an unexpected error. Its ability to do recognitions might be affected.