napsty / check_mysql_write Goto Github PK
View Code? Open in Web Editor NEWA simple monitoring plugin to check if MySQL/MariaDB host can do write operations. Supports Galera Cluster.
License: GNU General Public License v3.0
A simple monitoring plugin to check if MySQL/MariaDB host can do write operations. Supports Galera Cluster.
License: GNU General Public License v3.0
# /usr/lib/nagios/plugins/check_mysql_write.sh -H mysqlhost -u monitoring -p supersecret -d monitoring
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
OK: Write query successful (UPDATE monitoring SET mytime=1566392156 WHERE host='icinga')
Galera Cluster wsrep / sync can fall on its nose because of this monitoring table as it has no PK defined. This would then look something like this in the error log:
2021-05-01 17:05:03 19 [ERROR] InnoDB: Conflicting lock on table: `monitoring`.`monitoring` index: GEN_CLUST_INDEX that has lock
RECORD LOCKS space id 8 page no 3 n bits 72 index GEN_CLUST_INDEX of table `monitoring`.`monitoring` trx id 627 lock_mode X locks rec but not gap
Record lock, heap no 2
Record lock, heap no 3
2021-05-01 17:05:03 19 [ERROR] InnoDB: WSREP state:
2021-05-01 17:05:03 19 [ERROR] WSREP: Thread BF trx_id: 628 thread: 19 seqno: 247 client_state: exec client_mode: high priority transaction_mode: executing applier: 1 toi: 0 local: 0 query: UPDATE monitoring SET mytime=1619879025 WHERE host = 'node3'qd�`
2021-05-01 17:05:03 19 [ERROR] WSREP: Thread BF trx_id: 627 thread: 15 seqno: 248 client_state: exec client_mode: high priority transaction_mode: executing applier: 1 toi: 0 local: 0 query: UPDATE monitoring SET mytime=1619879025 WHERE host = 'node2'qd�`
2021-05-01 17:05:03 0x7f47684d5700 InnoDB: Assertion failure in file /home/buildbot/buildbot/build/mariadb-10.4.16/storage/innobase/lock/lock0lock.cc line 687
InnoDB: We intentionally generate a memory trap.
This is nicely documented on SeveralNines: https://severalnines.com/database-blog/troubleshooting-galera-cluster-issues-part-1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.