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

api trigger.get expand macro URL

    XMLWordPrintable

    Details

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

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            sasha Alexander Vladishev
            Reporter:
            jorge.iwano Jorge Fernando Matsudo Iwano
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: