zabbix Triggers Top 100

G8bao7發表於2017-05-18


查詢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

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26250550/viewspace-2139307/,如需轉載,請註明出處,否則將追究法律責任。

相關文章