www site monitor

2012-02-10 Thread pch0317

Hi list,

I must monitor remote site to check that it works. I refresh this site 
from time to time in web browser. Can I automate this process?

I search for service which:
- monitors *remote* WWW site (via http request)
- when remote site doesn't respond for example 5 minutes it notify some 
person (via e-mail or SMS).


Is that service available in Debian repository? Or is there any 
commercial product which do that?



Best regards


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4f3553de.50...@gmail.com



Re: www site monitor

2012-02-10 Thread Michel Blankleder
On Friday 10 February 2012 19:29:02 pch0317 wrote:
 Hi list,
 
 I must monitor remote site to check that it works. I refresh this site
 from time to time in web browser. Can I automate this process?
 I search for service which:
 - monitors *remote* WWW site (via http request)
 - when remote site doesn't respond for example 5 minutes it notify some
 person (via e-mail or SMS).
 
 Is that service available in Debian repository? Or is there any
 commercial product which do that?
 
 
 Best regards

You can use Nagios.
It has a plugin that does what you want.
Hope it helps
Michel


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201202101942.38164.michel.blankle...@gmail.com



Re: www site monitor

2012-02-10 Thread Glenn English

On Feb 10, 2012, at 10:29 AM, pch0317 wrote:

 I search for service which:
 - monitors *remote* WWW site (via http request)
 - when remote site doesn't respond for example 5 minutes it notify some 
 person (via e-mail or SMS).
 
 Is that service available in Debian repository?

I've made those things happen on my nets with both Monit and Nagios (I think; I 
never can remember whether it's Nessus or Nagios), but Monit is a whole lot 
easier to get going (the other one is vastly more flexible, though).

-- 
Glenn English




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/f3f561c4-03c8-4cc1-b097-54ae4ff63...@slsware.com



Re: www site monitor

2012-02-10 Thread Julien Claassen

Hi!
  I think, you could write a script for this. Using perhaps ping, to just see, 
if the server responds or wget to download a certain file. I'm not sure though 
about their timeouts. I think you can set a tieout with wget. Then you could 
use mail to send an e-mail.
  I suppose, tat there might be a more comfotable way with more GUI stuff, but 
that would do the trick.

  I've seen:
ping -W timeout_in_secs server
  This will only timeout after timeout_secs, if no response is received.
  The line to send mail would be:
cat file | nail -s subject -r from@host to@host
  That should do.
  Warmly yours
 Julien

=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!

==  Find my music at  ==
http://juliencoder.de/nama/music.html
.
If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you. (Winnie the Pooh)


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: 
http://lists.debian.org/alpine.deb.2.00.1202101838010.30...@flower.world.net



Re: www site monitor

2012-02-10 Thread Roberto Scattini
On Fri, Feb 10, 2012 at 2:29 PM, pch0317 pch0...@gmail.com wrote:

 Hi list,

 I must monitor remote site to check that it works. I refresh this site
 from time to time in web browser. Can I automate this process?
 I search for service which:
 - monitors *remote* WWW site (via http request)
 - when remote site doesn't respond for example 5 minutes it notify some
 person (via e-mail or SMS).

 Is that service available in Debian repository? Or is there any commercial
 product which do that?



you can try mon.
easier setup than nagios, but few options.

http://mon.wiki.kernel.org


-- 
Roberto Scattini


Re: www site monitor

2012-02-10 Thread Camaleón
On Fri, 10 Feb 2012 17:29:02 +, pch0317 wrote:

 I must monitor remote site to check that it works. I refresh this site
 from time to time in web browser. Can I automate this process? I search
 for service which:
 - monitors *remote* WWW site (via http request) 
 - when remote site doesn't respond for example 5 minutes it notify some 
 person (via e-mail or SMS).
 
 Is that service available in Debian repository? Or is there any
 commercial product which do that?

Here is a nice selection for available services (free/paid) and tools:

http://www.hongkiat.com/blog/monitor-website-up-downtime-30-free-web-services-and-tools/

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/jh3pic$777$5...@dough.gmane.org



Re: www site monitor

2012-02-10 Thread Scott Ferguson
On 11/02/12 04:29, pch0317 wrote:
 Hi list,
 
 I must monitor remote site to check that it works. I refresh this site
 from time to time in web browser. Can I automate this process?
 I search for service which:
 - monitors *remote* WWW site (via http request)
 - when remote site doesn't respond for example 5 minutes it notify some
 person (via e-mail or SMS).
 
 Is that service available in Debian repository? Or is there any
 commercial product which do that?
 
 
 Best regards
 
 
As has already been suggested - mon will do the job *if* all you want to
do is check to see the server is up Nagios will do more, though it's
probably overkill.

It's possible that just knowing the server is serving something* may
not be what you're after...

If you want to check that the site is functioning[*1] as expected then
you have several, scripted, options depending on how deep you want to
test (any modifications, file size, site wide tests).


Use wget[*2]

Use curl and just compare filesize against an expected value - or use
pgp to check for any changes.

There's a number of gratis webservices like pingdom which will confirm
the site is up (and maybe serving fake antivirus or 503s).



[*1] you may wish to test ports 25, 53, 80 and 443 (and others).
My personal preference is to run check on the server, then send (tiny)
email status reports to a remote client. The absence of a regular report
indicates a serious problem. Changes to the subject line indicate
various errors. The remote client box can then alert your mobile with an
email if needed.

[*2] eg.:-
#!/bin/bash
WGET=/usr/bin/wget
$WGET -q --tries=20 --timeout=5 $site2test -O /tmp/site.test  /dev/null
if [ ! -s /tmp/site.test ];then
echo crapulence
else
echo go back to sleep
fi
===4cron==
* * * * * /usr/bin/wget $site2test  --timeout 20 -O - 2/dev/null  |
grep go back to sleep || echo crapulence | /usr/bin/mail -v -s
crapulence d.d...@wonderland.mil
==


Kind regards

-- 
Iceweasel/Firefox extensions for finding answers to Debian questions:-
https://addons.mozilla.org/en-US/firefox/collections/Scott_Ferguson/debian/


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f3587eb.8010...@gmail.com



Re: www site monitor

2012-02-10 Thread Chen Wei
On Fri, Feb 10, 2012 at 05:29:02PM +, pch0317 wrote:
 Hi list,
 
 I must monitor remote site to check that it works. I refresh this
 site from time to time in web browser. Can I automate this process?
 I search for service which:
 - monitors *remote* WWW site (via http request)
 - when remote site doesn't respond for example 5 minutes it notify
 some person (via e-mail or SMS).
 
 Is that service available in Debian repository? Or is there any
 commercial product which do that?
 

assume you have a local working smtp server, let's check if debian is
online by running following script from cron.

---Begin--
#!/usr/bin/env python
import urllib2
import cookielib

URL = 'http://www.debian.org/'

def browser():
cj = cookielib.CookieJar()
cookie_support = urllib2.HTTPCookieProcessor(cj)
opener = urllib2.build_opener(urllib2.HTTPHandler, cookie_support)
return opener


def sendmail(subject, msgbody):
'''send mail to gmail via a working local exim4'''
import smtplib
from email.mime.text import MIMEText
msg = MIMEText(msgbody)
from_addr = 'my_address'
dest_addr = 'man_on_duty'
msg['Subject'] = subject
msg['From'] = from_addr
msg['To'] = dest_addr
msg.set_charset('utf8')
s_obj = smtplib.SMTP('localhost')
s_obj.sendmail(from_addr, dest_addr, msg.as_string())
print 'Successfully sent mail to {0}'.format(dest_addr)
s_obj.quit()


def main(url):
brs = browser()
try:
site = brs.open(url)
except urllib2.URLError:
sendmail('datacenter on fire?')
except urllib2.HTTPError:
sendmail('or under water')


if __name__ == __main__:
main(URL)
end---


-- 
Chen Wei


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120211040017.GA5364@Tungsten.DarkStar