This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 908a26dafc67202e5c3fe072152dbdc1d55703d4
Author: Benoit Tellier <[email protected]>
AuthorDate: Tue Aug 27 11:33:27 2019 +0700

    JAMES-2526 HealthCheck documentation is not precise enough
    
    1. Missing an example of response body
    2. Missing the list of supported healthchecks
    3. Case typo in Cassandra Backend healthcheck name (B should be b)
    4. Status HEALTHY should be in lowercase
    5. Missing a list of possible statuses and their meanings
---
 src/site/markdown/server/manage-webadmin.md | 39 ++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/src/site/markdown/server/manage-webadmin.md 
b/src/site/markdown/server/manage-webadmin.md
index bdf6281..12b082a 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -68,6 +68,33 @@ The user has to check in the logs in order to have more 
information about failin
 curl -XGET http://ip:port/healthcheck
 ```
 
+Will return a list of healthChecks execution result, with an aggregated result:
+
+```
+{
+  "status": "healthy",
+  "checks": [
+    {
+      "componentName": "Cassandra backend",
+      "escapedComponentName": "Cassandra%20backend",
+      "status": "healthy"
+      "cause": null
+    }
+  ]
+}
+```
+
+**status** field can be:
+ - **healthy** : Component works normally
+ - **degraded** : Component works in degraded mode. Some non-critical services 
may not be working, or latencies are high, for example. Cause contains 
explanations.
+ - **unhealthy** : The component is currently not working. Cause contains 
explanations.
+
+Supported health checks include:
+ - **Cassandra backend**: Cassandra storage. Included in Cassandra Guice based 
products.
+ - **JPA Backend**: JPA storage. Included in JPA Guice based products.
+ - **RabbitMQ backend**: RabbitMQ messaging. Included in Distributed Guice 
based products.
+ - **Guice application lifecycle**: included in all Guice products.
+
 Response codes:
 
  - 200: All checks have answered with a Healthy status
@@ -78,16 +105,16 @@ Response codes:
 Performs a health check for the given component. The component is referenced 
by its URL encoded name.
 
 ```
-curl -XGET http://ip:port/healthcheck/checks/Cassandra%20Backend
+curl -XGET http://ip:port/healthcheck/checks/Cassandra%20backend
 ```
 
 Will return the component's name, the component's escaped name, the health 
status and a cause.
 
 ```
 {
-  "componentName": "Cassandra Backend",
-  "escapedComponentName": "Cassandra%20Backend",
-  "status": "HEALTHY"
+  "componentName": "Cassandra backend",
+  "escapedComponentName": "Cassandra%20backend",
+  "status": "healthy"
   "cause": null
 }
 ```
@@ -111,8 +138,8 @@ Will return the list of all available health checks.
 ```
 [
     {
-        "componentName": "Cassandra Backend",
-        "escapedComponentName": "Cassandra%20Backend"
+        "componentName": "Cassandra backend",
+        "escapedComponentName": "Cassandra%20backend"
     }
 ]
 ```


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to