Giter Club home page Giter Club logo

zabbix-orphaned-data-cleanup's Introduction

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.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.

 user@host-$ mysql -f zabbix < cleanup.sql

or

user@host-$ ./cleanup.sh
user@host-$ ./cleanup.sh ./zbx_db_info.cnf

zabbix-orphaned-data-cleanup's People

Contributors

ehuelsmann avatar i5513 avatar mattiasgeniar avatar nefelim4ag avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.