Is there any program that can be installed on CentOS and notify a via email when a webserver/site/webservices drops and does not respond anymore?
I was trying to use Cacti, but as I have been answered here, Cacti is used for graphs
Other than writing your own cron script, I'm not sure about it running on your own CentOS server. I use pingdom myself though. https://www.pingdom.com/
Try this solution that uses the built-in utility cron. As written, this script will detect a failed service and restart it. But it won't detect a running, non-responsive service. For that case, you could add a few lines that use curl to test a website URL for HTTP response code, and then you could restart the service if you get anything that is 4xx or 5xx. https://stackoverflow.com/a/9072923/5759901
I personally use something outside of my network for monitoring (specifically UptimeRobot).
However when searching around, I saw StatPing being mentioned at the time, a quick search revealed StatPing is dead, and StatPing-NG is the new king.
If you are using docker with the
restart: always (or
unless-stopped) option, you will not need to touch your cron config either.
Another alternative that seemed interesting is Uptime Kuma
Hope this sends you in the right direction.
You can use WebChangeMonitor.
It's an open-source cross-platform tool that allows you to monitor 1 or more web sites or services.
It can check for content, header, or ping changes/responses manually or on a schedule you determine.
Currently, it has releases for Linux, Windows, and Raspberry Pi. Furthermore, the source code (written in C++) is designed so it can be adapted to other operating systems.