Zabbix Monitoring Tomcat

Source: Internet
Author: User

 

1. Need to add parameters when compiling Zabbix--enable-java

For how to install zabbix , you can refer to the previous article http://blog.unix178.com/

Backup zabbix_server.conf and zabbix_agentd.conf files, recompile installationzabbix

[Email protected] zabbix-2.2.0]#/configure--enable-server--enable-agent--with-mysql--enable-ipv6--with-net-snm P--with-libcurl--with-ssh2--enable-java

2.zabbix_server-Side installation JDK

Installationjdk

[[Email protected] tmp]# tar XF jdk-7u9-linux-x64.tar.gz-c/usr/local/[[email protected] tmp]# ls/usr/local/jdk1.7.0_09         /bin JRE readme.html thirdpartylicensereadme.txtcopyright Lib Releasedb LICENSE Src.zipinclude man Thirdpartylicensereadme-javafx.txt

3. Modify Zabbix_java related options

Then go to the following directory to seeting.sh edit the script

[Email protected] zabbix-2.2.0]# Find/-name zabbix_java/usr/local/sbin/zabbix_java/tmp/zabbix-2.2.0/src/zabbix_ Java[[email protected] zabbix-2.2.0]# [[email protected] zabbix-2.2.0]# lsbin lib settings.sh shutdown.sh startup.sh

The file is all commented by default, enabling the following items

[Email protected] zabbix_java]# vim settings.sh [[email protected] zabbix_java]# sed-e '/^#/d;/^$/d ' settings.sh listen_ ip= "0.0.0.0" listen_port=10052pid_file= "/tmp/zabbix_java.pid" Start_pollers=5[[email protected] zabbix_java]#

4. Modify the Zabbix_server file

Enable several of these

[Email protected] zabbix_java]# sed-e '/^#/d;/^$/d '/usr/local/etc/zabbix_server.conflogfile=/tmp/zabbix_ Server.logdbname=zabbixdbuser=zabbixdbpassword=zabbix[[email protected] zabbix_java]# vim/usr/local/etc/zabbix_ Server.conf[[email protected] zabbix_java]# sed-e '/^#/d;/^$/d '/usr/local/etc/zabbix_server.conflogfile=/tmp/ zabbix_server.logdbname=zabbixdbuser=zabbixdbpassword=zabbixjavagateway=127.0.0.1javagatewayport= 10052startjavapollers=5

5. Start Zabbix_java

Locate zabbix_java the directory path, and then execute the command./startup.sh

[Email protected] zabbix-2.2.0]# Find/-name zabbix_java/usr/local/sbin/zabbix_java/tmp/zabbix-2.2.0/src/zabbix_ Java[[email protected] zabbix-2.2.0]# [[email protected] zabbix-2.2.0]# lsbin lib settings.sh shutdown.sh startup.sh[[ Email protected] zabbix-2.2.0]# SS-TUNLP | grep 10052tcp LISTEN 0::: 10052:::* Users: (("Java", 16405,12)

6. Adjustment tomcat End, installationcatalina-jmx-remote.jar

Download to install:

[Email protected] tmp]# wget Http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.8/bin/extras/catalina-jmx-remote.jar

Store the downloaded files in a tomcat subdirectory directory. lib

[Email protected] tmp]# mv Catalina-jmx-remote.jar/usr/local/tomcat/lib/[[email protected] tmp]#

7. Modify the catalina.sh file

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=**ip** "

8. Restart tomcat Services and zabbix_agentd services

9. Whether the server-side test can get the information properly

[Email protected] zabbix-2.2.0]# java-jar/root/cmdline-jmxclient-0.10.3.jar-192.168.146.130:9999 java.lang:type= Memory nonheapmemoryusage05/24/2014 15:42:02 +0800 org.archive.jmx.Client nonheapmemoryusage:committed:47316992init : 24313856max:136314880used:47012784

10. Server-side Custom monitoring items

Adding JMX monitoring ports

Customizing monitoring items

View Drawing Results

Go straight, see for yourself.

Adding JMX monitoring ports

Customizing monitoring items

View Drawing Results

11. Reference website

Tomcat website JMX Monitoring Introduction

Cu on a buddy's blog

Zabbix Monitoring 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.