How to Install & Setup Monit (Linux Process and Services Monitoring) Redhat Linux, CentOS, Fedora & Ubuntu, Linux Mint & Debian - Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee

Thursday, July 14, 2016

How to Install & Setup Monit (Linux Process and Services Monitoring) Redhat Linux, CentOS, Fedora & Ubuntu, Linux Mint & Debian




How to Install and Setup Monit (Linux Process and Services Monitoring)
 
              Redhat Linux, CentOS, Fedora & Ubuntu, Linux Mint & Debian.


Installing Monit
Step1 :- yum install monit           --> [RedHat/CentOS/Fedora]
Step2 :- sudo  apt-get install monit --> [Ubuntu/Debian/Linux Mint]

Configuring Monit 
Step3 :-      vi /etc/monit.conf      --> [RedHat/CentOS/Fedora]
Step3 :- sudo vi /etc/monit/monitrc   --> [Ubuntu/Debian/Linux Mint]

Next, uncomment
add the IP address or domain name of your server
     set httpd port 2812 and

Start the Monit
Step4 :- sudo /etc/init.d/monit start


http://localhost:2812” or “http://example.com:2812“ or ip address also can use

Adding Monitoring Services
Step5 :-   vi /etc/monit.conf         --> [RedHat/CentOS/Fedora]
Step5 :- sudo vi /etc/monit/monitrc   --> [Ubuntu/Debian/Linux Mint]

Apache
Apache2
Nginx
MySQL
SSHD


Errors :- When you get message like “Control file syntax OK“,
Step6 :- monit -t        --> [RedHat/CentOS/Fedora]
        monit reload
       monit start all
Step6 :- sudo monit -t   --> [Ubuntu/Debian/Linux Mint]


start the monit service.
Step7 :- /etc/init.d/monit restart      --> [RedHat/CentOS/Fedora]
Step7 :- sudo /etc/init.d/monit restart --> [Ubuntu/Debian/Linux Mint]

checking log file
Step8 :- tail -f /var/log/monit          --> [RedHat/CentOS/Fedora]
Step8 :- sudo tail -f /var/log/monit.log --> [Ubuntu/Debian/Linux Mint]



--------------------------------------------------------