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!
This question was answered by @kamthang:
a bit late but … make sure on the security group on your ec2 instance make sure tcp port 2812 is open for all or only for the remote ip address from where u r trying http://xxx.xxx.xxx.xxx:2812/ and have monit listen to 2812 for all ip and if xxx.xxx.xxx.xxx is on a network where there is firewall make sure tcp port 2812 for outgoing traffice is allow/pass
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.