Ad Widget

Collapse

Where can I find the zabbix database format?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mpsoxygen
    Junior Member
    • Apr 2016
    • 1

    #1

    Where can I find the zabbix database format?

    Hello,

    I am trying to make a script that can extract the data used to plot interface graphs in zabbix so I can automate some reports. But I have no idea how the data is stored in the database. Where could I find this information?
  • robthinking
    Junior Member
    • Jul 2016
    • 1

    #2
    Plot Data

    First it depends on the value type you are storing unsigned or float.

    Raw data will be stored in history tables. But if you are looking at 90days of data most likely this is out of the range you are storing history data. If this is the case you will need to grab it from the trends table.

    you can run a describe on your tables to figure out what type of value is stored in which table.

    Here are basic examples to get trend data

    For a specific item that is storing Numeric (unsigned) between a specific time frame:
    select * from trends_uint where itemid = 500063 and clock BETWEEN 1328100000 and 1328300000;

    For a specific item that is storing Numeric (float) from a specific time to now:
    select * from trends where itemid = 500263 and clock > 1323820800;

    you can use something http://www.epochconverter.com/ to figure out what epoch time you want to use.

    Comment

    Working...