Last update: December 08, 2020
This plugin will check the current memory usage of your Weblogic application. The plugin must run on the same host where your Weblogic installation is located.
As I don't have any Weblogic installations around to test further development, this plugin is end of life. Use as is.
If you are looking for commercial support for this monitoring plugin, need customized modifications or in general customized monitoring plugins, contact us at Infiniroot.com.
3986 downloads so far...
Download plugin and save it in your Nagios/Monitoring plugin folder (usually /usr/lib/nagios/plugins, depends on your distribution). Afterwards adjust the permissions (usually chmod 755).
20110930 Created plugin
20111003 Catching connection/authentication problem
The plugin requires Weblogic to be installed on the server on which the plugin should be executed. Before you start launching it on your Weblogic server, you must adjust the variable WL_HOME in the plugin. Set it so that it fits the root/home installation folder of your Weblogic installation:
# Define Variables
# a) Enter the root directory of your Weblogic installation e.g.:
# WL_HOME=/opt/weblogic/Oracle/Middleware/wlserver_10.3
WL_HOME=/opt/weblogic/Oracle/Middleware/wlserver_10.3
Another important and necessary information is the JAVA path. The java binary folder must be in the $PATH variable of your environment. If you know what $PATH means, you understand what there is to do. If not, please set the variable JAVA_HOME in the plugin to your java installation (the folder in which you will find the binary files 'java', 'javac', etc.):
# b) If Java installation is not yet in your $PATH, enter
it here:
JAVA_HOME=/opt/jdk1.6.0_23/bin
Parameter | Description |
-H* | Hostname or ip address where Weblogic is running (usually localhost) |
-P* | Port on which weblogic listens |
-u* | Weblogic admin user |
-p* | Password for Weblogic admin user |
-w | Warning threshold in percent |
-c | Critical threshold in percent |
--help | Show help/usage |
* mandatory parameter
Usage:
./check_weblogic_heap.sh -H HOST -P PORT -u username -p password [-w warning] [-c critical]
Example 1 without thresholds:
./check_weblogic_heap.sh -H localhost -P 7001 -u weblogic -p mypass
Example 2 with thresholds:
./check_weblogic_heap.sh -H localhost -P 7001 -u weblogic -p mypass -w 80 -c 90
As one can see, the -w and -c parameter (thresholds) are optional. If they're not given, the plugin will only return OK and output the current utilisation as information.
As the plugin must be executed on the Weblogic server itself, I suggest to launch the plugin as nrpe command:
# 'check_weblogic_heap' command definition with thresholds
command[check_weblogic_heap]=/usr/lib/nagios/plugins/check_weblogic_heap -H
localhost -P 7001 -u weblogic -p mypass -w 80 -c 90
# 'check_weblogic_heap' command definition just info output
command[check_weblogic_heap]=/usr/lib/nagios/plugins/check_weblogic_heap -H
localhost -P 8001 -u weblogic -p mypass
# Check Weblogic Heap
define service{
use generic-service
host_name weblogic-server
service_description Weblogic Memory Heap
check_command check_nrpe!check_weblogic_heap
}
# Check Weblogic Heap
object Service "Weblogic Memory Heap" {
import "generic-service"
host_name = "weblogic-server"
check_command = "nrpe"
check_command = "nrpe"
vars.nrpe_command = "check_weblogic_heap"
}