From owner-freebsd-questions@FreeBSD.ORG Tue Jan 3 13:17:19 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DCE016A41F for ; Tue, 3 Jan 2006 13:17:19 +0000 (GMT) (envelope-from maslak@ihlas.net.tr) Received: from mailhub.ihlas.net.tr (mailhub.ihlas.net.tr [213.238.128.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53B0B43D49 for ; Tue, 3 Jan 2006 13:17:18 +0000 (GMT) (envelope-from maslak@ihlas.net.tr) Received: (qmail 32606 invoked from network); 3 Jan 2006 13:18:53 -0000 Received: from unknown (HELO ihlasnetym) (maslak@213.238.150.220) by 0 with ESMTPA; 3 Jan 2006 13:18:53 -0000 Message-ID: <027b01c61067$fe3db290$dc96eed5@ihlasnetym> From: "Halid Faith" To: "Eric Kamara" References: <20060103103659.5639C25F125@mail.trueafrican.com> Date: Tue, 3 Jan 2006 15:17:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Cc: freebsd-questions@freebsd.org Subject: Re: check script for tcp connection X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2006 13:17:19 -0000 Thanks a lot I have installed monit from ports. But I have a problem. monit daemon is running . But Although set daemon is 60 ( 1 minute interval) in any problem it send an email to sysadmin only once time. I want the monit to send a mail every interval during any problem. my configuration is below; in /etc/monitrc set daemon 60 # Poll at 2-minute intervals #set logfile syslog facility log_daemon # Set syslog logging # # (facility LOG_DAEMON) # set mailserver mail.bar.baz, backup.bar.baz port 10025, localhost # # # Set localhost as a fall back server # # if the primary mail server fails # # and the backup mail server fails set mail-format # Set a default mail from-address for { from: monit@foo.bar } # all alert messages emitted by monit set alert abc@domain.com # Send alert to system admin on any event check host test with address 192.168.1.111 if failed icmp type echo with timeout 3 seconds then alert # if failed port 3306 then alert if failed port 81 protocol http then alert What shall I do ? Thanks ----- Original Message ----- From: "Eric Kamara" To: "'Halid Faith'" Cc: Sent: Tuesday, January 03, 2006 12:31 PM Subject: RE: check script for tcp connection > > > > -----Original Message----- > > From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd- > > questions@freebsd.org] On Behalf Of Halid Faith > > Sent: Tuesday, January 03, 2006 12:49 PM > > To: freebsd-questions@freebsd.org > > Subject: check script for tcp connection > > > > Hello > > > > I use FreeBSD6.0. I want to use a script to check two or more case. > > My first cases are as below; > > First case My Server will check the remote ip address alive or not as icmp > > Second case My server will connect to other remote ip address as tcp > > protocol like connected or not. > > > > if my server could not see the remote ip address AND not connect tcp > > connection, My server will send an email me. > > > > How can I write a simple script about that ? > > Why don't you try out monit(/usr/ports/sysutils/monit) in the ports? It can > do that and much more and yet is very easy to configure. > > Regards, > Eric > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >