Ad Widget

Collapse

Question about zabbix sql tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mppdidi
    Junior Member
    • Jul 2014
    • 17

    #1

    Question about zabbix sql tables

    Hello,

    i am trying to figure out how the zabbix events that occured are stored in the database ( postgres in my case ). Also am i correct in the assumption that triggers are host templates ?. Is there any description how zabbix operates the tables in detail ( besides the huge single graphic and the source code itself ) ?

    Kind regards.
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    I've found that only by digging in the database with known examples. Some of the structure is a bit arcane, notably when you look at prototypes and templates combined, as fields get reused, and flags (I think the field is literally flags) indicate the role it played.

    For example, a template has status=3, a regular host has status=0 (if enabled). Items are linked to hosts, but items are also linked via the template item to another item which is part of the template. LLD adds yet another level of indirection to things, as you have prototypes that become items but the prototype may (or may not) have been in a template.

    Some of this can be found in the API section of the manual in the object description. Fortunately they exposed the real field names and values in the API. Unfortunately (for trying to understand the database) they did it by object type, so some of the values of (for example) flags can be found in the item prototype, some in the item section, but if you look through there you can find a lot of this.

    Comment

    • kloczek
      Senior Member
      • Jun 2006
      • 1771

      #3
      Originally posted by mppdidi
      Hello,

      i am trying to figure out how the zabbix events that occured are stored in the database ( postgres in my case ). Also am i correct in the assumption that triggers are host templates ?. Is there any description how zabbix operates the tables in detail ( besides the huge single graphic and the source code itself ) ?

      Kind regards.
      Yep, it is. Zabbix source code provides excellent documentiations about threse bits
      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...