Monitor and Manage your services with Monit on CentOS 6 / RHEL 6

Install Monit

For Debian/Ubuntu

Monit is easiest to install through apt-get:

sudo apt-get install monit

For RHEL:

Configure EPEL repo to download the latest Monit package.

[root@server ~]# rpm -Uvh http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm
[root@server ~]# yum -y install monit

Once monit downloads, you can add programs and processes to the configuration file:

sudo nano /etc/monit/monitrc

Monit can be started up with a command that then keeps it running in the background

monit

Typing monit status displays monit’s details:

The Monit daemon 5.3.2 uptime: 1h 25m
System 'myhost.mydomain.tld'
status Running
monitoring status Monitored
load average [0.03] [0.14] [0.20]
cpu 3.5%us 5.9%sy 0.0%wa
memory usage 26100 kB [10.4%]
swap usage 0 kB [0.0%]
data collected Thu, 30 Aug 2012 18:35:0

Configure Monit

Monit is very easy to use nearly out of the box. By default, it is set up to check that services are running every 2 minutes and stores its log file in “/var/log/monit.log”. Continue reading “Monitor and Manage your services with Monit on CentOS 6 / RHEL 6” »

Share