You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
clerie caacaced97 Make the prometheus query configurable 2 years ago
uptimestatus Make the prometheus query configurable 2 years ago
.gitignore Add gitignore 2 years ago
LICENSE Add license 2 years ago
README.md Make the prometheus query configurable 2 years ago
app.py Restructure code again 2 years ago
requirements.txt Package module 2 years ago
screenshot.png Add screenshot 2 years ago
setup.py Package module 2 years ago

README.md

Uptime Status

Simple status page for server uptime.

screenshot

Displays the up indicator of node-exporter from your prometheus for the last 14 days in 6h steps.

Deployment

Init codebase

git clone https://github.com/clerie/uptime-status.git
cd uptime-status/
virtualenv -p python3 ENV
cd ..

Create config.cfg with the following contents and edit values for your needs:

PROMETHEUS_API_BASE="http://[::1]:9090"
PROMETHEUS_QUERY='(sum_over_time(up{job="node-exporter"}[6h]) / count_over_time(up{job="node-exporter"}[6h]))[14d:6h]'

Starten und updaten lässt sich die Flask-App folgendermaßen:

cd uptime-status/
git pull
source ENV/bin/activate
pip install -r requirements.txt
UPTIMESTATUS_SETTINGS=/path/to/config.cfg gunicorn uptimestatus:app
deactivate