Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  2. ZBX-18743

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



    • Patch request
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 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:
      [[email protected]]<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 {{


      }} 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).




            zux Edgars Melveris
            ftiede Felix Tiede
            0 Vote for this issue
            1 Start watching this issue