Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dwinston/itsdown
emails you a report if a web page indicates that a service is down or has not been running
https://github.com/dwinston/itsdown
Last synced: about 1 month ago
JSON representation
emails you a report if a web page indicates that a service is down or has not been running
- Host: GitHub
- URL: https://github.com/dwinston/itsdown
- Owner: dwinston
- License: agpl-3.0
- Created: 2019-06-26T18:13:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-06T22:35:31.000Z (about 3 years ago)
- Last Synced: 2024-11-29T11:14:06.194Z (about 1 month ago)
- Language: Python
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# itsdown
emails you a report if a web page indicates that a service is down or has not been running1. Supply a URL
2. Supply a function that, given a BeautifulSoup object as input, decides whether the service is down and outputs a
useful message. There are some provided in `itsdown.functions` -- you supply a function on the command line as a
dotted path.3. If the service is down, email someone with the message, with a link to the URL, and with the page output attached to
the email.## Installing
```bash
git clone [email protected]:dwinston/itsdown.git
cd itsdown
pip install -e .
cp itsdown/config.example.ini itsdown/config.ini
# Edit itsdown/config.ini to reflect your email service SMTP information.
```# Usage Example
```bash
python itsdown/main.py \
--url "https://structpred.dash.materialsproject.org/report/hours/24/" \
--fn "itsdown.functions.fwsdash_24hr" \
--to [email protected]
```## Advanced installation
In addition to the above, you can use [Celery](http://www.celeryproject.org/) to run reports in a crontab-like manner.
You'll need to install [RabbitMQ](https://www.rabbitmq.com/) (Celery's recommended so-called "data broker"):
```
# Ubuntu/Debian?
sudo apt-get install rabbitmq-server
# Docker?
docker run -d -p 5462:5462 rabbitmq
# Homebrew?
brew install rabbitmq
```# Usage Example
Start the RabbitMQ server:
```
# For example, if you use `brew install` on a Mac, this will ensure rabbitmq starts now and on system restarts.
brew services start rabbitmq
```Start the Celery server:
```
celery -A itsdown.tasks worker -l info
```(Under construction) Use `celery.schedules.crontab` to do great things!