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: [EMAIL PROTECTED] } # all alert messages emitted by monit set alert [EMAIL PROTECTED] # 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" <[EMAIL PROTECTED]> To: "'Halid Faith'" <[EMAIL PROTECTED]> Cc: <freebsd-questions@freebsd.org> Sent: Tuesday, January 03, 2006 12:31 PM Subject: RE: check script for tcp connection > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:owner-freebsd- > > [EMAIL PROTECTED] 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 "[EMAIL PROTECTED]" > _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"