GoDaddy 도움말

How to Install the Monit Monitoring Tool on CentOS

monit is a utility for managing and monitoring a host of functions of Unix systems, including monitoring processes, programs, files, directories, filesystems and more. I found setting up monit to be pretty straightforward, and it gave me the ability to see what was happening in various corners of my server. Most notably, after setting up monit, I was able to access all of this information via a simple web interface, enabling me to keep an eye on my environment from anywhere (including from my smartphone, using my phone's browser).

DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
RELATED PRODUCTS CentOS-based VPS or dedicated servers


Here is a quick tutorial on how to install Monit on CentOS 6.5.

Install Monit

rpm -ivh epel-release-6-8.noarch.rpm
yum install monit

Enable Monit's Web interface

cd /etc
nano monit.conf

Scroll down and uncomment and update these lines

set httpd port 2812
use address # only accept connection from localhost, replace x's with your ip address
allow # allow localhost to connect to the server and
allow admin:monit # require user admin with password monit
allow @monit # allow users of group 'monit' to connect
allow @users readonly # allow users of group 'users' to connect readonly

Save the configuration file and exit.

Now, start Monit by entering:

service monit start

The system should return

Starting monit: monit: generated unique Monit id...

Verify and test your configuration

Bring up a web browser and go to http://your server's URL or IP address:2812

You can log in to the monitoring screen with the username and password you set in the configuration file above.

Monitoring particular processes

You can also monitor particular processes using Monit such as Apache and MySQL. Here is how you can enable monitoring of Apache.

cd /etc
nano monit.conf

Scroll down and uncomment and update these lines in the configuration file

check process apache with pidfile /usr/local/apache/logs/
start program = "/etc/init.d/apache2 start" with timeout 60 seconds
stop program = "/etc/init.d/apache2 stop"

Restart Monit

service monit restart

You can now check the status of the service using http://your server's URL or IP address:2812

Note: As a courtesy, we provide information about how to use certain third-party products, but we do not endorse or directly support third-party products and we are not responsible for the functions or reliability of such products. Third-party marks and logos are registered trademarks of their respective owners. All rights reserved.

이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.