alerta-contrib/integrations/consul
2016-11-09 14:19:54 +00:00
..
consul-alerta.py event should be uniq, rollback correleation 2016-11-09 14:19:54 +00:00
consul-heartbeat.py fixed import name to alertaclient 2016-09-15 09:12:46 +00:00
README.md allow env from kv, and overrides per host 2016-08-23 06:19:48 +00:00

Consul

Trigger alerts based on consul. health checks, triggered by consul-alerts

Requirements:

consul
consul-alerts
python-consul
alerta

Installation

$ pip install python-consul
$ pip install alerta
copy script to somewhere accessible by consul-alerts, make sure its executable

Configuration

define these keys in consul KV store:

    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