Commit Graph

15 Commits (main)

Author SHA1 Message Date
saunders 8a7da6a9a3 Include extra status code
The code 000 can be returned by curl e.g. if the provided uri is bad.
2026-07-15 06:06:40 +01:00
mj-saunders 11cf8c58b0 Add GPLv2 license 2022-11-04 01:13:37 +04:00
mj-saunders 2c094fe894 Include basic usage info in README 2022-11-04 01:10:26 +04:00
mj-saunders 1cc04a6aab Add README 2022-11-04 01:07:06 +04:00
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
mj-saunders 6218e8534d Initial commit
We had a cheap and nasty script that could only dump a message onto a
pts terminal.

We have now partially set up to more sensibly send email instead.
2022-11-03 12:39:42 +04:00