Date: Tue, 3 Jan 2006 15:17:05 +0200 From: "Halid Faith" <maslak@ihlas.net.tr> To: "Eric Kamara" <kamara@trueafrican.com> Cc: freebsd-questions@freebsd.org Subject: Re: check script for tcp connection Message-ID: <027b01c61067$fe3db290$dc96eed5@ihlasnetym> References: <20060103103659.5639C25F125@mail.trueafrican.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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" <kamara@trueafrican.com> To: "'Halid Faith'" <maslak@ihlas.net.tr> Cc: <freebsd-questions@freebsd.org> 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" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?027b01c61067$fe3db290$dc96eed5>