Commit Graph

10 Commits (main)

Author SHA1 Message Date
mj-saunders 2c20d5bc61 Separate out config
Make the script more shareable.
2022-11-03 17:27:11 +04:00
mj-saunders f20a4344d5 Do not hard code the log file
We log to file only if WATCHDOG_LOG is set, otherwise we output to
stdout as usual.
2022-11-03 17:09:54 +04:00
mj-saunders 2ae1e0eb5b Add description text 2022-11-03 16:42:19 +04:00
mj-saunders 0bffafcc82 Improve readability 2022-11-03 16:18:06 +04:00
mj-saunders 01295e851f Keep logging somewhat sane
We don't want an infinitely growing logfile.
Instead we set a reasonable cap, currently 4MiB, and retain one backup.
2022-11-03 16:08:10 +04:00
mj-saunders 12f12efb9b Log output to file
Path is hard coded. Should improve this.
2022-11-03 15:07:51 +04:00
mj-saunders 74a2fc4513 Only email if error detected
We also took the opportunity to clean up the output a little.
2022-11-03 14:44:17 +04:00
mj-saunders b173ced7ec Send a single email only
Gather any detected errors into a list and send them all at once.
2022-11-03 14:24:55 +04:00
mj-saunders 7eff14d01f Handle multiple servers
The current approach is only useful for services delivered over http.
We are sending an individual email per fault detected - we can improve
this.
2022-11-03 13:48:53 +04:00
mj-saunders 63cb4e7256 Use a better name 2022-11-03 12:41:39 +04:00