Ad Widget

Collapse

[zabbix DB] relation between templates and his graphs ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eddriks
    Junior Member
    • Apr 2010
    • 22

    #1

    [zabbix DB] relation between templates and his graphs ?

    Hello everybody

    i'm looking for a while to find a relation in the zabbix DB between templates and his graphs.

    I would like to have the list of graphs who belong to one templates with one sql query.

    I've already look the db severals time but i've not find any solution to get this =/


    Someone have any idea ?


    thanks a lot .
    Last edited by Eddriks; 28-07-2010, 13:39.
  • sarathyme
    Member
    • Mar 2009
    • 58

    #2
    please see if this helps.

    Code:
    SELECT DISTINCT h.host, g.name 
    FROM   hosts h, 
           graphs g, 
           graphs_items gi, 
           items i 
    WHERE  h.hostid = i.hostid 
           AND gi.graphid = g.graphid 
           AND gi.itemid = i.itemid 
           AND h.status = 3  order by h.hostid;
    Here h.status=3 is to select only templates. If you wanted for both hosts and templates take that codition out.

    Status
    0-Host Monitored
    1-Not Monitored
    3-Template
    5-Proxy hosts

    Regards
    Vijay

    Comment

    • Eddriks
      Junior Member
      • Apr 2010
      • 22

      #3
      Niceee !!!

      it's absolutely that I want! .

      you're awesome !


      thanks a lot !

      Comment

      Working...