sobota 15. januára 2022

How to install and configure monit on Centos8:

 How to install and configure monit on Centos8:



1) monit is on epel repositories:


yum install monit

systemctl enable monit

systemctl start monit


2) configuration file is: 


 vi /etc/monitrc


--settings name/password


-- Allow IP addresses 


3) adding services:


 vi /etc/monit.d/httpdmonitor



in file: 


check process HTTPD with pidfile /var/run/httpd/httpd.pid

start program "/usr/bin/systemctl start httpd.service"

stop program "/usr/bin/systemctl stop httpd.service"

if failed port 80 protocol http then restart

~

~



4) check syntax 


  monit -t

 


5) restart monit


systemctl restart monit


6) run:


localhost:2812


older article about Centos7 and monit (but in Slovak language): https://zapiskylinuxadmina.blogspot.com/2020/02/ako-som-instaloval-monit-na-centos7-1.html 

Žiadne komentáre:

Zverejnenie komentára