[ZBX-3697] ITEM.LASTVALUE not correctly displayed in Host status Created: 2011 Apr 07  Updated: 2017 May 30  Resolved: 2012 Jun 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.5rc1
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: Nicola Canepa Assignee: Unassigned
Resolution: Duplicate Votes: 3
Labels: valuemapping
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix version 1.8.5rc1 18086


Attachments: JPEG File System status and Last 20 issues (Dashboard).jpg     JPEG File System status and Last 20 issues.jpg     PNG File suffixes_in_item_value.png     File triggers.inc.php.diff    
Issue Links:
Duplicate
duplicates ZBX-3530 Wrong value display on dashboard Closed
is duplicated by ZBX-4092 Time items {ITEM.LASTVALUE} in human ... Closed
is duplicated by ZBX-4488 {ITEM.VALUE} for Numeric (float) item... Closed

 Description   

When using ITEM.LASTVALUE (or ITEM.VALUE) in trigger names, the values are displayed in raw form in "Host Status", while they are correct in "Last 20 issues".
For example, I see "0.01345223" instead of "1.3%", or "1000" instead of "16m 40s"



 Comments   
Comment by Nicola Canepa [ 2011 May 12 ]

I noticed a different behaviour between ITEM.VALUE and ITEM.LASTVALUE used in trigger names:

  • ITEM.VALUE always shows as the raw value
  • ITEM.LASTVALUE is correct in "Last 20 issues" but has the raw value in "Host Status"
    Both are supported in trigger names
Comment by Oleksii Zagorskyi [ 2011 Jun 20 ]

More correct situation (trunk rev 20223):
ITEM.VALUE always ignores units, i.e. shown raw value, but in the details of event page (tr_events.php) it expanded always as ITEM.LASTVALUE macro !!! It's serious bug.
ITEM.LASTVALUE uses units well in the all paces (except the details of event page (tr_events.php) ).
Se picture "suffixes_in_item_value.png"

Comment by richlv [ 2011 Jul 26 ]

1. ITEM.VALUE using the raw value is not documented, so it is not clear whether that is intended behaviour or a bug; this is not really expected, so most likely it should be made to display formatted value in frontend and in notifications (if it's not already);

2. ITEM.VALUE currently does not trim trailing zeroes;

3. non-raw values should also obey ZBX_UNITS_ROUNDOFF_* settings;

4. there should be a way to use raw values. new macro names or some other approach ?

5. all this should be documented

Comment by alix [ 2011 Dec 27 ]

triggers.inc.php.diff 2011 Dec 27 11:44
fix for unformatted

{ITEM.VALUE}

all over the 1.8.9 frontend

Comment by José Roberto Prado [ 2012 Feb 27 ]

The fix triggers.inc.php.diff 2011 Dec 27 11:44 work for me in 20 last issues. But the values in the system status remains the problem occurs, values ​​appear with no mapping, no rounding, and show last values ​​like the macro ITEM.LASTVALUE.

I tested in 1.8.7, 1.8.8, 1.8.9 and 1.8.10.

Comment by alix [ 2012 Feb 28 ]

what's system status? it's better if you provide a screenshot, I might look up a solution for this too.

anyways, I just want to mention the problem requires more generic approach that I've choosen in the patch. it's not cool to copypaste the same code in three (or even more) different locations. but that's up to developers - looking up for the changes in 2.x branch.

Comment by José Roberto Prado [ 2012 Feb 28 ]

I added the screenshot showing the problem.

Comment by José Roberto Prado [ 2012 Feb 28 ]

In the last 20 issues the values ​​are mapped but in the system status is not.

Comment by alix [ 2012 Feb 28 ]

I see. Trigger descriptions of these popups are formatted using PHP API, api/classes/class.ctrigger.php. I don't have enough spare time on my hands to fix that.

I suggest creating another ZBXBUG regarding proper value formatting of

{ITEM.VALUE}

,

{ITEM.LASTVALUE}

etc in PHP API functions (if there isn't anything similar already).

Comment by Alexander Vladishev [ 2012 Jun 19 ]

Duplicates: ZBX-3530

Generated at Thu Apr 25 16:29:31 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.