api trigger.get expand macro URL

XMLWordPrintable

    • Type: New Feature Request
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: 4.0.1
    • Component/s: API (A)
    • Environment:
       CentOS 7, zabbix repo install.

      Using API, method trigger.get do not expand native macros used in URL field. Only works in frontend but not using API.

      Curiosly i find a partitial solution, changing the file "/usr/share/zabbix/include/classes/api/services/CTrigger.php" at line 465, adding follow lines.

      ------------------------------
      if (!is_null($options['expandComment']) && $result && array_key_exists('url', reset($result))) {
      $result = CMacrosResolverHelper::resolveTriggerUrls($result);
      }
      ------------------------------

      I used the existent option of "expandComment" to call "resolveTriggerUrls" to resolve my problem partialy.

      I request in next release add this fix.

      Thanks

            Assignee:
            Alexander Vladishev
            Reporter:
            Jorge Fernando Matsudo Iwano
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: