Ask HN: How to do simple heartbeat monitoring?
11–20 of 86 posts
Re: Ask HN: How to do simple heartbeat monitoring?
#12Write a cron job that greps the logs and pulls on your api with curl?
With another 20 minutes of work you can remember the log size on each run and grep only what's new on the next run.
Re: Ask HN: How to do simple heartbeat monitoring?
#13There isn’t a good way to solve this using a PUSH model that isn’t somewhat of a hack or using another external tool
Re: Ask HN: How to do simple heartbeat monitoring?
#14Not sure about Signoz and PagerDuty, but there are plenty freemium services like UpTimeRobot that work fine for basics.
And then something like AWS CloudWatch has a lot more advanced options about how to treat missing data.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitori...
With a lot of knobs to tune around what intervals you need and what counts as 'down', which you'll want to think about pretty carefully given what you need.
Re: Ask HN: How to do simple heartbeat monitoring?
#15You cannot only do classic heartbeat checks but also high level API (single request and multi request) and Browser checks to make sure your service is behaving as expected.
Re: Ask HN: How to do simple heartbeat monitoring?
#16Re: Ask HN: How to do simple heartbeat monitoring?
#17The heartbeat process itself basically just sent pings every second on a UDP port and waited for a reply. If we didn’t get a reply in one second, it’d assume the connection was bad until a ping came again.
Re: Ask HN: How to do simple heartbeat monitoring?
#18For example: https://blog.ediri.io/how-to-set-up-a-dead-mans-switch-in-pr...
Re: Ask HN: How to do simple heartbeat monitoring?
#19You 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?
#20You 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...