[ZBX-5111] Changing a templated trigger resets all individual changes on hosts Created: 2012 May 31  Updated: 2017 May 30  Resolved: 2012 Oct 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.0
Fix Version/s: 2.0.4rc1, 2.1.0

Type: Incident report Priority: Major
Reporter: Jens Berthold Assignee: Oleg Egorov (Inactive)
Resolution: Fixed Votes: 0
Labels: template, templatedtriggers, trigger
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian 6.0.3
mysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (x86_64)
PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli)


Issue Links:
Duplicate
duplicates ZBX-5708 Multiple PROBLEM/OK events in sequenc... Closed
is duplicated by ZBXNEXT-1588 Selective coming into effect of updat... Closed
is duplicated by ZBX-332 Importing triggers for a template cau... Closed

 Description   

Updating a trigger in a template should only set those parameters that are indeed changed, not all of them.

Example:
I have a templated trigger, and have changed it's priority on several hosts.
Now when I change the name of the trigger in the template, then it's priority is reset on all hosts.



 Comments   
Comment by Oleg Egorov (Inactive) [ 2012 Oct 17 ]

FIXED in svn://svn.zabbix.com/branches/dev/ZBX-5111-trunk r30878

Comment by Eduards Samersovs (Inactive) [ 2012 Oct 19 ]

Tested! But in 2.0 is the same problem.

Comment by Oleg Egorov (Inactive) [ 2012 Oct 19 ]

FIXED in 2.0.4 r30955, 2.1.0 r30956
CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2012 Oct 19 ]

(1) Now when calling trigger.update and passing the same value for a parameter, it will be ignored and not inherited to child items. This is incorrect, all parameters passed to the method must be propagated to child triggers.

oleg.egorov RESOLVED

Comment by Jens Berthold [ 2012 Oct 19 ]

But why should anyone first change individual settings for the children, and then overwrite them by re-applying the same value to the trigger?
If there should be any use cases, maybe you could introduce an optional parameter to trigger.update, something like "forceChildPropagationForUnchangedAttributes" (or maybe the inverted one, "ignoreUnchangedAttributes", to be backwards compatible)?
Maybe the same could be introduced to the web GUI as a radio button?

Comment by Pavels Jelisejevs (Inactive) [ 2012 Oct 19 ]

Jens,

The frontend after the fix behaves correctly, but the API doesn't. From the API's point of view, if you don't want to update a property, you shouldn't pass it to the method. But if you do pass it, it must always be propagated to children. That way you will be able to override all changes on child triggers, if you'll need to.

Comment by Oleg Egorov (Inactive) [ 2012 Oct 19 ]

FIXED IN svn://svn.zabbix.com/branches/dev/ZBX-5111 r30983

Comment by Pavels Jelisejevs (Inactive) [ 2012 Oct 22 ]

(2) When I try to change the severity of the trigger via the API, I get an error:

Trigger "223" already exists on "super-template1".

oleg.egorov RESOLVED

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Oct 22 ]

(3) I have a template linked to a host and a trigger on a template. When I replace the template in the expression with the host, save it, and then change the host back to the template, the child trigger lacks certain attributes, like "Multiple event generation."

oleg.egorov RESOLVED in r31091

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Oct 22 ]

(4) Selecting the expression in CTrigger::update() is not required, it's done later in CTriggerGeneral::inherit().

oleg.egorov RESOLVED

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Oct 30 ]

(5) Another problem when moving triggers. I have a template T1 linked to T2 linked to host H1. When I create a trigger on T2 and change it's expression to T1, the trigger disappears from H1.

oleg.egorov This problem exist in 2.0.4 and not exist in 2.1.0

jelisejev We've decided not to fix it in 2.0. CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Oct 30 ]

TESTED.

Comment by Oleg Egorov (Inactive) [ 2012 Oct 30 ]

FIXED IN 2.0.4rc1 r31139, 2.1.0 r31140
CLOSED

Comment by Oleksii Zagorskyi [ 2012 Nov 14 ]

Note that this fix also fixed another unexpected server's behavior, described in ZBX-5708, linked.

just in case - Affects Version/s: 2.0.0 <- is really correct.

Generated at Thu Mar 28 16:32:23 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.