Talvez você possa usar isso como base (precisa de python-appindicator e python-notify):
import gtk
import gobject
import urllib2
import pynotify
import appindicator
urls = ["http://askubuntu.com",
"http://not.available.com"]
ind = appindicator.Indicator("url-checker", "indicator-messages",
appindicator.CATEGORY_APPLICATION_STATUS)
ind.set_status(appindicator.STATUS_ACTIVE)
ind.set_attention_icon ("indicator-messages-new")
menu = gtk.Menu()
# yadda yadda yadda
ind.set_menu(menu)
def update(urls, ind):
err = ""
for url in urls:
try:
if (urllib2.urlopen(url).getcode() != 200):
err += "%s is down\n" % url
except urllib2.URLError:
err += "%s is down\n" % url
if err:
ind.set_status(appindicator.STATUS_ATTENTION)
pynotify.Notification("Bad news:", err).show()
else:
ind.set_status(appindicator.STATUS_ACTIVE)
return True
update(urls, ind)
timeout = 300000 # 5 minutes
gobject.timeout_add(timeout, update, urls, ind)
gtk.main()