Basic site monitoring in a single Python script, with no dependencies.
- Python 2 and Python 3 compatible
- No external deps
- Pushover notifications
- Edit the
config
incritikl.py
config = {
'interval': 60, # How often to perform checks (in seconds)
'pushover': {
'app_token': 'your-pushover-app-token',
'user_key': 'your-user-key',
},
'sites': {
'example.com', # Just the domain
'https://example.com/api', # OR a full url
}
}
- Start the script
$ python critikl.py
-
(Optional) Use a process manager (e.g. circus)
A. Install circus
$ sudo pip install circus
B. Create the circus config file
Edit
circus.ini
and modify the path where you put thecritikl.py
script$ nano circus.ini
Create circus configuration file
$ sudo cp circus.ini /etc/circus.ini
Start circus (circus will start
critikl.py
)circusd /etc/circus.ini
For more about circus, read this
C. Start circus on system startup using upstart
$ sudo cp circus.conf /etc/init/circus.conf $ sudo service circus start
That's it. You will now receive Pushover notifications when one of your sites is down.