1. Home
  2. Docs
  3. Master profile
  4. Monitoring profile
  5. JIRA publisher

JIRA publisher

In this section, all italic terms refer to standard JIRA terms.
Since Jeyzer 2.1

The JIRA publisher permits to create or update JIRA tickets when handling important monitoring events.

  • If the event is issued from a monitoring rule without any associated JIRA ticket, a JIRA item is created. The generated JZR report gets attached to it.
  • If the event is issued from a monitoring rule (or applicative event) with any associated JIRA ticket, the related JIRA item is updated with a comment and possibly the generated JZR report (optional).

Each Jeyzer master profile should be associated with one JIRA project and possibly one of its Components.
JIRA projects can reside on different JIRA servers.

The JIRA publisher is supporting any JIRA cloud server, using the JIRA REST v3 API. It is connecting with the standard basic auth key mechanism.

Published information on JIRA includes :

  • Monitoring event details : name, recommended action, priority
  • JZR report
  • Contextual information : process card values, process jar versions, module versions

When an event is encountered multiple times, only one JIRA item gets generated/updated. The number of similar events is then included in the JIRA item description (creation case) or comment (update case).

JIRA publishing occurs at the end of any scanning phase and will apply to any new event matching the defined thresholds (see hereafter).

The JIRA publishing functionality is activated within the Jeyzer master profile publishers section :

<jira jira_config_file="${JEYZER_DEMO_MASTER_PROFILES_DIR}/${JEYZER_TARGET_PROFILE}/monitor/publishers/jira/jira.xml"/>

In the above JIRA configuration file, 2 configurations sets are provided :

1 – JIRA project configuration

It defines the JIRA project, the JIRA Component, the event thresholds, the create/update action configurations and the JIRA priority mappings.

The event_thresholds permit for example to publish only the highly critical ones.

JIRA ticket creation

The create action includes the following fields :

  • JIRA summary : templatized
  • JIRA description : templatized
  • JIRA affect version. Mandatory.
    It is recommended to set it with the process jar version of the current application
  • JIRA assignee. Optional. Default is the JIRA connection user.
    If specified, it must be the end user email or the account id of the JIRA user
  • JIRA priority. Optional
  • JIRA priority mappings permit to map the event level and sub level to a JIRA priority (ex: C10 to Highest). If the mapping is not defined, the default JIRA priority will apply.
  • JIRA component. Optional.
    Can be set with the profile name for example, or hard coded.
  • JIRA environment. Optional.

JIRA ticket update

The update action defines the comment template to use and if the JZR report must be attached to the ticket.

Templates

As mentioned, the summary, description and comment contents are templatized.
Velocity templates (.vm files) have access to the context and event contents : see the demo templates for usage examples.

JIRA configurations and templates can refer to property card values with the @@ prefix and suffix tokens.
Example : @@jzr.profile.name@@

JIRA configurations and templates can refer to process jar versions with the %% prefix and suffix tokens.
Example : %%jeyzer-demo%%

JIRA configurations and templates can refer to Java module versions with the ## prefix and suffix tokens, using the module name.
Example : ##org.jeyzer.demo##

<jira jira_enabled="${JEYZER_MONITOR_JIRA_ENABLED}">
  
  <target>
    <project value="JZRD"/>
    <issue_type value="bug"/>
  </target>

  <actions event_thresholds="C4, C5, C9, C10">
    <create>
      <!-- mandatory fields -->
      <summary_template directory="${JEYZER_ANALYZER_CONFIG_DIR}/monitor/publishers/jira" name="ticket-summary.vm"/>
      <description_template directory="${JEYZER_ANALYZER_CONFIG_DIR}/monitor/publishers/jira" name="ticket-description.vm"/>
      <affect_version value="%%jeyzer-demo%%"/>
      
      <!-- optional fields -->
      <component value="@@jzr.profile.name@@"/>
      <assignee value="email@domain.com"/>
      <priority/>
      <environment value="@@process-card-property@@"/>
    </create>

    <update attachment_enabled="true">
      <comment_template directory="${JEYZER_ANALYZER_CONFIG_DIR}/monitor/publishers/jira" name="ticket-comment.vm"/>
    </update>
  </actions>

  <priority_mappings priority_mapping_config_file="${JEYZER_ANALYZER_CONFIG_DIR}/monitor/publishers/jira/jira_priority_mappings.xml"/>

  <jira_setup setup_config_file="${JEYZER_ANALYZER_CONFIG_DIR}/monitor/publishers/jira/jira_setup.xml"/>

</jira>

The jira_setup refers to a centralized connectivity configuration detailed hereafter.

Configuration file is usually stored within the master profile in the monitor/publishers/jira/jira.xml file.

2 – JIRA connectivity setup

It contains the JIRA server URL and the auth_key authentication key.

The basic auth header key creation is detailed in the Atlassian documentation.

<jira_setup>

  <server url="https://cloud.server.atlassian.net"/>

  <client type="jira_cloud_v3" debug="true">
    <connectivity auth_key="changeit"/>
  </client>

</jira_setup>

In standard, the JIRA setup configuration file is located in the Jeyzer core configuration : ${JEYZER_ANALYZER_CONFIG_DIR}/monitor/publishers/jira/jira_setup.xml

JIRA communication troubleshooting

If the JIRA item is not created or updated, activate the JIRA client debug traces (see JIRA connectivity setup above) and check the Jeyzer Monitor log.