My preferred options for this are monit for service supervision and netdata for resource tracking.
Monit is a minimalistic service supervision and health-checking tool with a dead-simple configuration format. It can do the usual service supervision stuff (restart a program if it stops running, send e-mail alerts when an error occurs, etc), but it also has a bunch of other useful checks built-in (you can easily use it to verify HTTP return codes for arbitrary paths on your web server) and allows for interdependency of checks (for example, you can have it monitor the state of a network interface, and then only try to check a network filesystem's status over that connection if the interface is up). It's also tiny in terms of resource usage (the instance on my home server, which has about 50 checks it runs every minute uses only about 4MB of memory and a miniscule amount of CPU time when it runs the checks), and it has a nice simple web dashboard you can see status of everything on which is trivial to proxy through nginx.
Netdata is in contrast oriented towards tracking performance metrics, but it also has a health-checking framework that will let you send alerts through a bunch of different messaging services (including email and SMS, as well as a bunch of others) if tracked metrics go outside certain bounds. By default, it tracks a bunch of basic stuff without needing any user intervention, and it has plugins for a bunch of different server applications (including nginx) that are easy to set up. It also ships with a bunch of really useful checks by default (including a rather neat one which figures out based on how fast space usage is increasing if a filesystem is likely to fill up in the next 48 hours). It's also really lightweight (I've got it set to track 12 hours of metrics on the same server mentioned above, and it's only using about half a GB of RAM, and the original install before I bumped things up from the 1 hour default tracking window and enabled other plugins needed only about 15MB), and has a web interface that's also insanely easy to proxy through nginx.
Note that together, the two of these can do the same types of things for a single host that the big-name network monitoring solutions like Nagios, Ganglia, or Munin do for entire networks, with a lot less work involved in the configuration.
crontab
as it gets enormous daily even that it's a minimal environment. I just basically don't use that./etc/aliases
appropriately (e.g. an entryroot: [email protected]
would cause all mail directed to root being sent to johndoe – andnobody: /dev/null
would discard all mail to nobody).