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

Multiple Host/Template user macros not working

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.4rc1, 1.8.4
    • Fix Version/s: 1.8.4
    • Component/s: Frontend (F)
    • Labels:
      None

      Description

      ?????? ???? api/classes/class.cusermacro.php ??? ?????????? ???????? ?????????, ????????? ??????? ???? ??????? ????? ??? ???????.
      ??????? getMacros() ???:

      $host_macros = array();
      foreach($hmacros as $hmacroid => $hmacro)

      { $h = reset($hmacro['hosts']); $host_macros[$h['hostid']] = $hmacro; }

      ksort($host_macros);

      ????????? ????????? ?????? ???????? $hmacros ??????????? ?? ???? ????? ?????? ???? ??????, ??? ?????? hostid, ? ??? ???? ???????? ?????? ?????? ?

      ??? ?????????? ??????? ????? print_r:

      1. hmacros: Array ( [100100000000013] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 100100000000011 ) ) [hostmacroid] => 100100000000013 [hostid] => 100100000000011 [macro] => {$IFNAME0} [value] => em0 ) [100100000000014] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 100100000000011 ) ) [hostmacroid] => 100100000000014 [hostid] => 100100000000011 [macro] => {$IFNAME1} [value] => em1 ) )
      2. host_macros: Array ( [100100000000011] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 100100000000011 ) ) [hostmacroid] => 100100000000014 [hostid] => 100100000000011 [macro] => {$IFNAME1} [value] => em1 ) )

      ??? ????????? item_descriptions() ??????? ?????????? ??????? ? ???????????? ?????? ?????? ?? ??????????, ? ?????? ?????????? ?????? ???? ????????? ?????? ?? ???? ??? ???? ?? ?????

      ?????? ?? ???? ???? ?? getMacros() ???? ??? ???? ?????????? ??????, ?? ????????? foreach ? ??????? ??????????? ?????????? ????????? ???????? ? ???? ???????????? result array() ????? break; - ? ??? ???? ? ?????????? ?????? ?????? ????????????? ?? ???? ?

      ? ??? ???? ??????, ? ???? ?? ??????????????? ????????? host macros ????? template macros, ????????????? ???? ?????? ?????????????, ?? ??? ?? ?????? ??? ??????????? ?? ????????? (? ? C ????, ????????, ??? ????????? ????????, ??????????????? ??????? ?????????? ??????????)

      ????????? ??? ?? ?? ??????? ?? ???????

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jimson Vladimir Kravchenko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: