monit-general
[Top][All Lists]
Advanced

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

Re: Plans for the next release


From: Jan-Henrik Haukeland
Subject: Re: Plans for the next release
Date: 02 Jul 2002 00:47:56 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Rory Toma <address@hidden> writes:

> I use the http interface as a command channel, and will have apps
> write w/o a browser directly (over the VPN) to start/stop stuff. I
> do not want stuff visible from a browser.
> 
> Perhaps the answer to this question (and the multiple interface ?)
> is to add a non-webserver interface that just implements remote
> commands?

And there I thought I was pretty clever to use HTTP for this :) That
way you can have apps talking directly to the monit server and even
use a browser.

For example here is an app for starting apache:

  perl -MIO::Socket -e '
   $s= IO::Socket::INET->new(PeerAddr => localhost, PeerPort => 2812) 
   or die "monit http is down\n";
   print($s "GET /apache?action=start HTTP/1.0\r\n\r\n"); 
   printf("%s\n", <$s>=~/200/?"Apache started":"Error staring apache");'


Actually using HTTP for remote control _is_ clever if I have to say it
myself :)

--
Jan-Henrik Haukeland



reply via email to

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