A Prometheus management framework.
Warning: Work in Progress.
$ virtualenv venv
$ source venv/bin/activate
$ cd app
$ pip install -r requirements.txt
$ python manage.py syncdb
[...]
$ python manage.py runserver
$ docker-compose build
$ docker-compose up
$ docker-compose restart prommgr
$ docker-compose exec prommgr python manage.py syncdb
[...]
For API documentation, spin up the server locally and visit /docs.
The system is configured for these alerts (configured in prom/alerts.rules):
When an alert is fired, the webhook (target configured in prom/webhook.yml) content will look something like this:
{'alerts': [{'annotations': {'summary': 'Instance 1.2.3.4:9100 is down'},
'endsAt': '0001-01-01T00:00:00Z',
'generatorURL': 'http://0c680b8917a9:9090/graph?g0.expr=up+%3D%3D+0\\u0026g0.tab=0',
'labels': {'alertname': 'service_down',
'cloudnet_owner_id': '11',
'cloudnet_server_id': '4386',
'instance': '1.2.3.4:9100',
'job': 'node'},
'startsAt': '2017-01-12T14:44:37.805Z',
'status': 'firing'},
{'annotations': {'summary': 'Instance 1.2.3.4:9100 is down'},
'endsAt': '0001-01-01T00:00:00Z',
'generatorURL': 'http://0c680b8917a9:9090/graph?g0.expr=up+%3D%3D+0\\u0026g0.tab=0',
'labels': {'alertname': 'service_down',
'cloudnet_owner_id': '11',
'cloudnet_server_id': '4385',
'instance': '1.2.3.4:9100',
'job': 'node'},
'startsAt': '2017-01-12T14:44:37.805Z',
'status': 'firing'}],
'commonAnnotations': {},
'commonLabels': {'alertname': 'service_down',
'cloudnet_owner_id': '11',
'job': 'node'},
'externalURL': 'http://56272fa974e2:9093',
'groupKey': 11840296893788715932L,
'groupLabels': {'alertname': 'service_down'},
'receiver': 'webhook',
'status': 'firing',
'version': '3'}
Content type
Image
Digest
Size
274 MB
Last updated
over 9 years ago
docker pull onapp/prommgr