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

 

History

7 Commits
 
 
 
 
 
 

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 'mymonitoring':

CREATE DATABASE mymonitoring;
GRANT ALL ON mymonitoring.* TO 'monitoring'@'%' IDENTIFIED BY 'secretpassword';
CREATE TABLE mymonitoring.monitoring ( host VARCHAR(100), mytime INT(13) );

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