A small bash script I created for my own forum that gives a one-shot health overview of Discourse server. Sharing for anyone who finds this type of quick overview useful.
Checks system resources: Docker, Discourse services (Postgres, Redis, Nginx, Unicorn, Sidekiq), backup freshness, TLS, and security basics. Ends with a pass / warning / critical summary and an exit code suitable for cron.
For backups, I’d suggest checking the latest backup to see if it has been read since it was written. That’s a proxy, for checking if it has been copied offsite. (Or, if not checking the latest, perhaps check all.)
If no backup has been copied offsite for a week, that’s worth warning about.
(I think you can subtract stat -c %Y from stat -c %X or perhaps just compare them. They will be different if the backup file has been read since it was written.)