Open ejunker opened 5 years ago
I am not sure if this is within the scope of this project but there is a proposed standard for health data.
More detailed information can be found at: https://inadarei.github.io/rfc-healthcheck/
Example response format:
GET /health HTTP/1.1 Host: example.org Accept: application/health+json HTTP/1.1 200 OK Content-Type: application/health+json Cache-Control: max-age=3600 Connection: close { "status": "pass", "version": "1", "releaseID": "1.2.2", "notes": [""], "output": "", "serviceID": "f03e522f-1f44-4062-9b55-9587f91c9c41", "description": "health of authz service", "details": { "cassandra:responseTime": [ { "componentId": "dfd6cf2b-1b6e-4412-a0b8-f6f7797a60d2", "componentType": "datastore", "metricValue": 250, "metricUnit": "ms", "status": "pass", "time": "2018-01-17T03:36:48Z", "output": "" } ], "cassandra:connections": [ { "componentId": "dfd6cf2b-1b6e-4412-a0b8-f6f7797a60d2", "type": "datastore", "metricValue": 75, "status": "warn", "time": "2018-01-17T03:36:48Z", "output": "", "links": { "self": "http://api.example.com/dbnode/dfd6cf2b/health" } } ], "uptime": [ { "componentType": "system", "metricValue": 1209600.245, "metricUnit": "s", "status": "pass", "time": "2018-01-17T03:36:48Z" } ], "cpu:utilization": [ { "componentId": "6fd416e0-8920-410f-9c7b-c479000f7227", "node": 1, "componentType": "system", "metricValue": 85, "metricUnit": "percent", "status": "warn", "time": "2018-01-17T03:36:48Z", "output": "" }, { "componentId": "6fd416e0-8920-410f-9c7b-c479000f7227", "node": 2, "componentType": "system", "metricValue": 85, "metricUnit": "percent", "status": "warn", "time": "2018-01-17T03:36:48Z", "output": "" } ], "memory:utilization": [ { "componentId": "6fd416e0-8920-410f-9c7b-c479000f7227", "node": 1, "componentType": "system", "metricValue": 8.5, "metricUnit": "GiB", "status": "warn", "time": "2018-01-17T03:36:48Z", "output": "" }, { "componentId": "6fd416e0-8920-410f-9c7b-c479000f7227", "node": 2, "componentType": "system", "metricValue": 5500, "metricUnit": "MiB", "status": "pass", "time": "2018-01-17T03:36:48Z", "output": "" } ] }, "links": { "about": "http://api.example.com/about/authz", "http://api.x.io/rel/thresholds": "http://api.x.io/about/authz/thresholds" } }
I am not sure if this is within the scope of this project but there is a proposed standard for health data.
More detailed information can be found at: https://inadarei.github.io/rfc-healthcheck/
Example response format: