Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattiasgeniar/zabbix-orphaned-data-cleanup
Cleanup script for orphaned data in a Zabbix Database
https://github.com/mattiasgeniar/zabbix-orphaned-data-cleanup
Last synced: 20 days ago
JSON representation
Cleanup script for orphaned data in a Zabbix Database
- Host: GitHub
- URL: https://github.com/mattiasgeniar/zabbix-orphaned-data-cleanup
- Owner: mattiasgeniar
- Created: 2013-01-03T23:18:13.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2021-08-17T17:32:22.000Z (about 3 years ago)
- Last Synced: 2024-10-15T04:08:51.055Z (about 1 month ago)
- Language: Shell
- Size: 22.5 KB
- Stars: 143
- Watchers: 25
- Forks: 143
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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).
user@host-$ mysql -f zabbix < checkscript.sql
or
user@host-$ ./checkscript.sh
user@host-$ ./checkscript.sh ./zbx_db_info.cnfUsage: 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.
user@host-$ mysql -f zabbix < cleanup.sql
or
user@host-$ ./cleanup.sh
user@host-$ ./cleanup.sh ./zbx_db_info.cnf