Ad Widget

Collapse

History Values Switched Tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jm123
    Junior Member
    • Jul 2017
    • 5

    #1

    History Values Switched Tables

    Hello,

    I'm working on tracking the history for an ifinoctets item on a switch interface and I notice that the history switched from being stored in history_uint to history.

    I have many other people in this environment that could have changed something? I'd like to know what switched the stored values from ints to floats. I don't mess with the front side all that much, but I've been pulling values from some of the tables.


    It is important because I'm doing some sql scripting to determine bandwidth usage, and it would be a new complication if the values switched tables periodically.
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2
    Hello !

    I think someone has changed in the web interface the item type from unsigned to float..
    the default value is int which goes to history_uint. Zabbix normally is not changing data types. It may be some upgrade issue, i'm not sure about that.

    It seems zabbix by default rounds down the speed per second, which basically is delta of two values divided by seconds between those values, to integer and then stores it in history_uint

    By changing data to float you will get more precise result by a few tenths of a bit which makes no sense for me

    I have tested zabbix with both float and int, both ways worked for me but used different tables

    imho using float is a bad practice, because it uses more storage space and floating point operations are more resource hungry. I suggest switching back to int, but in that case some of the historic data will stay in different history table

    Best regards
    Kaspars

    Comment

    • jm123
      Junior Member
      • Jul 2017
      • 5

      #3
      You are correct. I tracked it down to an admin that has changed it.

      Also, I agree that int is better for our purposes, especially so for my work. It is very resource heavy to calculate the rates between data points.

      Thanks

      Comment

      Working...