monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

monit: cannot read status from the monit daemon


From: Yang Zhang
Subject: monit: cannot read status from the monit daemon
Date: Thu, 9 Dec 2010 16:04:09 -0800

I get "monit: cannot read status from the monit daemon" whenever the
process being monitored has trouble starting (or at least putting its
PID into pidfile). E.g, take this basic config:

<<<
set daemon 1 # Poll at 1-second intervals
set logfile syslog facility log_daemon
set httpd port 2812 and use address localhost
  allow localhost   # Allow localhost to connect
check process foo
  with pidfile "/tmp/pid/foo"
  start program = "foo"
  stop program = "foo"
>>>

/tmp/mydaemon:

<<<
#!/usr/bin/env bash
#echo $$ > /tmp/pid/foo # uncommenting this makes things work smoothly
exec sleep 100
>>>

Example:

<<<
$ monit -c foo.monit status
The Monit daemon 5.0.3 uptime: 0m

Process 'foo'
  status                            not monitored - stop pending
  monitoring status                 not monitored
  data collected                    Wed Dec  8 11:44:36 2010

System 'zs'
  status                            running
  monitoring status                 monitored
  load average                      [0.58] [0.40] [0.36]
  cpu                               6.9%us 2.7%sy 0.0%wa
  memory usage                      1047732 kB [50.9%]
  data collected                    Wed Dec  8 11:44:36 2010


$ monit -c foo.monit monitor foo

$ monit -c foo.monit status
monit: cannot read status from the monit daemon
>>>

Not an enormous problem when dealing with reliable programs, but still
annoying that monit's own availability/usability hinges on its
subprocesses' reliability.
--
Yang Zhang
http://yz.mit.edu/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]