Zabbix Monitoring Tomcat

Source: Internet
Author: User

First, Zabbix server aspects


1, Zabbix Server compile time need to add parameters--enable-java

Attach my Zabbix Server compilation parameters

./configure--prefix=/usr/local/zabbix--enable-server--enable-agent--enable-proxy--with-mysql--WITH-NET-SNMP-- With-libcurl--enable-java


2. Modify the Zabbix server Java configuration file/usr/local/zabbix/sbin/zabbix_java/settings.sh

listen_ip= "0.0.0.0"

listen_port=10052

Pid_file= "/tmp/zabbix_java.pid"

Start_pollers=5


where Listen_port and listen_ip can not be configured, Zabbix_java will take the default values. But Pid_file and start_pollers must be configured, especially the idea of start_pollers, if not configured Zabbix-java-gateway can still be started but not working


3. Modify the Zabbix server master configuration file/usr/local/zabbix/etc/zabbix_server.conf

Add the following configuration:

javagateway=127.0.0.1

javagatewayport=10052

Startjavapollers=5


All three items need to be configured, where startjavapollers is considered a switch-type parameter. 0 or not configured will be considered by the system to have no Java information fetching ability

It should be noted that the Startjavapollers <= start_pollers, otherwise there will be zabbix-server to the Zabbix-java-gataway after the request is not responding to the situation, if not remember clearly, The two parameters are configured to the same


4. Start Zabbix-java-gateway

Execute/usr/local/zabbix/sbin/zabbix_java/startup.sh Script


Second, Zabbix client configuration


1. Download the Catalina-jmx-remote.jar and put it in Tomcat's Lib directory

wget Http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.8/bin/extras/catalina-jmx-remote.jar

MV catalina-jmx-remote.jar/usr/local/tomcat/lib/


2. Modify the Tomcat configuration file Server.xml

In <Host>

....

Add such a line in the </Host> field

<listener classname= "Org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiregistryportplatform= "5555" rmiserverportplatform= "5555"/>

Where 5555 is the port to be opened


3. Modify the catalina.sh file to add

Catalina_opts= "-dcom.sun.management.jmxremote

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

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

-djava.rmi.server.hostname=10.139.96.70 "

Where 10.139.96.70 is your native intranet IP address


4. Restart Zabbix_agentd and Tomcat


5, on the Zabbix server can be used Cmdline-jmxclient-0.10.3.jar to test the data can be obtained

Java-jar cmdline-jmxclient-0.10.3.jar-10.139.37.178:5555 java.lang:type=memory NonHeapMemoryUsage

08/10/2016 15:33:04 +0800 org.archive.jmx.Client nonheapmemoryusage:

committed:539426816

init:539426816

max:1124073472

used:17749136

is: http://down.51cto.com/data/1900369


6, the configuration of the Web side

In the configuration-host, find the host to be added Tomcat monitor

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/85/B0/wKioL1esRmLRoF23AAAVbzalo54351.png-wh_500x0-wm_3 -wmp_4-s_1837937923.png "title=" 111.png "alt=" Wkiol1esrmlrof23aaavbzalo54351.png-wh_50 "/>

In the JMX interface, add that client's IP, port write 5555, which is configured on the port above, the template does not choose to bring, not easy to use, here choose to spread a more extensive online template jmx Templates, the attachment will give the template file

And then update, you'll see the monitoring data in a minute.


Note: Most of the content of this article collects and organizes the documents on the Internet, if infringe your interest, please contact me



This article is from the "PC personal blog" blog, make sure to keep this source http://pc1990.blog.51cto.com/10541224/1837011

Zabbix Monitor Tomcat

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.