0
0
Fork 0
mirror of https://github.com/alerta/alerta-contrib.git synced 2025-03-17 14:02:38 +00:00
alerta_alerta-contrib/integrations/consul/README.md

57 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2016-12-10 14:17:19 +00:00
Consul Integration
2016-12-10 09:04:53 +00:00
==================
2016-06-09 09:55:13 +00:00
2016-12-10 09:04:53 +00:00
Send alerts based on [consul](https://www.consul.io/). health checks,
triggered by [consul-alerts](https://github.com/AcalephStorage/consul-alerts)
2016-06-09 09:55:13 +00:00
2016-12-10 09:04:53 +00:00
For help, join [![Gitter chat](https://badges.gitter.im/alerta/chat.png)](https://gitter.im/alerta/chat)
2016-06-09 09:55:13 +00:00
2016-12-10 09:04:53 +00:00
Prerequisites
-------------
2016-06-09 09:55:13 +00:00
2016-12-10 09:04:53 +00:00
Consul and [consul-alerts](https://github.com/AcalephStorage/consul-alerts)
is installed and running.
2016-06-09 09:55:13 +00:00
Installation
------------
2016-12-10 09:04:53 +00:00
Clone the GitHub repo and run:
$ python setup.py install
Or, to install remotely from GitHub run:
$ pip install git+https://github.com/alerta/alerta-contrib.git#subdirectory=integrations/consul
2016-06-09 09:55:13 +00:00
Configuration
-------------
2016-12-10 09:04:53 +00:00
Define these keys in consul KV store:
2016-12-10 14:17:19 +00:00
```
consul-alerts/config/notifiers/custom/alerta:<path>/consul-alerta.py
alerta/apikey:'api-key' // alerta key for api access
alerta/apiurl:'api-url' // alerta api url
alerta/timeout:900 // alarm timeout in alerta (default 86400)
alerta/max_retries:3 // max api call attemps
alerta/sleep:2 // sleep between attemps
alerta/origin:consul // alert origin
alerta/defaultenv:Production // default alert environment
alerta/env/{hostname}:Testing // exceptions for env of specific nodes
alerta/alerttype:ConsulAlerts // alert type
consul-alerts/config/notif-profiles/default: { "Interval": 10 } // will keep active alerts "open" in alerta, before timeout removes them
```
2016-12-10 09:04:53 +00:00
References
----------
2016-06-09 09:55:13 +00:00
2016-12-10 09:04:53 +00:00
* https://www.consul.io/
* https://github.com/hashicorp/consul
* https://github.com/AcalephStorage/consul-alerts
2016-06-10 12:27:04 +00:00
2016-12-10 09:04:53 +00:00
License
-------
2016-06-09 09:55:13 +00:00
2016-12-10 09:04:53 +00:00
Copyright (c) 2016 Marco Supino. Available under the MIT License.