Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-8773

Amendments to Redmine Media Type webhook including support for auto-closing created issues

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • None
    • Zabbix-5.0.x server with Redmine-4.1.x issue tracker

      The webhook for Redmine Media Type integration into Zabbix does not support auto-closing generated issues when Zabbix reports a problem recovery.

      The attached patch adds the following functionality to the Media Type:

      1. Specify default assignee of new issue, project and issue tracker using Zabbix' Send To: field instead of global values, allowing for multiple uses of the same Media Type with different assignees/projects/trackers on the same Redmine instance.
      2. Specify an issue closing status (name or numerical id) to set an issue to when Zabbix reports a problem recovery.
      3. Add a global parameter definint new Redmine issues as public or private.

      Additionally, repetitions of information, such as the problem name already noted in the new issue's subject are avoided in the issue message and subsequent comments.

      The patch requires some rework of the documentation accompanying the YAML media type definition as well as the modification of the YAML itself with updated JS code as well as changed global parameters.

      Most notable change is the new required syntax of the Media Type's Send To: field:
      [assignee@]<project>/<tracker>, where both project and tracker may be numerical IDs or names, while the latter produces additional requests to the Redmine instance.

      Also, there are new global parameters:

      • redmine_closing_status pointing to an issue status used when a problem recovery is reported to Redmine. This may also be either ID or name, with the latter causing an additional request to the Redmine instance.
      • redmine_is_private defining whether newly generated issues are marked private or not.

      Note that the user of the Redmine API key needs to have permission to edit at least its own issues as well as Redmine's workflow definition must allow to reach the defined status for this to have effect, as Redmine will not report a failure here but just silently ignore a status change.

      Due to the use of {{

      {ALERT.SENDTO}

      }} the global parameters redmine_project and redmine_tracker_id have been dropped from the Media Type.

      Attached are the patch for the Media Type's JavaScript code as well as an XML, defining the entire webhook for Zabbix-5.0 (note older Zabbix API, the patch applies to new Zabbix API).

            zabbix.dev Zabbix Development Team
            ftiede Felix Tiede
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: