[ZBX-6698] In frontend macro {ITEM.VALUE<1-9>} is evaluated differently in trigger name Created: 2013 Jun 13 Updated: 2017 May 30 Resolved: 2014 May 20 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D) |
Affects Version/s: | 2.0.6 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | Marc | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | evaluation, macros, trigger | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Linux, CentOS-6.4, PostgreSQL 9.1.9, Apache HTTPD-2.2.15, PHP-5.3.3 |
Description |
I've got a trigger name that gets evaluated differently in 'Last 20 issues' and 'Status of triggers'. The trigger is configured like that: In 'Status of triggers' it is evaluated to: In 'Last 20 issues' it is evaluated to: The value of the corresponding item is 0. |
Comments |
Comment by Marc [ 2013 Jun 14 ] |
Appears to be event related. The wrong value is evaluated in 'History of events'. |
Comment by David Israel [ 2013 Jun 28 ] |
This bug is not minor as it prevents keeping a record of the value that caused the issue in the trigger list. |
Comment by Marc [ 2013 Jul 17 ] |
Another variation I see often: In 'Status of triggers' it is evaluated to: In 'Last 20 issues' it is evaluated to: |
Comment by Marc [ 2013 Oct 02 ] |
I believe I found the cause. API::Trigger()->get('expandDescription' => true) In 'Last 20 issues' it's not the API that is used for that task: make_latest_issues() Due to the fact the the item in question has 'Keep history' set to 0, querying the history will probably result to NULL. |
Comment by richlv [ 2013 Oct 02 ] |
as 2.2 does away with history value being kept in the item table, history of one day would be required for this to work, and i assume this issue will not be relevant anymore |
Comment by Marc [ 2013 Oct 02 ] |
Agree. |
Comment by Pavels Jelisejevs (Inactive) [ 2013 Oct 02 ] |
This is not exactly a bug, it's by design. It's important to notice that in the "Status of triggers" page we display triggers, but in "Last 20 issues" and some other places - events. And the {ITEM.VALUE} macro is resolved differently for triggers and events. For triggers it always displays the latest value of an item and acts the same way as the {ITEM.LASTVALUE} macro. For events, it displays the latest value of an item before the event happened. This is somewhat confusing and may be redesigned in the future. zalex_ua yeah, it's suggested to be redesigned in zalex_ua as for 2016-04-05 it has been indeed changed in the |
Comment by Marc [ 2013 Oct 02 ] |
I see. |
Comment by Martins Valkovskis [ 2013 Oct 03 ] |
More clearly stated in the documentation now:
Please review. jelisejev I've made a minor correction: it can also resolve into "unknown" if the history value existed but has been deleted by the housekeeper. zalex_ua 2.2 and 2.4 doc branches do not contain the changes. martins-v Thanks, RESOLVED in:
zalex_ua there is suggestion to add the same sentence to ITEM.LASTVALUE macro description martins-v I don't think we want to have duplicate entries with such details much, for the reason that it may apply elsewhere and then it would have to copied again, and again. The sentence with ITEM.VALUE remains and has been improved so that it can be understood that it relates to the latest value situation as well. RESOLVED. asaveljevs CLOSED |