[[ch-monitoring-reference]]
== Service Monitoring

The Symbiosis system is comprised of several distinct components, which
we've documented throughout the course of this reference:

  * The @MySQL@ database server.
  * @Exim@ & @Dovecot@ servers for handling email.
  * @Apache@ for serving websites.
  * The FTP server, @proftpd@
  * The inotify cron daemon, @incron@.
  * @Prosody@ an XMPP server

Each of these services runs in an independent fashion, and it is
possible under certain circumstances that these services might fail, or
stop themselves.

To handle the case of services failing to execute normally we've
included an automated service checker as part of the Symbiosis system.
The service checker will check upon the health of your system, by
default once every two minutes, and it will automatically restart any
services which have failed.

The `symbiosis-monit` command is responsible for testing each of
the available services, and restarting the failed ones.  By default it
is executed every two minutes, such that it may respond quickly to
failures.  It will also stop services that are not required.  For example if
the machine is not configured to scan any domains' mail, then
@SpamAssassin@ will be stopped.

At any time you wish to check upon the health of your system you may
launch it manually, when connected to your server via SSH.

------------------------------------------------------
admin@example:~$ sudo symbiosis-monit
= Symbiosis service test report ========================================

 Tests conducted on symbiosis-test.default.uk0.bigv.io.
 Tests started at 2015-10-15T12:50:35+01:00.

 * apache2: PASSED
 * cron: PASSED
 * dovecot: PASSED
 * exim4: PASSED
 * incrond: PASSED
 * mysqld: PASSED
 * prosody: PASSED
 * pure-ftpd: PASSED
 * spamassassin: PASSED
 * sshd: PASSED

 Tests finished at 2015-10-15T12:50:36+01:00.

= End of service test report ===========================================
------------------------------------------------------

In this case all services are working correctly, so "PASSED" was reported
instead of the failing "FAILED".  The possible output status are:

FAILED:: The service failed.
PASSED:: The service appears to be running correctly.



