I have simple uptime monitors pinging my servers for response, but it's not really ideal since it doesn't test the database. I also didn't want to test a normal website/wordpress/etc because those can give a false-positive result so easily. So I made this script that will act as a simple standalone monitor for the webserver and database. In my monitor program I'll have it setup to check for http status response code (200 = good), if the script can't connect to the database or the webserver fails then it will throw a different http response, which will trigger my uptime monitor to contact me.
Here's the php file with code you can grab:
https://github.com/doodelybeep/service-monitor/blob/main/index.php
In Enhance I made a customer account to house all my monitors, added a package/website for each server (just made sure to move each one to the specific server it needs to be on for monitoring), then add the website as a subdomain server-monit-1.website.com, point my dns at that subdomain, add the index.php to the public_html, create a database+user and add the db name + db user name + db user password to the index.php file, and voila! If for some reason the DB is unresponsive then that url will throw http 500 error page, same for webserver too.
The uptime monitor I'm using can actually use a bunch of items from this "service monitor page" like it can check for specific words that should be on the page, or can check http response headers. I prefer the http status.