Search code examples
zabbix

Zabbix DB: how events linked to hosts


I want to create the custom report on event by 2 monitoring system.

I know about Zabbix API, but think if I request data through the API, then the performance will not be the same if I perform queries directly to the database Zabbix.

I found a table with information about events,

SELECT eventid, source, object, objectid, clock, value, acknowledged, ns
FROM zabbix.events

Found zabbix.hosts and zabbix.host_inventory.

How is zabbix.events linked to zabbix.hosts?


Solution

  • objectid for trigger events (source=0) is the trigger ID, which in turn has function IDs, which in turn have item IDs, which in turn have host IDs.