craigerl / aprsd

Amateur radio APRS daemon which listens for messages and responds. By KM6LYW.
Apache License 2.0
124 stars 19 forks source link

Added healthcheck app #46

Closed hemna closed 3 years ago

hemna commented 3 years ago

This patch adds the healthcheck app that uses the flask stats url to fetch the internal stats of a running aprsd server. If the server is up the stats will return and be checked for 'healthy' status. IF the url fails to return, healthcheck will exit with -1. You can use this script to restart aprsd if healthcheck exits with -1 status.

There is a check against the email thread. The email thread updates a deadman's timer every 5 seconds. If that time gets older than 5 minutes, then healthcheck will say that's a failure and exit with -1.

You can call healthcheck and restart aprsd if it fails (exit -1)