Ad Widget

Collapse

Query zabbix database searching for enabled discoveries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leoh
    Member
    • Oct 2005
    • 47

    #1

    Query zabbix database searching for enabled discoveries

    Hi,

    does anybody know a query in Zabbix database to show which hosts have discoveries enabled???

    Is the current zabbix database schema avaiable for us who understand something about SQL queries? It would make our administration of Zabbix much more easier!!!

    Thanks
    Leo.
  • Pada
    Senior Member
    • Apr 2012
    • 236

    #2
    Here's a query for item discovery:

    Code:
    SELECT h.host, (SELECT name FROM items i WHERE i.itemid = d.parent_itemid) as 'parent name', i.name, i.key_, d.lastcheck
    FROM item_discovery d
    LEFT JOIN items i ON d.itemid = i.itemid
    LEFT JOIN hosts h ON i.hostid = h.hostid;
    There are different tables for graph, trigger, item, interface, group and host discovery. You should be able to easily modify the above query to any one of these tables.

    Comment

    Working...