Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)

Zabbix5系列-监控SpringBoot内置的Tomcat和JVM

        • 一、参考
        • 二、环境
        • 三、开启JMX
        • 四、配置模板
        • 五、测试
        • 六、修改后的模板参考
          • 6.1 Apache Tomcat JMX模板
          • 6.2 Generic Java JMX模板

一、参考
  • Zabbix5系列
  • Zabbix5专栏
  • Centos7安装Docker
  • Centos8安装Docker
  • Debian10安装Docker
  • Zabbix5系列-Docker安装zabbix5.4 (一)
  • Zabbix5系列-监控华为、H3C交换机(snmpv2c/snmpv3/snmptrap) (二)
  • Zabbix5系列-监控Windows主机 (三)
  • Zabbix5系列-监控Linux主机 (四)
  • Zabbix5系列-Linux/Windows磁盘SMART监控 (五)
  • Zabbix5系列-监控惠普服务器iLO管理口 (六)
  • Zabbix5系列-监控海康威视摄像头 (七)
  • Zabbix5系列-使用SNMP监控Linux (八)
  • Zabbix5系列-监控docker (九)
  • Zabbix5系列-监控mysql(5.7/5.8/mariadb) (十)
  • Zabbix5系列-监控redis (十一)
  • Zabbix5系列-监控nginx (十二)
  • Zabbix5系列-制作拓扑图 (十三)
  • Zabbix5系列-声音告警、邮件告警 (十四)
  • Zabbix5系列-钉钉告警 (十五)
  • Zabbix5系列-创建自动发现模板 (十六)
  • Zabbix5系列-接入Grafana面板 (十七)
  • Zabbix5系列-报表工具ZbxTable (十八)
  • 用户手册: https://www.zabbix.com/documentation/current/zh/manual
  • 官方模板参考: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates?at=refs%2Fheads%2Frelease%2F5.4
  • Zabbix模板库: https://share.zabbix.com
  • Zabbix容器: https://hub.docker.com/u/zabbix
  • Zabbix Agent下载页: https://www.zabbix.com/cn/download_agents
  • MIB浏览器下载: http://www.ireasoning.com/download.shtml
  • 华为MIB查询: https://support.huawei.com/mibtoolweb/enterpriseMibInfo/zh
  • 华为 VRP V200R021C00SPC100 MIB文件: https://support.huawei.com/enterprise/zh/software/253350229-ESW2000397776
  • H3C Comware MIB文件: https://www.h3c.com/cn/d_200905/635750_30003_0.htm
  • 华为图标 百度云盘 提取码mzhx: https://pan.baidu.com/s/1S6p96p3gNrv78Z2yJxrhaQ
  • zabbix报表工具: https://zbxtable.cactifans.com/
  • Grafana面板: https://grafana.com/docs/grafana/latest/installation/docker/
  • Grafana-cn面板: https://hub.docker.com/r/w958660278/grafana-cn
二、环境

系统:Centos7.9
JDK版本:1.8.0_251
Springboot版本:2.1.6.RELEASE

三、开启JMX

3.1 如果采用springboot注册为Linux服务的方式运行程序找到jar所在目录创建同名文件后缀名改为conf,配置文件内添加JAVA_OPTS配置
比如我的jar文件在/usr/local/workmanager/workmanage-2.0.2.jar创建配置文件/usr/local/workmanager/workmanage-2.0.2.conf内容为

JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.registry.ssl=false -Djava.rmi.server.hostname=主机IP地址 -Dcom.sun.management.jmxremote.rmi.port=12345"

3.2 如果采用脚本或者直接运行 在java参数内加入以上参数配置
3.3 JAVAOPTS参考Zabbix-JMX监控和Monitoring and Management Using JMX

参数 用途
-Dcom.sun.management.jmxremote 开启jmx远程访问 true / false
-Dcom.sun.management.jmxremote.port JMX端口 12345
-Dcom.sun.management.jmxremote.ssl 是否启用SSL true / false
-Dcom.sun.management.jmxremote.registry.ssl 是否启用SSL记录 true / false
-Djava.rmi.server.hostname 本地绑定地址 127.0.0.1
-Dcom.sun.management.jmxremote.rmi.port RMI端口 12345
-Dcom.sun.management.jmxremote.authenticate 是否启用密码认证 true / false

3.4 配置JMX密码
进入JRE根目录下的lib/management/目录下 复制jmxremote.password.template密码配置模板为jmxremote.password

# 进入JRE的management目录
cd /usr/local/jdk1.8.0_251/jre/lib/management/
# 复制模板文件
cp jmxremote.password.template jmxremote.password
# 编辑密码配置文件 末尾加入 monitorRole  密码
echo "monitorRole  密码">>jmxremote.password
# 修改文件所属用户跟启动jar的用户一致
chown www.www jmxremote.password
# 修改权限为600
chmod 600 jmxremote.password

3.5 重启jar
3.6 在Windows下使用jconsole测试
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第1张图片
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第2张图片

四、配置模板
  • Apache Tomcat JMX模板手册
  • Generic Java JMX模板手册

4.1 进入模板"Apache Tomcat JMX",所有监控项和自动发现的key里面的Catalina修改为Tomcat
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第3张图片
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第4张图片
4.2 进入模板"Generic Java JMX",所有监控项的用户名称和密码填写宏{$JMX.USER}和{$JMX.PASSWORD}
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第5张图片
4.3 切换到Generic Java JMX模板的宏页 创建宏{$JMX.USER}和{$JMX.PASSWORD}
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第6张图片

4.4 创建主机 选择JMX方式 写入IP地址和前面配置的端口
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第7张图片
4.5 切换到模板页 选择刚修改过的模板
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第8张图片

4.6 切换到宏页 从继承的宏里配置前面设置的JMX用户和密码

Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第9张图片

4.7 添加主机

五、测试

5.1 检查是否正常读取
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第10张图片
Zabbix5系列-监控SpringBoot内置的Tomcat和JVM(二十一)_第11张图片

六、修改后的模板参考
6.1 Apache Tomcat JMX模板
zabbix_export:
  version: '5.4'
  date: '2022-06-19T07:33:51Z'
  groups:
    -
      uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
  templates:
    -
      uuid: 3cc8c9ae7055458c9a803597007f70bd
      template: 'Apache Tomcat JMX'
      name: 'Apache Tomcat JMX'
      description: |
        The template to monitor Apache Tomcat by Zabbix that work without any external scripts.
        The metrics are collected by JMX.
        
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/411862-discussion-thread-for-official-zabbix-template-tomcat
        
        Template tooling version used: 0.38
      groups:
        -
          name: Templates/Applications
      items:
        -
          uuid: 7f6ec0e48d41456896799f487cd8243e
          name: 'Tomcat: 版本'
          type: JMX
          key: 'jmx["Tomcat:type=Server",serverInfo]'
          history: 7d
          trends: '0'
          value_type: CHAR
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          description: 'The version of the Tomcat.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: Tomcat
          triggers:
            -
              uuid: 152d235652914aa2af78334385334214
              expression: 'last(/Apache Tomcat JMX/jmx["Tomcat:type=Server",serverInfo],#1)<>last(/Apache Tomcat JMX/jmx["Tomcat:type=Server",serverInfo],#2) and length(last(/Apache Tomcat JMX/jmx["Tomcat:type=Server",serverInfo]))>0'
              name: 'Tomcat: 版本已变更'
              priority: INFO
              description: 'Tomcat version has changed. Ack to close.'
              manual_close: 'YES'
      discovery_rules:
        -
          uuid: a478be537e5f48fe95310997d0df0eda
          name: '协议处理程序 自动发现'
          type: JMX
          key: 'jmx.discovery[attributes,"Tomcat:type=ProtocolHandler,port=*"]'
          delay: 1h
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#JMXATTR}'
                value: ^name$
                formulaid: A
          description: 'Discovery for ProtocolHandler'
          item_prototypes:
            -
              uuid: 830f58f8ad6640d989a70c01f7aa2ad8
              name: '{#JMXVALUE}: Gzip压缩状态'
              type: JMX
              key: 'jmx[{#JMXOBJ},compression]'
              history: 7d
              trends: '0'
              value_type: CHAR
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Gzip compression status on {#JMXNAME}. Enabling gzip compression may save server bandwidth.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: ProtocolHandler {#JMXVALUE}'
              trigger_prototypes:
                -
                  uuid: 7d707de73a164f1db6b69e4dcb8c6ae9
                  expression: 'find(/Apache Tomcat JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1'
                  name: '{#JMXVALUE}: Gzip压缩已禁用'
                  priority: INFO
                  description: 'gzip compression is disabled for connector {#JMXVALUE}.'
                  manual_close: 'YES'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        -
          uuid: 77175f79fe844bb8bca66de437a3ba32
          name: '全局请求处理程序 自动发现'
          type: JMX
          key: 'jmx.discovery[beans,"Tomcat:type=GlobalRequestProcessor,name=*"]'
          delay: 1h
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#JMXNAME}'
                value: '{$TOMCAT.LLD.FILTER.MATCHES:"GlobalRequesProcessor"}'
                formulaid: A
              -
                macro: '{#JMXNAME}'
                value: '{$TOMCAT.LLD.FILTER.NOT_MATCHES:"GlobalRequesProcessor"}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Discovery for GlobalRequesProcessor'
          item_prototypes:
            -
              uuid: d7cb07f3f5e04792850332c416284dd9
              name: '{#JMXNAME}: 每秒接收的字节数'
              type: JMX
              key: 'jmx[{#JMXOBJ},bytesReceived]'
              history: 7d
              units: B
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Bytes received rate by processor {#JMXNAME}'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: {#JMXTYPE} {#JMXNAME}'
            -
              uuid: abad7332ed6b417c92f6038ce12ae000
              name: '{#JMXNAME}: 每秒发送的字节数'
              type: JMX
              key: 'jmx[{#JMXOBJ},bytesSent]'
              history: 7d
              units: B
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Bytes sent rate by processor {#JMXNAME}'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: {#JMXTYPE} {#JMXNAME}'
            -
              uuid: 1596a335401d47d6b2bde7a5b0de7b07
              name: '{#JMXNAME}: 每秒错误数'
              type: JMX
              key: 'jmx[{#JMXOBJ},errorCount]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Error rate of request processor {#JMXNAME}'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: {#JMXTYPE} {#JMXNAME}'
            -
              uuid: 985d3eeacd9d404385bfcef693add39a
              name: '{#JMXNAME}: 请求处理时间'
              type: JMX
              key: 'jmx[{#JMXOBJ},processingTime]'
              history: 7d
              units: s
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'The total time to process all incoming requests of request processor {#JMXNAME}'
              preprocessing:
                -
                  type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: {#JMXTYPE} {#JMXNAME}'
            -
              uuid: 8e0307b5063549dab118e0e374a62aad
              name: '{#JMXNAME}: 每秒请求数'
              type: JMX
              key: 'jmx[{#JMXOBJ},requestCount]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Rate of requests served by request processor {#JMXNAME}'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: {#JMXTYPE} {#JMXNAME}'
          graph_prototypes:
            -
              uuid: 87de97d55baa4be1964652957a051fc2
              name: '{#JMXNAME}: 流量'
              graph_items:
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},bytesSent]'
                -
                  sortorder: '2'
                  drawtype: GRADIENT_LINE
                  color: 2774A4
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},bytesReceived]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        -
          uuid: cf1badf064714d9b9e3b7110696432f9
          name: 'Contexts 自动发现'
          type: JMX
          key: 'jmx.discovery[beans,"Tomcat:type=Manager,host=*,context=*"]'
          delay: 1h
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#JMXHOST}'
                value: '{$TOMCAT.LLD.FILTER.MATCHES:"Manager"}'
                formulaid: A
              -
                macro: '{#JMXHOST}'
                value: '{$TOMCAT.LLD.FILTER.NOT_MATCHES:"Manager"}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Discovery for contexts'
          item_prototypes:
            -
              uuid: c20bb67db247471ba686d2ea371b7c73
              name: '{#JMXHOST}{#JMXCONTEXT}: 在线会话'
              type: JMX
              key: 'jmx[{#JMXOBJ},activeSessions]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Active sessions of the application.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: Context {#JMXHOST}{#JMXCONTEXT}'
            -
              uuid: bc3c2a3cff614f3eaf001463df1b2364
              name: '{#JMXHOST}{#JMXCONTEXT}: 允许的最大会话数'
              type: JMX
              key: 'jmx[{#JMXOBJ},maxActiveSessions]'
              history: 7d
              value_type: FLOAT
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'The maximum number of active Sessions allowed, or -1 for no limit.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: Context {#JMXHOST}{#JMXCONTEXT}'
            -
              uuid: fd8678e68cf440939af2dd8f3568a42f
              name: '{#JMXHOST}{#JMXCONTEXT}: 最大在线会话数'
              type: JMX
              key: 'jmx[{#JMXOBJ},maxActive]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Maximum number of active sessions so far.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: Context {#JMXHOST}{#JMXCONTEXT}'
            -
              uuid: 34702e2d6b2142ec9aa43bea1059a98a
              name: '{#JMXHOST}{#JMXCONTEXT}:  每秒拒绝的会话数'
              type: JMX
              key: 'jmx[{#JMXOBJ},rejectedSessions]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Rate of sessions we rejected due to maxActive being reached.'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: Context {#JMXHOST}{#JMXCONTEXT}'
            -
              uuid: eb28f9bd99d440f4a50d1c24ae758029
              name: '{#JMXHOST}{#JMXCONTEXT}: 每秒创建的会话数'
              type: JMX
              key: 'jmx[{#JMXOBJ},sessionCounter]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Rate of sessions created by this application per second.'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: Context {#JMXHOST}{#JMXCONTEXT}'
          graph_prototypes:
            -
              uuid: dfd46f5443f9438fb21ae23dfd4010c0
              name: '{#JMXHOST}{#JMXCONTEXT}: 会话'
              graph_items:
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},maxActive]'
                -
                  sortorder: '2'
                  drawtype: GRADIENT_LINE
                  color: 2774A4
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},activeSessions]'
                -
                  sortorder: '3'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},rejectedSessions]'
                -
                  sortorder: '4'
                  drawtype: GRADIENT_LINE
                  color: A54F10
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},maxActiveSessions]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        -
          uuid: 05752834671f416fb2fdac1006308c3e
          name: '线程池 自动发现'
          type: JMX
          key: 'jmx.discovery[beans,"Tomcat:type=ThreadPool,name=*"]'
          delay: 1h
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#JMXNAME}'
                value: '{$TOMCAT.LLD.FILTER.MATCHES:"ThreadPool"}'
                formulaid: A
              -
                macro: '{#JMXNAME}'
                value: '{$TOMCAT.LLD.FILTER.NOT_MATCHES:"ThreadPool"}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Discovery for ThreadPool'
          item_prototypes:
            -
              uuid: 7d7418c72ced48eca2a92e30021b611b
              name: '{#JMXNAME}: 线程数'
              type: JMX
              key: 'jmx[{#JMXOBJ},currentThreadCount]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Amount of threads the thread pool has right now, both busy and free.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: {#JMXTYPE} {#JMXNAME}'
            -
              uuid: 35b1e99fbc44448083b5aad0ce1239a1
              name: '{#JMXNAME}: 繁忙线程数'
              type: JMX
              key: 'jmx[{#JMXOBJ},currentThreadsBusy]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Number of the requests that are being currently handled.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: {#JMXTYPE} {#JMXNAME}'
            -
              uuid: 32e316ce567c4f94aecb89d9763e4d27
              name: '{#JMXNAME}: 线程限制'
              type: JMX
              key: 'jmx[{#JMXOBJ},maxThreads]'
              history: 7d
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Limit of the threads count. When currentThreadsBusy counter reaches the maxThreads limit, no more requests could be handled, and the application chokes.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Tomcat: {#JMXTYPE} {#JMXNAME}'
          trigger_prototypes:
            -
              uuid: 7a15296553a447f6aebf4958631b6704
              expression: 'min(/Apache Tomcat JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100'
              name: '{#JMXNAME}: 繁忙线程数 {$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"} 内超过 {$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}%'
              priority: HIGH
              description: 'When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes.'
          graph_prototypes:
            -
              uuid: d8236335204a42488c6221c8b2d31e77
              name: '{#JMXNAME}: 工作线程'
              graph_items:
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},maxThreads]'
                -
                  sortorder: '2'
                  drawtype: GRADIENT_LINE
                  color: 2774A4
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},currentThreadCount]'
                -
                  sortorder: '3'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Apache Tomcat JMX'
                    key: 'jmx[{#JMXOBJ},currentThreadsBusy]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
      macros:
        -
          macro: '{$TOMCAT.LLD.FILTER.MATCHES}'
          value: '.*'
          description: 筛选可发现的对象。可用于以下上下文:“GlobalRequestProcessor”、“ThreadPool”、“Manager”
        -
          macro: '{$TOMCAT.LLD.FILTER.NOT_MATCHES}'
          value: 'CHANGE IF NEEDED'
          description: '筛选以排除发现的对象。可用于以下上下文:“GlobalRequestProcessor”、“ThreadPool”、“Manager”"'
        -
          macro: '{$TOMCAT.PASSWORD}'
          description: 'JMX 密码'
        -
          macro: '{$TOMCAT.THREADS.MAX.PCT}'
          value: '75'
          description: '繁忙工作线程触发器的阈值。可以与{#JMXNAME}一起用作上下文。'
        -
          macro: '{$TOMCAT.THREADS.MAX.TIME}'
          value: 5m
          description: '繁忙线程数可能超过阈值的时间。可以与{#JMXNAME}一起用作上下文。'
        -
          macro: '{$TOMCAT.USER}'
          description: 'JMX 用户名'

6.2 Generic Java JMX模板
zabbix_export:
  version: '5.4'
  date: '2022-06-19T07:33:18Z'
  groups:
    -
      uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
  templates:
    -
      uuid: 72aab08f7f27406a8f2c291648e5ba95
      template: 'Generic Java JMX'
      name: 'Generic Java JMX'
      description: 'Template tooling version used: 0.38'
      groups:
        -
          name: Templates/Applications
      items:
        -
          uuid: d16a651b35234011876b4f0c98126988
          name: 'ClassLoading: 加载的类数量'
          type: JMX
          key: 'jmx["java.lang:type=ClassLoading","LoadedClassCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays number of classes that are currently loaded in the Java virtual machine.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: fc79c5ac074f4266a88d5c239fa0fb70
          name: 'ClassLoading: 加载的类总数'
          type: JMX
          key: 'jmx["java.lang:type=ClassLoading","TotalLoadedClassCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of classes that have been loaded since the Java virtual machine has started execution.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: b7620bdebd044fb1b1d2cb293ea8912c
          name: 'ClassLoading: 已卸载的类数量'
          type: JMX
          key: 'jmx["java.lang:type=ClassLoading","UnloadedClassCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of classes that have been loaded since the Java virtual machine has started execution.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 0d6880c07fcd42bebddc41f5f2eb7bdd
          name: 'Compilation: 当前JIT编译器的名称'
          type: JMX
          key: 'jmx["java.lang:type=Compilation","Name"]'
          history: 7d
          trends: '0'
          value_type: CHAR
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of classes unloaded since the Java virtual machine has started execution.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
          triggers:
            -
              uuid: 691f051584d74995b757b4be5e3824fe
              expression: 'find(/Generic Java JMX/jmx["java.lang:type=Compilation","Name"],,"like","Client")=1'
              name: '编译: {HOST.NAME} 使用非最优的 JIT 编译器'
              priority: INFO
              manual_close: 'YES'
        -
          uuid: c097ea2de6034d1d94f528533562b896
          name: 'Compilation: 累计花费时间'
          type: JMX
          key: 'jmx["java.lang:type=Compilation","TotalCompilationTime"]'
          history: 7d
          value_type: FLOAT
          units: s
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the approximate accumulated elapsed time spent in compilation, in seconds.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 4cbe63dbe9184a0ba4df8cedbd86c2e8
          name: 'GarbageCollector: ConcurrentMarkSweep每秒回收数'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep","CollectionCount"]'
          history: 7d
          value_type: FLOAT
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of collections that have occurred per second.'
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 133c53c035df4e83b6bf99a98f3f5ee0
          name: 'GarbageCollector: ConcurrentMarkSweep回收所用的累计时间'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep","CollectionTime"]'
          history: 7d
          value_type: FLOAT
          units: s
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the approximate accumulated collection elapsed time, in seconds.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 2b378c3a34ae40fd9d2425298514860e
          name: 'GarbageCollector: Copy每秒回收数'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=Copy","CollectionCount"]'
          history: 7d
          value_type: FLOAT
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of collections that have occurred per second.'
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 253cd639242848a1905b22b821951f9c
          name: 'GarbageCollector: Copy回收的累计时间'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=Copy","CollectionTime"]'
          history: 7d
          value_type: FLOAT
          units: s
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the approximate accumulated collection elapsed time, in seconds.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: fc7adc1d5bab4bd28481b6e37d82210b
          name: 'GarbageCollector: MarkSweepCompact每秒回收数'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact","CollectionCount"]'
          history: 7d
          value_type: FLOAT
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of collections that have occurred per second.'
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: ce72ee1080114604b42fc0c5b9c4b283
          name: 'GarbageCollector: MarkSweepCompact回收所用的累计时间'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact","CollectionTime"]'
          history: 7d
          value_type: FLOAT
          units: s
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the approximate accumulated collection elapsed time, in seconds.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: d55858afe5d14098a75918a4719a4d00
          name: 'GarbageCollector: ParNew每秒回收数'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=ParNew","CollectionCount"]'
          history: 7d
          value_type: FLOAT
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of collections that have occurred per second.'
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 00f5d02eddbe4bac8816c11da6336600
          name: 'GarbageCollector: ParNew回收所用的累计时间'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=ParNew","CollectionTime"]'
          history: 7d
          value_type: FLOAT
          units: s
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the approximate accumulated collection elapsed time, in seconds.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 65f874c8707d44f3ac35e6a48868c3e7
          name: 'GarbageCollector: PS MarkSweep每秒回收数'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=PS MarkSweep","CollectionCount"]'
          history: 7d
          value_type: FLOAT
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of collections that have occurred per second.'
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: cd4c77af696b4312b2cf050e954bc5c4
          name: 'GarbageCollector: PS MarkSweep回收所用的累计时间'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=PS MarkSweep","CollectionTime"]'
          history: 7d
          value_type: FLOAT
          units: s
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the approximate accumulated collection elapsed time, in seconds.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 161555b8c92346e0a4ea51349d99b7af
          name: 'GarbageCollector: PS Scavenge每秒回收数'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=PS Scavenge","CollectionCount"]'
          history: 7d
          value_type: FLOAT
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the total number of collections that have occurred per second.'
          preprocessing:
            -
              type: CHANGE_PER_SECOND
              parameters:
                - ''
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: fd1b0b7149bb41b3a2ba674ae83799d2
          name: 'GarbageCollector: PS Scavenge回收所用的累计时间'
          type: JMX
          key: 'jmx["java.lang:type=GarbageCollector,name=PS Scavenge","CollectionTime"]'
          history: 7d
          value_type: FLOAT
          units: s
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Displays the approximate accumulated collection elapsed time, in seconds.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: d98a8d00639742f4b62a29e0c7394d61
          name: 'Memory: 堆内存-已提交'
          type: JMX
          key: 'jmx["java.lang:type=Memory","HeapMemoryUsage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current heap memory allocated. This amount of memory is guaranteed for the Java virtual machine to use.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: e757e0d3d72548df97066632448dd18c
          name: 'Memory: 堆内存-最大'
          type: JMX
          key: 'jmx["java.lang:type=Memory","HeapMemoryUsage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of heap that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 0c24cd559cd74ddb9ff0b167a3d37c23
          name: 'Memory: 堆内存-已用'
          type: JMX
          key: 'jmx["java.lang:type=Memory","HeapMemoryUsage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage outside the heap.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 50bb1ecb0a2141bbba128dfc842a1e34
          name: 'Memory: 非堆内存-已提交'
          type: JMX
          key: 'jmx["java.lang:type=Memory","NonHeapMemoryUsage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory allocated outside the heap. This amount of memory is guaranteed for the Java virtual machine to use.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 0c6301dfec1c4e6c8ab26091e9372e91
          name: 'Memory: 非堆内存-最大'
          type: JMX
          key: 'jmx["java.lang:type=Memory","NonHeapMemoryUsage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of non-heap memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 58d2bb1791994cbcacb75d029ed8a21b
          name: 'Memory: 非堆内存-已用'
          type: JMX
          key: 'jmx["java.lang:type=Memory","NonHeapMemoryUsage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage outside the heap'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: e309472afb794a2c9cd581275931db79
          name: 'Memory: 待完成对象数量'
          type: JMX
          key: 'jmx["java.lang:type=Memory","ObjectPendingFinalizationCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'The approximate number of objects for which finalization is pending.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 5b5b9458cc284cbe90a4732a656c5745
          name: 'MemoryPool: CMS Old Gen 已提交'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=CMS Old Gen","Usage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory allocated'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 60ee3f05569f4b99809090d8b5e06f44
          name: 'MemoryPool: CMS Old Gen 最大'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=CMS Old Gen","Usage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 31fbaf48b1634d9b8c3cdbb8155f0347
          name: 'MemoryPool: CMS Old Gen 已用'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=CMS Old Gen","Usage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 02e3dc52db244bda9fbcb7e926fbb7fa
          name: 'MemoryPool: CMS Perm Gen 已提交'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=CMS Perm Gen","Usage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory allocated'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: cb595bbf821f44e8b00aee3217070be5
          name: 'MemoryPool: CMS Perm Gen 最大'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=CMS Perm Gen","Usage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: ff3ca233f45b473e8952632d515dbdc1
          name: 'MemoryPool: CMS Perm Gen 已用'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=CMS Perm Gen","Usage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 9012e9453bb7442fb87aca747c148ed7
          name: 'MemoryPool: Code Cache 已提交'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Code Cache","Usage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory allocated'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: a6282cd5464747ec955597d933192f18
          name: 'MemoryPool: Code Cache 最大'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Code Cache","Usage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: a004c3a23c2d476ca12c0b6bf4d64ebd
          name: 'MemoryPool: Code Cache 已用'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Code Cache","Usage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 119045200b08450b87e35c5580d24162
          name: 'MemoryPool: Perm Gen 已提交'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Perm Gen","Usage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory allocated'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 8ca9e2beaa6d48fbb87fc78967c2d544
          name: 'MemoryPool: Perm Gen 最大'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Perm Gen","Usage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: e17f81cd11b34eb6ae26e46a157cb84b
          name: 'MemoryPool: Perm Gen 已用'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Perm Gen","Usage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 26edef50a85745a488b92ab22094edcd
          name: 'MemoryPool: PS Old Gen 已提交'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory allocated'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: a708c5a695d6441e984d8d24c58f9971
          name: 'MemoryPool: PS Old Gen 最大'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: e4eb87b021aa49fb88e6b97e33dd2392
          name: 'MemoryPool: PS Old Gen 已用'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 97022584d6314efaaabb216fd28ed3a0
          name: 'MemoryPool: PS Perm Gen 已提交'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=PS Perm Gen","Usage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory allocated'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: d6f6c199bd7f4eb6a24a75933a53aa3b
          name: 'MemoryPool: PS Perm Gen 最大'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=PS Perm Gen","Usage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 598378a9571943e2925951f381616ea3
          name: 'MemoryPool: PS Perm Gen 已用'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=PS Perm Gen","Usage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 088933bc2f5d46008ae26f95e1a07ace
          name: 'MemoryPool: Tenured Gen 已提交'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Tenured Gen","Usage.committed"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory allocated'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 0eddc89e4c6640dea5f958e75b779225
          name: 'MemoryPool: Tenured Gen 最大'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Tenured Gen","Usage.max"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum amount of memory that can be used for memory management. This amount of memory is not guaranteed to be available if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 08cc0edf464c41dc9e19cbcf14c23012
          name: 'MemoryPool: Tenured Gen 已用'
          type: JMX
          key: 'jmx["java.lang:type=MemoryPool,name=Tenured Gen","Usage.used"]'
          history: 7d
          units: B
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Current memory usage'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 4c847c1239654be7b4f4d03fbb45ea4f
          name: 'OperatingSystem: 打开的文件描述符最大'
          type: JMX
          key: 'jmx["java.lang:type=OperatingSystem","MaxFileDescriptorCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'This is the number of file descriptors we can have opened in the same process, as determined by the operating system. You can never have more file descriptors than this number.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: f72ee698db964f3c9ce84bbb4a1274d7
          name: 'OperatingSystem: 打开的文件描述符'
          type: JMX
          key: 'jmx["java.lang:type=OperatingSystem","OpenFileDescriptorCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'This is the number of opened file descriptors at the moment, if this reaches the MaxFileDescriptorCount, the application will throw an IOException: Too many open files. This could mean you’re are opening file descriptors and never closing them.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 3c252493c9304aabbb2930b9a82a1cbf
          name: 'OperatingSystem: CPU负载'
          type: JMX
          key: 'jmx["java.lang:type=OperatingSystem","ProcessCpuLoad"]'
          history: 7d
          value_type: FLOAT
          units: '%'
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'ProcessCpuLoad represents the CPU load in this process.'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '100'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
          triggers:
            -
              uuid: cc6cc7942e434b8589ff28a0b3112fc7
              expression: 'min(/Generic Java JMX/jmx["java.lang:type=OperatingSystem","ProcessCpuLoad"],{$JMX.CPU.LOAD.TIME})>{$JMX.CPU.LOAD.MAX}'
              name: '操作系统: CPU负载 {$JMX.CPU.LOAD.TIME} 内超过 {$JMX.CPU.LOAD.MAX}%'
              priority: AVERAGE
        -
          uuid: 00007954da00442b9631e15995ef6cab
          name: 'Runtime: JVM 正常运行时间'
          type: JMX
          key: 'jmx["java.lang:type=Runtime","Uptime"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          preprocessing:
            -
              type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
          triggers:
            -
              uuid: c82c23dc5be34bb68ec8b152b3be367b
              expression: 'nodata(/Generic Java JMX/jmx["java.lang:type=Runtime","Uptime"],5m)=1'
              name: '运行时: JVM 不可访问'
              priority: AVERAGE
              manual_close: 'YES'
        -
          uuid: e824c36de524425eaac253bcf3a1f3ec
          name: 'Runtime: JVM 名称'
          type: JMX
          key: 'jmx["java.lang:type=Runtime","VmName"]'
          delay: 1h
          history: 7d
          trends: '0'
          value_type: CHAR
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
          triggers:
            -
              uuid: 560edfbeb7654f1eb7315389f08ef1b3
              expression: 'find(/Generic Java JMX/jmx["java.lang:type=Runtime","VmName"],,"like","Server")<>1'
              name: '运行时: {HOST.NAME} 运行在非最优 VM 类型'
              priority: INFO
              manual_close: 'YES'
        -
          uuid: a8675d659349414fa10cc11a1cd4ddd7
          name: 'Runtime: JVM 版本'
          type: JMX
          key: 'jmx["java.lang:type=Runtime","VmVersion"]'
          delay: 1h
          history: 7d
          trends: '0'
          value_type: CHAR
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: f2f0836103ea4358a740abc0010336ca
          name: 'Threading: 守护线程数'
          type: JMX
          key: 'jmx["java.lang:type=Threading","DaemonThreadCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Number of daemon threads running.'
          preprocessing:
            -
              type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 1793243b7ed147f1a182876fda905ebc
          name: 'Threading: 峰值线程数'
          type: JMX
          key: 'jmx["java.lang:type=Threading","PeakThreadCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Maximum number of threads being executed at the same time since the JVM was started or the peak was reset.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: ca198e0473384025aecbc16913800c0c
          name: 'Threading: 线程数'
          type: JMX
          key: 'jmx["java.lang:type=Threading","ThreadCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'The number of threads running at the current moment.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
        -
          uuid: 9db83653dfa6449c95ffec2b0e6c8b5d
          name: 'Threading: 总启动线程数'
          type: JMX
          key: 'jmx["java.lang:type=Threading","TotalStartedThreadCount"]'
          history: 7d
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'The number of threads started since the JVM was launched.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            -
              tag: Application
              value: JMX
      macros:
        -
          macro: '{$JMX.CPU.LOAD.MAX}'
          value: '85'
          description: CPU利用率触发器的阈值(以百分比为单位)。
        -
          macro: '{$JMX.CPU.LOAD.TIME}'
          value: 5m
          description: CPU利用率可能超过阈值的时间。
        -
          macro: '{$JMX.FILE.DESCRIPTORS.MAX}'
          value: '85'
          description: 文件描述符计数触发器的阈值(以百分比为单位)。
        -
          macro: '{$JMX.FILE.DESCRIPTORS.TIME}'
          value: 3m
          description: 文件描述符计数可能超过阈值的时间。
        -
          macro: '{$JMX.HEAP.MEM.USAGE.MAX}'
          value: '85'
          description: 堆内存利用率触发器的阈值(以百分比为单位)。
        -
          macro: '{$JMX.HEAP.MEM.USAGE.TIME}'
          value: 10m
          description: 堆内存利用率可能超过阈值的时间。
        -
          macro: '{$JMX.MP.USAGE.MAX}'
          value: '85'
          description: 内存池利用率触发器的阈值(以百分比为单位)。使用上下文更改特定池的阈值。
        -
          macro: '{$JMX.MP.USAGE.TIME}'
          value: 10m
          description: 内存池利用率可能超过阈值的时间。
        -
          macro: '{$JMX.NONHEAP.MEM.USAGE.MAX}'
          value: '85'
          description: 非堆内存利用率触发器的阈值(以百分比为单位)。
        -
          macro: '{$JMX.NONHEAP.MEM.USAGE.TIME}'
          value: 10m
          description: 非堆内存利用率可能超过阈值的时间。
        -
          macro: '{$JMX.PASSWORD}'
          description: 'JMX 密码'
        -
          macro: '{$JMX.USER}'
          value: monitorRole
          description: 'JMX 用户名'
  triggers:
    -
      uuid: fa84ae88918c4a21953a93052ebf7380
      expression: 'last(/Generic Java JMX/jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep","CollectionCount"])>last(/Generic Java JMX/jmx["java.lang:type=GarbageCollector,name=ParNew","CollectionCount"])'
      name: 'GC垃圾回收: fire fighting 模式下的 Concurrent Mark Sweep'
      priority: AVERAGE
    -
      uuid: 32f2c8687d634240b430bbbd7881e0d8
      expression: 'last(/Generic Java JMX/jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact","CollectionCount"])>last(/Generic Java JMX/jmx["java.lang:type=GarbageCollector,name=Copy","CollectionCount"])'
      name: 'GC垃圾回收: fire fighting 模式下的 Mark Sweep Compact'
      priority: AVERAGE
    -
      uuid: 3dd80e3ba2b843e1b26212239c23ca24
      expression: 'last(/Generic Java JMX/jmx["java.lang:type=GarbageCollector,name=PS MarkSweep","CollectionCount"])>last(/Generic Java JMX/jmx["java.lang:type=GarbageCollector,name=PS Scavenge","CollectionCount"])'
      name: 'GC垃圾回收: fire fighting 模式下的 PS Mark Sweep'
      priority: AVERAGE
    -
      uuid: 69fda060b5004d12b6af0ba5f73cec6d
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=Memory","HeapMemoryUsage.used"],{$JMX.HEAP.MEM.USAGE.TIME})>(last(/Generic Java JMX/jmx["java.lang:type=Memory","HeapMemoryUsage.max"])*{$JMX.HEAP.MEM.USAGE.MAX}/100)'
      name: '内存: 堆内存使用率 {$JMX.HEAP.MEM.USAGE.TIME} 内超过 {$JMX.HEAP.USAGE.MAX}%'
      priority: WARNING
    -
      uuid: 2b4dfda1100d4feeaa66218e57786f38
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=Memory","NonHeapMemoryUsage.used"],{$JMX.NONHEAP.MEM.USAGE.TIME})>(last(/Generic Java JMX/jmx["java.lang:type=Memory","NonHeapMemoryUsage.max"])*{$JMX.NONHEAP.MEM.USAGE.MAX}/100)'
      name: '内存: 非堆内存使用率 {$JMX.NONHEAP.MEM.USAGE.TIME} 内超过 {$JMX.NONHEAP.MEM.USAGE.MAX}%'
      priority: WARNING
    -
      uuid: e8efca02403d44de916b6266e06dd230
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=CMS Old Gen","Usage.used"],{$JMX.MP.USAGE.TIME:"CMS Old Gen"})>(last(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=CMS Old Gen","Usage.max"])*{$JMX.MP.USAGE.MAX:"CMS Old Gen"}/100)'
      name: '内存池: CMS Old Gen 内存使用率 {$JMX.MP.USAGE.TIME:"CMS Old Gen"} 内超过 {$JMX.MP.USAGE.MAX:"CMS Old Gen"}%'
      priority: WARNING
    -
      uuid: 1c2d038eaa8546ee81e5498ee1b67433
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=CMS Perm Gen","Usage.used"],{$JMX.MP.USAGE.TIME:"CMS Perm Gen"})>(last(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=CMS Perm Gen","Usage.max"])*{$JMX.MP.USAGE.MAX:"CMS Perm Gen"}/100)'
      name: '内存池: CMS Perm Gen 内存使用率 {$JMX.MP.USAGE.TIME:"CMS Perm Gen"} 内超过 {$JMX.MP.USAGE.MAX:"CMS Perm Gen"}%'
      priority: WARNING
    -
      uuid: 2624989d3a3340c1b8bcb3ba8e2c2a4a
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=Code Cache","Usage.used"],{$JMX.MP.USAGE.TIME:"Code Cache"})>(last(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=Code Cache","Usage.max"])*{$JMX.MP.USAGE.MAX:"Code Cache"}/100)'
      name: '内存池: Code Cache 内存使用率 {$JMX.MP.USAGE.TIME:"Code Cache"} 内超过 {$JMX.MP.USAGE.MAX:"Code Cache"}%'
      priority: WARNING
    -
      uuid: 385f7b11df2c42d19a52502bd63c861f
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=Perm Gen","Usage.used"],{$JMX.MP.USAGE.TIME:"Perm Gen"})>(last(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=Perm Gen","Usage.max"])*{$JMX.MP.USAGE.MAX:"Perm Gen"}/100)'
      name: '内存池: Perm Gen 内存使用率 {$JMX.MP.USAGE.TIME:"Perm Gen"} 内超过 {$JMX.MP.USAGE.MAX:"Perm Gen"}%'
      priority: WARNING
    -
      uuid: 00f060e8925946c3a1d9b0cdfae10f59
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.used"],{$JMX.MP.USAGE.TIME:"PS Old Gen"})>(last(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.max"])*{$JMX.MP.USAGE.MAX:"PS Old Gen"}/100)'
      name: '内存池: PS Old Gen 内存使用率 {$JMX.MP.USAGE.TIME:"PS Old Gen"} 内超过 {$JMX.MP.USAGE.MAX:"PS Old Gen"}%'
      priority: WARNING
    -
      uuid: 2e10427bbac64a7a9d44344b6c862952
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=PS Perm Gen","Usage.used"],{$JMX.MP.USAGE.TIME:"PS Perm Gen"})>(last(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=PS Perm Gen","Usage.max"])*{$JMX.MP.USAGE.MAX:"PS Perm Gen"}/100)'
      name: '内存池: PS Perm Gen 内存使用率 {$JMX.MP.USAGE.TIME:"PS Perm Gen"} 内超过 {$JMX.MP.USAGE.MAX:"PS Perm Gen"}%'
      priority: WARNING
    -
      uuid: ed73f2cee57c4f7d8c581190bd9a70a6
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=Tenured Gen","Usage.used"],{$JMX.MP.USAGE.TIME:"Tenured Gen"})>(last(/Generic Java JMX/jmx["java.lang:type=MemoryPool,name=Tenured Gen","Usage.max"])*{$JMX.MP.USAGE.MAX:"Tenured Gen"}/100)'
      name: '内存池: Tenured Gen 内存使用率 {$JMX.MP.USAGE.TIME:"Tenured Gen"} 内超过 {$JMX.MP.USAGE.MAX:"Tenured Gen"}%'
      priority: WARNING
    -
      uuid: 726a3b8a6209451b9a6cca63a3195a0c
      expression: 'min(/Generic Java JMX/jmx["java.lang:type=OperatingSystem","OpenFileDescriptorCount"],{$JMX.FILE.DESCRIPTORS.TIME})>(last(/Generic Java JMX/jmx["java.lang:type=OperatingSystem","MaxFileDescriptorCount"])*{$JMX.FILE.DESCRIPTORS.MAX}/100)'
      name: '操作系统: 打开的文件描述符数量超过最大限制的 {$JMX.FILE.DESCRIPTORS.MAX}%'
      priority: WARNING
  graphs:
    -
      uuid: 9fdf00862d4b4a24bcc17eb0f2fb3f16
      name: 'GC垃圾回收: 每秒垃圾回收器回收次数'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep","CollectionCount"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=GarbageCollector,name=Copy","CollectionCount"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=GarbageCollector,name=ParNew","CollectionCount"]'
        -
          sortorder: '4'
          color: A54F10
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact","CollectionCount"]'
        -
          sortorder: '5'
          color: FC6EA3
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=GarbageCollector,name=PS MarkSweep","CollectionCount"]'
        -
          sortorder: '6'
          color: 6C59DC
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=GarbageCollector,name=PS Scavenge","CollectionCount"]'
    -
      uuid: 959dfaec1af14f928146487873cba637
      name: '内存池: CMS Old Gen'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=CMS Old Gen","Usage.max"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=CMS Old Gen","Usage.committed"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=CMS Old Gen","Usage.used"]'
    -
      uuid: ca71ee8bd5004f6aa55063456094acfe
      name: '内存池: CMS Perm Gen'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=CMS Perm Gen","Usage.max"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=CMS Perm Gen","Usage.committed"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=CMS Perm Gen","Usage.used"]'
    -
      uuid: 32363c586f1a4cd1be2e87bc0c2cde99
      name: '内存池: Code Cache'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Code Cache","Usage.max"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Code Cache","Usage.committed"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Code Cache","Usage.used"]'
    -
      uuid: 0506ebace4454f9199e5c9ac60fffb28
      name: '内存池: Perm Gen'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Perm Gen","Usage.max"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Perm Gen","Usage.committed"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Perm Gen","Usage.used"]'
    -
      uuid: dd44791c7d3b4051ab47be938f9f57bc
      name: '内存池: PS Old Gen'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.max"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.committed"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=PS Old Gen","Usage.used"]'
    -
      uuid: 3576b8bb968d4ee8820b332a0f1fd3bd
      name: '内存池: PS Perm Gen'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=PS Perm Gen","Usage.max"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=PS Perm Gen","Usage.committed"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=PS Perm Gen","Usage.used"]'
    -
      uuid: 0ea8ef33ad55455d8a6e45ac3a52c064
      name: '内存池: Tenured Gen'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Tenured Gen","Usage.max"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Tenured Gen","Usage.committed"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=MemoryPool,name=Tenured Gen","Usage.used"]'
    -
      uuid: 39c14cff77694bddb836b63609d9ae92
      name: '操作系统: 文件描述符'
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=OperatingSystem","MaxFileDescriptorCount"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=OperatingSystem","OpenFileDescriptorCount"]'
    -
      uuid: 69184fc10a914cc78637625cc6cc554c
      name: 类加载:类加载器
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=ClassLoading","TotalLoadedClassCount"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=ClassLoading","UnloadedClassCount"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=ClassLoading","LoadedClassCount"]'
    -
      uuid: 397d90097f3f4237ac45d929ffd513e5
      name: 线程:线程使用
      graph_items:
        -
          sortorder: '1'
          color: 1A7C11
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=Threading","PeakThreadCount"]'
        -
          sortorder: '2'
          color: 2774A4
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=Threading","DaemonThreadCount"]'
        -
          sortorder: '3'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=Threading","ThreadCount"]'

你可能感兴趣的:(Zabbix,spring,boot,tomcat,zabbix)