Setup Monit for SafeSquid Monitoring

From Secure Web Gateway
Share/Save/Bookmark
Jump to: navigation, search

Installation and configuration of Monit Service

When you used SafeSquid Appliance Builder (SAB) to setup your secure web gateway Monit will automatically installed.

Check status of monit service using command:  /etc/init.d/monit status

If monit is not installed automatically while installing SAB or you installed safesquid manually ,in this case you need to configured monit manually.

Follow below steps:

Run below command to install the monit service

apt-get install monit

Edit the monit configuration located in /etc/monit folder

Open the file by using below command, And set the below parameters as shown

  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

 

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

Then restart the monit service by using below command

/etc/init.d/monit restart

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

monit status

You will see all services monitored by the monit             

Testing

Stop the SafeSquid service by using below command

/etc/init.d/safesquid stop

Then check for pidof safesquid service, the monit will automatically start the SafeSquid without user interaction

Add Monit service to startup

Run below command to add monit to start for every reboot

update-rc.d monit enable