Integrate with Icinga 2
Overview
What does the integration offer?
The Icinga 2 integration plugin utilizes the full capabilities of Jira Service Management and provides bidirectional integration with Icinga 2.
How does the integration work?
Icinga 2 sends alerts to Jira Service Management with detailed information. Jira Service Management acts as a dispatcher for Icinga 2 alerts, determines the right people to notify based on on-call schedules– notifies via email, phone calls, text messages (SMS), and iPhone & Android push notifications, and escalates alerts until they are acknowledged or closed.
Jira Service Management automatically connects to Icinga 2, gets performance data from Graphite for the host/service, and attaches it to the alert.
Jira Service Management posts alert updates to Icinga 2. For example, acknowledging the alert will automatically ack the alert in Icinga 2, alert comments are reflected in Icinga 2, etc.
Set up the integration
The Icinga 2 integration plugin utilizes the full capabilities of Jira Service Management and provides bi-directional integration with Icinga 2. The steps in the following procedure describe how to integrate Jira Service Management and Icinga 2 using the Icinga 2 integration plugin. Note that slight alteration to these instructions may be necessary depending on the exact Linux distribution and your Icinga 2 configuration.
Installation prerequisites
The installation packages support the following systems:
RedHat-based Linux distributions
Debian-based Linux distributions
Install the Jira Service Management plugin for Icinga 2
Jira Edge Connector (JEC) is a prerequisite for configuring the outgoing authentication of Icinga 2 integration. You can combinedly use JEC and Icinga 2 scripts to update alerts on Icinga 2. With this setup, you can deploy your script, modify the ones provided, or run customized actions on Icinga 2. Download the latest version of the Icinga 2 package from this repository.
Add Icinga 2 integration
If you're using the Free or Standard plan in Jira Service Management. To access the feature through Settings
(gear icon) > Products
(under JIRA SETTINGS) > OPERATIONS
, you need to be on Premium or Enterprise plan.
Adding an integration from your team’s operations page makes your team the owner of the integration. This means Jira Service Management only assigns the alerts received through this integration to your team.
To add an Icinga 2 integration in Jira Service Management:
Go to your team’s operations page.
On the left navigation panel, select Integrations and then Add integration.
Run a search and select “Icinga 2”.
On the next screen, enter a name for the integration.
Optional: Select a team in Assignee team if you want a specific team to receive alerts from the integration.
Select Continue.
The integration is saved at this point.Expand the Steps to configure the integration section and copy the API key.
You will use this URL while configuring the integration in Icinga 2 later. This key is used by Icinga 2 to authenticate with Jira Service Management and specify the integration to process Icinga2 alerts.Select Turn on integration.
The rules you create for the integration will work only if you turn on the integration.
Configure the Jira Service Management plugin in Icinga 2
The plugin uses a golang-executable file (included in the plugin as send2jsm) to create, acknowledge, and close alerts in Jira Service Management. Configure Icinga 2 to execute this file on events to create, acknowledge, and close alerts in Jira Service Management. Setting the apiKey is required. Other configuration parameters are set to defaults that work with most Icinga 2 implementations but may also need to be modified. The following table lists the parameters and states if they are mandatory:
Configure the golang-executable file in any of the following three methods:
Define Icinga contacts
1. Copy /home/jsm/jec/conf/jsm.conf
as an available Icinga feature:
2. Enable jsm and restart Icinga 2:
3. Restart Icinga:
systemctl restart icinga2
If everything goes well, alerts are seen in Jira Service Management for every notification created in Icinga 2.
Configure Jira Service Management to update Icinga 2
This is an optional step.
Select the Send Alert Actions To Icinga 2 checkbox on the integration configuration page. You can combinedly use JEC and Icinga 2 scripts to update alerts on Icinga 2. With this setup, you can deploy your own script, modify the ones provided, or run customized actions on Icinga 2.
To run actions in Icinga 2, JEC gets the configuration parameters from the configuration file config.json (found at /home/jsm/jec/conf/jec-config.json).
The downloaded package includes the JEC utility (found in /usr/local/bin) and the script that JEC needs to run (found in /home/jsm/jec/scripts). Be sure to run JEC after configuring it. Learn more about running JEC documentation.
The Icinga 2 integration package does not support SSL v1.0. If your Icinga 2 server has SSL v1.0, upgrade your SSL server.
Source for and recompiling send2jsm
The source for the executable send2jsm is found in /usr/bin/ and send2jsm.go, in /home/jsm/jec/scripts, respectively, and is also available in this repository. To change the behavior of the executable, edit send2jsm.go and build it by using the following command: go build send2jsm.go
For installing go, refer to http://golang.org/doc/install. Note that the executable in the plugin is built for linux/386 systems.
FAQ and troubleshooting
If the integration is not working, review this section and follow the prescribed guidelines.