## ## ####### ## ## #### ######## ####### ########
### ### ## ## ### ## ## ## ## ## ## ##
#### #### ## ## #### ## ## ## ## ## ## ##
## ### ## ## ## ## ## ## ## ## ## ## ########
## ## ## ## ## #### ## ## ## ## ## ##
## ## ## ## ## ### ## ## ## ## ## ##
## ## ####### ## ## #### ## ####### ## ##
"What is the status of ____ ?"
Monitor is a simple service that lets you get and set the status of arbitrary things. Not a system of record but a tool to reduce notification fatigue.
The simplest way to use this is to have some system send an outbound webhook to Monitor to update monitor status then dipslay the status as a PNG badge somewhere.
- pipx
- PostgreSQL database
pipx run virtualenv monitor
source ./monitor/bin/activate
pip install -r requirements.txt
pip install -e .
- Create a PostgreSQL database at Supabase or similar
or run make setup
black .
ormake format
pylint $(git ls-files '*.py')
ormake lint
pytest tests/ -v
ormake test
- Set
DATABASE_URL
through a.env
file or other environment export uvicorn app.main:app --reload
ormake run
curl -X 'POST' \
'http://localhost:8000/api/v1/monitor/' \
-H 'Content-Type: application/json' \
-d '{
"name": "test-monitor",
"tags": ["test"]
}'
curl -X 'POST' \
'http://localhost:8000/api/v1/monitor/1/state/' \
-H 'Content-Type: application/json' \
-d '{
"state": "Normal"
}'
curl -X 'GET' \
'http://localhost:8000/api/v1/monitor/statuses/' \
-H 'accept: application/json'
The easiest way to start is to run this locally and use Ngrok.
- Create a Ngrok account at https://ngrok.com/docs/getting-started/
- Create a domain at https://dashboard.ngrok.com/domains
- Confirm your local server is running
- Run
ngrok http --url={{your_domain}} 8000
The medium-difficult way is to use Heroku or AWS Apprunner.