Zabbix JMX之tomcat監控

工做原理:

一、JAVA-GATEWAYjava

   Zabbix自己不支持直接監控Java,在zabbix 1.8之前,只能使用Zapcat來作代理監控,並且要修改源代碼,很是麻煩。全部後來爲了解決這個監控問題,Zabbix和Java雙方應運生成了各自的代理監控程序:zabbix 2.0 之後添加了服務進程zabbix-java-gateway,用以在服務端接收JMX的監控數據;Java有了JMX(全稱是Java Management Extensions,即Java管理擴展),用以在客戶端收集客戶端的監控數據並轉發到zabbix-java-gatewaymysql

二、示意圖sql

 

 

好比:當Zabbix-Server須要知道java應用程序的某項性能的時候,會啓動自身的一個Zabbix-JavaPollers進程去鏈接Zabbix-Java-Gateway請求數據,而Zabbix-Java-gateway收到請求後會使用「JMX-management-API」去tomcat服務器開啓JMX,而前提是tomcat服務器端在開啓時須要「-Dcom.sun.management.jmxremote」參數來開啓JMX遠程查詢。Java程序會啓動自身的一個簡單的小程序端口12345向Zabbix-JavaGateway提供請求數據。apache

 

Zabbix監控端部署:

1.安裝zabbix server小程序

編譯安裝zabbix server須要加上--enable-java以支持jmx監控,若是以前的zabbix server沒加,那麼請從新編譯安裝tomcat

./configure --prefix=/application/zabbix-3.0.3 --enable-server --enable-agent --enable-java --enable-ipv6 --with-mysql=/application/mysql-5.5.49/bin/mysql_config  --with-net-snmp --with-libcurl --with-libxml2 --with-openipmi --with-unixodbc --with-openssl服務器

而且監控端也須要安裝java環境session

 

2.安裝zabbix_java_gatewayapp

wget http://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/6/x86_64/zabbix-java-gateway-3.4.1-1.el6.x86_64.rpmcurl

rpm -ivh zabbix-java-gateway-3.4.1-1.el6.x86_64.rpm(zabbix-java-gateway用老版本可能會出錯

#zabbix_java_gateway配置文件zabbix_java_gateway.conf裏有默認端口等設置,這裏咱們保持默認便可

service zabbix-java-gateway start

此時,默認的端口10052應該打開,ss -nat | grep 10052查看

zabbix_server.conf 中配置監控端訪問zabbix_java_gateway

JavaGateway=172.16.2.150  #zabbix_java_gateway地址

StartJavaPollers=6   #預啓動進程輪詢個數,且這個值要比zabbix_java_gateway.confStart_poller值要大,否則會沒法通訊

重啓zabbix-server

 

zabbix客戶端安裝:

1.安裝JMX

1. 下載 JMX Remote jar 二進制包。放在 tomcat/lib 下面

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

2. 修改 tomcat conf/server.xml 配置文件,添加如下內容:

<Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="12345" rmiServerPortPlatform="12346" />

 

3. 修改 tomcat/bin 目錄下 catalina.sh ,添加如下內容:

CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=10.32.18.1"

注意:Djava.rmi.server.hostname這裏寫上被監控端 hostname 是因爲 hostname 默認值爲 localhost,若是你的 tomcat 未監聽在 localhost,那麼不寫具體 ip 會引起問題。而且這段配置應該寫在catalina.sh的前面,否則端口打不開。

4. 確保 zabbix server 或者 proxy 和 配置文件中的端口通信暢通,重啓tomcat,lsof -i:12345端口打開

 

驗證是否能獲取數據

在監控端下載JMX cmd.jar文件

wget http://nchc.dl.sourceforge.net/project/jmxcmd/jmxcmd.jar

測試有數據則表示成功

命令格式:

# java -jar jmxcmd.jar - 192.168.3.18:12345 java.lang:type=Memory NonHeapMemoryUsage

 

導入模板,添加監控

 

 

<?xml version="1.0" encoding="UTF-8"?>

-<zabbix_export>

<version>2.0</version>

<date>2013-05-30T03:17:01Z</date>


-<groups>


-<group>

<name>Templates</name>

</group>

</groups>


-<templates>


-<template>

<template>CustomTomcat</template>

<name>CustomTomcat</name>


-<groups>


-<group>

<name>Templates</name>

</group>

</groups>


-<applications>


-<application>

<name>class</name>

</application>


-<application>

<name>HeapStatistics</name>

</application>


-<application>

<name>Sessions</name>

</application>


-<application>

<name>ThreadStatistics</name>

</application>


-<application>

<name>Tomcat</name>

</application>

</applications>


-<items>


-<item>

<name>http-8080 gzip compression</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["Catalina:type=ProtocolHandler,port=8080",compression]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>1</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>

<applications/>

<valuemap/>

</item>


-<item>

<name>http-8080活動線程</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=Threading","ThreadCount"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>ThreadStatistics</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>http-8080線程峯值</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=Threading","PeakThreadCount"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>ThreadStatistics</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>http-8080線程總計</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=Threading","TotalStartedThreadCount"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>ThreadStatistics</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>Sessions-Number of sessions we rejected due to maxActive beeing reached</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",rejectedSessions]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>Sessions</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>Sessions-The maximum number of active Sessions allowed, or -1 for no limit</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",maxActiveSessions]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>0</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>Sessions</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>Sessions-會話數</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",sessionCounter]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>Sessions</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>Sessions-當前活動會話數</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",activeSessions]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>Sessions</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>Sessions-最大活動會話數</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",maxActive]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>Sessions</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>Tomcat version</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["Catalina:type=Server",serverInfo]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>1</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>Tomcat</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>堆內存已使用</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=Memory","HeapMemoryUsage.used"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>HeapStatistics</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>堆內存已提交</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=Memory","HeapMemoryUsage.committed"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>HeapStatistics</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>堆內存最大</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=Memory","HeapMemoryUsage.max"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>HeapStatistics</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>類-已加載</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=ClassLoading","LoadedClassCount"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>class</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>類-已卸載</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=ClassLoading","UnloadedClassCount"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>class</name>

</application>

</applications>

<valuemap/>

</item>


-<item>

<name>類-總計</name>

<type>16</type>

<snmp_community/>

<multiplier>0</multiplier>

<snmp_oid/>

<key>jmx["java.lang:type=ClassLoading","TotalLoadedClassCount"]</key>

<delay>30</delay>

<history>90</history>

<trends>365</trends>

<status>0</status>

<value_type>3</value_type>

<allowed_hosts/>

<units/>

<delta>0</delta>

<snmpv3_securityname/>

<snmpv3_securitylevel>0</snmpv3_securitylevel>

<snmpv3_authpassphrase/>

<snmpv3_privpassphrase/>

<formula>1</formula>

<delay_flex/>

<params/>

<ipmi_sensor/>

<data_type>0</data_type>

<authtype>0</authtype>

<username/>

<password/>

<publickey/>

<privatekey/>

<port/>

<description/>

<inventory_link>0</inventory_link>


-<applications>


-<application>

<name>class</name>

</application>

</applications>

<valuemap/>

</item>

</items>

<discovery_rules/>

<macros/>

<templates/>

<screens/>

</template>

</templates>


-<graphs>


-<graph>

<name>會話狀態</name>

<width>900</width>

<height>200</height>

<yaxismin>0.0000</yaxismin>

<yaxismax>100.0000</yaxismax>

<show_work_period>1</show_work_period>

<show_triggers>1</show_triggers>

<type>0</type>

<show_legend>1</show_legend>

<show_3d>0</show_3d>

<percent_left>0.0000</percent_left>

<percent_right>0.0000</percent_right>

<ymin_type_1>0</ymin_type_1>

<ymax_type_1>0</ymax_type_1>

<ymin_item_1>0</ymin_item_1>

<ymax_item_1>0</ymax_item_1>


-<graph_items>


-<graph_item>

<sortorder>0</sortorder>

<drawtype>0</drawtype>

<color>C80000</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",maxActive]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>1</sortorder>

<drawtype>0</drawtype>

<color>00C800</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",activeSessions]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>2</sortorder>

<drawtype>0</drawtype>

<color>0000C8</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",sessionCounter]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>3</sortorder>

<drawtype>0</drawtype>

<color>C800C8</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",rejectedSessions]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>4</sortorder>

<drawtype>0</drawtype>

<color>00C8C8</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["Catalina:type=Manager,context=/,host=localhost",maxActiveSessions]</key>

</item>

</graph_item>

</graph_items>

</graph>


-<graph>

<name>堆內存狀態</name>

<width>900</width>

<height>200</height>

<yaxismin>0.0000</yaxismin>

<yaxismax>100.0000</yaxismax>

<show_work_period>1</show_work_period>

<show_triggers>1</show_triggers>

<type>0</type>

<show_legend>1</show_legend>

<show_3d>0</show_3d>

<percent_left>0.0000</percent_left>

<percent_right>0.0000</percent_right>

<ymin_type_1>0</ymin_type_1>

<ymax_type_1>0</ymax_type_1>

<ymin_item_1>0</ymin_item_1>

<ymax_item_1>0</ymax_item_1>


-<graph_items>


-<graph_item>

<sortorder>0</sortorder>

<drawtype>0</drawtype>

<color>C80000</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=Memory","HeapMemoryUsage.used"]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>1</sortorder>

<drawtype>0</drawtype>

<color>00C800</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=Memory","HeapMemoryUsage.committed"]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>2</sortorder>

<drawtype>0</drawtype>

<color>0000C8</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=Memory","HeapMemoryUsage.max"]</key>

</item>

</graph_item>

</graph_items>

</graph>


-<graph>

<name>類狀態</name>

<width>900</width>

<height>200</height>

<yaxismin>0.0000</yaxismin>

<yaxismax>100.0000</yaxismax>

<show_work_period>1</show_work_period>

<show_triggers>1</show_triggers>

<type>0</type>

<show_legend>1</show_legend>

<show_3d>0</show_3d>

<percent_left>0.0000</percent_left>

<percent_right>0.0000</percent_right>

<ymin_type_1>0</ymin_type_1>

<ymax_type_1>0</ymax_type_1>

<ymin_item_1>0</ymin_item_1>

<ymax_item_1>0</ymax_item_1>


-<graph_items>


-<graph_item>

<sortorder>0</sortorder>

<drawtype>0</drawtype>

<color>C80000</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=ClassLoading","LoadedClassCount"]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>1</sortorder>

<drawtype>0</drawtype>

<color>00C800</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=ClassLoading","UnloadedClassCount"]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>2</sortorder>

<drawtype>0</drawtype>

<color>0000C8</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=ClassLoading","TotalLoadedClassCount"]</key>

</item>

</graph_item>

</graph_items>

</graph>


-<graph>

<name>線程狀態</name>

<width>900</width>

<height>200</height>

<yaxismin>0.0000</yaxismin>

<yaxismax>100.0000</yaxismax>

<show_work_period>1</show_work_period>

<show_triggers>1</show_triggers>

<type>0</type>

<show_legend>1</show_legend>

<show_3d>0</show_3d>

<percent_left>0.0000</percent_left>

<percent_right>0.0000</percent_right>

<ymin_type_1>0</ymin_type_1>

<ymax_type_1>0</ymax_type_1>

<ymin_item_1>0</ymin_item_1>

<ymax_item_1>0</ymax_item_1>


-<graph_items>


-<graph_item>

<sortorder>0</sortorder>

<drawtype>0</drawtype>

<color>C80000</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=Threading","ThreadCount"]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>1</sortorder>

<drawtype>0</drawtype>

<color>00C800</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=Threading","PeakThreadCount"]</key>

</item>

</graph_item>


-<graph_item>

<sortorder>2</sortorder>

<drawtype>0</drawtype>

<color>0000C8</color>

<yaxisside>0</yaxisside>

<calc_fnc>2</calc_fnc>

<type>0</type>


-<item>

<host>CustomTomcat</host>

<key>jmx["java.lang:type=Threading","TotalStartedThreadCount"]</key>

</item>

</graph_item>

</graph_items>

</graph>

</graphs>

</zabbix_export>

 

 附錄

 

相關文章
相關標籤/搜索