26 |
monitrc. Please read it and use it as a starting point when you |
monitrc. Please read it and use it as a starting point when you |
27 |
write your own monit control file. |
write your own monit control file. |
28 |
|
|
|
- monit contains a small http server (see the man page for how to set |
|
|
this up). This server is useful for checking status and managing |
|
|
services watched by monit and also to check monit itself. |
|
|
|
|
|
Besides providing status for the monit daemon, you can use the http |
|
|
server to test if monit is running. Here's a Perl "one-liner" you |
|
|
can use to test monit (for example from cron). You should change the |
|
|
host and portnumber to match your setup, and you will probably want |
|
|
another type of reporting. |
|
|
|
|
|
perl -MIO::Socket -e ' |
|
|
$s= IO::Socket::INET->new(PeerAddr => localhost, PeerPort => 2812) |
|
|
or die "monit is down\n"; |
|
|
printf("monit is up\n");' |
|
|
|
|
|
- monit use threads to provide HTTP support and for interprocess |
|
|
communication. You will need a system that support POSIX threads |
|
|
(pthread) to compile monit. Normally, this should not be a problem |
|
|
since most Unix systems comes with pthreads installed. |
|
|
|
|
29 |
- monit will probably work on most Unix systems. However, monit is |
- monit will probably work on most Unix systems. However, monit is |
30 |
tested and known to compile and operate on; Linux, FreeBSD, OpenBSD |
tested and known to compile and operate on; Linux, FreeBSD, OpenBSD |
31 |
and Solaris. See also the PLATFORMS file. |
and Solaris. See also the PLATFORMS file. |