You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal of this task is to create a way for the satellite to internally monitor its own health, and then serve information about the health of these services over an endpoint that can be monitored for orbiter checks. This way, if one of these internal services breaks, orbiter can use this endpoint to determine whether the on-call engineer should be paged.
Create a generic "health check" package (e.g. in storj/private/healthcheck) for the interface and server definition
Define a basic HealthCheck interface - this should define a basic function that returns true/false based on whether a single service is healthy, as well as a function for getting a unique "check name" to be used in endpoint definitions and JSON responses
Define a basic HealthCheckServer along with a constructor
individual health checks can be added to the service
e.g. during instantiation like NewHealthCheckServer(ctx context.Context, checks ...HealthCheck)
or e.g. after instantiation like healthCheckServer.AddCheck(check HealthCheck)
the server, when run, serves GET endpoints to check overall health:
e.g. GET /health -> returns JSON with {checkName1: true, checkName2: false, ...}; status 200 if all healthy, 5xx otherwise
individaul endpoints e.g. GET /health/checkName -> returns true or false; status 200 if true and 5xx if false
Implement health check interface in Stripe service package - the Healthy() check should call a Stripe endpoint and return true/false depending on whether it gets an error response
Add health check server to satellite API peer, and add Stripe health check to this health check server - health check server should run on its own port, separate from the console API/metainfo servers
The text was updated successfully, but these errors were encountered:
This change adds a health check package and server to be used to check
the status of services.
Issue: #6938
Change-Id: I361c70af39dfdc85f3f269897ea7a1711f5b26fe
This change implements health check in the stripe service and adds it
to the health check server.
Issue: #6938
Change-Id: Ic7490b5c80bbdf4cd53401f9d1c68f129132671e
The goal of this task is to create a way for the satellite to internally monitor its own health, and then serve information about the health of these services over an endpoint that can be monitored for orbiter checks. This way, if one of these internal services breaks, orbiter can use this endpoint to determine whether the on-call engineer should be paged.
Example of a possible
HealthCheck
interface:AC:
HealthCheck
interface - this should define a basic function that returns true/false based on whether a single service is healthy, as well as a function for getting a unique "check name" to be used in endpoint definitions and JSON responsesHealthCheckServer
along with a constructorNewHealthCheckServer(ctx context.Context, checks ...HealthCheck)
healthCheckServer.AddCheck(check HealthCheck)
GET /health
-> returns JSON with{checkName1: true, checkName2: false, ...}
; status 200 if all healthy, 5xx otherwiseGET /health/checkName
-> returnstrue
orfalse
; status 200 if true and 5xx if falseHealthy()
check should call a Stripe endpoint and return true/false depending on whether it gets an error responseThe text was updated successfully, but these errors were encountered: