Skip to content

A simple monitoring plugin to check if MySQL/MariaDB host can do write operations. Supports Galera Cluster.

License

Notifications You must be signed in to change notification settings

Napsty/check_mysql_write

Folders and files

NameName
Last commit message
Last commit date

Latest commit

21a455f · Jun 21, 2022

History

18 Commits
May 23, 2019
Jun 21, 2022
Jun 21, 2022

Repository files navigation

check_mysql_write

A simple monitoring plugin to check if MySQL/MariaDB host can do write operations

##How does it work?

The plugin will connect to the given MySQL server and database given by -d parameter. Within this database, a table "monitoring" must exist. Here are the SQL commands to prepare the database on a mysql server, assuming you name the database 'monitoring':

CREATE DATABASE monitoring;
GRANT ALL ON monitoring.* TO 'monitoring'@'%' IDENTIFIED BY 'secretpassword';
CREATE TABLE monitoring.monitoring ( id INT(3) NOT NULL AUTO_INCREMENT, host VARCHAR(100), mytime INT(13), PRIMARY KEY (id) );

If the table monitoring does not exist, the plugin will attempt to create the table on the first run.

Every time the plugin runs, the "mytime" column of the row matching the monitoring host will be updated with the current timestamp.

About

A simple monitoring plugin to check if MySQL/MariaDB host can do write operations. Supports Galera Cluster.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages