# Monitoring SearchBlox with Monit

Monit can be configured for monitoring SearchBlox servers on Ubuntu, Debian, CentOS, and RedHat.

_Install [Monit](🔗) now._

## **What can Monit do?**

Monit can be configured to

  • check every 2 Minutes.

  • log into Syslog.

  • send emails through locally-installed mail servers.

  • send alerts to specific email addresses.

  • check load (alert if the 5 min average is above the number of CPUs).

  • alert if memory usage is more than 85%.

  • check SearchBlox process and restart if not running.

  • alert if SearchBlox uses more than 75% CPU.

  • alert if SearchBlox's memory usage exceeds 75%.

  • restart SearchBlox if there is no "Basic Search" string as result to query http://localhost/searchblox/search.jsp.

  • alert if the disk where SearchBlox is installed (/opt/searchblox) is less than 25% free.

  • add additional config values you can easily uncomment and enable/adjust.

## **Prerequisites**

SearchBlox must be installed into /opt/searchblox.

## **Install the SearchBlox Monit script**

  1. Download the script ([searchblox_monit.sh](🔗)) and move/copy it to your SearchBlox server.

  2. Login to linux shell and change to root user: `sudo su -`

  3. Change to the directory where you placed the script.

  4. Change permissions for the script `chmod 0755 searchblox_monit.sh`

  5. Run the following command `yum install bc`

  6. Run the script with your the specific email information. `./searchblox_monit.sh -e [email protected] -v`

  7. This script will install Monit, configure settings and start monitoring your SearchBlox installation.