[ZBXNEXT-5176] Take in consideration history storage period with 0 on housekeep override Created: 2019 Apr 15  Updated: 2024 Apr 10  Resolved: 2019 Jul 04

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 4.0.6, 4.2.0, 4.4.0alpha1
Fix Version/s: 4.0.11rc1, 4.2.5rc1, 4.4.0alpha1, 4.4 (plan)

Type: Change Request Priority: Major
Reporter: Markus Fischbacher Assignee: Andris Zeila
Resolution: Fixed Votes: 2
Labels: history, housekeeper
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File screenshot-1.png    
Issue Links:
Sub-task
part of ZBX-15222 Housekeeping not working Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
ZBXNEXT-5205 Frontend part: do not override item's... Change Request (Sub-task) Closed Miks Kronkalns  
Team: Team A
Sprint: Sprint 51 (Apr 2019), Sprint 52 (May 2019), Sprint 53 (Jun 2019), Sprint 54 (Jul 2019)
Story Points: 1

 Description   

Steps to reproduce:

  1. Housekeeping override of History to 7d (because of TimescaleDB)
  2. Create an item with History storage period of 0 (zero)

Result:

The items configured history storage period of 0 is overridden by the global 7d.

Expected:

Even if this is plausible for most cases, IMO for the 0 value this should be considered as non-overrideable.

For example if you configure the master element for an Prometheus scrape and set it to 0 because there is alot of data you realy dont want to store them for 7d!

I think, this even was as expected in previous versions?



 Comments   
Comment by Markus Fischbacher [ 2019 Apr 15 ]

Currently my only workaround is to deactivate global override and individually set to 7d and master items to 0.

Comment by Dmitrijs Lamberts [ 2019 Apr 15 ]

Hello Markus,
Your statement is fully correct. But this is more a feature request rather a bug, so moved it here.

Additionally - I would say that this becomes a problem not only with Timescale support, but also without it since Zabbix is more and more about pre-processing and dependent items. Quite often users have a master item that gathers big amount of data which is being extracted by dependent items, and general Idea is to drop that huge data chunk in preprocessing stage without storing to database.

In a large environments quite often Override housekeeper is used, and that again will negatively affect such master items.

Comment by Glebs Ivanovskis [ 2019 Apr 15 ]

There is an alternative to global overrides — user macros.

Comment by Markus Fischbacher [ 2019 Apr 16 ]

@Glebs - that is my current workaround. I define an global macro {$DEFAULT_HISTORYPERIOD} = 7d and use use that in the items. Actually it's one of the first things I change in all my installations and on all Templates/Items. TBT I often have thought to bring that in for a change request.

But i still see how it is better to provide the global override - it just should honour the 0 setting!

@Dmitrijs - I thought it would fit better as a bug as I really thought it worked in previous versions. But I'm happy you see that as a problem too.

Comment by Glebs Ivanovskis [ 2019 Apr 16 ]

Official templates don't always follow the best practices of template building. As far as I recall discussions during ZBXNEXT-1675 implementation, it was decided not to use macros in update intervals and history/trend storage settings in official templates in order to keep them "humane" and easier to understand for Zabbix beginners. But you can still try to convince Zabbix to do this by filing a feature request and gathering few votes. Sometimes people do change their minds.

Comment by Alexei Vladishev [ 2019 Apr 26 ]

I think that Zabbix must not overwrite history storage period for items configured to have no history (i.e. item history period set to 0).

Comment by Edgars Melveris [ 2019 Apr 26 ]

Another option could be to override only if the item period is larger. eg change the terminology there to "Maximum history period" or similar. This might be useful in some use cases, where no partitioning is used, but user would still wants smaller history period for some items.
Example:
Override max history to 30 days, but user has some items, that update really often, but do not require that much history. For such items, 1 day might be enough history and the setting might be honored in this case.

Comment by Miks Kronkalns [ 2019 Jul 02 ]

Fixed in:

  • 4.0.11rc1 f2770b316ef
  • 4.2.5rc1 c9fc882527c
  • 4.4.0alpha1 (master) 5f0957e8233, 97259c1bda8
Comment by Miks Kronkalns [ 2019 Jul 03 ]

Documentation changes:

Generated at Wed Apr 24 09:47:39 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.