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

Multiple Host/Template user macros not working

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8.4
    • 1.8.4rc1, 1.8.4
    • Frontend (F)
    • None

      ?????? ???? 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 ????, ????????, ??? ????????? ????????, ??????????????? ??????? ?????????? ??????????)

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

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

              Created:
              Updated:
              Resolved: