fridim / nagios-plugin-check_galera_cluster Goto Github PK
View Code? Open in Web Editor NEWA nagios plugin to check status of a galera cluster
A nagios plugin to check status of a galera cluster
Using: mariadb 10.5.5-MariaDB-1:10.5.5+maria~focal-log
Error on execution
/opt/nagios/libexec/check_galera_cluster -H localhost -u nagios -p <pw> -w 2 -c 2 0
(standard_in) 1: syntax error
/opt/nagios/libexec/check_galera_cluster: line 171: [: =: unary operator expected
OK: number of NODES = 3 (wsrep_cluster_size)
Value in db:
show status like 'wsrep_flow_control_paused';
+---------------------------+-------------+
| Variable_name | Value |
+---------------------------+-------------+
| wsrep_flow_control_paused | 1.42823e-05 |
+---------------------------+-------------+
1 row in set
Time: 0.031s
script can't handle Scientific Notation 1.42823e-05
Solution:
add before line 171:
rFlowControl=$(printf "%.14f" $rFlowControl)
thanks for your script, hope this fix helps others too :)
Hello,
When im trying to do remote check, the check is done locally on nagios server not on remote machine.
-H 100.64.9.42 -u USERNAME -p PASSWORD-w 2 -c 2 0
/opt/plugins/check_galera_cluster
Result code: CRITICAL
CRITICAL: node is not part of a cluster
When I run the script locally on the DB-server i get correct answer.
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.