Ad Widget

Collapse

How are hosts and host groups related nodes in the schema?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dfrankow
    Junior Member
    • Mar 2012
    • 5

    #1

    How are hosts and host groups related nodes in the schema?

    I am using a Zabbix 1.8.8 instance with many hosts, groups, and nodes. When I choose a "Current Node" in the UI, it changes the membership of the "Hosts" drop-down. That leads me to believe hosts are related to nodes, possibly through host groups.

    When I look in the MySQL schema, I see hosts, groups, hosts_groups, nodes, but no tables mapping from either hosts or host groups to nodes.

    How does Zabbix map nodes to hosts in the schema?
  • dfrankow
    Junior Member
    • Mar 2012
    • 5

    #2
    Items => Hosts

    Similar question: how does the Zabbix schema associate items with hosts?

    There is no items_hosts or hosts_items table.

    Comment

    • dfrankow
      Junior Member
      • Mar 2012
      • 5

      #3
      Anyone? Beuller?

      Comment

      • dfrankow
        Junior Member
        • Mar 2012
        • 5

        #4
        I found an implicit relationship between hosts and items.

        get (http://git.zabbixzone.com/zabbix1.8/...ost.php#l289):

        if(!$nodeCheck){
        $nodeCheck = true;
        $sql_parts['where'][] = DBin_node('i.itemid', $nodeids);
        }

        DB_innode (http://git.zabbixzone.com/zabbix1.8/...inc.php#l798):

        foreach($nodes as $nnum => $nodeid){
        $sql.= '('.$id_name.' BETWEEN '.$nodeid.'00000000000000 AND '.$nodeid.'99999999999999)';
        $sql.= ' OR ';
        }

        So I guess item ids begin with the nodeid.

        Looks like host ids and host group ids might have the same relationship (http://git.zabbixzone.com/zabbix1.8/...chost.php#l216).

        Comment

        Working...