Monitor JVM with Zabbix-java-gateway

Source: Internet
Author: User

To Monitor Tomcat 's JVM on Zabbix, you need to use zabbix-java-gateway

Zabbix monitoring JVM Workflow:

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/95/9A/wKioL1kXPd6BEM4CAACSqF4soqs337.png "title=" Picture 1.png "alt=" Wkiol1kxpd6bem4caacsqf4soqs337.png "/>

when Zabbix-server need to get JVM the process for the situation is:

Zabbix-server-Zabbix-java-gateway-and JVM

Note:zabbix-server and zabbix-java-gateway are 2 separate programs that can be installed on a single machine, can also be installed on a different machine

Installation method:

1.zabbix-java-gateway can be installed source code Zabbix-server when you specify the installation directly (enabled at compile time --enable-java selection)

2. It can also be installed by means of rpm

This article takes zabbix2.4 For example:

Yum Install zabbix-java-gateway-2.4.7-1.el6.x86_64.rpm

Configuration file:

/etc/zabbix/zabbix_java_gateway.conf

Important Configuration parameters:

listen_ip= "0.0.0.0" -- listening IP

listen_port=10052---monitoring port

pid_file= "/var/run/zabbix/zabbix_java.pid" -- PID file

start_pollers=5 -- start several probes

Note: Only a few of the above parameters can be required, no additional configuration

Starting mode:

/etc/init.d/zabbix-java-gateway start

Note:The Zabbix-java-gateway takes effect if you need to open the remote administration of The Java Program

Remote monitoring is only possible after the configuration of catalina.sh in Tomcat

# in catalina.sh Add the following:

catalina_opts= "$CATALINA _opts

-dcom.sun.management.jmxremote

-dcom.sun.management.jmxremote.port=12345

-dcom.sun.management.jmxremote.authenticate=false

-dcom.sun.management.jmxremote.ssl=false

-djava.rmi.server.hostname=192.168.10.59 "

Zabbix-server the configuration to be done:

Vim zabbix_server.conf

javagateway=192.168.10.58

javagatewayport=10052

Startjavapollers=5

Restart required after configuration is complete Zabbix-server

Zabbix-server and zabbix-java-gateway configuration comparison:

zabbix-java-gateway

precautions

javagateway=x.x.x.x

zabbix-java-gateway ip

listen_port=10052

javagatewayport=10052

ports must be consistent, and firewalls allow

startjavapollers=5

is less than or equal to start_pollers

Test Whether the Zabbix-server can receive zabbix-java-gateway data:

Tools to use Cmdline-jmxclient-0.10.3.jar

Java-jar cmdline-jmxclient-0.10.3.jar-192.168.10.58:12345 java.lang:type=memory NonHeapMemoryUsage

Execute the above command if you receive data that indicates no problem with the configuration

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/95/9A/wKiom1kXPvehInU3AAAN6C94UGs569.png "title=" Picture 2.png "Width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:74px; "alt=" Wkiom1kxpvehinu3aaan6c94ugs569.png "/>

Login zabbix-web add A host that requires a JVM:

click "Configuration"--"Host"-- write JVM host ip and corresponding port

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/95/9A/wKioL1kXPy6SVFOVAAB8AubcHck774.png "title=" Picture 3.png "Width=" "height=" 422 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:422px; "alt=" Wkiol1kxpy6svfovaab8aubchck774.png "/>

2. Select the corresponding template

there 2 templates: and

after testing Template JMX Generic templates work properly, presumably 2 there's data in minutes or so .

Template JMX Tomcat long time no data, do not know why, pending research

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/95/9A/wKioL1kXP4egw3l8AABBiOObyWM242.png "title=" Image 4.png "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:210px "" alt= " Wkiol1kxp4egw3l8aabbioobywm242.png "/>

Use Template JMX Generic the data that appears when the template

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/95/9A/wKiom1kXP6-zs2vGAABYNZ10tno378.png "title=" Picture 5.png "Width=" "height=" 272 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:272px; "alt=" Wkiom1kxp6-zs2vgaabynz10tno378.png "/>

This article is from the "burning Years of Passion" blog, please be sure to keep this source http://liuzhengwei521.blog.51cto.com/4855442/1925411

Monitor JVM with Zabbix-java-gateway

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.