[ZBX-11310] 'tag <>' event condition doesn't work Created: 2016 Oct 04 Updated: 2017 May 30 Resolved: 2016 Oct 27 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 3.2.0 |
Fix Version/s: | 3.2.2rc1, 3.4.0alpha1 |
Type: | Incident report | Priority: | Major |
Reporter: | Jacek konieczny | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | actions, tags | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
I want to use a different notification mail template for triggers with one and with two items (so I don't get the ugly UNKNOWN place-holders). I tagged all my two-items triggers with tag '2items' and configured two actions:
Only the second action would ever be executed, the 'Tag <> 2items' never matches an event without any tags. I took a peek into the source code and it seems that tag conditions are broken – the condition value is based on the first matching tag. It will never be 'SUCCEED' for event without any tags. |
Comments |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Oct 11 ] |
If we read "Tag" as "event has a tag" and "<> 2items" as "which is not equal to '2items'" then it becomes logical and obvious that event with no tags does not match condition "event has a tag which is not equal to '2items'". |
Comment by richlv [ 2016 Oct 11 ] |
glebs.ivanovskis, that's a dangerous path |
Comment by Jacek konieczny [ 2016 Oct 11 ] |
And the documentation clearly states:
(from https://www.zabbix.com/documentation/3.2/manual/config/notifications/action/conditions) |
Comment by Yaroslav [ 2016 Oct 17 ] |
I agree. When I add tag<>"something tagname" to actions, it doesn't working with triggers without any tag. |
Comment by Sergejs Paskevics [ 2016 Oct 18 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-11310 |
Comment by Andris Zeila [ 2016 Oct 25 ] |
Successfully tested. Please review slight improvement in code readability (r63348). |
Comment by Sergejs Paskevics [ 2016 Oct 27 ] |
Fixed in:
|