[Top][All Lists]

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

Re: configuring monit's httpd

From: Christian Hopp
Subject: Re: configuring monit's httpd
Date: Fri, 9 Jan 2004 11:44:24 +0100 (CET)

On Thu, 8 Jan 2004, Allen Shaw wrote:

Hi Allen!

> I have just installed monit, running with a basic config file (shown
> below) -- as far as I can see it is not running well (I get no monit http
> connection on port 2812 where I expected it; I get no alert or restart on
> the service I'm monitoring when it goes down; and, when I run monit with
> 'quit' argument, I see 'monit: no daemon process found').  So, I ran monit
> with the -Iv switch, which pumps out some configuration info and then ends
> with the follwing two encouraging lines:
> Starting monit daemon
> Segmentation fault

Mhh...!  What user is running the monit daemon... root?  You have to
set a smtp server for the alerts "set mailserver".

> (For some reason I can't get the monit -Iv output to write to a file, but I
> think you can guess most of it from the following, which is the text of my
> control file:)

Does /var/log/monit have any useful content?

> ======= Start text of ~/.monitrc ===============
>  set daemon  120           # Poll at 2-minute intervals
>  set logfile /var/log/monit #syslog facility log_daemon # Set syslog logging
>  set alert address@hidden  # Send alert to system admin on any event

This does look okay so far.

>  set httpd port 2812 and   # Make monit start it's web-server
>      use address  # and only accept connection from localhost
>      allow localhost       # allow localhost to connect to the server and
>      allow
>      allow admin:monit     # user 'admin' with password 'monit'

This is inconsistent!  If you only want to use localhost write it like this:

set httpd port 2812 and
    use address localhost
    allow localhost
    allow admin:monit

You configuration does not allow localhost to connect, because you do
not bind to it.  And "" != "".

>   check process apache with pidfile /var/run/
>      start program = "/etc/rc.d/init.d/httpd start"
>      stop program  = "/etc/rc.d/init.d/httpd stop"
>     if failed host port 80 protocol http
>        and request "/index.html" then restart


> Could anyone recommend a further debug procedure to help me figure out
> what's going on?

strace -ft monit -Iv

This command shows all system calls during the run (-f = trace forks,
-t = show time).  Any further debugging would result in heavy gdb

Btw, did you compile monit yourself or is it a ready made package?


Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf.   fax: +49-5323-72-3197

reply via email to

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