• Products
  • Get started
  • Documentation
  • Resources

Integrate with Zabbix

The feature described in this article is currently rolling out to some Jira Service Management Cloud customers. It may not yet be visible or available on your site.

Zabbix Logo

What does the integration offer?

Integration leverages Jira Service Management's Zabbix-specific executable and (Jira Edge Connector (JEC) utility to automatically create rich alerts and synchronize alert status between Zabbix and Jira Service Management. Zabbix alarms are acknowledged automatically when the alert is acknowledged in Jira Service Management. Jira Service Management Zabbix plugin is the recommended integration method as it enables Zabbix to take advantage of advanced capabilities provided by Jira Service Management.

How does the integration work?

When users acknowledge an alert from their mobile devices using the Jira Service Management app, the alert is acknowledged in Zabbix.

Set up the integration

Zabbix is a bidirectional integration. Setting it up involves the following steps:

  • Add a Zabbix integration in Jira Service Management

  • Configure the integration in Zabbix

Install the Zabbix plugin

Following are the steps to integrate Jira Service Management and Zabbix using the Jira Service Management Zabbix integration plugin. Note that these instructions may need slight alteration depending on the exact Linux distribution and the Zabbix configuration.

Prerequisites

Download the latest version of the Zabbix plugin package. Find how to download and install the plugin.

The packages support the following systems:

  • RedHat-based Linux distributions

  • Debian-based Linux distributions

For RedHat-based distributions

Run following command : rpm -i jsm-zabbix-<your_version>.rpm

During upgrades, the rpm package does not overwrite existing configurations. It saves the new default configuration file as jsm-integration.conf.rpmnew. Read more about rpm upgrade config file handling. To update from version 201X-XX-XX to 2.X.X, add --force parameter. For example:

rpm -U --force jsm-integration-<your_version>.rpm

Backup your configuration files before updating.

For Debian-based distributions

Run the following command : dpkg -i jsm-zabbix-<your_version>.deb

Add a Zabbix integration

If you're using the Free or Standard plan in Jira Service Management, you can only add this integration from your team’s operations page. 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 a Zabbix integration in Jira Service Management:

  1. Go to your team’s operations page.

  2. On the left navigation panel, select Integrations and then Add integration.

  3. Run a search and select “Zabbix”.

  4. On the next screen, enter a name for the integration.

  5. Optional: Select a team in Assignee team if you want a specific team to receive alerts from the integration.

  6. Select Continue.
    The integration is saved at this point.

  7. Select Turn on integration.
    The rules you create for the integration will work only if you turn on the integration.

Configure the plugin in Zabbix (For Zabbix version 3.0 and below)

The plugin uses a golang-executable file (included in the plugin as send2jsm) to create, acknowledge, and close alerts in Jira Service Management. Configure Zabbix to execute this file on events to create, acknowledge, and close alerts in Jira Service Management. Configure an action via the Zabbix frontend, that executes /home/jsm/jec/jsm-zabbix/send2jsm when an event is triggered.

  1. Under Actions enable "Recovery Message" checkbox for closing the alert on Jira Service Management when an alert is closed on Zabbix.

  2. Under Operations, define a Remote Command that executes on Zabbix server. Paste the command in */home/jsm/jec/jsm-zabbix/actionCommand.txt into Command.

  3. Select Add then Save.

To make send2jsm work you need to make some configurations. The following table shows the parameters, where they are located, and whether they are mandatory to fill or not.

Configuration Parameters

Description

Mandatory to fill

Location

apiKey

Copy the API key from the Zabbix integration created above. send2jsm uses this key to authenticate to Jira Service Management. API key is also used to identify the right integration configuration used to process alerts.

Yes

/home/jsm/jec/conf/config.json

baseUrl

If you're using Jira Service Management from another domain(eg. EU, sandbox), you should update this configuration. Jira Service Management Zabbix integration, Advanced Settings page.

Optional

/home/jsm/jec/conf/config.json

responders

Responders field is used to specify which responders should be notified for the Zabbix alerts. This field is used to set the default responder field value. It can be modified to route different alerts to different teams in Jira Service Management Zabbix integration, Advanced Settings page.

Optional

/home/jsm/jec/conf/jsm-integration.conf

tags

Tags field is used to specify the tags of the alert that created in Jira Service Management.

Optional

/home/jsm/jec/conf/jsm-integration.conf

logPath

Specifies the full path of the log file. (Default value is /var/log/jsm/send2jsm.log)

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.enabled

zabbix2jsm.http.proxy.enabled field is to enable/disable external proxy configuration. The default value is false.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.host

It is the host of the proxy.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.port

It is the port of the proxy.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.scheme

It is the proxy connection protocol. It may be http or https depending on your proxy servers. Its default value is http.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.username

It is the Proxy authentication username.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.password

It is the Proxy authentication password.

Optional

/home/jsm/jec/conf/jsm-integration.conf

Special characters (except triggerUrl, ipAddress, date, and time fields) are removed from Zabbix incoming payload before the data is processed in Jira Service Management.

Configure the plugin in Zabbix (For Zabbix version 3.2 and above)

The plugin uses a golang-executable file (included in the plugin as send2jsm) to create, acknowledge, and close alerts in Jira Service Management. Configure Zabbix to execute this file on events to create, acknowledge, and close alerts in Jira Service Management.

Configure an action via the Zabbix frontend, that executes */home/jsm/jec/jsm-zabbix/send2jsm when an event is triggered.

  1. Select Configurations > Actions then select Create New Action.

  2. Select Operations under Actions.

  3. Under Operations, define a remote command that executes on Zabbix server.

  4. Paste the command in */home/jsm/jec/jsm-zabbix/actionCommand.txt into Command.

  5. Select Recovery Operations under Actions.

  6. Under Recovery Operations, define a remote command that executes on Zabbix server.

  7. Paste the command in */home/jsm/jec/jsm-zabbix/actionCommand.txt into Command.

  8. Save Add and Save.

To make send2jsm work, make some additional configuration. The following table shows the parameters, where they are located, and whether they are mandatory to fill or not.

Configuration Parameters

Description

Mandatory to fill

Location

apiKey

Copy the API key from the Zabbix integration you've created above. send2jsm uses this key to authenticate to Jira Service Management. API key is also used to identify the right integration configuration that should be used to process alerts.

Yes

/home/jsm/jec/conf/config.json

baseUrl

If you're using Jira Service Management from another domain(eg. EU, sandbox), you should update this configuration. Jira Service Management Zabbix integration, Advanced Settings page.

Optional

/home/jsm/jec/conf/config.json

responders

Responders field is used to specify who should be notified for the Zabbix alerts. This field is used to set the default responders field value. The recipients can be modified to route different alerts to different people and teams in Jira Service Management Zabbix integration, Advanced Settings page. Recipients can be set to users, groups, escalations or schedules who will be notified by Jira Service Management. If you did not set responders in the integration, this field is required.schedules who will be notified by Jira Service Management. If you did not set recipients in the integration, this field is required.

Optional

/home/jsm/jec/conf/jsm-integration.conf

tags

Tags field is used to specify the tags of the alert that created in Jira Service Management.

Optional

/home/jsm/jec/conf/jsm-integration.conf

logPath

Specifies the full path of the log file. (Default value is /var/log/jsm/send2jsm.log)

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.enabled

zabbix2jsm.http.proxy.enabled field is to enable/disable external proxy configuration. The default value is false.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.host

It is the host of the proxy.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.port

It is the port of the proxy.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.scheme

It is the proxy connection protocol. It may be http or https depending on your proxy servers. Its default value is http.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.username

It is the Proxy authentication username.

Optional

/home/jsm/jec/conf/jsm-integration.conf

zabbix2jsm.http.proxy.password

It is the Proxy authentication password.

Optional

/home/jsm/jec/conf/jsm-integration.conf

Special characters (except triggerUrl, ipAddress, date, and time fields) are removed from Zabbix incoming payload before data is processed in Jira Service Management.

To send additional custom arguments, add them after the flags as: customArgName1 customArgValue1 customArgName2 customArgValue2. You can parse custom arguments by adding {{_payload.customArgName}} to wherever you need on the input fields.

Read more about dynamic properties.

Optional: Configure the Zabbix integration

If you are using Zabbix version 4.0 or above, use actionExecutorForZabbix4.py script. Update the conf file so that the actions will trigger this script too.

Use JEC and the Zabbix script to update alerts on Zabbix. This enables deployment of your own scripts/ability to modify the ones provided and execute customized actions on Zabbix. To be able to execute actions in Zabbix, JEC gets the configuration parameters from the configuration file. The configuration file can be found under /home/jsm/jec/conf/config.json

Configuration Parameters

 

Location

command_url

The Zabbix API endpoint to acknowledge Zabbix alerts.

/home/jsm/jec/conf/config.json

user

The username that JEC used to authenticate to Zabbix.

/home/jsm/jec/conf/config.json

password

The password that JEC uses to authenticate to Zabbix.

/home/jsm/jec/conf/config.json

The package that you downloaded also includes JEC utility which is located under /usr/local/bin and the script that is needed to be run by JEC which is under /home/jsm/jec/scripts. Run JEC after you configure it. Find out how to run JEC.

Zabbix integration package doesn’t support SSL v1.0. If your Zabbix Server has SSL v1.0, upgrade your SSL server.


FAQ and troubleshooting

If the integration is not working, review this section and follow the prescribed guidelines.

1. Zabbix alerts aren’t created in Jira Service Management:

Run the following test command from the shell. Check if the test alert is created in Jira Service Management:

Text

1 /home/jsm/jec/jsm-zabbix/send2jsm -triggerName='zabbix test alert' -triggerStatus='PROBLEM'
  • If a "Trace/breakpoint trap" error occurs: It means the sendjsm plugin isn't compatible with your server distribution. Follow the "Source and Recompiling send2jsm" section below and rebuild the send2jsm.go according to a specific server environment.

  • If the alert is created in Jira Service Management: It means the integration is installed correctly. The problem might be that Zabbix is not executing the command.

  • If not: Check the logs at /var/log/jsm/send2jsm.log. Look for the following errors in the log file:

    • If "RestException[Could not authenticate.]" error occurs in the logs, it means Jira Service Management couldn't identify the api key. Check if the API key is set correctly, as explained in "Jira Service Management plugin configuration in Zabbix" in this article.

    • If unsure of the issue, set the plugin's log level to debug, try again and send the logs us through the contact us form.

  • If there is no /var/log/jsm/send2jsm.log file, or there are no logs in it, check the following:

    • First, make sure the Zabbix user has permission to write to /var/log/jsm directory. The installation package should automatically do this. If problems occur, execute: chown -R zabbix:jsm /var/log/jsm.

    • Now check the Zabbix server logs at /var/log/zabbix/zabbix_server.log. See if there are error logs regarding send2jsm, and contact us with them.

Setting send2jsm plugin's log level to DEBUG

Change the line zabbix2jsm.logger=warning to zabbix2jsm.logger=debug in /home/jsm/jec/conf/jsm-integration.conf file.

2. The Zabbix alarm isn’t acknowledged when you ack the alert at Jira Service Management:

Check the alerts logs.

  • If the "Posted [Acknowledge] action to Zabbix.." log does not appear, it means Jira Service Management didn't send the Acknowledge action to Zabbix. Check the integration configuration, it might not have matched the alert action.

  • If "Posted [Acknowledge] action to Zabbix.." log only occurs, and no related log after that, it might mean JEC is having connection problems. Check the logs.

3. Could not open Zabbix RPM package

If while installing Zabbix's rpm package you get the following error:

Text

1 2 3 zabbix is obsoleted by (installed) zabbix-server-pgsql-4.0.13-1.el7.x86_64 zabbix is obsoleted by (installed) zabbix-agent-4.0.13-1.el7.x86_64 zabbix is obsoleted by (installed) zabbix-java-gateway-4.0.13-1.el7.x86_64

Use "rpm -i jsm-zabbix-1.0.4-rpm-x86-64.rpm --nodeps" instead. If you get "is already installed" error, use "rpm -i jsm-zabbix-1.0.4-rpm-x86-64.rpm --force" instead.

Source for and recompiling send2jsm

The source for the executable send2jsm and send2jsm.go are located under /home/jsm/jec/jsm-zabbix and is also available at the GitHub repository for Jira Service Managment integrations. To change the behavior of the executable, edit send2jsm.go and build it using the following:

go build send2jsm.go

Find out how to install go. Note that the executable in the plugin is built for linux/386 systems.

 

Additional Help