[ZBX-3530] Wrong value display on dashboard Created: 2011 Feb 11  Updated: 2017 May 30  Resolved: 2012 Jul 11

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

Type: Incident report Priority: Major
Reporter: Italo Santos Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix-web-ctrigger.patch    
Issue Links:
Duplicate
duplicates ZBX-5159 All predefined macros with specified ... Closed
is duplicated by ZBX-3697 ITEM.LASTVALUE not correctly displaye... Closed

 Description   

I Created a trigger to alert of incoming traffic over 60% percent (this work correctly), but when a see this alert on my dashboard I see a number with no formatation. see more details in the forum thread - http://www.zabbix.com/forum/showthread.php?t=20896



 Comments   
Comment by richlv [ 2011 Feb 11 ]

item value macro expands w/o units. could this be a regression ?
also, please add details on what exact macro was used

Comment by Italo Santos [ 2011 Feb 11 ]

In trigger description I'm using

{ITEM.LASTVALUE}. The trigger Expression is - {Template_Cisco_WS-C3560-48TS:ifHCInOctets.10008.last(0)}>60M and the trigger name is - Incoming traffic on Fa0/3 over 60% - {ITEM.LASTVALUE}
Comment by Ricardo Santos [ 2011 Feb 11 ]
  • Dashboard uses CTrigger::get() to get the trigger's description, so the macro (eg: ITEM.LASTVALUE) are expanded in api/classes/class.ctrigger.php
  • Monitoring -> Triggers uses expand_trigger_description() function present in includes/triggers.inc.php

Both do same work, but CTrigger::get() doesn't expand ITEM.LASTVALUE correctly, respecting the multiplier and unit

Suggested Solution - alter CTrigger::get() to use expand_trigger_description() - No make sense for me two pieces of code to do the same work.

Comment by Ricardo Santos [ 2011 Feb 11 ]

Patch for frontend/php/api/classes/class.ctrigger.php - File attached
http://pastebin.com/uAiawvk5

Needs to be tested on 1.9.x

Comment by Alexey Fukalov [ 2012 Jun 27 ]

This probably is fixed in https://support.zabbix.com/browse/ZBX-5159 for trunk.

Comment by Toms (Inactive) [ 2012 Jul 11 ]

Fixed with ZBX-5159

Generated at Tue Apr 16 21:18:26 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.