zabbix2.2 Getting Started tutorial on monitoring Tomcat (iv)

Source: Internet
Author: User

Monitoring Tomcat first needs to compile and install Zabbix_java

#./configure--enable-java--prefix=/usr/local/zabbix_java

#make && make Install

Some configuration is required after the installation is complete.

#vim/usr/local/zabbix_java/sbin/zabbix_java/settings.sh

listen_ip= "0.0.0.0"

listen_port=10052

Pid_file= "/tmp/zabbix_java.pid"

Start_pollers=5

To edit the Zabbix_server configuration file, turn on the following options

#vim/usr/local/zabbix/etc/zabbix_server.conf

javagateway=192.168.1.3 #zabbix_server the IP address

javagatewayport=10052

Startjavapollers=5

Next we also need to configure Tomcat

Download the Catalina-jmx-remote.jar package and copy it to the Tomcat/lib directory first.

Then modify the Tomcat Server.xml to add the following paragraph

<listenerclassname= "Org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiregistryportplatform= "12345" rmiserverportplatform= "12346"/>

Edit Tomcat's catalina.sh file to add the following paragraph

Export catalina_opts= "$CATALINA _opts

-dcom.sun.management.jmxremote

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

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

-djava.rmi.server.hostname=192.168.1.2 "# this writes the server IP address of Tomcat

After the configuration is complete, you can start the Zabbix_java service and restart the Tomcat,zabbix_server service.

You can use Cmdline_jmxclient to crawl data

#java-jarcmdline-jmxclient-0.10.3.jar-192.168.1.2:12345 java.lang:type=memorynonheapmemoryusage

04/24/2015 16:44:19 +0800 org.archive.jmx.Client nonheapmemoryusage:

committed:24313856

init:24313856

max:136314880

used:18165304

you can see that the data has been crawled, then you can zabbix_server the Dashboard page to configure the

zabbix2.2 has its own template for monitoring Tomcat , but it does not necessarily meet the needs of production, so we need to customize the template, I found a good template, put in the attachment

in particular, when configuring the host, you need to turn on JMX,

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6C/55/wKiom1VGyvHSsreeAAC9FcHk8AI655.jpg "title=" 1.jpg " alt= "Wkiom1vgyvhssreeaac9fchk8ai655.jpg"/>


This article from the "source clean is clear, the shape of the end of the shadow straight" blog, please be sure to keep this source http://zhouxt.blog.51cto.com/8743763/1641550

zabbix2.2 Getting Started tutorial on monitoring Tomcat (iv)

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.