monit-miscellaneous icon indicating copy to clipboard operation
monit-miscellaneous copied to clipboard

Monit configuration files for miscellaneous services

  • Monit configuration files

** Introduction

This is a bunch of monit configuration files for monitoring a variety of things.

** Monitored services

  1. Courier

  2. Exim

  3. Memcached

  4. MySQL: the default setup uses UNIX sockets. It has also the support for TCP sockets commented out.

  5. Nginx

  6. php-cgi (FastCGI)

  7. php-fpm (FastCGI Process Manager) with UNIX domain sockets

  8. php-fpm (FastCGI Process Manager) with TCP sockets

  9. Postfix

  10. SSH

  11. thttpd

** Web interface

The web interface is setup in the =000-global= file. The current setup is the one I use my dev machine setup. This is a standalone firewalled machine.

If on the Internet then you should use a [[http://mmonit.com/wiki/Monit/EnableSSLInMonit][SSL setup]] for the web interface.

** Installation

Copy the file(s) you're interested to =/etc/monit/conf.d=. Start or restart monit. Note that I'm assuming a Debian like directory hierarchy. =/etc -> /etc/monit/ -> /etc/monit/conf.d=

The base configuration file =/etc/monit/monitrc= has as last statement the inclusion of all files in the =conf.d= subdirectory of =/etc/monit=.

There's no tampering with the package installed =monitrc=. Instead all global settings are defined in a =000-global= file that due to its name is the first to be included in =monitrc= therefore making all statements there affect all other configuration files.

** Alerts

All alerts are sent to =root@localhost= you should either/or define an alias/forward for root or alter the address in =000-global=.

The mailserver is also localhost in port 25. Change it if necessary for your mail setup.