monit on ubuntu error connecting to the monit daemon

原创文章,转载请注明来源并保留原文链接

Install

sudo apt-get install monit

Start

sudo service monit start

When i tried monit status, i got the error message:

monit: error connecting to the monit daemon

Solution

vi /etc/monit/monitrc

uncomment the follow lines

set httpd port 2812 and
use address localhost
allow localhost

Save and restart

service monit restart

Check port netstat -lpn | grep 2812

tcp        0      0 127.0.0.1:2812          0.0.0.0:*               LISTEN      16331/monit

Run monit status

The Monit daemon 5.3.2 uptime: 0m

System 'system_AY1404211138578652eaZ'
  status                            Running
  monitoring status                 Monitored
  load average                      [0.00] [0.01] [0.05]
  cpu                               0.0%us 0.0%sy 0.0%wa
  memory usage                      1779196 kB [86.7%]
  swap usage                        0 kB [0.0%]
  data collected                    Mon, 08 Dec 2014 11:35:57

Leave a Reply

Your email address will not be published. Required fields are marked *