To monitor the services the beacon-chain already supplies a number of json-rpc but slasher doesn't have any kind of health check endpoints yet.
Similar to beacon-chain implementing a simple json-rpc should do the trick, stating the slasher's connectivity to a beacon chain and availability for validators' submits. This can be as simple as https://api.prylabs.net/#/Node/GetSyncStatus
The working alternative right now is to just check if the service ports of slasher are open for requests. But this has some obvious downsides:
All binaries support a /healthz endpoint served on the monitoring port. The "healthz" endpoint returns a 200 when the node is healthy and a 500 when not healthy. It also prints out the statuses of current services. If this endpoint returns 200, then it is OK to serve requests.
Closing this issue. Please reopen if you think this issue have to be addressed further
I think what @stefa2k is getting at is that currently the health check in the slasher doesn't tell us when its ready to serve data to external clients. I had a look at all the Status methods and they weren't checking for when the slasher is ready, just basic grpc errors. Reopening this until that is addressed.
@shayzluf Any update on this issue?
Will add those capabilities to healthz endpoint tomorrow @prestonvanloon
Most helpful comment
I think what @stefa2k is getting at is that currently the health check in the slasher doesn't tell us when its ready to serve data to external clients. I had a look at all the
Statusmethods and they weren't checking for when the slasher is ready, just basic grpc errors. Reopening this until that is addressed.