monit-general
[Top][All Lists]
Advanced

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

Re: Httpd to triger heartbeat


From: Martin Pala
Subject: Re: Httpd to triger heartbeat
Date: Wed, 10 Nov 2004 15:42:40 +0100

I have not checked dag rpms (its independent of monit project based on
custom spec file), but it is possible that the configuration file is
installed somewhere else by it (you can check it with 'rpm -ql monit').

It is possible to specify the path to monit control file using -c option =>
in the case that configuration is not in one of locations where monit looks
by default for it (which is ~/monitrc, ./monitrc and /etc/monitrc) or rc
script doesn't point to custom file (such as for example 'monit -c
/etc/monit/monit.conf') you will need to modify rc script properly or use
default location.

Most probably you will need to customize the configuration file for your
needs - i'm not sure whether dag rpm comes with preconfigured monit (monit
by default has no service predefined).

Your configuration doesn't contain definition for daemon mode => monit will
run the check once and exit. Here is example of simple configuration file
which sets monit to daemon mode, check just httpd process existence and root
filesystem usage:

--8<--
set daemon  5
set logfile syslog
set httpd port 2812 address 127.0.0.1 allow monit:monit
set mailserver my.mail.server
set alert address@hidden

check process httpd with pidfile /var/run/httpd.pid
  start program = "/etc/init.d/httpd start"
  stop program  = "/etc/init.d/httpd stop"

check device rootfs with path /
  if space usage > 99% then alert
  if inode usage > 99% then alert
--8<--


----- Original Message ----- 
From: "Stratos Misinezis" <address@hidden>
To: "Martin Pala" <address@hidden>
Sent: Wednesday, November 10, 2004 3:05 PM
Subject: Re: Httpd to triger heartbeat


> Yes in fact I had some problems with the installation. I did install
> monit using the command    "  rpm -ivh monit-4.3-1.rh90.dag.i386.rpm "
> , it installed with no complaints but when I tried to run monit there
> was a file monitrc missing so monit was not starting. I figure out
> through help pages tha monitrc was a file that monit needs to read the
> parameters for the service to start monitor etc....So from the
> configuration examples grub the apache configuration and paste it in a
> file in /etc/monitrc....
> But in Redhat 9 I think that it does not work....due to the fact that
> there is nothing happened when I personally run the command apache
> start or stop.....
>
> below is my monitrc file .....changed a lot but the original would not
> start monit at all...at least now when I do the command monit I got
> feedback that apache could not start...
> Anyway which is the commnad to start apache?
> I use service httpd start ....for apache to start....
>
>
>  check process apache with pidfile /opt/apache_misc/logs/httpd.pid
>    group www
>    start program = "httpd start"
>    stop  program = "httpd stop"
>    if failed host localhost port 80
>         protocol HTTP request /monit/token then restart
>    if failed host localhost port 443 type TCPSSL
>         certmd5 12-34-56-78-90-AB-CD-EF-12-34-56-78-90-AB-CD-EF
> protocol HTTP request /monit/token  then restart
>    if 5 restarts within 5 cycles then timeout
>    alert address@hidden
> #   alert address@hidden on { timeout }
>    depends on apache_bin
>    depends on apache_rc
>
>  check file apache_bin with path /opt/apache/bin/httpd
> #   group www
> #   if failed checksum then unmonitor
> #   if failed permission 755 then unmonitor
> #   if failed uid root then unmonitor
> #   if failed gid root then unmonitor
> #   alert address@hidden
>
>  check file apache_rc with path /etc/init.d/apache
> #   group www
> #   if failed checksum then unmonitor
> #   if failed permission 755 then unmonitor
> #   if failed uid root then unmonitor
> #   if failed gid root then unmonitor
>   alert address@hidden
>
>
>
> On Wed, 10 Nov 2004 14:44:48 +0100, Martin Pala <address@hidden>
wrote:
> > Hi,
> >
> > ... i have used monit on redhat 9 in the past and it was running without
> > problems - do you have some problems with the installation?
> >
> > ... you don't need to stop heartbeat (in fact you should not do it). You
can
> > use monit exec action and call start/stop methods for httpd via monit
http
> > interface on local and remote server as needed.
> >
> > Martin
> >
> >
> >
> > ----- Original Message -----
> > From: "Stratos Misinezis" <address@hidden>
> > To: <address@hidden>
> > Sent: Wednesday, November 10, 2004 9:13 AM
> > Subject: Httpd to triger heartbeat
> >
> > > Hi List.
> > > I was wondering 2 things about monit.
> > > Does monit installs well on Redhat 9?
> > > Does monit if monitors httpd service and the httpd service fails,
> > > could do as an action to stop heartbeat service in order the other
> > > node to see that heartbeat service failed in the primary node and to
> > > take the resource to itself to provide the httpd service?
> > >
> > > Thanks
> > >
> > >
> > > --
> > > To unsubscribe:
> > > http://lists.nongnu.org/mailman/listinfo/monit-general
> > >
> >
> >
>





reply via email to

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