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

XML Export - trigger with more then 1 host

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 1.4.3
    • Frontend (F)
    • None
    • PHP5 - Apache 2.2.x - MySQL 5.1 - Debian

      Wrong export:
      ...
      <triggers>
      <trigger>
      <description>trigger1</description>
      <expression>{{HOSTNAME}:item1.last(0)}=0 | {{HOSTNAME}:item1.last(0)}=0</expression>
      </trigger>
      </triggers>
      ...

      Right export:
      ...
      <triggers>
      <trigger>
      <description>trigger1</description>
      <expression>

      {host1:item1.last(0)}

      =0 |

      {host2:item1.last(0)}

      =0</expression>
      </trigger>
      </triggers>
      ...

      My patch on function explode_exp() in triggers.inc.php :

      902c902
      < else if(is_numeric($functionid) && $function_data = DBfetch(DBselect('select h.host,i.key_,f.function,f.parameter,i.itemid,i.value_type'.

      > else if(is_numeric($functionid) && $function_data = DBfetch(DBselect('select h.host,h.status,i.key_,f.function,f.parameter,i.itemid,i.value_type'.
      906c906
      < if( $template ) $function_data["host"] = '

      {HOSTNAME}';

      > if( $function_data["status"] == HOST_STATUS_TEMPLATE ) $function_data["host"] = '{HOSTNAME}

      ';

            alexei Alexei Vladishev
            cesare cesare montresor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: