zabbix Triggers Top 100

zabbix Triggers Top 100



查询1天内的Top

点击(此处)折叠或打开

  1. SELECT h.`name`, t.`description`, COUNT(*) num
  2. FROM `events` e
  3. JOIN `triggers` t ON e.`objectid`=t.`triggerid` AND t.`priority`>=2
  4. JOIN functions f ON f.`triggerid`=t.`triggerid`
  5. JOIN items i ON f.`itemid`=i.`itemid`
  6. JOIN `hosts` h ON i.`hostid`=h.`hostid`
  7. WHERE e.object=AND e.source=0 and e.`clock`>=UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL 1 DAY))
  8. GROUP BY h.`name`, t.`description`
  9. ORDER BY num DESC,t.`priority` DESC
  10. limit 100