To keep thing short, I straight into Monit installation assuming you have installed CentOS7.
Configure EPEL repo to download the latest version of Monit
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Install the Monit using the YUM command.
yum -y install monit
Start monit by using the following command.
monit
Check the monit status.
monit status
/etc/monitrc is the main configuration file of Monit.
vi /etc/monitrc
By default, monit is set to check the services at an interval of 1 min. This setting can be altered by changing the below line.
set daemon 60
Alerts can be configured by.
set mailserver mx.yourdomain.com port 25
Alert templates can be found in the configuration file itself. Logs setting can be changed by using the following file.
set logfile syslog
Restart monit
systemctl restart monit
Auto-start Monit on start-up.
systemctl enable monit
