...
Add an OP5 integration in Jira Service Management
Map alert actions
Configure the integration in OP5
Install the Jira Service Management plugin for OP5
...
Jira Edge Connector (abbreviated as JEC) is a prerequisite for configuring the outgoing authentication of OP5 integration. Download the latest version of
...
the OP5package from this repository.
Expand | ||
---|---|---|
| ||
Either share the OP5 file to the remote OP5 monitor or copy the link on the opening page.
|
...
|
Before rpm upgrades, back up your configuration files. During upgrades, the rpm package does not overwrite the existing configuration. It saves the new default configuration file as opsgenie- integration.conf.rpmnew. Find more information about rpm upgrade config file handling from here. |
Note |
---|
To update from version 201X-XX-XX to 2.X.X, add the We suggest that you backup your configuration files before updating. |
Note |
---|
If while installing the rpm package you get an error that the package is obsolete, use "rpm -i opsgenie-op5-<your_version>.rpm --nodeps" instead. If you get "is already installed" error, use "rpm -i opsgenie-op5-<your_version>.rpm --force" instead. |
...
Add OP5 integration
Info |
---|
You can add this integration from your team dashboard If you're using Opsgenie's Free or Essentials plan, or if you’re using Opsgenie with Jira Service Management's Standard plan, you can only add this integration from your team dashboard as the Integrations page under Settings is not available in your plan. Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only. To do that,
Follow the rest of the steps to complete the integration. |
...
The plugin uses a golang-executable file (included in the plugin as send2opsgeniesend2jsm) to create, acknowledge, and close alerts in Jira Service Management. Configure OP5 to execute this file on events to create, acknowledge, and close alerts in Jira Service Management. Setting the apiKey is requiredmandatory. Other configuration parameters are set to defaults that work with OP5.
The following table lists the parameters and their locations:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
There are three ways to configure Configure the golang-executable files:
...
file in any of the following three methods:
Expand | ||
---|---|---|
|
...
Configure from |
...
the |
...
|
...
|
...
|
...
This overwrites any configuration you previously made in the script. |
...
Expand |
---|
Configure by entering flags |
...
into the command in |
...
the jsm.cfg |
...
file. Use |
...
your apiKey and -ns flag for nagios_server name. If multiple OP5 servers are not in use, there is no need to define the nagios server. Using flags overwrites all the other configuration methods |
...
discussed earlier in the article.
When apiKey is added to the cfg file, it overrides the apiKey in the config.json file. | ||||||
Info | ||||||
---|---|---|---|---|---|---|
To send additional custom arguments, add them after the flags as: . For example, |
...
, see dynamic fields. |
Expand | ||
---|---|---|
| ||
Configure apiKey and nagios_server from |
...
send2jsm.go script. To use this option, build the script again and put the new executable to /usr/bin directory. Find information about the location of the |
...
send2jsm.go and how to build a go script in the "Source for send2jsm and recompiling" section. |
Define Jira Service Management as Contact
Log in to your OP5 monitor.
Go to your the /opt/monitor/etc directory where you'll find nagiosetc directory to find nagios.cfg.
cd /opt/monitor/etc
Add the following line to the main Nagios configuration file (nagios.cfg).
Code Block ... cfg_file=opsgeniejsm.cfg ...
Reboot the monitor to see the "opsgeniejsm" contact in the contact list.
Add the contact "opsgeniejsm" to the OP5 Monitor’s main contact group.
If everything goes well, alerts are created in Jira Service Management for every notification created in OP5.
...
Configure Jira Service Management to update OP5
This step is optional.
Use Jira Service Management’s JEC and the OP5 script to update alerts on OP5. This enables deployment of your own scripts/ability to modify the ones provided and execute customized actions on OP5. To be able to execute actions in OP5, JEC gets the configuration parameters from the configuration file. The configuration file can be is found under /home/opsgeniejsm/oecjec/conf/jec-config.json.
Configuration parameters
...
The package that you downloaded also includes OEC JEC utility which is located under /usr/local/bin and the script that is needed to be run by JEC which is under /home/opsgeniejsm/oecjec/scripts. After the configuration of JEC is done, you need be sure to run it. In order to learn more about how to run JEC, refer to the Running OEC documentationLearn more about running JEC documentation.
Source for send2jsm and recompiling
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/amd64 systems.
FAQ and troubleshooting
If the integration is not working, review this section and follow the guidance prescribed:
...
Expand | ||
---|---|---|
| ||
|
3. Could not open OP5 RPM package
Expand | ||
---|---|---|
| ||
|
If unsure of the problem, set the OECJEC's script log level to debug, try again, and contact us and share the log files found under /var/log/jsm/.
Map alert actions
...
In the Send alert updates back to OP5 section, map Jira Service Management actions to OP5 actions when the source of the alert is OP5 (when the alert is created by OP5 integration itself). Map different Jira Service Management actions to different OP5 actions. For example, acknowledge the alert in OP5, when the alert is acknowledged from OP5. To do this, define If alert is acknowledged in Jira Service Management, acknowledge in OP5 mapping in Send alert updates back to OP5 section.
Source for send2jsm and recompiling
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/amd64 systems.