Setup Monit for SafeSquid Monitoring

From Secure Web Gateway

Installation and configuration of Monit Service

Monit will automatically get installed when you install SafeSquid Appliance Builder (SAB) to setup your secure web gateway.

You can check status of monit service using command:  /etc/init.d/monit status

If monit is not installed automatically while installing SAB or while installing SafeSquid manually, you have to install and configure it manually.

Follow below steps to install Monit:

Run below command to install the monit service

apt-get install monit

Open /etc/monit folder and edit monitrc configuration file.

Set the parameters as shown below-

  1. To check the services in 3 second interval
    set daemon 3
  1. enable the built in web server for browsing the services you're monitoring:
    set httpd port 2812 and
    use address localhost
    allow localhost

    allow admin:monit
    allow @monit
  1. To include the configuration or its parts from other files or directories.
    include /etc/monit/conf.d/*

You need to restart the monit service by using below command

/etc/init.d/monit restart

You can check whether SafeSquid is monitored by monit or not by using below command

monit status

You will see all services monitored by the monit


To test the working of Monit service, stop the SafeSquid service by using command    /etc/init.d/safesquid stop

Now check the process Id of SafeSquid service with the command    pidof safesquid
You will observe that SafeSquid service had automatically been started by Monit without any user interaction.

Add Monit service to startup

You can also execute below command to add monit service to be started for every reboot of machine.

update-rc.d monit enable