Site monitoring
Cloverleaf users routinely rely on the Cloverleaf Monitor Daemon to monitor the heath/status of interfaces. In today’s distributed enterprise, users require a method/API to verify that the site daemons, hcimonitord and hcilockmgr, are functioning correctly.
To do this, there is a Restful API request that checks the status/health of hcimonitord and hcilockmgr.
This feature is enabled with CLAPI.
The API checks the current health of the two site-level daemons. The default behavior is to
return the status on all Cloverleaf sites. To return the status on a single site, you can add
a sitename
parameter.
SiteDeamonHealth
POST | clapi/api/health | |||
---|---|---|---|---|
Key | Type | Length | Required | Note |
site |
String | 50 | O | sitename |
Example 1: This returns payload reports for the status of all sites.
https://servername:port/clapi/api/root/sites/health
Return:
[{ "lockmgrState": 1, "monitordState": 1, "siteName": "Site1" }, { "lockmgrState": 1, "monitordState":
1, "siteName": "Site2" }]
Example 2: This returns payload reports for the status of one site
(prod
).
https://servername:port/clapi/api/root/sites/health/prod
Return:
{ "lockmgrState": 1, "monitordState": 1, "siteName": "prod" }
Example
In this scenario:
- Cloverleaf is deployed in a Cloud environment.
- CLAPI is enabled with any dependencies.
To perform a site-level health check through CLAPI, you must configure a third-party application, Big Monitor, to poll Cloverleaf for health checks every few minutes.
Big Monitor calls the restful API to check the current status on the site-level daemons.
The return payload is parsed and the daemons are logged as being active.