zabbix_export:
  version: '6.0'
  date: '2022-02-16T05:16:56Z'
  groups:
    -
      uuid: 8c4b6924111b4679a9f96ed3b2a25194
      name: 'Templates Applications'
  templates:
    -
      uuid: 082890595d964376ae8b462039cfc92e
      template: 'Template Generic Java JMX ver2'
      name: 'Template Generic Java JMX ver2'
      groups:
        -
          name: 'Templates Applications'
      discovery_rules:
        -
          uuid: c8ea2860b0d44685a45ab75ac4166c39
          name: 'Dicovery Garbage Collector'
          type: JMX
          key: 'jmx.discovery["beans","java.lang:name=*,type=GarbageCollector"]'
          delay: 4h
          username: '{$JMX_USER}'
          password: '{$JMX_PASSWORD}'
          lifetime: 5d
          item_prototypes:
            -
              uuid: ae18fb7a6cb9448aa3666b9365f5d88b
              name: 'gc {{#JMXOBJ}.regsub("name=([a-zA-Z0-9_ \-]+)", \1)} Count'
              type: JMX
              key: 'jmx["java.lang:name={{#JMXOBJ}.regsub(\"name=([a-zA-Z0-9_ \-]+)\", \1)},type=GarbageCollector","CollectionCount"]'
              username: '{$JMX_USER}'
              password: '{$JMX_PASSWORD}'
              preprocessing:
                -
                  type: SIMPLE_CHANGE
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Garbage collector'
            -
              uuid: 37ab5e5920754eaf8b70e80960997fdb
              name: 'gc {{#JMXOBJ}.regsub("name=([a-zA-Z0-9_ \-]+)", \1)} Time'
              type: JMX
              key: 'jmx["java.lang:name={{#JMXOBJ}.regsub(\"name=([a-zA-Z0-9_ \-]+)\", \1)},type=GarbageCollector","CollectionTime"]'
              username: '{$JMX_USER}'
              password: '{$JMX_PASSWORD}'
              preprocessing:
                -
                  type: SIMPLE_CHANGE
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Garbage collector'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        -
          uuid: 3b4d79ad26a14239a34560bff4e155ee
          name: 'Dicovery Memory Pool'
          type: JMX
          key: 'jmx.discovery["beans","java.lang:name=*,type=MemoryPool"]'
          delay: 4h
          username: '{$JMX_USER}'
          password: '{$JMX_PASSWORD}'
          filter:
            conditions:
              -
                macro: '{#JMXOBJ}'
                value: 'PS Old Gen|G1'
                formulaid: A
          lifetime: 5d
          item_prototypes:
            -
              uuid: 2963432bf5614756b064f4672a578cb1
              name: 'mp {{#JMXOBJ}.regsub("name=([a-zA-Z0-9_ \-]+)", \1)} Committed'
              type: JMX
              key: 'jmx["java.lang:name={{#JMXOBJ}.regsub(\"name=([a-zA-Z0-9_ \-]+)\", \1)},type=MemoryPool","Usage.committed"]'
              delay: 10m
              username: '{$JMX_USER}'
              password: '{$JMX_PASSWORD}'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Memory pool'
            -
              uuid: 2158779ad9f64d8fa9a81bdf80abb574
              name: 'mp {{#JMXOBJ}.regsub("name=([a-zA-Z0-9_ \-]+)", \1)} Max'
              type: JMX
              key: 'jmx["java.lang:name={{#JMXOBJ}.regsub(\"name=([a-zA-Z0-9_ \-]+)\", \1)},type=MemoryPool","Usage.max"]'
              delay: 1h
              value_type: FLOAT
              username: '{$JMX_USER}'
              password: '{$JMX_PASSWORD}'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Memory pool'
            -
              uuid: 1c0723ee16ef46a7b0515b555432049f
              name: 'mp {{#JMXOBJ}.regsub("name=([a-zA-Z0-9_ \-]+)", \1)} Used'
              type: JMX
              key: 'jmx["java.lang:name={{#JMXOBJ}.regsub(\"name=([a-zA-Z0-9_ \-]+)\", \1)},type=MemoryPool","Usage.used"]'
              delay: 20m
              username: '{$JMX_USER}'
              password: '{$JMX_PASSWORD}'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: 'Memory pool'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
      macros:
        -
          macro: '{$JMX_PASSWORD}'
          value: '123'
        -
          macro: '{$JMX_USER}'
          value: monitorRoleUser
