LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Web Monitoring.

[ILUG] Web Monitoring.

John P . Looney john at antefacto.com
Tue Feb 20 14:21:29 GMT 2001


On Tue, Feb 20, 2001 at 02:03:32PM +0000, Noel Harnett mentioned:
> I need to set up a script file to monitor a specific web address, and if
> the URL is down send out a pager or a text message. I know there are
> services out there for this, but hopefully it's something that can be
> done in house, so to speak.

 I was just playing with "mon"[0] yesterday. Basically, you set it up so
that it calls a script every few minutes, and if there is a problem, do
something. For instance:

 Making a /etc/mon/mon.cf file with:

hostgroup cluster goodwillow evilwillow

watch goodwillow
    service ping
        interval 2m
        monitor fping.monitor
        period wd {Mon-Sun} hr {7am-10pm}
            alert mail.alert john at antefacto.com
            alertevery 1h
            alert mail.alert -S "Mysql is down!" john at antefacto.com
            upalert mail.alert -S "Mysql is back!" john at antefacto.com
    service mysql
        interval 2m
        monitor msql-mysql.monitor --mode mysql --username=test --password=test --database=test
        randskew 1s
        depend SELF:ping
        randskew 1s
        period wd {mon-sun}
            alert mail.alert john at antefacto.com
            alertevery 1h
            alert mail.alert -S "Mysql is down!" john at antefacto.com
            upalert mail.alert -S "Mysql is back!" john at antefacto.com

watch goodwillow
    service ping
        interval 2m
        monitor fping.monitor
        period wd {Mon-Sun} hr {7am-10pm}
            alert mail.alert john at antefacto.com
            alertevery 1h
            alert mail.alert -S "Mysql is down!" john at antefacto.com
            upalert mail.alert -S "Mysql is back!" john at antefacto.com
    service mysql
        interval 2m
        monitor msql-mysql.monitor --mode mysql --username=test --password=test --database=test
        randskew 1s
        depend SELF:ping
        randskew 1s
        period wd {mon-sun}
            alert mail.alert john at antefacto.com
            alertevery 1h
            alert mail.alert -S "Mysql is down!" john at antefacto.com
            upalert mail.alert -S "Mysql is back!" john at antefacto.com

 Will test the mysql server, as well as a standard "ping" on the machines
every 2 minutes, and if the mysql server is down, it'll email me, and if
the machine isn't pingable either, it'll no that mysql depends on "ping"
working, so won't send me two messages every time. Kinda cool. It has
loads of "alert" scripts for everything from http checking to free disk
space on NetApps, or you could write your own.

Kate

[0] http://www.kernel.org/software/mon/

-- 
 When I say 'free', I mean 'free': free from bond, of chain or command: 
to go where you will, even to Mordor, Saruman, if you desire. " 
    -- Gandalf, paraphrasing the choice between Free and Non-free software




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell