Ad Widget

Collapse

how can I get the graphs id of some host?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jun.Liu
    Member
    • Apr 2007
    • 91

    #1

    how can I get the graphs id of some host?

    Below is the table structure of table graphs in the database:


    +------------------+---------------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +------------------+---------------------+------+-----+---------+-------+
    | graphid | bigint(20) unsigned | NO | PRI | 0 | |
    | name | varchar(128) | NO | MUL | | |
    | width | int(11) | NO | | 0 | |
    | height | int(11) | NO | | 0 | |
    | yaxismin | double(16,4) | NO | | 0.0000 | |
    | yaxismax | double(16,4) | NO | | 0.0000 | |
    | templateid | bigint(20) unsigned | NO | | 0 | |
    | show_work_period | int(11) | NO | | 1 | |
    | show_triggers | int(11) | NO | | 1 | |
    | graphtype | int(11) | NO | | 0 | |
    | show_legend | int(11) | NO | | 0 | |
    | show_3d | int(11) | NO | | 0 | |
    | percent_left | double(16,4) | NO | | 0.0000 | |
    | percent_right | double(16,4) | NO | | 0.0000 | |
    | ymin_type | int(11) | NO | | 0 | |
    | ymax_type | int(11) | NO | | 0 | |
    | ymin_itemid | bigint(20) unsigned | NO | | 0 | |
    | ymax_itemid | bigint(20) unsigned | NO | | 0 | |
    +------------------+---------------------+------+-----+---------+-------+
    I can't find the connection between the graphs with the hosts. so if there are some graphs which have the same name, how can't I decide the host for these graphs?
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    graphs are not strictly tied to hosts. a graph is said to belong to some host if it includes an item from that host (same as with triggers)
    Zabbix 3.0 Network Monitoring book

    Comment

    • Jun.Liu
      Member
      • Apr 2007
      • 91

      #3
      thanks richlv's answer. so the graph should connect to a item or some items? but why there is no related item info in the table?

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        graph includes (or references) one or more items. which table are you talking about ?
        Zabbix 3.0 Network Monitoring book

        Comment

        • sarathyme
          Member
          • Mar 2009
          • 58

          #5
          Hi Jun Liu,

          The releated items are stored in graphs_items table.
          It will have graphid, which is pk in graphs table.

          Hope that helps.

          Regards
          Vijay

          Comment

          • Jun.Liu
            Member
            • Apr 2007
            • 91

            #6
            Originally posted by richlv
            graph includes (or references) one or more items. which table are you talking about ?
            The releated items are stored in graphs_items table.
            It will have graphid, which is pk in graphs table.
            I'm talking about the 'graphs' table. and now I know another table ''graphs_items" connect the graphs and items. thanks you both very much

            Comment

            Working...