Table of contents

Monit is a a free open source 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.

How to enable Monit?

Recent versions of BitNami stacks ship Monit configuration files for all servers. If you are using a Virtual Machine or Cloud Image, Monit is already configured and enabled by default. Note the following is only valid for Linux platforms.

Check the Monit files in the installdir/config/monit folder. If you are using a Virtual Machine or a Cloud Image, installdir is the /opt/bitnami folder.

You can enable Monit in your machine creating a symbolic link. It is necessary to have already installed Monit from the repositories. For example, in Ubuntu:

Monit is also includes a small httpd application where you can manage the servers. It only works from localhost by default but you can add your IP address in the "/installdir/config/monit/bitnami.conf" configuration file:

As you can see in the above example, it is ponly necessary to specify the PID file location and the commands to start/stop the server. You can find more configuration options at the Monit documentation.

Once you created your own config file for your server, add it to the same folder. To reinitialize monit you can run the following command:

$ sudo monit reload

How to disable Monit?

If you want to disable one server, you can run the following comand to disable it. For example, Apache server:

$ sudo monit unmonitor apache

You can also stop the monit process with the following command:

$ sudo monit quit

How to access to the Monit WebGUI?

Amazon cloud / BitNami Hosting

By default Monit WebGUI is not accessible from the outside for security reasons. In order to access it, you can create an SSH tunnel to the default Monit Port (2812) , sending your requests to your Monit WebGUI from 127.0.0.1 (localhost).

3. While the tunnel is active you can connect to the Monit WebGUI at http://127.0.0.1:2812 in your browser.

Virtual Machine

If you are running the Virtual Appliance in a secure environment, you can enable it by editing the "installdir/config/monit/bitnami.conf" file and replace "use address localhost" with "use address SERVER_IP" and "allow localhost" with "allow 0.0.0.0/0":

By default Monit WebGUI is not accessible from the outside for security reasons. In order to access it, you can create an SSH tunnel to the default Monit Port (2812) , sending your requests to your Monit WebGUI from 127.0.0.1 (localhost).

You should follow these steps to create the tunnel:

1. Create the tunnel.

- If you are in Linux or Mac you can run the following in a Terminal in your local machine (using your Public DNS instead of xyz.bitnamiapp.com):