Ad Widget

Collapse

Change default value for new items "history storage period"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joosep
    Junior Member
    • Sep 2019
    • 4

    #1

    Change default value for new items "history storage period"

    When creating a new item the current default "history storage period" is shown as 90d. Is there a configuration parameter somewhere where that can be changed?
    I'm not looking for a solution for fixing the already existing items (by setting the housekeeping override value). What I need is for all the new items to have a different default value.

    When looking at older posts on this topic I saw some "hints" that this is actually hardcoded somewhere in php. Is this still the case? If so then where is that and can one simply change the code or would there be any weird side-effects?

    Version of Zabbix that we're running is : "Zabbix 3.4.15"
  • joosep
    Junior Member
    • Sep 2019
    • 4

    #2
    So if anyone ever needs to do the same change.
    That "History storage period" default value comes from https://github.com/zabbix/zabbix/blo...schema.inc.php ( line 1345 )
    PHP Code:
    'history' => [
      
    'null' => false,
      
    'type' => DB::FIELD_TYPE_CHAR,
      
    'length' => 255,
      
    'default' => '90d' 
    Most likely it'll get reverted back to 90d once one upgrades the Zabbix version so imho not the best place to keep those values but it is what it is.

    Comment

    Working...