Need help with zabbix-orphaned-data-cleanup?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

mattiasgeniar
131 Stars 125 Forks 37 Commits 3 Opened issues

Description

Cleanup script for orphaned data in a Zabbix Database

Services available

!
?

Need anything else?

Contributors list

Zabbix Database Cleanup

This repo contains a few useful queries to cleanup old orphaned data in a Zabbix database. While Zabbix does Housekeeping, it does not clear orphaned data very well. Especially if you come from a long upgrade-line (1.x to 1.6 to 1.8 to 2.x), chances are your database is riddled with orphaned data that is consuming disk space.

Usage: check how many orphaned rows you have

These queries are safe to run, but if you have a large database please note that these can take a while (read: a few hours is normal).

[email protected]$ mysql -f zabbix < checkscript.sql

or

[email protected]$ ./checkscript.sh
[email protected]$ ./checkscript.sh ./zbx_db_info.cnf

Usage: delete the orphaned rows

Use the queries above on your won risk. Take backups first. Once you have back-ups, go ahead and be brave.

 [email protected]$ mysql -f zabbix < cleanup.sql

or

[email protected]$ ./cleanup.sh
[email protected]$ ./cleanup.sh ./zbx_db_info.cnf

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.