Zabbix monitoring of WebSphere and WebLogic

Source: Internet
Author: User

Zabbix Java Gateway

The Zabbix monitors the application server through JMX. Note If the Zabbix needs to monitor the JMX application program, it needs to be--enable-java when compiling the Zabbix, and it needs to install the JDK as well. See my previous blog, "Zabbix installation configuration."

JMX (Java Management Extensions, or Java Management Extensions) is a framework for embedding management functions for applications, devices, systems, and so on. JMX can flexibly develop seamlessly integrated systems, network, and service management applications across a range of heterogeneous operating system platforms, system architectures, and network transport protocols.

Zabbix has been integrated with jmx and can be monitored jvm,tomcat,weblogic,jboss by Zabbix via JMX. To use Zabbix monitoring WebLogic, we first need to understand the Zabbix JMX monitoring architecture, WebLogic JMX information, finally to implement how to configure monitoring and alarm.

Zabbix is using an application called Java Gateway to monitor JMX. The Java Gateway integration was released in the official development of Zabbix. So you need to add an option--enable-java when you compile and install Zabbix server. After installing Zabbix, there will be a Zabbix_java directory under the/usr/local/zabbix-3.0.1/sbin directory, which is the Zabbix Java gateway file.

Configuring and running the Java gateway

By default, the Java gateway listens on port 10052. If you plan to use a different port to run Java gateway, you need to specify the desired port via the setting.sh script.

Start:

./startup. SH

Shut down:

./shutdown. SH

Configure Zabbix server to use the Java gateway

Now that the Java gateway is running, you need to tell Zabbix server how to find the Zabbix Java gateway. So you need to specify the Javagateway and Javagateway ports in the server configuration file. If the jmx application is monitored by a zabbix proxy, you need to specify the corresponding connection parameters in the proxy configuration file.

By default, server does not derive any processes for jmx monitoring. If you want to use complete JMX monitoring, you need to specify the number of pre-derived Java pollers processes, and you can also specify common pollers and trappers in the same way.

# vim Zabbix_server.confjavagateway=172.16. 7.151 javagatewayport=10052startjavapollers=5
zabbix_server.conf Adding a configuration

After the configuration is complete, restart the server (or agent):

killall -9  zabbix_server#. /zabbix_server

Adjust the log level of the Java gateway

In case there are some problems with the Java gateway, the monitoring items you can see in the previous paragraph are not informative and you can also get more information by looking at the Java Gateway log file.

By default, Java gateway logs the log to the/tmp/zabbix_java.log file with the log level "info". Sometimes you feel that the "info" level is not getting enough information and you need to modify the level to "debug". You can change the <root> tag to "debug" to get the log level increase by modifying lib/logback.xml.

<root level="debug">   <appender-ref ref="FILE" /></root>

It is important to note that, unlike Zabbix server or proxy, the logback.xml does not need to be restarted Zabbix Java gateway. The modified configuration will be loaded automatically. When you have completed the debugging, you can replace the log level with "info".

Monitoring WebLogic

First, WebLogic Configuration

1. If you are monitoring WebLogic Admin Server: Edit wl_domain_home/bin/setdomainenv.sh, add the following lines at the end of the file:

$ cd/opt/oracle/middleware/user_projects/domains/ids_domain/bin$ vim setdomainenv. SH

Add a sentence:

java_options="$JAVA _options-dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.port=9997 -dcom.sun.management.jmxremote.ssl=false-dcom.sun.management.jmxremote.authenticate=false"

And then we're going to start WebLogic.

2. If you are monitoring a managed server: Enter the server startup, "Your new server", server--environment-- In the input box of the parameters, enter:

-dcom.sun.management.jmxremote.port=jmx_port-djava.rmi.server. hostname=jmx_host-dcom.sun.management.jmxremote.authenticate=false  - Dcom.sun.management.jmxremote.ssl=false -djavax.management.builder.initial= Weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder

The console then starts the managed server.

Second, Zabbix server add monitoring WebLogic Host

Click Configure, host, and create a host.

Enter the host information, main note the JMX port, click Add.

Select the Jmx template.

Monitor WebSphere

One, WebSphere configuration

To access the WebSphere console, click Server types→websphere application Servers→was_server_name→java and Process management→process D Efinition→java Virtual Machine.

Add the following environment variables to the "Generic JVM arguments":

-djavax.management.builder.initial=

Click Server types→websphere Application Servers→was_server_name→java and Process management→process Definition→jav A Virtual machine→custom properties. Add the following environment variables:

Name:java.rmi.server. hostname   truefalseFalse

Restart the server.

Second, Zabbix server add monitoring WebSphere Host

Click Configure, host, and create a host.

Enter the host information, main note the JMX port, click Add.

Zabbix monitoring of WebSphere and WebLogic

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.