EvoHub

Icinga alerts, routed to the right on-call engineer

Receive Icinga problems via the Icinga Notifications webhook channel or a ready-made Icinga 2 notification script. EvoHub turns each Icinga alert into an on-call alert, runs it through your escalation policy, and pages people by voice call, mobile push and email.

How the Icinga integration works

  1. Create a Icinga integration in EvoHub On-Call and pick the escalation policy it should notify.
  2. EvoHub gives the integration its own URL (or inbound address) with a unique key — paste it into Icinga using the steps below.
  3. Each Icinga alert opens an EvoHub alert, and your escalation policy pages the on-call person — then the next step if nobody acknowledges.
  4. Resolves automatically when the incident recovers (Icinga Notifications) or on the RECOVERY notification (Icinga 2).

Set up Icinga

Create the integration in EvoHub first — it shows your personal integration URL to paste below.

# Two ways in — pick the one your Icinga uses.

# A) Icinga Notifications (Icinga DB Web → Notifications)
# Configuration → Modules → notifications → Channels tab
# → Add Channel
Type: Webhook
Method: POST
URL Template: <your EvoHub integration URL>
Request Body Template: {{json .}}   (the default — keep it)
Response Status Codes: 200
#    Add the channel to a contact and use it in event rules.
#    Incident severity crit/alert/emerg → critical, err → high,
#    warning → medium, notice → low; back to OK → resolves.

# B) Icinga 2 notification script (no Icinga Notifications)
# 1. Save this script as /etc/icinga2/scripts/evohub-notification
#    — paste as-is (Python 3 standard library only), then
#    chmod 755 it:
#!/usr/bin/env python3
# EvoHub On-Call — Icinga 2 notification script.
# Install as /etc/icinga2/scripts/evohub-notification (chmod 755).
# Reads the EVOHUB_* environment the NotificationCommand sets.
# Test by hand: EVOHUB_URL='<URL>' ./evohub-notification --test
import json
import os
import sys
import urllib.error
import urllib.request

FIELDS = {
    "notification_type": "EVOHUB_NOTIFICATION_TYPE",
    "host": "EVOHUB_HOST",
    "host_display_name": "EVOHUB_HOST_DISPLAY_NAME",
    "service": "EVOHUB_SERVICE",
    "service_display_name": "EVOHUB_SERVICE_DISPLAY_NAME",
    "state": "EVOHUB_STATE",
    "output": "EVOHUB_OUTPUT",
    "address": "EVOHUB_ADDRESS",
    "time": "EVOHUB_TIME",
    "author": "EVOHUB_AUTHOR",
    "comment": "EVOHUB_COMMENT",
}


def main(argv):
    url = os.environ.get("EVOHUB_URL", "").strip()
    if not url:
        sys.stderr.write("evohub: EVOHUB_URL is not set\n")
        return 2
    if len(argv) == 2 and argv[1] == "--test":
        payload = {"evohub_test": True}
    else:
        payload = {k: os.environ[v] for k, v in FIELDS.items() if os.environ.get(v)}
    req = urllib.request.Request(
        url,
        data=json.dumps(payload).encode("utf-8"),
        method="POST",
        headers={"Content-Type": "application/json", "User-Agent": "evohub-icinga2/1"},
    )
    try:
        with urllib.request.urlopen(req, timeout=10) as resp:
            resp.read()
        return 0
    except urllib.error.HTTPError as e:
        sys.stderr.write("evohub: EvoHub answered HTTP %d\n" % e.code)
    except (urllib.error.URLError, OSError) as e:
        sys.stderr.write("evohub: could not reach EvoHub: %s\n" % getattr(e, "reason", e))
    return 1


if __name__ == "__main__":
    sys.exit(main(sys.argv))

# 2. Check the connection — EvoHub answers OK, opens no alert:
EVOHUB_URL='<your EvoHub integration URL>' /etc/icinga2/scripts/evohub-notification --test

# 3. Add to /etc/icinga2/conf.d/evohub.conf — paste as-is:
object User "evohub" {
  display_name = "EvoHub On-Call"
}

object NotificationCommand "evohub-host-notification" {
  command = [ ConfigDir + "/scripts/evohub-notification" ]
  env = {
    EVOHUB_URL = "<your EvoHub integration URL>"
    EVOHUB_NOTIFICATION_TYPE = "$notification.type$"
    EVOHUB_HOST = "$host.name$"
    EVOHUB_HOST_DISPLAY_NAME = "$host.display_name$"
    EVOHUB_STATE = "$host.state$"
    EVOHUB_OUTPUT = "$host.output$"
    EVOHUB_ADDRESS = "$host.address$"
    EVOHUB_TIME = "$icinga.long_date_time$"
  }
}

object NotificationCommand "evohub-service-notification" {
  command = [ ConfigDir + "/scripts/evohub-notification" ]
  env = {
    EVOHUB_URL = "<your EvoHub integration URL>"
    EVOHUB_NOTIFICATION_TYPE = "$notification.type$"
    EVOHUB_HOST = "$host.name$"
    EVOHUB_HOST_DISPLAY_NAME = "$host.display_name$"
    EVOHUB_SERVICE = "$service.name$"
    EVOHUB_SERVICE_DISPLAY_NAME = "$service.display_name$"
    EVOHUB_STATE = "$service.state$"
    EVOHUB_OUTPUT = "$service.output$"
    EVOHUB_ADDRESS = "$host.address$"
    EVOHUB_TIME = "$icinga.long_date_time$"
  }
}

apply Notification "evohub" to Host {
  command = "evohub-host-notification"
  users = [ "evohub" ]
  types = [ Problem, Recovery ]
  states = [ Up, Down ]
  interval = 0
  assign where true
}

apply Notification "evohub" to Service {
  command = "evohub-service-notification"
  users = [ "evohub" ]
  types = [ Problem, Recovery ]
  states = [ OK, Warning, Critical, Unknown ]
  interval = 0
  assign where true
}

# 4. icinga2 daemon -C && systemctl reload icinga2

# One EvoHub alert per host or host!service. CRITICAL / DOWN →
# critical, WARNING → medium, UNKNOWN → low; RECOVERY resolves.

Icinga + EvoHub — FAQ

How do I connect Icinga to EvoHub?

In EvoHub, go to On-Call → Integrations, add Icinga, and choose an escalation policy. Then configure Icinga with the integration URL EvoHub shows you — the exact steps are on this page.

Do Icinga alerts resolve automatically in EvoHub?

Resolves automatically when the incident recovers (Icinga Notifications) or on the RECOVERY notification (Icinga 2).

How is the Icinga integration priced?

Integrations are included. EvoHub bills on usage, not per seat: an ingested alert costs 1 EvoHub token (about $0.015), push and webhook notifications are free, and every account gets 200 free tokens each month.

Start free — 200 EvoHub tokens every month. See pricing.

Last updated: · EvoHub is built and operated by EvoSync Teknoloji A.Ş.