-
Notifications
You must be signed in to change notification settings - Fork 7
Health check endpoint #92
Comments
There is a health check endpoint using Prometheus - https://github.com/input-output-hk/smash/blob/master/src/Cardano/Metrics.hs smash/src/Cardano/SmashDbSync.hs Line 407 in bd36af6
So by default, you have port 8080 as the health check port (
|
But does that tell me this is a an actual smash server and it understands my API calls? |
No, the SMASH server tells you it's a SMASH server by understanding your API calls 😄 What is that you want to check here? An example would do wonders here. |
The wallet wants to have a health check when a user sets a SMASH server, knowing that it's a valid SMASH server without doing expensive API calls and validating this prior to any metadata syncing. |
@hasufell Sure, propose the format of such health check. |
paths:
/status:
get:
summary: Get
description: Query status/health of the SMASH server
responses:
200:
description: Ok
content:
application/json:
schema:
type: object
required:
- smash_status
- smash_version
properties:
smash_status:
description: the status of the SMASH server
type: string
enum:
- ok
- booting
example: ok
smash_version:
description: The "git describe" version of the SMASH server
type: string
example: 0.1.0-rc-99-gb7fa2fe
smash_message:
description: A custom message set by the operator
type: string
example: I'm a SMASH server for cardano
|
@hasufell That looks solid, will implement it in this sprint, and get back to you. |
Implemented in #101 |
many thanks |
For https://jira.iohk.io/browse/ADP-496 it would be interesting to have an inexpensive and unambiguous health check endpoint.
I couldn't find any in https://github.com/input-output-hk/smash/blob/master/src/Lib.hs
The text was updated successfully, but these errors were encountered: