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

"Undefined array key" errors returned when switching from "Inherited and host macros" to "Host macros" in discovered host configuration form

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 6.4.12rc1, 7.0.0beta2
    • Frontend (F)

      Problem description: In case if a discovered host has a secret macro, and a user switches from "Inherited and host macros" to "Host macros" in Macros tab of its configuration form, then the following errors are returned (per each host macro):

      Undefined array key "value" [zabbix.php:22 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> ZBase->processResponseFinal() -> CView->getOutput() -> include() -> CPartial->getOutput() -> include() -> CConfigFile->{closure}() in app/partials/hostmacros.list.html.php:83]
      Undefined array key "description" [zabbix.php:22 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> ZBase->processResponseFinal() -> CView->getOutput() -> include() -> CPartial->getOutput() -> include() -> CConfigFile->{closure}() in app/partials/hostmacros.list.html.php:84]
      Undefined array key "type" [zabbix.php:22 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> ZBase->processResponseFinal() -> CView->getOutput() -> include() -> CPartial->getOutput() -> include() -> CConfigFile->{closure}() in app/partials/hostmacros.list.html.php:85]
      

      Steps to reproduce:

      1. Discover a host with Text macro, Secret macro and Vault macro (or just import the attached host and send value '{"data":[\{"\{#NAME}":"HOST 1"}]}' to key 'trap' on host 'test')
      2. Open configuration form of this host and switch to Macros tab
      3. Switch to "Inherited and host macros"
      4. Switch back to "Host macros"

      Result: The above mentioned errors are returned (per each host macro)
      Expected: No errors should be observed.

      Example:

        1. broken_discovered_host_macros.gif
          871 kB
          Sergejs Olonkins
        2. zbx_export_hosts_host_with_HP.yaml
          1 kB
          Sergejs Olonkins

            solonkins Sergejs Olonkins
            solonkins Sergejs Olonkins
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: