Skip to content

A set of Grafana dashboards for analyzing Zabbix database

License

Notifications You must be signed in to change notification settings

pavlozt/zabbix-db-auditor

Repository files navigation

Zabbix DB Auditor

Zabbix DB Auditor is a collection Grafana dashboards designed to analyze Zabbix database size. This tool provides comprehensive visualizations and insights into your Zabbix database, helping you to optimize storage cost.

Table of Contents

Screenshots

Zabbix DB Auditor

Features

  • Easy-to-evaluate dashboard - using modern type of visualization Treemap.
  • Quick loading - due to approximate analysis of the data planned for the storage.
  • Filters - filters by host groups and hosts.
  • Accurate counting - If necessary, it can count the items actually stored in tables.It also counts data from deleted hosts that has not yet been cleared.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Grafana: Ensure you have Grafana 10+ installed and running.
  • Treemap Plugin: for Grafana version older than 11 you need to install a Treemap Plugin. Grafana 11 include this pluging.
  • Zabbix: Of course, you need Zabbix. Versions 6.0 and 7.0+ are supported.
  • Database Access: Currently the dashboard only supports MYSQL 8.0+. It is necessary to provide access to the Zabbix database and the ability to GRANT rights.

Database access

The dashboard requires access to the Zabbix database.

in first, create user:

  • make your own password
  • make sure MySQL is not accessible from (container) network
CREATE USER 'zabbix_db_auditor'@'%' IDENTIFIED BY 'pas_WoRD#!sw';
GRANT USAGE ON zabbix.* TO 'zabbix_db_auditor'@'%';

Then execute grant script in zabbix database context. The table names in the script are short, that is, this script depends on the launch context.

For zabbix version 6, you need execute another grant script grant-zabbix-6.sql (without history_bin table).

It is very important to create limited access to the database. Often tables in Zabbix contain a lot of access data. But access to data in Grafana is different from what you would expect. You can read more about this in a separate post in Grafana Blog . Carefully granted access eliminates these problems.

Dashboard Installation

Query sets differ for Zabbix versions and the selected database type. Therefore, you need to upload to Grafana the corresponding file with the dashboard.

The repository contains an example of setting up datasource provisioning. Of couse, dashboards can be provisioned too.

Recomendations

It is recommended to set up some type of partitioning.

The quick estimation panel works fast enough without these extensions.

Caveats

  • Zabbix items with flexible intervals not fully supported at the estimation dashboard, so it is suggested to calculate the actual items count. These dashboard elements are collapsed by default.

  • Although the dashboard allows you to estimate which elements consume the most resources, it is almost impossible to calculate with byte accuracy. Service data, compression and fragmentation affect this.

  • Even though this is a Zabbix dashboard, it does not use access via API and a special Zabbix Grafana plugin. You need direct network access to the Zabbix database.

Contributing

Contributions are welcome and encouraged.

License

This project is licensed under the GPL-3.0 License. See the LICENSE file for more details.

About

A set of Grafana dashboards for analyzing Zabbix database

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published