From MAILER-DAEMON Fri Aug 15 14:33:46 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.20) id 19njOT-0001th-Rv for mharc-monit-general@gnu.org; Fri, 15 Aug 2003 14:33:45 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19njOR-0001rm-IJ for monit-general@nongnu.org; Fri, 15 Aug 2003 14:33:43 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19njNv-0001iH-Nb for monit-general@nongnu.org; Fri, 15 Aug 2003 14:33:42 -0400 Received: from [62.49.18.13] (helo=buffy.scoobygang) by monty-python.gnu.org with esmtp (Exim 4.20) id 19njNv-0001hf-6N for monit-general@nongnu.org; Fri, 15 Aug 2003 14:33:11 -0400 Received: from buffy.scoobygang (localhost [127.0.0.1]) by buffy.scoobygang (8.12.8/8.12.8) with SMTP id h7FIXAwQ002279 for ; Fri, 15 Aug 2003 19:33:10 +0100 Date: Fri, 15 Aug 2003 19:33:10 +0100 From: John Williams To: monit-general@nongnu.org Message-Id: <20030815193310.438f370c.john@pond-weed.com> X-Mailer: Sylpheed version 0.8.11claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Config file syntax X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 18:33:44 -0000 Hello, I've just installed monit 3.2, and noticed that although the manual says that the word "program" in the configuration file is just noise and is ignored, it is in fact needed in lines like: start program = "some command" If you leave the word "program" out, it looks to me like the whole of the string in quotes is interpreted as the name of the program to execute, instead of being parsed as program name plus arguments. I'm not sure if this is a bug or just an error in the documentation. Regards, John From MAILER-DAEMON Fri Aug 15 14:51:20 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.20) id 19njfT-0004Dz-IE for mharc-monit-general@gnu.org; Fri, 15 Aug 2003 14:51:19 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19njfQ-0004D9-Of for monit-general@nongnu.org; Fri, 15 Aug 2003 14:51:16 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19njeu-00044B-LR for monit-general@nongnu.org; Fri, 15 Aug 2003 14:51:15 -0400 Received: from [62.179.232.19] (helo=rd88u4.cm.chello.no) by monty-python.gnu.org with esmtp (Exim 4.20) id 19njet-00042n-Fj for monit-general@nongnu.org; Fri, 15 Aug 2003 14:50:43 -0400 Received: (from hauk@localhost) by rd88u4.cm.chello.no (8.11.6/8.11.6) id h7FInFg01943; Fri, 15 Aug 2003 20:49:15 +0200 X-Authentication-Warning: rd88u4.cm.chello.no: hauk set sender to hauk@tildeslash.com using -f To: This is the general mailing list for monit References: <20030815193310.438f370c.john@pond-weed.com> From: Jan-Henrik Haukeland Organization: /dev/urandom X-Home-Page: http://www.tildeslash.com X-Cite: Amor Vincit Omnia Date: Fri, 15 Aug 2003 20:49:15 +0200 In-Reply-To: <20030815193310.438f370c.john@pond-weed.com> (John Williams's message of "Fri, 15 Aug 2003 19:33:10 +0100") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by rd88u4.cm.chello.no id h7FInFg01943 Subject: Re: Config file syntax X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 18:51:17 -0000 John Williams writes: > I've just installed monit 3.2, and noticed that although the manual say= s > that the word "program" in the configuration file is just noise and is > ignored, it is in fact needed in lines like: > start program =3D "some command" This will work also: start =3D "some command" > If you leave the word "program" out, it looks to me like the whole of > the string in quotes is interpreted as the name of the program to > execute, instead of being parsed as program name plus arguments. > > I'm not sure if this is a bug or just an error in the documentation. The documentation is correct, it is a bug in the lexer when parsing the config file. This bug was reported a while ago and was fixed in CVS and in the soon to be released monit 4.0 version.=B9 Thanks for the report, keep 'em comming :) =B9 We are done with adding features, and as soon as, Rory, the CPO (Chief Porting Officer), is done with porting monit to the various plattforms, 4.0 will be released. Regards, --=20 Jan-Henrik Haukeland From MAILER-DAEMON Fri Aug 15 14:52:41 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.20) id 19njgn-0004ZF-92 for mharc-monit-general@gnu.org; Fri, 15 Aug 2003 14:52:41 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19njga-0004X5-Ut for monit-general@nongnu.org; Fri, 15 Aug 2003 14:52:28 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19njft-0004Ny-QP for monit-general@nongnu.org; Fri, 15 Aug 2003 14:52:16 -0400 Received: from [62.24.64.14] (helo=ms2.dkm.cz) by monty-python.gnu.org with smtp (Exim 4.20) id 19njft-0004NN-4e for monit-general@nongnu.org; Fri, 15 Aug 2003 14:51:45 -0400 Received: (qmail 12078 invoked by uid 0); 15 Aug 2003 18:45:00 -0000 Received: from r2n21.mistral.cz (HELO iol.cz) (62.245.77.21) by ms2.dkm.cz with SMTP; 15 Aug 2003 18:45:00 -0000 Message-ID: <3F3D2A2D.2000407@iol.cz> Date: Fri, 15 Aug 2003 20:45:01 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: cs, en MIME-Version: 1.0 To: This is the general mailing list for monit References: <20030815193310.438f370c.john@pond-weed.com> In-Reply-To: <20030815193310.438f370c.john@pond-weed.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Config file syntax X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 18:52:37 -0000 Helo, this is bug of 3.2 release - it is fixed in cvs version and in upcoming 4.0 release. I recommend you to use long form (as you noted) in the meantime. Cheers, Martin Pala John Williams wrote: >Hello, > >I've just installed monit 3.2, and noticed that although the manual says >that the word "program" in the configuration file is just noise and is >ignored, it is in fact needed in lines like: > start program = "some command" > >If you leave the word "program" out, it looks to me like the whole of >the string in quotes is interpreted as the name of the program to >execute, instead of being parsed as program name plus arguments. > >I'm not sure if this is a bug or just an error in the documentation. > >Regards, >John > > >-- >To unsubscribe: >http://mail.nongnu.org/mailman/listinfo/monit-general > > From MAILER-DAEMON Fri Aug 15 17:26:53 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.20) id 19nm5v-0008BG-QI for mharc-monit-general@gnu.org; Fri, 15 Aug 2003 17:26:47 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19nm5q-0007vd-Ey for monit-general@nongnu.org; Fri, 15 Aug 2003 17:26:42 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19nm5I-0006v3-CM for monit-general@nongnu.org; Fri, 15 Aug 2003 17:26:39 -0400 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19nm2K-0005a6-VO for monit-general@nongnu.org; Fri, 15 Aug 2003 17:23:04 -0400 Received: from john-and-mon.demon.co.uk ([62.49.18.13] helo=buffy.scoobygang) by mx20.gnu.org with esmtp (Exim 4.20) id 19nm2J-0006DW-M1 for monit-general@nongnu.org; Fri, 15 Aug 2003 17:23:04 -0400 Received: from buffy.scoobygang (localhost [127.0.0.1]) by buffy.scoobygang (8.12.8/8.12.8) with SMTP id h7FLMxPj000338 for ; Fri, 15 Aug 2003 22:22:59 +0100 Date: Fri, 15 Aug 2003 22:22:59 +0100 From: John Williams To: This is the general mailing list for monit Message-Id: <20030815222259.700eda93.john@pond-weed.com> In-Reply-To: <3F3D2A2D.2000407@iol.cz> References: <20030815193310.438f370c.john@pond-weed.com> <3F3D2A2D.2000407@iol.cz> X-Mailer: Sylpheed version 0.8.11claws (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Config file syntax X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 21:26:46 -0000 On Fri, 15 Aug 2003 20:45:01 +0200 Martin Pala wrote: > Helo, > > this is bug of 3.2 release - it is fixed in cvs version and in > upcoming 4.0 release. I recommend you to use long form (as you noted) > in the meantime. No problem. Sorry to trouble you if it's been fixed. Thanks, John From MAILER-DAEMON Fri Aug 22 10:02:25 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.20) id 19qBrO-0001NC-CX for mharc-monit-general@gnu.org; Fri, 22 Aug 2003 09:21:46 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19qAdJ-0004YM-LZ for monit-general@nongnu.org; Fri, 22 Aug 2003 08:03:09 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19qAYE-0003HL-HD for monit-general@nongnu.org; Fri, 22 Aug 2003 07:58:25 -0400 Received: from [130.44.1.6] (helo=ams.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19qAT9-0001vW-1s for monit-general@nongnu.org; Fri, 22 Aug 2003 07:52:39 -0400 Received: from ams.org (ser.ams.org [130.44.1.161]) by ams.org (8.12.9/8.12.9) with ESMTP id h7MBqVF6015359; Fri, 22 Aug 2003 07:52:31 -0400 (EDT) Message-ID: <3F46033F.8020403@ams.org> Date: Fri, 22 Aug 2003 07:49:19 -0400 From: "Shannon E. Reall" User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020921 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: monit-general@nongnu.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 1.0 (http://www.roaringpenguin.com/mimedefang/) Subject: PID file being removed X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2003 13:21:44 -0000 I recently upgraded to 3.2 and am now having a problem monitoring mysqld. Here is that portion of the conf file: check mysql with pidfile /usr/local/mysql/var/sun07.pid timeout(3,3) start program = "/etc/init.d/mysql start" stop program = "/etc/init.d/mysql stop" alert ser@ams.org on { timeout } alert ser@ams.org on { restart } The pid file exists before I start monit but then it disappears. Here is what I did for testing: root@sun07:/# ps -ef |grep mysql mysql 455 1 0 18:05:55 ? 0:01 /usr/local/mysql/libexec/mysqld root 23227 19786 0 07:47:11 pts/3 0:00 grep mysql root@sun07:/# echo 455 > /usr/local/mysql/var/sun07.pid root@sun07:/# ls -l /usr/local/mysql/var/sun07.pid -rw-r--r-- 1 root other 4 Aug 22 07:47 /usr/local/mysql/var/sun07.pid root@sun07:/# /usr/local/bin/monit -d 60 Starting monit daemon root@sun07:/# tail /var/log/monit [EDT Aug 22 07:37:20] Starting monit daemon [EDT Aug 22 07:39:44] Stopping monit HTTP server [EDT Aug 22 07:39:44] monit daemon with pid [22123] killed [EDT Aug 22 07:43:28] Starting monit daemon [EDT Aug 22 07:43:28] start: (mysql) /etc/init.d/mysql [EDT Aug 22 07:44:28] monit: Warning process 'mysql' was not started [EDT Aug 22 07:44:29] Stopping monit HTTP server [EDT Aug 22 07:44:29] monit daemon with pid [23002] killed [EDT Aug 22 07:47:47] Starting monit daemon [EDT Aug 22 07:47:47] start: (mysql) /etc/init.d/mysql [EDT Aug 22 07:48:47] monit: Warning process 'mysql' was not started root@sun07:/# ls -l /usr/local/mysql/var/sun07.pid /usr/local/mysql/var/sun07.pid: No such file or directory Am I missing something? Thanks for any help you can provide. -- Shannon From MAILER-DAEMON Thu Aug 28 08:09:48 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19sLam-0006S5-O8 for mharc-monit-general@gnu.org; Thu, 28 Aug 2003 08:09:32 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sLaM-0006GH-0t for monit-general@nongnu.org; Thu, 28 Aug 2003 08:09:06 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sLWM-00042j-SR for monit-general@nongnu.org; Thu, 28 Aug 2003 08:05:00 -0400 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sL9I-0005ww-I1 for monit-general@nongnu.org; Thu, 28 Aug 2003 07:41:08 -0400 Received: from [194.228.2.91] (helo=smtp-out3.iol.cz) by mx20.gnu.org with esmtp (Exim 4.22) id 19sL6b-0006yl-22 for monit-general@nongnu.org; Thu, 28 Aug 2003 07:38:21 -0400 Received: from iol.cz (gate2.hq.iol.cz [194.228.192.226]) by smtp-out3.iol.cz (Internet on Line ESMP server) with ESMTP id 07C7635019 for ; Thu, 28 Aug 2003 13:12:34 +0200 (CEST) Message-ID: <3F4DE3A9.9030107@iol.cz> Date: Thu, 28 Aug 2003 13:12:41 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030711 X-Accept-Language: cs, en, en-us MIME-Version: 1.0 To: This is the general mailing list for monit References: <3F46033F.8020403@ams.org> In-Reply-To: <3F46033F.8020403@ams.org> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: PID file being removed X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 12:09:27 -0000 Hi, the problem is probably caused in your mysql startup script, which probably removes it. Monit is not able to remove the monitored service's pidfile (until instructed to do so via exec statement which is not this case). Please: 1.) attach your mysql rc script - we can figure out where and why it removed the pidfile. 2.) optionaly trace the process as described in FAQ.txt distributed with monit, it could help to see the actions/environment which preceded to start method execution and the cause why monit decided to start mysql though it was running before monit started (which is not normal - there must be some reason for it - it works in 3.2 well). 3.) run monit in verbose mode ('-v' command line option) If it is problem for you to do any of above hints, please send kindly just some of these informations. Thanks for feedback :) Martin Shannon E. Reall wrote: > I recently upgraded to 3.2 and am now having a problem monitoring > mysqld. Here is that portion of the conf file: > > check mysql with pidfile /usr/local/mysql/var/sun07.pid > timeout(3,3) > start program = "/etc/init.d/mysql start" > stop program = "/etc/init.d/mysql stop" > alert ser@ams.org on { timeout } > alert ser@ams.org on { restart } > > The pid file exists before I start monit but then it disappears. Here > is what I did for testing: > > root@sun07:/# ps -ef |grep mysql > mysql 455 1 0 18:05:55 ? 0:01 > /usr/local/mysql/libexec/mysqld > root 23227 19786 0 07:47:11 pts/3 0:00 grep mysql > > root@sun07:/# echo 455 > /usr/local/mysql/var/sun07.pid > > root@sun07:/# ls -l /usr/local/mysql/var/sun07.pid > -rw-r--r-- 1 root other 4 Aug 22 07:47 > /usr/local/mysql/var/sun07.pid > > root@sun07:/# /usr/local/bin/monit -d 60 > Starting monit daemon > > root@sun07:/# tail /var/log/monit > [EDT Aug 22 07:37:20] Starting monit daemon > [EDT Aug 22 07:39:44] Stopping monit HTTP server > [EDT Aug 22 07:39:44] monit daemon with pid [22123] killed > [EDT Aug 22 07:43:28] Starting monit daemon > [EDT Aug 22 07:43:28] start: (mysql) /etc/init.d/mysql > [EDT Aug 22 07:44:28] monit: Warning process 'mysql' was not started > [EDT Aug 22 07:44:29] Stopping monit HTTP server > [EDT Aug 22 07:44:29] monit daemon with pid [23002] killed > [EDT Aug 22 07:47:47] Starting monit daemon > [EDT Aug 22 07:47:47] start: (mysql) /etc/init.d/mysql > [EDT Aug 22 07:48:47] monit: Warning process 'mysql' was not started > > root@sun07:/# ls -l /usr/local/mysql/var/sun07.pid > /usr/local/mysql/var/sun07.pid: No such file or directory > > Am I missing something? Thanks for any help you can provide. > From MAILER-DAEMON Thu Aug 28 10:44:53 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19sNuW-0000E2-Nx for mharc-monit-general@gnu.org; Thu, 28 Aug 2003 10:38:04 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sNs8-0007uX-Ua for monit-general@nongnu.org; Thu, 28 Aug 2003 10:35:36 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sNlD-0005U6-1I for monit-general@nongnu.org; Thu, 28 Aug 2003 10:28:27 -0400 Received: from [213.170.94.170] (helo=fishbone.ramax.spb.ru) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sNIJ-0001ut-3i for monit-general@nongnu.org; Thu, 28 Aug 2003 09:58:36 -0400 Received: by fishbone.ramax.spb.ru (Postfix, from userid 513) id 42F17B798; Thu, 28 Aug 2003 17:40:31 +0400 (MSD) Received: from kadath.ramax.spb.ru (kadath.office.spb.ramax.ru [10.4.1.73]) by fishbone.ramax.spb.ru (Postfix) with ESMTP id 59FC1C5A9 for ; Thu, 28 Aug 2003 17:40:30 +0400 (MSD) Received: by kadath.ramax.spb.ru (Postfix, from userid 500) id C27C29D6; Thu, 28 Aug 2003 17:45:51 +0400 (MSD) Date: Thu, 28 Aug 2003 17:45:51 +0400 From: Igor Homyakov To: monit-general@nongnu.org Message-ID: <20030828134551.GB17313@kadath.office.spb.ramax.ru> Mail-Followup-To: monit-general@nongnu.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Operating-System: GNU/Linux (ALT Linux http://altlinux.org) Subject: CVS snapshot failed X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 14:38:02 -0000 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi, truble with last CVS (28 Aug 2003) # monit -c /etc/monitrc -i monit: syntax error 'postmaster' at line 9 /etc/monitrc attached -- Igor Homyakov --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=monitrc set daemon 120 set logfile syslog set mailserver 10.4.1.10 # null mailer check process master with pidfile /var/spool/postfix/pid/master.pid start program = "/etc/init.d/postfix start" stop program = "/etc/init.d/postfix stop" alert postmaster check process sshd with pidfile /var/run/sshd.pid start program = "/etc/init.d/sshd start" stop program = "/etc/init.d/sshd stop" if failed host 10.4.1.73 port 22 protocol ssh then restart if 3 restarts within 5 cycles then timeout alert admin --ZPt4rx8FFjLCG7dd-- From MAILER-DAEMON Thu Aug 28 11:26:36 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19sOdE-00049W-S9 for mharc-monit-general@gnu.org; Thu, 28 Aug 2003 11:24:16 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sOby-0003bL-2z for monit-general@nongnu.org; Thu, 28 Aug 2003 11:22:58 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sOaL-0002u2-Ff for monit-general@nongnu.org; Thu, 28 Aug 2003 11:21:19 -0400 Received: from [194.228.2.91] (helo=smtp-out3.iol.cz) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sOYj-0002Ou-JY for monit-general@nongnu.org; Thu, 28 Aug 2003 11:19:37 -0400 Received: from iol.cz (gate2.hq.iol.cz [194.228.192.226]) by smtp-out3.iol.cz (Internet on Line ESMP server) with ESMTP id D3C3A34200 for ; Thu, 28 Aug 2003 16:54:02 +0200 (CEST) Message-ID: <3F4E1793.4070305@iol.cz> Date: Thu, 28 Aug 2003 16:54:11 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030711 X-Accept-Language: cs, en, en-us MIME-Version: 1.0 To: This is the general mailing list for monit References: <20030828134551.GB17313@kadath.office.spb.ramax.ru> In-Reply-To: <20030828134551.GB17313@kadath.office.spb.ramax.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: CVS snapshot failed X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 15:24:15 -0000 Hi, monit now requires full address (e.g. postmaster@domain) Martin Igor Homyakov wrote: >hi, > >truble with last CVS (28 Aug 2003) > ># monit -c /etc/monitrc -i >monit: syntax error 'postmaster' at line 9 > >/etc/monitrc attached > > >------------------------------------------------------------------------ > >set daemon 120 >set logfile syslog >set mailserver 10.4.1.10 > ># null mailer >check process master with pidfile /var/spool/postfix/pid/master.pid > start program = "/etc/init.d/postfix start" > stop program = "/etc/init.d/postfix stop" > alert postmaster > >check process sshd with pidfile /var/run/sshd.pid > start program = "/etc/init.d/sshd start" > stop program = "/etc/init.d/sshd stop" > if failed host 10.4.1.73 port 22 protocol ssh > then restart > if 3 restarts within 5 cycles then timeout > alert admin > > >------------------------------------------------------------------------ > >-- >To unsubscribe: >http://mail.nongnu.org/mailman/listinfo/monit-general > From MAILER-DAEMON Thu Aug 28 12:03:15 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19sPEF-00031n-QI for mharc-monit-general@gnu.org; Thu, 28 Aug 2003 12:02:31 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sP9V-0001No-Mm for monit-general@nongnu.org; Thu, 28 Aug 2003 11:57:37 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sP6f-0000H8-M1 for monit-general@nongnu.org; Thu, 28 Aug 2003 11:54:42 -0400 Received: from [62.179.234.75] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sP4I-0007h8-3K for monit-general@nongnu.org; Thu, 28 Aug 2003 11:52:14 -0400 Received: (from hauk@localhost) by d22mdi.cm.chello.no (8.11.6/8.11.6) id h7SFUgJ06409; Thu, 28 Aug 2003 17:30:42 +0200 X-Authentication-Warning: d22mdi.cm.chello.no: hauk set sender to hauk@tildeslash.com using -f To: monit-general@nongnu.org References: <20030828134551.GB17313@kadath.office.spb.ramax.ru> From: Jan-Henrik Haukeland Organization: /dev/urandom X-Home-Page: http://www.tildeslash.com X-Cite: Amor Vincit Omnia Date: Thu, 28 Aug 2003 17:30:42 +0200 In-Reply-To: <20030828134551.GB17313@kadath.office.spb.ramax.ru> (Igor Homyakov's message of "Thu, 28 Aug 2003 17:45:51 +0400") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: CVS snapshot failed X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 16:02:29 -0000 Igor Homyakov writes: > hi, > > truble with last CVS (28 Aug 2003) > > # monit -c /etc/monitrc -i > monit: syntax error 'postmaster' at line 9 > > /etc/monitrc attached > -- > Igor Homyakov > > > set daemon 120 > set logfile syslog > set mailserver 10.4.1.10 > > # null mailer > check process master with pidfile /var/spool/postfix/pid/master.pid > start program = "/etc/init.d/postfix start" > stop program = "/etc/init.d/postfix stop" > alert postmaster > > check process sshd with pidfile /var/run/sshd.pid > start program = "/etc/init.d/sshd start" > stop program = "/etc/init.d/sshd stop" > if failed host 10.4.1.73 port 22 protocol ssh > then restart > if 3 restarts within 5 cycles then timeout > alert admin Yep, sorry, but I removed the possibility to use the short email address version for alerts. There was some problem with the function leading to a SIGSEGV for certain email addresses and I felt it was better to remove it and only allow a real email address for alerts. You can obtain the same functionality by using this type of email address (i.e. post-fix with @localhost): alert postmaster@localhost alert admin@localhost -- Jan-Henrik Haukeland From MAILER-DAEMON Fri Aug 29 10:40:52 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19skP5-00013z-IW for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 10:39:07 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19skOV-0000iF-H1 for monit-general@nongnu.org; Fri, 29 Aug 2003 10:38:31 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19skNc-0000Hp-Ga for monit-general@nongnu.org; Fri, 29 Aug 2003 10:37:37 -0400 Received: from [213.170.94.170] (helo=fishbone.ramax.spb.ru) by monty-python.gnu.org with esmtp (Exim 4.22) id 19skJh-0006xx-Hb for monit-general@nongnu.org; Fri, 29 Aug 2003 10:33:33 -0400 Received: by fishbone.ramax.spb.ru (Postfix, from userid 513) id 69D08E1B8; Fri, 29 Aug 2003 18:11:08 +0400 (MSD) Received: from kadath.ramax.spb.ru (kadath.office.spb.ramax.ru [10.4.1.73]) by fishbone.ramax.spb.ru (Postfix) with ESMTP id 75D3FA2A7 for ; Fri, 29 Aug 2003 18:11:08 +0400 (MSD) Received: by kadath.ramax.spb.ru (Postfix, from userid 500) id BFF9B9E2; Fri, 29 Aug 2003 18:16:25 +0400 (MSD) Date: Fri, 29 Aug 2003 18:16:25 +0400 From: Igor Homyakov To: monit-general@nongnu.org Message-ID: <20030829141625.GA29050@kadath.office.spb.ramax.ru> Mail-Followup-To: monit-general@nongnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Operating-System: GNU/Linux (ALT Linux http://altlinux.org) Subject: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 14:38:43 -0000 hi, is it possible to check connection(s) without checking process ? -- Igor Homyakov From MAILER-DAEMON Fri Aug 29 12:27:25 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19sm5d-0001HC-AT for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 12:27:09 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sm4b-0000lC-Pt for monit-general@nongnu.org; Fri, 29 Aug 2003 12:26:05 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19slaH-0000uk-LL for monit-general@nongnu.org; Fri, 29 Aug 2003 11:54:48 -0400 Received: from [62.179.234.75] (helo=d22mdi.cm.chello.no) by monty-python.gnu.org with esmtp (Exim 4.22) id 19slZy-0000nc-IR for monit-general@nongnu.org; Fri, 29 Aug 2003 11:54:26 -0400 Received: (from hauk@localhost) by d22mdi.cm.chello.no (8.11.6/8.11.6) id h7TFqvH04176; Fri, 29 Aug 2003 17:52:57 +0200 X-Authentication-Warning: d22mdi.cm.chello.no: hauk set sender to hauk@tildeslash.com using -f To: monit-general@nongnu.org References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> From: Jan-Henrik Haukeland Organization: /dev/urandom X-Home-Page: http://www.tildeslash.com X-Cite: Amor Vincit Omnia Date: Fri, 29 Aug 2003 17:52:57 +0200 In-Reply-To: <20030829141625.GA29050@kadath.office.spb.ramax.ru> (Igor Homyakov's message of "Fri, 29 Aug 2003 18:16:25 +0400") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 16:27:07 -0000 Igor Homyakov writes: > is it possible to check connection(s) without > checking process ? Not as monit is now. Since monit is very localhost centric I guess we (or at least I) simply haven't thought about this. But it is very easy to change this so a connection test may become a standalone statement because all network code for doing this is already in place. The only thing to change is the control file grammar to allow such a standalone statement. From the top of my head, such a statement may look like this: check host rhn.redhat.com:443 with type TCPSSL if failed connection with timeout 15 seconds then {..} if failed protocol http and request "/cgi-bin/login.cgi" then {..} alert hauk@tildeslash But since we, right now, are in the process of releasing the monit 4.0 code as a beta and in a week as a full release I'm not sure we have time to add this. But it is very tempting to do so :-) What do others think? Is it interesting to add an external standalone connection test to monit? Ps. In a check process it is already possible to use an external connection test like so (extracted from the presentation draft, see paragraph 2 below): (1) check process apache with pidfile "/usr/local/apache/logs/httpd.pid" (2) start = "/etc/init.d/httpd start" (3) stop = "/etc/init.d/httpd stop" (4) if failed port 80 and use the protocol http (5) and request "/cgi-bin/printenv" then restart (6) if failed host weblogic.tildeslash.com port 8080 then alert (7) if cpu usage is greater than 60 percent for 2 cycles then alert (8) if cpu usage > 95% for 5 cycles then restart (9) if 2 restarts within 3 cycles then timeout (10) alert foo@bar.baz Line 1 starts a process service entry. It contains the keyword check and a descriptive name for the process to monitor, in this case apache. Monit also requires each process to have a pidfile. If you want monit to start, stop or restart the process you must submit a start and stop program. Line 2-3 defines those programs for this process. In line 4 we ask monit to open a socket connection to the apache server and request a certain document from the server at line 5. If this test fails, monit will restart the apache process. If you have setup apache to run as a front-end for an application server on another machine you may also request monit to test the connection to the application server and send an alert if the connection should fail, line 6 contains such a test. You may also specify the host name in a connection test to test name-based virtual hosts at the web server. Line 7-8 test the process characteristics and conduct an action if any of the tests are true. In line 9 a timeout is set, i.e. if the process was restarted X times within a period of Y poll cycles then monit will not monitor this service anymore. The rationale for this is that monit should not waste time trying to start or restart a service if it has problems running stable. Finally in line 10 monit is requested to send alert messages to foo@bar.baz. Monit will send alert messages for events that occurred on the service, it is also possible to ask monit only to send alerts for certain events. We have only demonstrated a few if-tests here, there are many more if-tests and other useful statements you may use in a process service entry. See the documentation. -- Jan-Henrik Haukeland From MAILER-DAEMON Fri Aug 29 14:15:52 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19snjM-0002b8-KH for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 14:12:16 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sniw-0002HM-4n for monit-general@nongnu.org; Fri, 29 Aug 2003 14:11:50 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sni5-0001W6-K9 for monit-general@nongnu.org; Fri, 29 Aug 2003 14:10:59 -0400 Received: from [62.24.64.14] (helo=ms2.dkm.cz) by monty-python.gnu.org with smtp (Exim 4.22) id 19snhP-00012O-LR for monit-general@nongnu.org; Fri, 29 Aug 2003 14:10:15 -0400 Received: (qmail 64801 invoked by uid 0); 29 Aug 2003 18:10:13 -0000 Received: from r3h125.mistral.cz (HELO iol.cz) (213.220.199.125) by ms2.dkm.cz with SMTP; 29 Aug 2003 18:10:13 -0000 Message-ID: <3F4F9705.9080403@iol.cz> Date: Fri, 29 Aug 2003 20:10:13 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: cs, en MIME-Version: 1.0 To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 18:12:11 -0000 Jan-Henrik Haukeland wrote: >Igor Homyakov writes: > > > >>is it possible to check connection(s) without >>checking process ? >> >> > >Not as monit is now. Since monit is very localhost centric I guess we >(or at least I) simply haven't thought about this. > >But it is very easy to change this so a connection test may become a >standalone statement because all network code for doing this is >already in place. The only thing to change is the control file grammar >to allow such a standalone statement. From the top of my head, such a >statement may look like this: > > check host rhn.redhat.com:443 with type TCPSSL > if failed connection with timeout 15 seconds then {..} > if failed protocol http and request "/cgi-bin/login.cgi" then {..} > alert hauk@tildeslash > >But since we, right now, are in the process of releasing the monit 4.0 >code as a beta and in a week as a full release I'm not sure we have >time to add this. But it is very tempting to do so :-) > >What do others think? Is it interesting to add an external standalone >connection test to monit? > > > I agree, it is very interesting. I think the implementation should utilize present tests (aka object modules) without changing it. It is sufficient to add new monitoring service type reflecting present convention - i.e. each service has its token (shortcut), which is used by monit for example for dependencies, monitor/unmonitor commands, etc. For example the syntax could be (basic): (1) check host up2date-http with address 66.187.232.110 (2) if failed host rhn.redhat.com port 80 protocol http and request "/my/index.html" then alert (3) if failed host rhn.redhat.com port 443 type tcpssl protocol http and request "/my/index.html" then alert On line 1 'host' identifies host monitoring service class + defines 'up2date' as this service instance token and server's address (it is better to use IP address to bypass potential name resolving problems). The second line is exactly the same test, which is supported in 'process' monitoring service - it is important to support hostname option too because of virtual host. Line 3 defines another service which is part of this instance. More complex example: (1) check host up2date-http with address 66.187.232.110 (2) if failed host rhn.redhat.com port 80 protocol http and request "/my/index.html" then alert (3) if failed host rhn.redhat.com port 443 type tcpssl protocol http and request "/my/index.html" then alert (4) (5) check host up2date-ftp with address 66.187.232.110 (6) if failed port 21 protocol ftp then alert This example shows just the fact, that it is possible to define more monitoring service instance for the same server. This is usefull for example if you need to take care for different services running on the same host different way. For example you can define dependency fir service running on localhost to depend on specific host monitoring service instance. You can monitor other service running on the same remote host in other host monitoring service instance and take care for another dependency chain (or use it as standalone service as usual). The advantage is, that the host monitoring service instance could agregate more ports if needed (if it makes sense). The implementation of such check will be very easy, because monit has framework for it now. From MAILER-DAEMON Fri Aug 29 14:39:57 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19so9p-0007GK-IQ for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 14:39:37 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19so8b-0006KA-LC for monit-general@nongnu.org; Fri, 29 Aug 2003 14:38:21 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19so7A-0005g5-Hz for monit-general@nongnu.org; Fri, 29 Aug 2003 14:36:53 -0400 Received: from [62.24.64.14] (helo=ms2.dkm.cz) by monty-python.gnu.org with smtp (Exim 4.22) id 19so6O-0005LI-T3 for monit-general@nongnu.org; Fri, 29 Aug 2003 14:36:05 -0400 Received: (qmail 89671 invoked by uid 0); 29 Aug 2003 18:36:03 -0000 Received: from r3h125.mistral.cz (HELO iol.cz) (213.220.199.125) by ms2.dkm.cz with SMTP; 29 Aug 2003 18:36:03 -0000 Message-ID: <3F4F9D13.3000402@iol.cz> Date: Fri, 29 Aug 2003 20:36:03 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: cs, en MIME-Version: 1.0 To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> In-Reply-To: <3F4F9705.9080403@iol.cz> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 18:39:35 -0000 Martin Pala wrote: > > More complex example: > > (1) check host up2date-http with address 66.187.232.110 > (2) if failed host rhn.redhat.com port 80 protocol http and request > "/my/index.html" then alert > (3) if failed host rhn.redhat.com port 443 type tcpssl protocol http > and request "/my/index.html" then alert > (4) > (5) check host up2date-ftp with address 66.187.232.110 > (6) if failed port 21 protocol ftp then alert > => this way we can provide equivalent for local 'process' monitoring service type, i.e. remote process (different ports can be served by different processes on remote server, or the remote process could listen on more then one port as well or support virtual hosts). From MAILER-DAEMON Fri Aug 29 17:08:23 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19sqTI-0005rp-16 for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 17:07:52 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sqSp-0005RM-A3 for monit-general@nongnu.org; Fri, 29 Aug 2003 17:07:23 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sqRX-0004Xr-BC for monit-general@nongnu.org; Fri, 29 Aug 2003 17:06:04 -0400 Received: from [62.179.234.75] (helo=d22mdi.cm.chello.no) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sqOa-0003Kz-8N for monit-general@nongnu.org; Fri, 29 Aug 2003 17:03:00 -0400 Received: (from hauk@localhost) by d22mdi.cm.chello.no (8.11.6/8.11.6) id h7TL1VV08371; Fri, 29 Aug 2003 23:01:31 +0200 X-Authentication-Warning: d22mdi.cm.chello.no: hauk set sender to hauk@tildeslash.com using -f To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> From: Jan-Henrik Haukeland Organization: /dev/urandom X-Home-Page: http://www.tildeslash.com X-Cite: Amor Vincit Omnia Date: Fri, 29 Aug 2003 23:01:31 +0200 In-Reply-To: <3F4F9705.9080403@iol.cz> (Martin Pala's message of "Fri, 29 Aug 2003 20:10:13 +0200") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 21:07:49 -0000 Martin Pala writes: > Jan-Henrik Haukeland wrote: > * >>What do others think? Is it interesting to add an external standalone >>connection test to monit? >> > I agree, it is very interesting. Let's add it then :-) Because by doing this simple thing (for us) it opens up a whole new ballpark for monit. Before we start we must agree on the syntax for the new statement though. Your proposal: check host up2date-http with address 66.187.232.110 if failed host rhn.redhat.com port 80 protocol http then {...} if failed host rhn.redhat.com port 443 type tcpssl protocol http and request "/my/index.html" then {..} alert hauk@tildeslash.com Is good because it lets us keep the current if-connection-test as it is and can use several connection tests in an entry. But the syntax is a bit redundant, since the hostname/address is given twice. It is easy to write a new rule in the parser for a remote connection test, so we do not *need* to keep the connection test as it is for a remote test. Here is another suggestion, modeled after your check-file test, where the host and port is given in the check line and the if-test simply refere to the host and port: check host rhn.redhat.com port 80 if failed protocol http and request "/my/index.html" and with timeout 15 seconds then {...} alert hauk@tildeslash.com The drawback with this solution is that since the host and port is stated in the check-line there can only be *one* if-failed.. test. So if you want to test more than one port at the server you must write several check-host statements. Finally, here is a suggestion using a rewrite of your proposal. Here the check-block simply contains a descriptive name for the connection test. [In the parser we will also require that host is stated for a remote connection test (in the current grammar host is not required and if not stated is assumed to be localhost).] check connection redhat <- redhat is just a descriptive name for the test if failed host rhn.redhat.com port 80 protocol http and request "/my/index.html" then alert if failed host rhn.redhat.com port 443 type tcpssl protocol http and request "/my/index.html" then alert alert hauk@tildeslash.com Other suggestions are welcome! -- Jan-Henrik Haukeland From MAILER-DAEMON Fri Aug 29 17:52:33 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19srAP-0003HR-Dx for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 17:52:25 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19srA9-00039S-Bv for monit-general@nongnu.org; Fri, 29 Aug 2003 17:52:09 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sr8a-0002ck-45 for monit-general@nongnu.org; Fri, 29 Aug 2003 17:50:33 -0400 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.22) id 19sqxq-0008SP-PI for monit-general@nongnu.org; Fri, 29 Aug 2003 17:39:26 -0400 Received: from [62.179.234.75] (helo=d22mdi.cm.chello.no) by mx20.gnu.org with esmtp (Exim 4.22) id 19sqlN-00054x-7i for monit-general@nongnu.org; Fri, 29 Aug 2003 17:26:33 -0400 Received: (from hauk@localhost) by d22mdi.cm.chello.no (8.11.6/8.11.6) id h7TLP3S08540; Fri, 29 Aug 2003 23:25:03 +0200 X-Authentication-Warning: d22mdi.cm.chello.no: hauk set sender to hauk@tildeslash.com using -f To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> From: Jan-Henrik Haukeland Organization: /dev/urandom X-Home-Page: http://www.tildeslash.com X-Cite: Amor Vincit Omnia Date: Fri, 29 Aug 2003 23:25:03 +0200 In-Reply-To: (Jan-Henrik Haukeland's message of "Fri, 29 Aug 2003 23:01:31 +0200") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 21:52:23 -0000 Jan-Henrik Haukeland writes: > Here is another suggestion, modeled after your check-file test, where > the host and port is given in the check line and the if-test simply > refere to the host and port: > > check host rhn.redhat.com port 80 > if failed protocol http and request > "/my/index.html" and with timeout 15 seconds then {...} > alert hauk@tildeslash.com > > The drawback with this solution is that since the host and port is > stated in the check-line there can only be *one* if-failed.. test. So > if you want to test more than one port at the server you must write > several check-host statements. Well of course, if you take the port from the check line and put it into a if-connection-test you can test several ports at the host in one entry. I think maybe this proposal has the nicest syntax. check host rhn.redhat.com if failed port 80 protocol http and request "/my/index.html" and with timeout 15 seconds then {...} if failed port 443 type TCPSSL protocol http then {..} alert hauk@tildeslash.com One slight drawback is that one will have to write several check-host entries if you want to test named-virtual hosts at the same server. But IMHO, the drawback is small compared with the nice syntax above :) Shall we go for this one? -- Jan-Henrik Haukeland From MAILER-DAEMON Fri Aug 29 17:55:57 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19srD9-00046b-3u for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 17:55:15 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sr6l-0002GI-9u for monit-general@nongnu.org; Fri, 29 Aug 2003 17:48:39 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sr6b-0002EF-CX for monit-general@nongnu.org; Fri, 29 Aug 2003 17:48:30 -0400 Received: from [24.66.76.252] (helo=proxy.rlhc.net) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sr6Z-00024z-MH for monit-general@nongnu.org; Fri, 29 Aug 2003 17:48:28 -0400 Received: from jangofett.homenet (unknown [10.1.1.85]) by proxy.rlhc.net (Postfix) with SMTP id 81B435711F for ; Fri, 29 Aug 2003 16:52:49 -0500 (CDT) Received: from 10.1.1.5 (SquirrelMail authenticated user rich) by rlhc.myservers.net with HTTP; Fri, 29 Aug 2003 16:52:17 -0500 (CDT) Message-ID: <41482.10.1.1.5.1062193937.squirrel@rlhc.myservers.net> In-Reply-To: References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> Date: Fri, 29 Aug 2003 16:52:17 -0500 (CDT) From: "Richard Houston" To: "This is the general mailing list for monit" User-Agent: SquirrelMail/2.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal Content-Transfer-Encoding: quoted-printable Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 21:55:13 -0000 -- zz Thanks Richard Houston R.L.H. Consulting www.rlhc.net Jan-Henrik Haukeland said: > Martin Pala writes: > >> Jan-Henrik Haukeland wrote: >> * >>>What do others think? Is it interesting to add an external standalone >>>connection test to monit? >>> >> I agree, it is very interesting. > > Let's add it then :-) Because by doing this simple thing (for us) it > opens up a whole new ballpark for monit. > > Before we start we must agree on the syntax for the new statement > though. Your proposal: > > check host up2date-http with address 66.187.232.110 > if failed host rhn.redhat.com port 80 protocol http then {...} > if failed host rhn.redhat.com port 443 type tcpssl protocol http > and request "/my/index.html" then {..} > alert hauk@tildeslash.com > > Is good because it lets us keep the current if-connection-test as it > is and can use several connection tests in an entry. But the syntax is > a bit redundant, since the hostname/address is given twice. It is easy > to write a new rule in the parser for a remote connection test, so we > do not *need* to keep the connection test as it is for a remote test. > > Here is another suggestion, modeled after your check-file test, where > the host and port is given in the check line and the if-test simply > refere to the host and port: > > check host rhn.redhat.com port 80 > if failed protocol http and request > "/my/index.html" and with timeout 15 seconds then {...} > alert hauk@tildeslash.com > > The drawback with this solution is that since the host and port is > stated in the check-line there can only be *one* if-failed.. test. So > if you want to test more than one port at the server you must write > several check-host statements. > > Finally, here is a suggestion using a rewrite of your proposal. Here > the check-block simply contains a descriptive name for the connection > test. [In the parser we will also require that host is stated for a > remote connection test (in the current grammar host is not required > and if not stated is assumed to be localhost).] > > check connection redhat <- redhat is just a descriptive name for the > test > if failed host rhn.redhat.com port 80 protocol http and request > "/my/index.html" then alert > if failed host rhn.redhat.com port 443 type tcpssl protocol http > and request "/my/index.html" then alert > alert hauk@tildeslash.com > > Other suggestions are welcome! > > -- > Jan-Henrik Haukeland > > > -- > To unsubscribe: > http://mail.nongnu.org/mailman/listinfo/monit-general > > From MAILER-DAEMON Fri Aug 29 18:21:45 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19srcN-0004vP-7h for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 18:21:19 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19srab-00040v-TU for monit-general@nongnu.org; Fri, 29 Aug 2003 18:19:29 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19srY9-0003Cl-0x for monit-general@nongnu.org; Fri, 29 Aug 2003 18:16:58 -0400 Received: from [24.66.76.252] (helo=proxy.rlhc.net) by monty-python.gnu.org with esmtp (Exim 4.22) id 19srPJ-000897-Gr for monit-general@nongnu.org; Fri, 29 Aug 2003 18:07:49 -0400 Received: from balrog.homenet (unknown [10.1.1.8]) by proxy.rlhc.net (Postfix) with ESMTP id C0A775711F for ; Fri, 29 Aug 2003 17:12:43 -0500 (CDT) Received: from balrog.homenet (localhost.localdomain [127.0.0.1]) by balrog.homenet (Postfix) with SMTP id 94BEF1E01D for ; Fri, 29 Aug 2003 17:13:32 -0500 (CDT) Received: from 10.1.1.5 (SquirrelMail authenticated user rich) by balrog.homenet with HTTP; Fri, 29 Aug 2003 17:13:32 -0500 (CDT) Message-ID: <41991.10.1.1.5.1062195212.squirrel@balrog.homenet> In-Reply-To: <41482.10.1.1.5.1062193937.squirrel@rlhc.myservers.net> References: <20030829141625.GA29050@kadath.office.spb.ramax.ru><3F4F9705.9080403@iol.cz> <41482.10.1.1.5.1062193937.squirrel@rlhc.myservers.net> Date: Fri, 29 Aug 2003 17:13:32 -0500 (CDT) From: "Richard Houston" To: "This is the general mailing list for monit" User-Agent: SquirrelMail/2.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal Content-Transfer-Encoding: quoted-printable Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 22:21:17 -0000 Sorry, Made a mistake. Please disregard. Thanks Richard Houston R.L.H. Consulting www.rlhc.net Richard Houston said: > > -- zz > > > Thanks > > Richard Houston > R.L.H. Consulting > www.rlhc.net > > Jan-Henrik Haukeland said: >> Martin Pala writes: >> >>> Jan-Henrik Haukeland wrote: >>> * >>>>What do others think? Is it interesting to add an external standalone >>>>connection test to monit? >>>> >>> I agree, it is very interesting. >> >> Let's add it then :-) Because by doing this simple thing (for us) it >> opens up a whole new ballpark for monit. >> >> Before we start we must agree on the syntax for the new statement >> though. Your proposal: >> >> check host up2date-http with address 66.187.232.110 >> if failed host rhn.redhat.com port 80 protocol http then {...} >> if failed host rhn.redhat.com port 443 type tcpssl protocol http >> and request "/my/index.html" then {..} >> alert hauk@tildeslash.com >> >> Is good because it lets us keep the current if-connection-test as it >> is and can use several connection tests in an entry. But the syntax is >> a bit redundant, since the hostname/address is given twice. It is easy >> to write a new rule in the parser for a remote connection test, so we >> do not *need* to keep the connection test as it is for a remote test. >> >> Here is another suggestion, modeled after your check-file test, where >> the host and port is given in the check line and the if-test simply >> refere to the host and port: >> >> check host rhn.redhat.com port 80 >> if failed protocol http and request >> "/my/index.html" and with timeout 15 seconds then {...} >> alert hauk@tildeslash.com >> >> The drawback with this solution is that since the host and port is >> stated in the check-line there can only be *one* if-failed.. test. So >> if you want to test more than one port at the server you must write >> several check-host statements. >> >> Finally, here is a suggestion using a rewrite of your proposal. Here >> the check-block simply contains a descriptive name for the connection >> test. [In the parser we will also require that host is stated for a >> remote connection test (in the current grammar host is not required >> and if not stated is assumed to be localhost).] >> >> check connection redhat <- redhat is just a descriptive name for the >> test >> if failed host rhn.redhat.com port 80 protocol http and request >> "/my/index.html" then alert >> if failed host rhn.redhat.com port 443 type tcpssl protocol http >> and request "/my/index.html" then alert >> alert hauk@tildeslash.com >> >> Other suggestions are welcome! >> >> -- >> Jan-Henrik Haukeland >> >> >> -- >> To unsubscribe: >> http://mail.nongnu.org/mailman/listinfo/monit-general >> >> > > > > -- > To unsubscribe: > http://mail.nongnu.org/mailman/listinfo/monit-general > > From MAILER-DAEMON Fri Aug 29 19:23:36 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19ssaE-00084X-6R for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 19:23:10 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19ssZU-0007Ms-J4 for monit-general@nongnu.org; Fri, 29 Aug 2003 19:22:24 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19ssYU-0006CT-Vb for monit-general@nongnu.org; Fri, 29 Aug 2003 19:21:30 -0400 Received: from [62.24.64.14] (helo=ms2.dkm.cz) by monty-python.gnu.org with smtp (Exim 4.22) id 19ssTu-0004OF-GV for monit-general@nongnu.org; Fri, 29 Aug 2003 19:16:38 -0400 Received: (qmail 74725 invoked by uid 0); 29 Aug 2003 23:16:36 -0000 Received: from r3h125.mistral.cz (HELO iol.cz) (213.220.199.125) by ms2.dkm.cz with SMTP; 29 Aug 2003 23:16:36 -0000 Message-ID: <3F4FDED4.70308@iol.cz> Date: Sat, 30 Aug 2003 01:16:36 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: cs, en MIME-Version: 1.0 To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 23:23:08 -0000 Jan-Henrik Haukeland wrote: >Martin Pala writes: > > > >>Jan-Henrik Haukeland wrote: >>* >> >> >>>What do others think? Is it interesting to add an external standalone >>>connection test to monit? >>> >>> >>> >>I agree, it is very interesting. >> >> > >Let's add it then :-) Because by doing this simple thing (for us) it >opens up a whole new ballpark for monit. > Yes :) I think it could be good to add it in 4.1, which could be released soon after 4.0 (this is non critical feature) > >Before we start we must agree on the syntax for the new statement >though. Your proposal: > > check host up2date-http with address 66.187.232.110 > if failed host rhn.redhat.com port 80 protocol http then {...} > if failed host rhn.redhat.com port 443 type tcpssl protocol http > and request "/my/index.html" then {..} > alert hauk@tildeslash.com > >Is good because it lets us keep the current if-connection-test as it >is and can use several connection tests in an entry. But the syntax is >a bit redundant, since the hostname/address is given twice. It is easy >to write a new rule in the parser for a remote connection test, so we >do not *need* to keep the connection test as it is for a remote test. > >Here is another suggestion, modeled after your check-file test, where >the host and port is given in the check line and the if-test simply >refere to the host and port: > > check host rhn.redhat.com port 80 > if failed protocol http and request > "/my/index.html" and with timeout 15 seconds then {...} > alert hauk@tildeslash.com > >The drawback with this solution is that since the host and port is >stated in the check-line there can only be *one* if-failed.. test. So >if you want to test more than one port at the server you must write >several check-host statements. > >Finally, here is a suggestion using a rewrite of your proposal. Here >the check-block simply contains a descriptive name for the connection >test. [In the parser we will also require that host is stated for a >remote connection test (in the current grammar host is not required >and if not stated is assumed to be localhost).] > > check connection redhat <- redhat is just a descriptive name for the test > if failed host rhn.redhat.com port 80 protocol http and request > "/my/index.html" then alert > if failed host rhn.redhat.com port 443 type tcpssl protocol http > and request "/my/index.html" then alert > alert hauk@tildeslash.com > This has small drawback too - for example it could be good to add optional icmp echo request test (some machines can deny icmp by default so it should be optional). In such case this syntax requires specification of the host in icmp test statement, such as: check connection redhat if failed host rhn.redhat.com port 80 protocol http and request "/my/index.html" then alert if failed host rhn.redhat.com port 443 type tcpssl protocol http and request "/my/index.html" then alert if failed icmp host 66.187.232.110 type echoRequest then alert alert hauk@tildeslash.com => you must specify the host too - in the case that there will be another tests (icmp provides more interesting types then just echoRequest), the host specification will become more reduntant then in the first proposal (specification of the host for each test). In addition 'host' portion of the test is optional - it is interesting to use it in the case of remote host monitoring only if you need to use virtual hosts. If it is not your case, the first proposal could be simply written as: check host up2date-http with address 66.187.232.110 if failed port 80 protocol http then {...} if failed port 443 type tcpssl protocol http and request "/my/index.html" then {..} if failed icmp type echoRequest then alert alert hauk@tildeslash.com Btw. the icmp test syntax is interesting as well - some options (the utilization of host specification depends on particular above syntax proposals): 1.) if failed ping [host 66.187.232.110] then alert or 2.) if failed [host 66.187.232.110] type icmp protocol echoRequest then alert or 3.) if failed icmp type echoRequest then alert The first is nost simple, but in the case that more ICMP types will be implemented, it will require new standalone tests (for similar thing) => i think it is not suitable. The second is nice, but we can't probably base it on extended port test (because it doesn't need port specification) => it could be problematic (just first sigth - maybe it will be simple and possible). The usage of 'type' is not accurate too (mixture of different network layers - IP based protocols vs. ICMP word is not correct). The third is maybe the cleanest of all - the usage of 'type' word is correct in the context of port test. Conclusion: I preffer first proposal and the third form of icmp echo test: check host up2date-http with address 66.187.232.110 if failed port 80 protocol http then {...} if failed port 443 type tcpssl protocol http and request "/my/index.html" then {..} if failed icmp type echoRequest then alert alert hauk@tildeslash.com Martin From MAILER-DAEMON Fri Aug 29 19:50:54 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19ssyN-0003TG-RM for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 19:48:07 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19ssuI-0002N2-OB for monit-general@nongnu.org; Fri, 29 Aug 2003 19:43:54 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sstQ-0001oh-V7 for monit-general@nongnu.org; Fri, 29 Aug 2003 19:43:02 -0400 Received: from [62.24.64.14] (helo=ms2.dkm.cz) by monty-python.gnu.org with smtp (Exim 4.22) id 19ssqS-0000ij-LL for monit-general@nongnu.org; Fri, 29 Aug 2003 19:39:57 -0400 Received: (qmail 87530 invoked by uid 0); 29 Aug 2003 23:39:53 -0000 Received: from r3h125.mistral.cz (HELO iol.cz) (213.220.199.125) by ms2.dkm.cz with SMTP; 29 Aug 2003 23:39:53 -0000 Message-ID: <3F4FE449.6050006@iol.cz> Date: Sat, 30 Aug 2003 01:39:53 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: cs, en MIME-Version: 1.0 To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 23:48:03 -0000 Jan-Henrik Haukeland wrote: >Jan-Henrik Haukeland writes: > > > >>Here is another suggestion, modeled after your check-file test, where >>the host and port is given in the check line and the if-test simply >>refere to the host and port: >> >> check host rhn.redhat.com port 80 >> if failed protocol http and request >> "/my/index.html" and with timeout 15 seconds then {...} >> alert hauk@tildeslash.com >> >>The drawback with this solution is that since the host and port is >>stated in the check-line there can only be *one* if-failed.. test. So >>if you want to test more than one port at the server you must write >>several check-host statements. >> >> > >Well of course, if you take the port from the check line and put it >into a if-connection-test you can test several ports at the host in >one entry. I think maybe this proposal has the nicest syntax. > > check host rhn.redhat.com > if failed port 80 protocol http and request > "/my/index.html" and with timeout 15 seconds then {...} > if failed port 443 type TCPSSL protocol http then {..} > alert hauk@tildeslash.com > >One slight drawback is that one will have to write several check-host >entries if you want to test named-virtual hosts at the same server. >But IMHO, the drawback is small compared with the nice syntax above :) > >Shall we go for this one? > > > Ahh, i'm sorry - in my last mail i replied to your previous mail and hove not seen thos message ... However if we'll use this one: check host rhn.redhat.com if failed port 80 protocol http and request "/my/index.html" and with timeout 15 seconds then {...} if failed port 443 type TCPSSL protocol http then {..} alert hauk@tildeslash.com we'll have problems in the case that you will need to split services running on remote host to more then one monitoring service instance. You can need it, because you can for example make local apache depend on remote mysql and and different service (for example smtp proxy) on remote messaging servers running on the same remote host. Apache and pop3 multiplexor are not dependend on each other, nor on each others prerequisite service => as i mentioned in my last mail, the first proposal is probably better: check process apache with pidfile /var/run/httpd.pid start program = "/etc/init.d/apache start" stop program = "/etc/init.d/apache stop" if failed port 80 protocol http then restart alert hauk@tildeslash.com depends on mysql check host mysql on address 10.1.1.1 if failed port 3306 then stop alert hauk@tildeslash.com check process mmp with pidfile /var/run/mmp.pid start program = "/etc/init.d/mmp start" stop program = "/etc/init.d/mmp stop" if failed port 110 protocol pop then restart alert hauk@tildeslash.com depends on pop-backend1 depends on pop-backend2 check host pop-backend1 on address 10.1.1.1 if failed port 110 then stop alert hauk@tildeslash.com check host pop-backend2 on address 10.1.1.2 if failed port 110 then stop alert hauk@tildeslash.com As you can see, host 10.1.1.1 provides pop3 as well as mysql, first syntax is more general and allows such setups. Martin From MAILER-DAEMON Fri Aug 29 20:46:28 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19strb-0008BB-JA for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 20:45:11 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19stoU-0006wB-Ax for monit-general@nongnu.org; Fri, 29 Aug 2003 20:41:58 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sto9-0006gs-Vs for monit-general@nongnu.org; Fri, 29 Aug 2003 20:41:39 -0400 Received: from [62.24.64.14] (helo=ms2.dkm.cz) by monty-python.gnu.org with smtp (Exim 4.22) id 19stnu-0006ae-53 for monit-general@nongnu.org; Fri, 29 Aug 2003 20:41:22 -0400 Received: (qmail 6222 invoked by uid 0); 30 Aug 2003 00:14:41 -0000 Received: from r3h125.mistral.cz (HELO iol.cz) (213.220.199.125) by ms2.dkm.cz with SMTP; 30 Aug 2003 00:14:41 -0000 Message-ID: <3F4FEC71.20200@iol.cz> Date: Sat, 30 Aug 2003 02:14:41 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: cs, en MIME-Version: 1.0 To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> <3F4FE449.6050006@iol.cz> In-Reply-To: <3F4FE449.6050006@iol.cz> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 00:45:10 -0000 Martin Pala wrote: > Jan-Henrik Haukeland wrote: > >> Jan-Henrik Haukeland writes: >> >> >> >>> Here is another suggestion, modeled after your check-file test, where >>> the host and port is given in the check line and the if-test simply >>> refere to the host and port: >>> >>> check host rhn.redhat.com port 80 >>> if failed protocol http and request >>> "/my/index.html" and with timeout 15 seconds then {...} >>> alert hauk@tildeslash.com >>> >>> The drawback with this solution is that since the host and port is >>> stated in the check-line there can only be *one* if-failed.. test. So >>> if you want to test more than one port at the server you must write >>> several check-host statements. >>> >> >> >> Well of course, if you take the port from the check line and put it >> into a if-connection-test you can test several ports at the host in >> one entry. I think maybe this proposal has the nicest syntax. >> >> check host rhn.redhat.com >> if failed port 80 protocol http and request >> "/my/index.html" and with timeout 15 seconds then {...} >> if failed port 443 type TCPSSL protocol http then {..} >> alert hauk@tildeslash.com >> >> One slight drawback is that one will have to write several check-host >> entries if you want to test named-virtual hosts at the same server. >> But IMHO, the drawback is small compared with the nice syntax above :) >> >> Shall we go for this one? >> >> >> > Ahh, i'm sorry - in my last mail i replied to your previous mail and > hove not seen thos message ... Ugly keying mistakes - i'll better go to bed :) > > > However if we'll use this one: > > check host rhn.redhat.com > if failed port 80 protocol http and request > "/my/index.html" and with timeout 15 seconds then {...} > if failed port 443 type TCPSSL protocol http then {..} > alert hauk@tildeslash.com > > we'll have problems in the case that you will need to split services > running on remote host to more then one monitoring service instance. > You can need it, because you can for example make local apache depend > on remote mysql and and different service (for example smtp proxy) Note: in the example bellow pop3 proxy > on remote messaging servers running on the same remote host. Apache > and pop3 multiplexor are not dependend on each other, nor on each > others prerequisite service => as i mentioned in my last mail, the > first proposal is probably better: > > check process apache with pidfile /var/run/httpd.pid > start program = "/etc/init.d/apache start" stop program = > "/etc/init.d/apache stop" > if failed port 80 protocol http then restart > alert hauk@tildeslash.com > depends on mysql > > check host mysql on address 10.1.1.1 > if failed port 3306 then stop > alert hauk@tildeslash.com Note: this will stop local apache in the case that remote mysql went offline > > > check process mmp with pidfile /var/run/mmp.pid > start program = "/etc/init.d/mmp start" stop program = > "/etc/init.d/mmp stop" > if failed port 110 protocol pop then restart > alert hauk@tildeslash.com > depends on pop-backend1 > depends on pop-backend2 > > check host pop-backend1 on address 10.1.1.1 > if failed port 110 then stop > alert hauk@tildeslash.com > > check host pop-backend2 on address 10.1.1.2 > if failed port 110 then stop > alert hauk@tildeslash.com Note: In the case that some of backend servers is down, it will stop the frontend too. In real world such behavior (to stop it) is undesirable - this is just example to show possible remote and local services dependencies. Martin From MAILER-DAEMON Fri Aug 29 20:55:44 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19su15-00043Q-B4 for mharc-monit-general@gnu.org; Fri, 29 Aug 2003 20:54:59 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19su0q-0003rg-9E for monit-general@nongnu.org; Fri, 29 Aug 2003 20:54:44 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19su0M-0003bO-HL for monit-general@nongnu.org; Fri, 29 Aug 2003 20:54:15 -0400 Received: from [62.179.234.75] (helo=d22mdi.cm.chello.no) by monty-python.gnu.org with esmtp (Exim 4.22) id 19stzX-0003GF-EB for monit-general@nongnu.org; Fri, 29 Aug 2003 20:53:23 -0400 Received: (from hauk@localhost) by d22mdi.cm.chello.no (8.11.6/8.11.6) id h7U0lcB11895; Sat, 30 Aug 2003 02:47:38 +0200 X-Authentication-Warning: d22mdi.cm.chello.no: hauk set sender to hauk@tildeslash.com using -f To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> <3F4FE449.6050006@iol.cz> From: Jan-Henrik Haukeland Organization: /dev/urandom X-Home-Page: http://www.tildeslash.com X-Cite: Amor Vincit Omnia Date: Sat, 30 Aug 2003 02:47:38 +0200 In-Reply-To: <3F4FE449.6050006@iol.cz> (Martin Pala's message of "Sat, 30 Aug 2003 01:39:53 +0200") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 00:54:58 -0000 Martin Pala writes: > check process apache with pidfile /var/run/httpd.pid > start program = "/etc/init.d/apache start" stop program = > "/etc/init.d/apache stop" > if failed port 80 protocol http then restart > alert hauk@tildeslash.com > depends on mysql > > check host mysql on address 10.1.1.1 > if failed port 3306 then stop > alert hauk@tildeslash.com > > check process mmp with pidfile /var/run/mmp.pid > start program = "/etc/init.d/mmp start" stop program = > "/etc/init.d/mmp stop" > if failed port 110 protocol pop then restart > alert hauk@tildeslash.com > depends on pop-backend1 > depends on pop-backend2 > > check host pop-backend1 on address 10.1.1.1 > if failed port 110 then stop > alert hauk@tildeslash.com > > check host pop-backend2 on address 10.1.1.2 > if failed port 110 then stop > alert hauk@tildeslash.com > > > As you can see, host 10.1.1.1 provides pop3 as well as mysql, first > syntax is more general and allows such setups. Good point, with my proposal you can only have *one* check-host entry in the control file per hostname/address. And the above example will not work with this proposal. But on the other hand, I could argue that you can roll-up the above entries into the process entry like so :-) > check process apache with pidfile /var/run/httpd.pid > start program = "/etc/init.d/apache start" > stop program = "/etc/init.d/apache stop" > if failed port 80 protocol http then restart if failed host 10.1.1.1 port 3306 then stop > alert hauk@tildeslash.com > depends on mysql > > check process mmp with pidfile /var/run/mmp.pid > start program = "/etc/init.d/mmp start" stop program = > "/etc/init.d/mmp stop" > if failed port 110 protocol pop then restart > alert hauk@tildeslash.com if failed host 10.1.1.1 port 110 then stop if failed host 10.1.1.2 port 110 then stop But, yes, you will miss out on the possibilities a depend tree can provide. Hmm, I still like my proposal, but I can see that it's not so flexible. How about a compromise? I think that it is a possibility that host in your proposal could be mistaken for a real DNS host record and not as a descriptive name, which in fact it is, so maybe we should rewrite the statement to something like this? check connection pop-backend2 on host 10.1.1.2 # or host xzzy.org if failed port 110 then alert alert hauk@tildeslash.com PS. I know we are in a freeze, and I know that I'm shooting myself in the foot when I suggest that we add this remote host test in the upcomming 4.0 release. But the reason is that it's very useful, and it is easy to realize. It will take me (or anyone of you) only about 1-2 hours to add this check. PPS. But the ICMP test you suggested in the other mail should be postponed to a later release. It could be fun and I even have code available for building a handmade ICMP ip-packet using a raw socket. -- Jan-Henrik Haukeland From MAILER-DAEMON Sat Aug 30 03:55:36 2003 Received: from list by monty-python.gnu.org with archive (Exim 4.22) id 19t0a6-0000FU-FT for mharc-monit-general@gnu.org; Sat, 30 Aug 2003 03:55:34 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19t0a0-0000EB-Qy for monit-general@nongnu.org; Sat, 30 Aug 2003 03:55:28 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19t0Zw-0000Cz-K3 for monit-general@nongnu.org; Sat, 30 Aug 2003 03:55:26 -0400 Received: from [62.24.64.14] (helo=ms2.dkm.cz) by monty-python.gnu.org with smtp (Exim 4.22) id 19t0Zu-0000C9-QH for monit-general@nongnu.org; Sat, 30 Aug 2003 03:55:22 -0400 Received: (qmail 43065 invoked by uid 0); 30 Aug 2003 07:55:20 -0000 Received: from r3h125.mistral.cz (HELO iol.cz) (213.220.199.125) by ms2.dkm.cz with SMTP; 30 Aug 2003 07:55:20 -0000 Message-ID: <3F505868.1020300@iol.cz> Date: Sat, 30 Aug 2003 09:55:20 +0200 From: Martin Pala User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: cs, en MIME-Version: 1.0 To: This is the general mailing list for monit References: <20030829141625.GA29050@kadath.office.spb.ramax.ru> <3F4F9705.9080403@iol.cz> <3F4FE449.6050006@iol.cz> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: test X-BeenThere: monit-general@nongnu.org X-Mailman-Version: 2.1.2 Precedence: list Reply-To: This is the general mailing list for monit List-Id: This is the general mailing list for monit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 07:55:31 -0000 Jan-Henrik Haukeland wrote: >Martin Pala writes: > > > >> check process apache with pidfile /var/run/httpd.pid >> start program = "/etc/init.d/apache start" stop program = >> "/etc/init.d/apache stop" >> if failed port 80 protocol http then restart >> alert hauk@tildeslash.com >> depends on mysql >> >> check host mysql on address 10.1.1.1 >> if failed port 3306 then stop >> alert hauk@tildeslash.com >> >> check process mmp with pidfile /var/run/mmp.pid >> start program = "/etc/init.d/mmp start" stop program = >> "/etc/init.d/mmp stop" >> if failed port 110 protocol pop then restart >> alert hauk@tildeslash.com >> depends on pop-backend1 >> depends on pop-backend2 >> >> check host pop-backend1 on address 10.1.1.1 >> if failed port 110 then stop >> alert hauk@tildeslash.com >> >> check host pop-backend2 on address 10.1.1.2 >> if failed port 110 then stop >> alert hauk@tildeslash.com >> >> >>As you can see, host 10.1.1.1 provides pop3 as well as mysql, first >>syntax is more general and allows such setups. >> >> > >Good point, with my proposal you can only have *one* check-host entry >in the control file per hostname/address. And the above example will >not work with this proposal. But on the other hand, I could argue that >you can roll-up the above entries into the process entry like so :-) > > > >> check process apache with pidfile /var/run/httpd.pid >> start program = "/etc/init.d/apache start" >> stop program = "/etc/init.d/apache stop" >> if failed port 80 protocol http then restart >> >> > if failed host 10.1.1.1 port 3306 then stop > > >> alert hauk@tildeslash.com >> depends on mysql >> >> check process mmp with pidfile /var/run/mmp.pid >> start program = "/etc/init.d/mmp start" stop program = >> "/etc/init.d/mmp stop" >> if failed port 110 protocol pop then restart >> alert hauk@tildeslash.com >> >> > if failed host 10.1.1.1 port 110 then stop > if failed host 10.1.1.2 port 110 then stop > Nice shortcut :) On the other hand if you specify remote connection test in its own monitoring service instance, you can use remote monitoring specific tests (such as mentioned icmp), which need not to be supported in process monitoring class. > >But, yes, you will miss out on the possibilities a depend tree can >provide. Hmm, I still like my proposal, but I can see that it's not so >flexible. How about a compromise? I think that it is a possibility >that host in your proposal could be mistaken for a real DNS host >record and not as a descriptive name, which in fact it is, so maybe we >should rewrite the statement to something like this? > > check connection pop-backend2 on host 10.1.1.2 # or host xzzy.org > if failed port 110 then alert > alert hauk@tildeslash.com > No problem - both notation (hostname or IP address) are usefull - in the case that the hostname is in hosts table (which is usual for critical hosts) there will be no problem. If the monit user wants not to depend on hosts table, he can choose raw form (IP address). > > >PS. I know we are in a freeze, and I know that I'm shooting myself in >the foot when I suggest that we add this remote host test in the >upcomming 4.0 release. But the reason is that it's very useful, and it >is easy to realize. It will take me (or anyone of you) only about 1-2 >hours to add this check. > You are rigth, the modification will be very simple and it is probably better to add it to 4.0. You choose :) >PPS. But the ICMP test you suggested in the other mail should be >postponed to a later release. It could be fun and I even have code >available for building a handmade ICMP ip-packet using a raw socket. > > > Super :) Martin