Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleMethod 2: Configure by using Golang flags

Configure by entering flags into the command definition in the /etc/icinga2/features-available/jsm.conf file. Use -apiKey flag for your apiKey and -is flag for the icinga_server name. If no multiple Icinga 2 servers are in use, you don't have to define the Icinga 2 server. Using flags overwrites all the other configuration methods mentioned earlier.

To send additional custom arguments, define them as key-value pairs in the argumentsdictionary. Since Icinga 2 shuffles the arguments, use the order property to ensure the custom arguments are placed at the end of the list. Example:

Code Block
"-spd" = "$service.perfdata$"

"customargument1" = {

value = "$customargument1$"

order = 1

}

Parse custom arguments by adding {{_payload.customArgName}} to the input fields as needed.
Learn more about dynamic fields.

Expand
titleMethod 3: Configure from script

Configure apiKey and icinga_server from send2jsm.go script. Build the script again and add the new executable to the /home/jsm/jec/scripts directory. Find information about the location of the send2jsm.go and how to build a go script in the Source section.

Configure the golang-executable to use a proxy for sending HTTP requests by defining the HTTP_PROXY=http://host:port environment variable.

...

Info

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

...

Expand
title1. Icinga alerts are not getting created in Jira Service Management

Run the following test command from the shell and check if a test alert is created in Jira Service Management: 

Code Block
/home/jsm/jec/scripts/send2jsm -entityType=host -t=PROBLEM -hs=DOWN -hn=test_host
  • If you get a "Trace/breakpoint trap" error, the send2jsm plugin isn't compatible with the server distribution. Rebuild send2jsm.go according to the specific server environment as described in the “Source for and recompiling send2jsm” section in this article.

  • If the alert is created in Jira Service Management, the integration is configured correctly. Icinga 2 is probably not notifying the Jira Service Management contact for alerts. Check your Icinga 2 alert notifications log.

  • If the alert is not created in Jira Service Management, check the logs at /var/log/jec/send2jsm.log.
    Look for the following errors in the log file:

    • If you see "RestException[Could not authenticate.]" in the logs, Jira Service Management couldn't identify the API key. Check if the API key is set correctly per the steps outlined in the “Configure the Jira Service Management plugin in Icinga 2” section of this article.

    • If a "Could not execute this action with apiKey of [Icinga2] integration" error is seen in the logs, the wrong integration package may have been downloaded. Make sure the downloaded Icinga 2 integration package is correct.

    • If unsure of the problem, set the plugin's log level to debug and try again. Contact us and share the logs.

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

    1. Check if the Icinga user has permission to write to /var/log/jec directory. The installation package should automatically do this for you. If you face issues, run the following command: 
      chown -R icinga:jsm /var/log/jec

    2. Check the Icinga 2 server logs at /var/log/icinga2/icinga2.log. See if there are error logs regarding send2jsm. Contact us with the logs as needed.

Set the send2jsm plugin's log level to DEBUG

Set the send2jsm plugin's log level to DEBUG. Open the /home/jsm/jec/conf/integration.conffile and change the line send2jsm.logger=warning to icinga2jsm.logger=debug.

Expand
title2. The Icinga 2 alert is not acknowledged when the alert is acknowledged in Jira Service Management

Check the alert logs.

  • If "Posted [Acknowledge] action to Icinga 2.." is not present in the log, Jira Service Management didn't send the Acknowledge action to Icinga 2. Check the integration configuration, it might not have a matching alert action.

  • If only the "Posted [Acknowledge] action to Icinga 2.." log occurs followed by no related logs, it might mean JEC is having connection problems. Check the logs.

...