Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a gnome applet that will let me configure a list of URLs to be verified and report when some is unavailable ? Preferably using notifiations.

The validation must use HTTP GET or HEAD .

share|improve this question
up vote 3 down vote accepted

Maybe you can take this as a base (needs python-appindicator and python-notify):

import gtk
import gobject
import urllib2
import pynotify
import appindicator

urls = ["",

ind = appindicator.Indicator("url-checker", "indicator-messages",
ind.set_attention_icon ("indicator-messages-new")
menu = gtk.Menu()
# yadda yadda yadda

def update(urls, ind):
    err = ""
    for url in urls:
            if (urllib2.urlopen(url).getcode() != 200):
                err += "%s is down\n" % url
        except urllib2.URLError:
            err += "%s is down\n" % url
    if err:
        pynotify.Notification("Bad news:", err).show()

    return True

update(urls, ind)
timeout = 300000 # 5 minutes
gobject.timeout_add(timeout, update, urls, ind)
share|improve this answer
It just needs a config dialog and it's perfect ;) – João Pinto Nov 9 '10 at 16:04
That, a menu indicating which page is offline in case you missed the notification, a possibility to exit, nice icons, packaging, etc. etc. - unfortunately I'm way too unmotivated. :P – htorque Nov 9 '10 at 16:09

You could write a small bash script to throw notifications at you... Something like:


for site in $(cat ~/.sites); do
    if ! ping -c 1 -w 5 "$site" &>/dev/null ; then 
      notify-send "$site is down!!"

Your list of sites to check lives in ~/.sites.

Then you just need to cron that up to run. You might need to export DISPLAY=:0 in cron so the notification shows up in the right place.

Note that if you use a DNS intermediary like OpenDNS, if a domain name you ping doesn't exist, it'll hit their no-domain search server. Therefore it's probably safer (though less informative) to use IPs.

oli@bert:~$ ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_req=1 ttl=54 time=33.1 ms
64 bytes from ( icmp_req=2 ttl=54 time=32.8 ms
share|improve this answer

You can install the link-monitor-applet Install link-monitor-applet (homepage : which puts this functionality on your gnome panel very elegantly. Link Monitor is in repositories, so :

sudo apt-get install link-monitor-applet

However, I suspect that since you said "URL" you might be looking at something that does a GET to the websites, reporting if it doesn't get a response? Can you clarify if a simple ping is enough? Some websites, for example, won't let you ping them. Worse, getting a ping doesn't guarantee that the website is actually up.

Since you've specified that you'd like this solution to be URL-based, you can use Oli's solution above, but first :

sudo apt-get install httping

And the script becomes :


for site in $(cat ~/.sites); do
    if ! httping -c 1 -g "$site" &>/dev/null ; then 
      notify-send "$site is down!!"

NOTE : This wasn't working for me until I realised that I had configured my home router to use OpenDNS. This means that timed-out sites are redirected to the OpenDNS landing page instead, meaning that this script never generated an on-screen notification! One to watch.

share|improve this answer
I do want a GET and check for an HTTP 200 (ok) reply. – João Pinto Nov 9 '10 at 15:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.