Zabbix using JMX to monitor Tomcat

Source: Internet
Author: User

Zabbix Monitoring Tomcat Scheme

1) The version of Zabbix is 2.4

You need to add a parameter when compiling Zabbix--enable-java

2) server-side configuration

2.1 Confirm that the JDK is installed

[Email protected] zabbix]# java-version

Java Version "1.7.0_79"

Java (TM) SE Runtime Environment (build 1.7.0_79-b15)

Java HotSpot (TM) 64-bit Server VM (build 24.79-b02, Mixed mode)

2.2 Installing Zabbix-java-gateway

Packages are available in Zabbix, and are currently only supported from the Zabbix software package.

If you have already installed Zabbix, only need to add the next Zabbix-java


# Make && make install

2.3 Modifying the Java-gateway configuration file

Go to the following directory for script editing

#find/-name Zabbix_java





Total 64

Drwxr-xr-x 2 4096 Oct 01:06 bin

Drwxr-xr-x 4 root root 4096 Oct 01:06 class

Drwxr-xr-x 2 4096 16:56 Lib

-rw-r--r--1 root root 15802 Oct 01:05 Makefile

-rw-r--r--1 1310 16:56

-rw-r--r--1 14949 16:57

-rw-r--r--1 788 Oct 09:51

-rwxr-xr-x 1 554 16:56

Drwxr-xr-x 3 4096 16:56 src

-rwxr-xr-x 1 2025 16:56

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

[Email protected] zabbix_java]# sed-e '/^#/d;/^$/d '

listen_ip= ""


Pid_file= "/tmp/"


2.4 Modify Zabbix_server File

Enable several of these

Sed-e '/^#/d;/^$/d '/etc/zabbix/zabbix_server.conf











2.5 Start Zabbix_java

Locate the Zabbix_java directory path, and then execute the command./

#find/-name Zabbix_java




Total 20

Drwxr-xr-x 2 root root 4096 Oct 01:07 bin

Drwxr-xr-x 2 root root 4096 Oct 01:07 Lib

-rw-r--r--1 root root 788 Oct 15:00

-rwxr-xr-x 1 root root 554 Oct 01:07

-rwxr-xr-x 1 root root 2025 Oct 01:07

#netstat-TUNLP | grep 10052

TCP 0 0::: 10052:::* LISTEN 2015/java

2.6 Restart Zabbix_server

3) Tomcat terminal, install Catalina-jmx-remote.jar

wget Http://

Store the downloaded files in the Tomcat subdirectory directory Lib

MV catalina-jmx-remote.jar/opt/tomcat/lib/

4) Modify the file

Modify the vim/opt/tomcat/bin/ file

Locate------Execute The requested Command-----add

[$! = "Stop"] && java_opts= " djava.rmi.server.hostname= $JAVA _opts "

Export java_opts

5) Restart the Tomcat service and ZABBIX_AGENTD service

6) Whether the server-side test can get the information properly

java-jar/usr/src/cmdline-jmxclient-0.10.3.jar- java.lang:type=memory NonHeapMemoryUsage

10/30/2015 06:02:34-0400 org.archive.jmx.Client nonheapmemoryusage:



Max: 1


7) Add a template to

8) template and related software see attached file.

Garbled problem

Zabbix garbled is how to shine it? Zabbix uses Dejavusan.ttf fonts, does not support Chinese, resulting in garbled Chinese. The solution is simple, upload the font file of our computer to the Zabbix server.

1. garbled characters such as

2. Solve Zabbix garbled method

2.1 Uploading files to Zabbix

Locate the local C:\Windows\Fonts\simkai.ttf (in italics) that is uploaded to the server Zabbix site Directory Fonts directory.

2.2 Modifying the Zabbix PHP configuration file

Cd/var/www/html/zabbix My Zabbix installation path

3. View Zabbix garbled processing results

4. Frequently Asked Questions

Still garbled: Through the above operation, most of the students garbled problem solved, but still some students or garbled? An attentive group of friends provides another scenario: the initialization of the database is not caused by the use of UTF8 encoding. Initialize database using commands

Create DATABASE Zabbix default CharSet UTF8;

Or my.cnf Add the following configuration

Default-character-set = UTF8

This article is from the "Guang" blog, make sure to keep this source

Zabbix using JMX to 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: 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.