Zabbix monitoring Java processes with JMX

Source: Internet
Author: User

Reference: [JMX monitoring] [Zabbix Java gateway] [JMX monitoring (Java Gateway) not working]

    • This explains the configuration process for monitoring the Java process through JMX and the issues that need to be noted.

    • This article is based on the Zabbix has been installed on the basis of the expansion. If you use Zabbix_proxy, the configuration is exactly the same, you only need to open zabbix_proxy access to all the ports in Java app Server.


Environment description

Basic Environment

    • Os:centos 7.x
    • Zabbix Series version: 3.4.11
    • Zabbix-server ip:172.16.1.10
    • Zabbix-java-gateway ip:172.16.1.10
    • Java App Server ip:172.16.1.11

Network Configuration requirements

Zabbix related processes are listening on the default port:

    • zabbix-server:10051
    • zabbix-agentd:10050
    • zabbix-java-gateway:10052

    • Zabbix-server: Visit Zabbix-agentd 10050
    • ZABBIX-AGENTD: Visit Zabbix-server 10051
    • Zabbix-java-gateway: Access all port permissions for ZABBIX-AGENTD. (reason can see here)


Zabbix Configuration

Installing Zabbix-java-gateway

Performed on 172.16.1.10 (Zabbix-server/zabbix-java-gateway):

rpm -i https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpmyum -y install zabbix-java-gateway


Configuration /etc/zabbix/zabbix_java_gateway.conf


Configuration/etc/zabbix/zabbix_server.conf

JavaGateway=localhostJavaGatewayPort=10052StartJavaPollers=5


About START_POLLERS StartJavaPollers setting requirements for and values: StartJavaPollers <= START_POLLERS ([reason])

If StartJavaPollers > START_POLLERS , there will be zabbix-java-gateway no threads to receive incoming requests.

Start the service

# start zabbix-server zabbix_server# start zabbix-java-gatewayzabbix_java-gateway



Configuration of the Java App startup parameters

For details, refer to [here].

The startup parameters are as follows

java -Djava.rmi.server.hostname=172.16.1.11 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=18383 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar /data/app/demo.jar


Here you need to explain:

    • Djava.rmi.server.hostname: Here you need to specify the IP address of the Java App running the server. If you do not specify this parameter, only requests from localhost are received.
    • The port on which the Dcom.sun.management.jmxremote.port:JMX listens. As long as there is no conflict.


Zabbix GUI Configuration

See [here] for configuration.

Configuring JMX Interface:

    • The server address where the IP Address:java APP resides
    • Port: The Dcom.sun.management.jmxremote.port ports that are configured
    • Link Template

Areas to be aware of during the configuration process:

    • Zabbix-server (or zabbix-proxy) requires permission to access all the ports of Java APP server.

Zabbix monitoring Java processes with JMX

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.