...
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Overview
What does the integration offer?
Jira Service Management’s Icinga plugin supports a bidirectional integration with Icinga. The integration leverages Jira Service Management’s Icinga-specific executable and JEC utility to automatically create rich alerts (status, alert histogram, trends, etc.) and synchronizes alert status between Icinga and Jira Service Management.
Set up the integration
The Icinga integration plugin utilizes the full capabilities of Jira Service Management and provides bi-directional integration with Icinga. The steps in the following procedure describe how to integrate Jira Service Management and Icinga by using the Icinga integration plugin. Note that slight alteration to these instructions may be necessary depending on the exact Linux distribution and your Icinga 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
Jira Edge Connector (abbreviated as JEC) is a prerequisite for configuring the outgoing authentication of Icinga integration. You can combinedly use JEC and Icinga scripts to update alerts on Icinga. With this setup, you can deploy your own script, modify the ones provided, or run customized actions on Icinga. Download the latest version of the Icingapackage from this repository.
Expand | ||
---|---|---|
| ||
Run the following command:
Before rpm upgrades, back up your configuration files. The rpm package does not overwrite the existing configuration during upgrades. It saves the new default configuration file as integration.conf.rpmnew. To upgrade from version 201X-XX-XX to 2.X.X, add the Learn more about config file handling for rpm upgrades. |
Expand | ||
---|---|---|
| ||
Run the following command:
|
Add Icinga integration
Info |
---|
If you're using the Free or Standard plan in Jira Service Management. To access the feature through 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 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”.
On the next screen, enter aname 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 key while configuring the integration in Icinga later. Icinga uses the key to authenticate with Jira Service Management and specify the integration to be used to process Icinga 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
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 to execute this file on events to create, acknowledge, and close alerts in Jira Service Management. The following table lists the parameters and states if they are mandatory.
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Configure the golang-executable file in any of the following three methods:
Expand | ||
---|---|---|
| ||
Configure from the |
Expand | ||
---|---|---|
| ||
Configure by entering flags into the command of the notification created in Icinga, as described earlier in this section. Use To send additional custom arguments, add them after the flags. For example, |
Expand | ||
---|---|---|
| ||
Configure apiKey from the send2jsm.go script. Build the script again and put the new executable into the /home/jsm/jec/scripts directory. Learn more about the location of the send2jsm.go and how to build a go script in the “Source and recompiling send2jsm” section in this article. |
Define Icinga contacts
1. Copy the /home/jsm/jec/jsm-icinga/jsm.cfg file (configures a contact, its host, and service notification commands) in to /usr/local/icinga/etc/objects directory.
Expand | ||
---|---|---|
| ||
|
2. Add the following line to the main Icinga configuration file (ICINGA_HOME/etc/icinga.cfg):
Expand | ||
---|---|---|
| ||
|
3. Add the contact “jsm" to the Icinga configuration’s main contact group in ICINGA_HOME/etc/objects/contacts.cfg file. If using the default configuration contacts.cfg, add "jsm" user to the "admins" contact group.
4. Restart Icinga.
If everything goes well, alerts are seen in Jira Service Management for every notification created in Icinga.
Configure Jira Service Management to update Icinga
This is an optional step.
Select the Send Alert Actions To Icinga checkbox on the integration configuration page. You can combinedly use JEC and Icinga scripts to update alerts on Icinga. With this setup, you can deploy your own script, modify the ones provided, or run customized actions on Icinga.
To run actions in Icinga, JEC gets the configuration parameters from the configuration file, config.json (found at /home/jsm/jec/conf/jec-config.json).
Expand | ||
---|---|---|
| ||
|
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.
Info |
---|
The Icinga integration package does not support SSL v1.0. If your Icinga 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.
Expand | ||
---|---|---|
| ||
Run the following test command from the shell and check if a test alert is created in Jira Service Management:
Set send2jsm plugin's log level to DEBUGSet the send2jsm plugin's log level to DEBUG. Open the /home/jsm/jec/conf/integration.conffile and change the line |
Expand | ||
---|---|---|
| ||
Check the activity log.
|
Expand | ||
---|---|---|
| ||
|
...
See also
https://operations-help.atlassian.net/wiki/spaces/OPSHELP/pages/2097191