klydel / nagios-checks Goto Github PK
View Code? Open in Web Editor NEWnagios checks
nagios checks
Amazon changed the location of mon-get-stats from /opt/aws/apitools/mon/bin/mon-get-stats to /opt/aws/bin/mon-get-stats
A check should be included to sort that out (you can use the "which" command to see where the file and whether it exists at all).
Since these 2 are not defined the exit code is always 0 and the status is always OK no matter what the check actually returned.
exit $STATE_OK
The current comparison between the max threshold and the current value does not accept float numbers.
Please consider the following function as a replacement:
function checkthresh {
# RESULT=${RESULT/.*}
COMP=`echo "$RESULT<$MXTHRESHOLD" | bc`
if [[ "$COMP" -eq "0" ]]
then
warn
else
echo "OK - $STAT |$STAT\n"
exit $STATE_OK
fi
}
The last parameter is the Minimum threshold but only the MXTHRESHOLD is checked.
I was thinking about adding an AND condition to the 'if' where I suggested to change the comparison from integer to float (with bc).
Thank you!
I think when dealing with bash the best thing to do is deal with parameters from the CLI using identification instead of location as it is now.
Please see the following example:
https://raw.github.com/tart/tart-monitoring/master/checkMySQLProcesslist.sh
The following parameters:
MON-GET-CMD
AWS-CRED-FILE
(in check_rds)
Include - in their names, these should be changed to _ in order to work correctly.
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.