Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_javamelody_http
0.6
2016-09-21
- Nagios 2.x
- Nagios 3.x
LGPL
6931
File | Description |
---|---|
check_javamelody_http.sh | check_javamelody_http.sh |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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
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
Reviews (0)
Be the first to review this listing!