Prerequisites
- Download and install the Site24x7 server monitoring agent (Linux | Windows) in the server where you plan to run the plugin.
- Ensure that the jmxquery module for Python is installed. If it is not installed, execute the following command to install it:
pip install jmxquery
- Set up the JMX port for WebLogic using the below steps:
- Open the setDomainEnv.sh in the domain folder of the WebLogic instance.
- To export the JMX port without user authentication, paste the below in the setDomainEnv.sh file.
JAVA_OPTIONS="${JAVA_OPTIONS} -Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=9010-Dcom.sun.management.jmxremote.rmi.port=9010-Dcom.sun.management.jmxremote.host=127.0.0.1-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.local.only=true-Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder-Djava.rmi.server.hostname=127.0.0.1"
The authentication for the above is false since no username and password is required.
- To export the JMX port with user authentication, paste the below in the setDomainEnv.sh file.
JAVA_OPTIONS="${JAVA_OPTIONS} -Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=9010-Dcom.sun.management.jmxremote.rmi.port=9010-Dcom.sun.management.jmxremote.host=127.0.0.1-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.local.only=true-Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder-Djava.rmi.server.hostname=127.0.0.1-Dcom.sun.management.jmxremote.access.file=jmxremote.access-Dcom.sun.management.jmxremote.password.file=jmxremote.password"
- Provide the applicable Weblogic instance details in the pasted code above for the following:
- jmxremote.port
- jmxremote.host
- jmxremote.access.file (this indicates the jmxremote.access file path)
- jmxremote.password.file (this indicates the jmxremote.password file path)
- Restart the WebLogic instance after making the above changes.
Plugin Installation
- Create a folder named weblogic_monitoring.
- Download the weblogic_monitoring.py and the weblogic_monitoring.cfg files from our GitHub repository and place them in the weblogic_monitoring folder.
wget https://raw.githubusercontent.com/site24x7/plugins/master/weblogic_monitoring/weblogic_monitoring.pywget https://raw.githubusercontent.com/site24x7/plugins/master/weblogic_monitoring/weblogic_monitoring.cfg
- To check if the plugin is working, execute the command below with appropriate arguments and check for a valid JSON output with applicable metrics and their corresponding value.
python3 weblogic_monitoring.py --hostname <HOSTNAME> --port <PORT NUMBER> --server_name <SERVER_NAME> --username <WEBLOGIC PASSWORD> --password <WEBLOGIC PASSWORD>
- Add the applicable configurations in the weblogic_monitoring.cfg file.
[weblogic_1]hostname=<HOSTNAME>port=<PORT NUMBER>server_name=<SERVER_NAME>username=<WEBLOGIC PASSWORD>password=<WEBLOGIC PASSWORD>logs_enabled=Falselog_type_name=Nonelog_file_path=None
- Follow the steps in this article to learn how to run the Python script on a Windows server. You don't need to do this for Linux.
- Move the weblogic_monitoring folder to the Site24x7 server monitoring plugins directory.
For Linux: /opt/site24x7/monagent/plugins/
For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\
The agent will automatically execute the plugin within five minutes and display performance data in Site24x7.
To view the plugin monitor and associated performance charts:
- Log in to Site24x7.
- Navigate to Plugins and click the required monitor.
Plugin Contribution
Feel free to contribute to our existing plugin and come up with suggestions or feedback on our Community.
Other Plugin Integrations
- MySQL Monitoring
- Memcached Monitoring
- NGINX Monitoring
- Nagios Integration
- 100+ Plugin Integrations
- Create custom plugins - Linux and Windows