[ZBX-10374] triggers do not work for items with "keep history"=0 Created: 2016 Feb 11  Updated: 2017 May 30  Resolved: 2016 Mar 15

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D), Server (S)
Affects Version/s: 2.4.7, 3.0.0rc2
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Stefan Priebe Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: history, regression, triggers, unknown
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File important_note.png    
Issue Links:
Duplicate
is duplicated by ZBXNEXT-2216 Items without history do not have las... Closed
is duplicated by ZBX-7548 ITEM.VALUE1 not working in email if i... Open
is duplicated by ZBX-7973 Items with 0 days history do not retu... Closed

 Description   

NOTE: see zalex's comment below for correct issue description.

The zabbix documentation says "If history is set to '0', Zabbix will only be able to calculate triggers that check the last value. Historical values would not be stored in the database at all, except for the last value for the item itself. "

But if i set an item to history 0 it wouldn't get checked at all. Last check stays at: " 2016-02-11 08:52:29" it starts checking the value again if i set the history to 1.



 Comments   
Comment by richlv [ 2016 Feb 11 ]

that might be correct still - the values are collected, but never stored in the db
unfortunately, the "last check" has slightly lost it's meaning from the older versions of zabbix and in some cases will mean only "latest value timestamp".

have you checked with a simple last() trigger against such an item ?

Comment by Stefan Priebe [ 2016 Feb 11 ]

Yes already tested this. The trigger doesn't work.

Comment by Stefan Priebe [ 2016 Feb 11 ]

I did the following to verify:

Added a simple check net.tcp.service[tcp,,12345] with interval 30s, history 0d, trends 0d.

Latest data screen in the webgui - always shows no value and no check.

Also the trigger which check if the value is = 1 or = 0 never fires up. If i set the history to 1d. It starts working.

Comment by Oleksii Zagorskyi [ 2016 Feb 12 ]

https://www.zabbix.com/documentation/3.0/manual/config/items/history_and_trends
The part "last value for the item itself" is definitely incorrect starting from 2.2 as we have removed lastvalue/lastclock in items table.

As I remember last value is stored in memory, just to calculate items with "store as delta .." mode.

DANG, CONFIRMED on 2.4.7 !
I use a numeric trapper item with a .last()>5 function.
Then there is a difference:

  • If item created after zabbix server start (or existed on server start, but without collected history), then the trigger gets Unknown state with a error: Cannot evaluate function "it0:test.item.last(0)". An alert for internal event for 'Unknown" trigger status is sent, a macro {ITEM.VALUE} in the trigger name expanded to *UNKNOWN*
  • If an item received a value previously, stored to db, we changed keep history to 0, cleaned history for the item, reloaded config cache then the trigger simply does not change its state and does not become Unknown. Just are no any reaction.

If use a "passive" zabbix agent item - the item is successfully polled but the same picture as above for the same trigger.

Issue summary has been updated.
CONFIRMED

Comment by Oleksii Zagorskyi [ 2016 Mar 05 ]

Note - a ZBXNEXT-2216 duplicate contains some suggested patch.

Comment by Oleksii Zagorskyi [ 2016 Mar 05 ]

After this fix, would be nice to answer will it resolve a ZBX-7548 too or not.

Comment by Alexei Vladishev [ 2016 Mar 07 ]

It should be documented that starting from introduction of value cache "keep history = 0" will cause item to update only inventory. No trigger functions will be evaluated.

Comment by Martins Valkovskis [ 2016 Mar 09 ]

Updated documentation:

sasha I think it must be documented as important note:

martins-v RESOLVED

sasha Thanks! CLOSED

Generated at Fri Jul 04 07:21:48 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.