Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Check javamelody values via http and the lastValue parameter.
Current Version
0.6
Last Release Date
2016-09-21
Owner
Steffen Wartner
License
LGPL
Compatible With
There is already a check for javamelody (https://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/check_java/details), but it reads the *.rrd files directly from the javamelody directory. I needed a check that can access javameldoy via http because of restrictions in the infrastructure, firewalls etc. This check monitors values of javamelody by using the lastValue parameter described here https://github.com/javamelody/javamelody/wiki/ExternalAPI. The plugin is a bash script that uses the wget command and other standard tools like e.g. bc. I have tested the script with Icinga and it should work with Nagios too, corresponding to https://nagios-plugins.org/doc/guidelines.html. There is a basic help with parameter description and examples included in the script:
Usage: check_javamelody_http.sh -H host -path pathtojavamelody/monitoring -cpm check parameter -w warning -c critcal [-noproxy] [-port port] [-pv printvalue] [-unit unit] [-v] Usage: -H hostname hostname or ip of javamelody server -path pathtojavamelody/monitoring path to javamelody web app -cpm check parameter parameter for javamelody to check -w warning warning value -c critcal critical value -noproxy do not use proxy -port port number, 80 is default for http -pv printvalue name for checked value -unit unit Use unit for value. For units B(ytes), K(iB), M(iB), G(iB), T(iB) and P(iB) lastValue is converted automatically. -v verbose ouput
Examples:
$ check_javamelody_http.sh -H myserver -path app/monitoring -noproxy -cpm cpu -w 90 -c 95 -pv CPU -unit % OK: cpu:0%|cpu=0%;95;98 $ check_javamelody_http.sh -H myserver -path app/monitoring -noproxy -cpm usedMemory -w 14336 -c 14848 -pv usedMemory -unit M OK: usedMemory:706M|usedMemory=706M;14336;14848 $ check_javamelody_http.sh -H myserver -path app/monitoring -cpm httpMeanTimes -c 10000 -w 5000 -noproxy -pv httpMeanTimes -unit ms OK: httpMeanTimes:313ms|httpMeanTimes=313ms;5000;10000
Please add suggestions for improvement or testing results in the comments below. Thank you
You must be logged in to submit a review.
To:
From: