Giter VIP home page Giter VIP logo

auto-increment-ratio's Introduction

Monitoring auto_increment_ratio of MySQL tables by Zabbix

Overview

For Zabbix version: 3.x and higher

This template was tested on:

  • MySQL version 5.6, 5.7
  • Percona version 5.6, 5.7

Template has a discovery rule (Table Discovery) which include,

  • an item prototype: MySQL {#TABLESCHEMA}:{#TABLENAME} auto increment ratio )
  • two trigger prototypes: MySQL Table: {#TABLESCHEMA}:{#TABLENAME} auto increment ratio is higher than 0.9 MySQL Table: {#TABLESCHEMA}:{#TABLENAME} auto increment ratio is higher than 0.8)

Setup

  • Copy template_mysql_tables_auto_increment_ratio.conf into directory with Zabbix agent configuration (/etc/zabbix/zabbix_agentd.d/ by default).
  • Copy zbxAutoIncrementRatio.py script into /usr/local/bin directory. If you would like to copy to another directory you have to change directory path in template_mysql_tables_auto_increment_ratio.conf file.
  • Restart zabbix-agent.
  • Create MySQL user for monitoring and grant limited privileges to user on 'sys' database.

Zabbix configuration

  • Import template: zbx_template_mysql_tables_auto_increment_ratio_exports.xml

Notes

Script discoveries the top 20 mysql tables. If you want to monitor auto-increment ratio for more tables you should change LIMIT value in discovery_tables function

	 def discovery_tables(self):
		return self.__select("""SELECT  `table_schema`,`table_name`
                            FROM `schema_auto_increment_columns`
                            ORDER BY `auto_increment_ratio` DESC
                            LIMIT 20;
    """)

auto-increment-ratio's People

Contributors

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