You need to implement a deadman switch. For example if using Prometheus you can configure it to access an HTTP endpoint of a deadman switch service every X seconds. When that service detects you have not accessed it in some time it will alert you. For example: https://blog.ediri.io/how-to-set-up-a-dead-mans-switch-in-pr...
And now you need to monitor the deadman switch service!
Ask HN: How to do simple heartbeat monitoring?
51–60 of 86 posts
Re: Ask HN: How to do simple heartbeat monitoring?
#52So I set the script to also write out a metric that was just the time stamp the metrics were last updated. Then it was simple to set up an alert in Prometheus - I can't access the config now so you'll have to look it up yourself, but it was basically "alert if metric less than now minus a time gap"
Re: Ask HN: How to do simple heartbeat monitoring?
#53Re: Ask HN: How to do simple heartbeat monitoring?
#54Re: Ask HN: How to do simple heartbeat monitoring?
#55You're looking for a dead man's switch. https://deadmanssnitch.com is a good hosted service or Uptime Kuma ( https://github.com/louislam/uptime-kuma ) can be configured to do the same thing.
Re: Ask HN: How to do simple heartbeat monitoring?
#56I clicked to say something about Instrumentation Amplifiers or interfacing with chest straps ;) You might want to use a different service for monitoring your stack just to make sure you have some redundancy there. Seems like you got an answer for how to do this with Signoz but if that is down then you won't know.
Re: Ask HN: How to do simple heartbeat monitoring?
#57I clicked to say something about Instrumentation Amplifiers or interfacing with chest straps ;) You might want to use a different service for monitoring your stack just to make sure you have some redundancy there. Seems like you got an answer for how to do this with Signoz but if that is down then you won't know.
Re: Ask HN: How to do simple heartbeat monitoring?
#58If this is a cloud deployment, there might be a recommended method native to your cloud if you search for synthetic monitoring or canary . For example, AWS recommends using CloudWatch Synthetics to create a canary: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitori...
Synthetics are there to tell you when something outside of your provider is breaking your website, like routing errors, geo-related issues, CDN issues (assuming you're not using your provider's CDN).