-
Incident report
-
Resolution: Fixed
-
Minor
-
None
-
1.4.3
-
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>
=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"] = '
—
> if( $function_data["status"] == HOST_STATUS_TEMPLATE ) $function_data["host"] = '{HOSTNAME}
';