Ad Widget

Collapse

Keeping history when changing an item's data type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webcompas
    Junior Member
    • Oct 2015
    • 14

    #1

    Keeping history when changing an item's data type

    Hi all,

    I have an item which is configured with the data type "Numeric (unsigned)". Because of some changes the item now can have negative values. So the data type has to be changed to "Numeric (float)".

    Depending on the data type Zabbix uses different database tables to store an item's historical values and trends. So I'm thinking about how Zabbix will handle a change of an item's data type. Can you therefor please answer the following questions?

    1. Will Zabbix keep history and trends?
    2. If it does, will the items stay in the actual database table or will they be moved into the new table?

    Kind regards,
    Pascal
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    1. Yes it will
    2. All data will stay as they are

    it is know issue when someone is doing such change that all delta items will calculate initial value in new type incorrectly.
    Workaround: do such switch just after full hour when new trends points are created -> delete in history table first new point of new type entry -> restart zabbix to force recalculate last our data not basing on cached already last our data but calculate those values basing on data from last full hour data from database.
    Without this trick you will have very big spike in trends data.

    Switching to new type of history data is not easy to handle internally by zabbix process.
    However as this spiking point will be removed still will be possible to look on raw history data using series of data from two tables.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    Working...