Monit: easily use triggers on your system
Software version | 5.4-2 |
---|---|
Operating System | Debian 7 |
Website | Monit Website |
Last Update | 28/05/2014 |
Others |
1 Introduction
monit[1] is a utility for managing and monitoring processes, programs, files, directories and filesystems on a Unix system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. E.g. Monit can start a process if it does not run, restart a process if it does not respond and stop a process if it uses too much resources. You can use Monit to monitor files, directories and filesystems for changes, such as timestamps changes, checksum changes or size changes.
Monit is controlled via an easy to configure control file based on a free-format, token-oriented syntax. Monit logs to syslog or to its own log file and notifies you about error conditions via customizable alert messages. Monit can perform various TCP/IP network checks, protocol checks and can utilize SSL for such checks. Monit provides a http(s) interface and you may use a browser to access the Monit program.
2 Installation
To install Monit, this is simple:
aptitude install monit |
3 Configuration
Regarding the configuration file, you've got a global configuration file where you can adjust some parameters:
But here is a configuration file to restart multiple services in a shell script when an URL is not containing a specific content:
There are several type of usages with Monit and you can see examples here[2].
3.1 Web interface
Regarding the web interface, you can use Nginx and do a proxy pass to access from outside with credentials:
And create the htaccess file with credentials.