PowerLoom / snapshotter-lite

https://powerloom.dev
Apache License 2.0
10 stars 10 forks source link

Feat/telegram health monitoring #20

Closed Seth-Schmidt closed 6 months ago

Seth-Schmidt commented 7 months ago
#13

Fixes #

Checklist

Current behaviour

Snapshotter-lite does not have a proper health check endpoint in core-api, and it does not currently have any means of externally reporting issues to node operators.

New expected behaviour

The /health endpoint in snapshotter.core-api requests data from the powerloom-reporting-service (if enabled) to determine the health status of the node, and it will return a failed status code if there are any issues with the node. It checks for the last time the node has pinged the reporting service, as well as if there are any issues reported to the service.

Additionally, the node operator now has the option to provide a telegram Chat ID on startup to enable automatic telegram notifications if any issues arise while snapshotting. This feature requires the telegram-reporting-host endpoint to be active and set in the .env.

Change logs

Added

Changed

Deployment Instructions

Deployment pattern has not changed, but there is now a prompt to enter an optional telegram Chat ID on startup. Users can request a Chat ID by starting a conversation with the @PowerloomReportingBot.

kanikamishra commented 6 months ago

I tested this but not getting any error messages on my TelegramSnapshotterReportingBot channel on my Telegram.

Things I tried to get error:

Things which we should mention in Docs: