ZABBIX Forums  
Old 12-01-2018, 09:06
voculus voculus is offline
Junior Member
Join Date: Dec 2017
Posts: 3
Default SQL queries directly to db for reporting


We are trying to develop custom SQL queries to be integrated into a report generation system (e.g. jasper reports).

Where can we find documentation on the description of the MySQL tables of the Zabbix database?

For example, how would the SQL query look like to produce a list of the top 10 alerts in the past week (or some user-specified time range)? Which tables would the data need to be pulled from?

Any pointers or hints would be greatly appreciated.

Reply With Quote
Old 12-01-2018, 11:09
jan.garaj jan.garaj is offline
Senior Member
Zabbix certified specialist
Join Date: Jan 2010
Location: United Kingdom, Slovakia, Bulgaria
Posts: 476

SQL schema is not documented officially. API is the official recommended approach. Some community effort has been made on, so if you really want to use SQL, then start on

That DB schema information may not be updated and there may be also a dependency on used DB (MySQL, PostgreSQL, Oracle, ...).
Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant
Reply With Quote

database, reporting

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 14:19.