PDA

View Full Version : [1.0]: error when 'duplicating' triggers in host creation (using template)


LEM
21-12-2004, 17:29
Hi all,

I face this problem which seems to be a bug, using my zabbix 1.0 platform: when creating a new host (say 'Host-B') using a template (or another host 'as a template, like 'Host-A'), some triggers are note correctly copied: copied incorrectly twice.

This kind of triggers (source) will

({Host-A:diskfree[/].last(0)}/{Host-A:disktotal[/].last(0)})<0.2

will be "copied" as two different triggers with the following expressions:

({Host-B:diskfree[/].last(0)}/{Host-A:disktotal[/].last(0)})<0.2
and
({Host-A:diskfree[/].last(0)}/{Host-B:disktotal[/].last(0)})<0.2


The point is that the substition of hostnames seems not to be done twice in triggers expression when creating a new host using a template (or another host as a template): instead of processing a double substition, it seems 2 new triggers are created, each with one (only) substitution performed...

I quickly looked at the source php but did not find where the substitution was made.

Any clues?

LEM
22-12-2004, 18:51
I've submitted the (probably) bug thru the SF tracker :
Bug id 378683 (http://sourceforge.net/tracker/index.php?func=detail&aid=1089867&group_id=23494&atid=378683) .