pony_monitor 0.1

Monitor a URL for a response code
pony-monitor is a Python tool to monitor a HTTP server. It fetches the specified urls, checks that a valid code is returned and warns to specified email when it fails.
Quick start

installing:

Download code:

python setup.py install

You have to install importlib:

 sudo pip install importlib

Configuration:

pony-monitor uses the same configuration philosophy as django, it uses a settings.py file, so you have to create a settings.py file on a folder:

#settings.py

URLS_TO_CHECK = (
 #(URL, expected_code),
 ('http://localhost:8000/', 200),
 ('http://localhost:8000/path', 404),
)


# timeout in sec
TIMEOUT = 20

# secs
CHECK_INTERVAL = 20

# backend.console.ConsoleAlert is alse available
# you can create you own backends, look inside pony_monitor.backend package
ALERT_BACKENDS = ('backend.mail.MailAlert',)


# email backend conf
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'YOURBOTMAIL@wtelecom.es'
DEFAULT_FROM_EMAIL=EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = 'pass'
EMAIL_USE_TLS = True

# emails to be warned
RECIPIENTS = ['YOU@mail.com', 'johnrambot@mail.com']


Usage:

 vim settings.py
 ponymonitor.py


Production usage:

In production environment a tool like supervisord is recommended although you can use nohup:

 nohup ponymonitor.py &

last updated on:
December 29th, 2010, 17:46 GMT
price:
FREE!
homepage:
github.com
license type:
Other/Proprietary License
developed by:
Javi Santana
category:
ROOT \ System \ Monitoring
pony_monitor
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT