Icinga Logo

Icinga2 Integration Guide

Icinga is an open source system monitoring platform. It was first created as a fork of Nagios. It has since developed more of its own core tools and has made it easier to handle plugins and integrations. Over the years it has evolved into a popular system and network monitoring platform. It helps companies identify vulnerabilities in their system through constant monitoring. Make the most of Icinga by integrating with TaskCall. Use our powerful incident response and management system to address alerts raised by Icinga in real time.

Pointers
  • The integration happens between a TaskCall service and Icinga2.
  • Incidents will automatically resolve in TaskCall when metrics fall back within the normal threshold.
  • Incidents in TaskCall are automatically synced up when problems in Icinga2 are acknowledged.
  • At the moment this integration only allows alerts to be received in TaskCall from Icinga2.
In TaskCall
  1. Go to Configurations > Services . Select the service you want to integrate with.
  2. Once you are on the Service details page, go to the Integrations tab. Click on New Integration.
  3. Give the integration a name.
  4. From the integration types, select the top radio button indicating that you are trying to use a built-in integration.
  5. From the list of built-in integrations, select Icinga2.
  6. Click Save.
  7. Copy the Integration Key that is issued for the integration.
On Icinga2
  1. Install TaskCall Icinga2 plugin.

    curl -s https://api.github.com/repos/taskcallapp/taskcall-icinga2/releases/latest | grep '"browser_download_url"' | sed -E 's/.*"([^"]+)".*/\1/' | wget -i-
    unzip -a taskcall-icinga2.zip

  2. Give execute permission to primary script in TaskCall's plugin.

    chmod +x taskcall-icinga2/scripts/send_to_taskcall.py

  3. Icinga2 can send alerts to endpoints that it defines as contacts. The downloaded plugin contains the TaskCall contact that Icinga2 uses to send alerts to TaskCall. Some changes need to be made to this file.

    Open /{installation path}/taskcall-icinga2/taskcall_icinga2.conf and replace the <INTEGRATION_KEY> placeholder in the NotificationCommands with the integration key you copied from TaskCall earlier ({installation path} could be /home or whichever parent directory the plugin is installed in). Please ensure that the path to the script is also updated in case you installed the plugin in a different directory from /home.


    object NotificationCommand "taskcall-service-notification" {
       import "plugin-notification-command"

       vars.hgns = {{ host.groups.join(",") }}
       vars.sgns = {{ service.groups.join(",") }}
       command = ["/home/taskcall-icinga2/scripts/send_to_taskcall.py"]
       arguments = {
       "-integKey" = "<INTEGRATION_KEY>"
       "-entityType" = "service"
       "-ntt" = "$notification.type$"
       "-ldt" = "$icinga.long_date_time$"
       "-s" = "$service.name$"
       ...
       ...
       }
    }


    object NotificationCommand "taskcall-host-notification" {
       import "plugin-notification-command"

       vars.hgns = {{ host.groups.join(",") }}
       command = ["/home/taskcall-icinga2/scripts/send_to_taskcall.py"]
       arguments = {
       "-integKey" = "<INTEGRATION_KEY>"
       "-entityType" = "host"
       "-ntt" = "$notification.type$"
       "-ldt" = "$icinga.long_date_time$"
       "-hn" = "$host.name$"
       ...
       ...
       }
    }

    ...
    ...

  4. Now we need to copy this file to the Icinga available features folder so Icinga can have access to it.

    cp /{installation path}/taskcall-icinga2/taskcall_icinga2.conf /etc/icinga2/features-available/taskcall_icinga2.conf

  5. Enable taskcall_icinga2.

    icinga2 feature enable taskcall_icinga2

  6. Restart Icinga2.

    systemctl restart icinga2

  7. Done! You are all ready to receive alerts in TaskCall from Icinga2.
If you are finding it difficult to get the above integration to work or the integration is not rendering results as expected then please contact us at support@taskcallapp.com .
On this page