Hi There
I tried to use monit in my aws server.
I have followed below step, but I can not view http://xxx.xxx.xxx.xxx:2812/
ERR_CONNECTION_REFUSED
Did I miss something?
sudo yum install monit
$ sudo cp /etc/monit.conf /etc/monit.conf.default
$ sudo vim /etc/monit.conf
# 監視間隔
set daemon 60
# primary, secondly
set mailserver example.com, second.exsample.com
set mail-format {
From: monit@exsample.com
# あとはデフォルトでもいい気がする
}
set alert hoge@exsample.com
include /etc/monit.d/*
$ sudo vim /etc/minit.d/sshd.monit
check process sshd with pidfile /var/run/sshd.pid
every 2 cycle
group system
start programe = "/etc/init.d/sshd start"
stop programe = "/etc/init.d/sshd stop"
if 5 restarts within 5 cycles then unmonitor
$ sudo vim /etc/monit.d/nginx.monit
check process nginx with pidfile /var/run/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
This question was answered by @kamthang:
View the original comment