[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: monit in cygwin
From: |
Mike |
Subject: |
Re: monit in cygwin |
Date: |
Wed, 28 Jun 2006 15:33:55 -0500 |
User-agent: |
Mutt/1.4.2.1i |
On Wed, 28 Jun 2006, Jan-Henrik Haukeland might have said:
>
> On 28. jun. 2006, at 20.42, Mike wrote:
>
> >I have monit running in cygwin except for ICMP in net.c.
> >There are minor changes and with more effor the ICMP could
> >work within windows. I have not yet tried a static comile
> >using the flag in cygwin (--mingw?) that allows a program
> >to execute outside of cygwin.
>
> Does this mean that you actually have monit working on a win32
> platform with cygwin!? Can monit start, stop and restart programs?
> Can you signal monit, i.e. do a monit quit and monit restart and
> finally, does monit's http server run?
>
> It's been a long time since I used a win platform, but I seem to
> recall that win32 uses services and runs them in separate threads,
> which is different from monits concepts of process ids and pid files.
> I.e. I cannot see how monit can be used standalone on a win32
> platform outside of a cygwin environment? More the kudos to you if
> you can prove me wrong :)
>
> >Where do I send the changes?
>
> You should join the monit developer list and send your changes there
> as a patch if you get it to work. Please discuss implementation
> details and choices you made if you submit a patch.
My limited, uninformed testing shows that monit will run, monit
will start and stop programs, monit accepts './monit -c monit.test quit'
type commands including stopping and starting services. I know there
is a way to link statically a program so that it does not require
cygwin and should be executable outside of cygwin and bash.
The web server (httpd) portion of monit works also.
I need the win32 capability for my next job. I don't need ICMP in the
win32 platform for the next job, so I will not miss it there. I do
need the 'check status'. I've started working on that code already.
I also have an idea for deployment and synchronization that I'll do
after 'check status'.
I've copied the developer list on this message. For the developer list,
what is the prefered method of creating a patch for someone else to test?
Mike
-------------------------- monit.test config file
# globals
set httpd port 2812
allow localhost
set daemon 10
set alert address@hidden
set mailserver txexc103, txexc104
# checks
check file test_file with path /tmp/test
group system
if failed checksum then alert
if failed permission 644 then alert
#if failed uid mikee then alert
#if failed gid mikee then alert
check process apache with pidfile /tmp/apache.pid
group www
start program = "/tmp/apache start"
stop program = "/tmp/apache stop"
if failed host txedi001 port 80
protocol HTTP request /pod/frames.html then restart
if 5 restarts within 5 cycles then timeout
check process xterm with pidfile /tmp/xterm.pid
group wm
start program = "/tmp/xterm.sh"
stop program = "/bin/sh -c '/usr/bin/kill -9 `cat /tmp/xterm.pid`'"
--------------------------