Zabbix monitoring Java and Tomcat

Source: Internet
Author: User
Tags egrep

Zabbix server needs to install Java, compile need to add boot parameters--enable-java


#zabbix服务器操作 (both Java and Tomcat need to be configured for this two-step procedure)

cat/usr/local/zabbix/sbin/zabbix_java/settings.sh

listen_ip= "0.0.0.0"

listen_port=10052

Start_pollers=12


#zabbix服务器操作

#JavaGateway现在和Zabbix-server on the same server

Cat/usr/local/zabbix/etc/zabbix_server.conf

javagateway=127.0.0.1

javagatewayport=10052

Startjavapollers=12


#查看端口

NETSTAT-TLNP | Egrep "10050|10051|10052"


Zabbix-java-gateway Zabbix-server Precautions
listen_ip= "0.0.0.0" javagateway=x.x.x.x IP with x.x.x.x parameter Zabbix-java-gateway
listen_port=10052 javagatewayport=10052 Ports must be consistent, and firewalls allow
Start_pollers=12 Startjavapollers=12 Startjavapollers less than or equal to Start_pollers


#被监控java程序的服务器操作

Normal startup Java

Java-jar/tmp/notepad.jar


Monitoring Java Applications

Java \

-dcom.sun.management.jmxremote \

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

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

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

-jar/tmp/notepad.jar


Restarting a Java application


#监控Tomcat程序

Place the following jar under the/usr/local/tomcat/lib

Cmdline-jmxclient-0.10.3.jar


Head-5/usr/local/tomcat/bin/catalina.sh

#!/bin/bash

catalina_opts= "-dcom.sun.management.jmxremote \

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

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

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


Restart Tomcat


View ports

NETSTAT-TLNP | Egrep "10050|10053|10054"


Detecting the acquisition of JMX data

Java-jar cmdline-jmxclient-0.10.3.jar-Monitored machine ip:10053 java.lang:type=memory

Java-jar cmdline-jmxclient-0.10.3.jar-Monitored machine ip:10054 java.lang:type=memory


#Zabbix_Web界面操作

Add a host monitoring interface

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/8E/C6/wKiom1jKitux20bBAAA5ZhQdWEk628.png "style=" float : none; "title=" 1.png "alt=" Wkiom1jkitux20bbaaa5zhqdwek628.png "/>


Add the host to the template

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/8E/C4/wKioL1jKityzzV2-AAA4hEcMq-Q366.png "style=" float : none; "title=" 2.png "alt=" Wkiol1jkityzzv2-aaa4hecmq-q366.png "/>


This article is from "YHT's operations Notes" blog, please make sure to keep this source http://yht1990.blog.51cto.com/9014030/1907438

Zabbix monitoring Java and Tomcat

Related Article

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.