KaliszAd / icinga2-autoack

This script listens to Icinga2 API and acknowledges all problem services in downtime.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

icinga2-autoack

This script listens to Icinga2 API and acknowledges hosts and services during they downtimes.

It also acknowledges hosts and services with autoack variable set.

Why? Because there are some buggy notification tools which do not honor "in downtime" but does work with acknowledged state. 🤦

Code maturity

This program is in proof-of-concept state. But it is already used in production. 🤷

How to start

Create Icinga2 API user in `/etc/icinga2/

object ApiUser "autoack" {
        password = "mrznawrxbxbg"
        permissions = [
            "objects/query/Host",
            "objects/query/Service",
            "objects/query/Downtime",
            "actions/acknowledge-problem",
            "events/*",
            "status/query",
        ]
}

Create icinga2-api.ini according to icinga2api module configuration.

[api]
url = https://my-icinga-hostname:5665/
username = auto-ack
password = mrznawrxbxbg
ca_certificate = ./icinga2-ca.crt

Copy certificate from /var/lib/icinga2/ca/ca.crt to your directory.

Start the script (possibly in Pipfile managed virtualenv).

License

BSD-2

About

This script listens to Icinga2 API and acknowledges all problem services in downtime.


Languages

Language:Python 100.0%