zabbix_export:
  version: '8.0'
  template_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
    - uuid: 748ad4d098d447d492bb935c907f652f
      name: Templates/Databases
    - uuid: 846977d1dfed4968bc5f8bdb363285bc
      name: 'Templates/Operating systems'
    - uuid: e960332b3f6c46a1956486d4f3f99fce
      name: 'Templates/Server hardware'
  templates:
    - uuid: 7e6bb0931a72459db9514aa924b420bc
      template: 'AIX by Zabbix agent'
      name: 'AIX by Zabbix agent'
      description: |
        This is an official AIX template. It requires Zabbix agent 8.0 or newer.
        
        Notes on filesystem (FS) discovery:
          - The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
          - BTRFS allocates a default of 10% of the volume for its own needs.
          - To mitigate potential disasters, FS usage triggers are based on the maximum available space.
            - Utilization formula: 'pused = 100 - 100 * (available / total - free + available)'
          - The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This is an official AIX template. It requires Zabbix agent 8.0 or newer.
        
        #### Notes on filesystem (FS) discovery:
        - The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
        - BTRFS allocates a default of 10% of the volume for its own needs.
        - To mitigate potential disasters, FS usage triggers are based on the maximum available space.
          - Utilization formula: `pused = 100 - 100 * (available / total - free + available)`
        - The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.
        
        
        ## Setup
        
        Install Zabbix agent on the AIX OS according to Zabbix documentation.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: 'Templates/Operating systems'
      items:
        - uuid: 4c80c15f5741464882aa238f27bec1bd
          name: 'Host name of Zabbix agent running'
          key: agent.hostname
          delay: 1h
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: 05849e0fb6504d339f2aebe159427bec
          name: 'Zabbix agent ping'
          key: agent.ping
          description: 'The agent always returns "1" for this item. May be used in combination with `nodata()` for the availability check.'
          valuemap:
            name: 'Zabbix agent ping status'
          tags:
            - tag: component
              value: system
        - uuid: fe4731720ba64eebbf125929e499209b
          name: 'Version of Zabbix agent running'
          key: agent.version
          delay: 1h
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: application
        - uuid: 2c2d08ab5833493ba45ebfe5154f04c1
          name: 'Number of running processes'
          key: 'proc.num[,,run]'
          description: 'Number of processes in a running state.'
          tags:
            - tag: component
              value: os
            - tag: component
              value: processes
          triggers:
            - uuid: 458180bc0f14468386429964f877cce7
              expression: 'avg(/AIX by Zabbix agent/proc.num[,,run],5m)>30'
              name: 'AIX: Too many processes running'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 7c64480f840a4778bde5278e1c0a083f
          name: 'Number of processes'
          key: 'proc.num[]'
          description: 'Total number of processes in any state.'
          tags:
            - tag: component
              value: os
            - tag: component
              value: processes
          triggers:
            - uuid: 874ef8fe4a6445ff971800d2d9a50541
              expression: 'avg(/AIX by Zabbix agent/proc.num[],5m)>300'
              name: 'AIX: Too many processes'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 4a15778222a24f129b8ae7c240a32ded
          name: 'Interrupts per second'
          key: system.cpu.intr
          units: ips
          description: 'Number of interrupts processed.'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: cpu
        - uuid: 4f8665f48aff4fa39e85639fed7b71c5
          name: 'Processor load (1 min average per core)'
          key: 'system.cpu.load[percpu,avg1]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: fdbedf15fe474fd18c045c62cf8cc7d6
              expression: 'avg(/AIX by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5'
              name: 'AIX: Processor load is too high'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 6fa2275f1f83456abfe786c8565c7a2d
          name: 'Processor load (5 min average per core)'
          key: 'system.cpu.load[percpu,avg5]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
        - uuid: 02210ac2faaa4f7bb74e995726706abc
          name: 'Processor load (15 min average per core)'
          key: 'system.cpu.load[percpu,avg15]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
        - uuid: 1ad486947da9428abdebcecb83ca3d8b
          name: 'Context switches per second'
          key: system.cpu.switches
          units: sps
          description: 'The combined rate at which all processors on the computer are switched from one thread to another.'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: cpu
        - uuid: f4d10d49fa3c4dababf03d2cb80f044c
          name: 'Host name'
          key: system.hostname
          delay: 1h
          value_type: CHAR
          description: 'The host name of the system.'
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: d1e70b7f465447a3ab575b3fd28755a1
              expression: 'last(/AIX by Zabbix agent/system.hostname,#1)<>last(/AIX by Zabbix agent/system.hostname,#2)'
              name: 'AIX: Hostname was changed'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: aebc5bb0264a4f55985c96445964dfc4
          name: 'Host local time'
          key: system.localtime
          units: unixtime
          description: 'The local system time of the host.'
          tags:
            - tag: component
              value: os
        - uuid: 081f8986446d43e7a3b72f7084576600
          name: 'CPU available physical processors in the shared pool'
          key: 'system.stat[cpu,app]'
          value_type: FLOAT
          units: '%'
          tags:
            - tag: component
              value: cpu
        - uuid: 6a97d56a6c2e45e1b10b97e2395ff30d
          name: 'CPU entitled capacity consumed'
          key: 'system.stat[cpu,ec]'
          value_type: FLOAT
          tags:
            - tag: component
              value: cpu
        - uuid: 142f33d7b2c3469c9664fedf4f053616
          name: 'CPU idle time'
          key: 'system.stat[cpu,id]'
          value_type: FLOAT
          units: '%'
          tags:
            - tag: component
              value: cpu
        - uuid: 752c952fb18e4a0e8e5e3415b107b9f1
          name: 'CPU logical processor utilization'
          key: 'system.stat[cpu,lbusy]'
          value_type: FLOAT
          units: '%'
          tags:
            - tag: component
              value: cpu
        - uuid: 748f1316a33b48658b11dca8f45cfcce
          name: 'CPU number of physical processors consumed'
          key: 'system.stat[cpu,pc]'
          value_type: FLOAT
          tags:
            - tag: component
              value: cpu
        - uuid: 2647132edb6647ca9ef43a00ca09ecbd
          name: 'CPU system time'
          key: 'system.stat[cpu,sy]'
          value_type: FLOAT
          units: '%'
          tags:
            - tag: component
              value: cpu
        - uuid: e990898ddbb74c7b9a8c1c67cb9544cf
          name: 'CPU user time'
          key: 'system.stat[cpu,us]'
          value_type: FLOAT
          units: '%'
          tags:
            - tag: component
              value: cpu
        - uuid: 2cd7a00570ad487d9cdf39fd198b2c0b
          name: 'CPU iowait time'
          key: 'system.stat[cpu,wa]'
          value_type: FLOAT
          units: '%'
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: c030cc99975d4fe3911789e58bbd5050
              expression: 'avg(/AIX by Zabbix agent/system.stat[cpu,wa],5m)>20'
              name: 'AIX: Disk I/O is overloaded'
              priority: WARNING
              description: 'Extended OS wait times for I/O operations may signal potential performance issues with the storage system.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 6748e4c87589472ca1474f3c7b729e0c
          name: 'Amount of data transferred'
          key: 'system.stat[disk,bps]'
          value_type: FLOAT
          units: B
          tags:
            - tag: component
              value: storage
        - uuid: bf0180d8f109451db616749990a113a6
          name: 'Number of transfers'
          key: 'system.stat[disk,tps]'
          value_type: FLOAT
          tags:
            - tag: component
              value: storage
        - uuid: 3e1af0261f6a421d8ca554f8eb222716
          name: 'Processor units is entitled to receive'
          key: 'system.stat[ent]'
          delay: 1h
          value_type: FLOAT
          tags:
            - tag: component
              value: cpu
        - uuid: 0fe71698a3c74c93a8cb3a937dc7226c
          name: 'Kernel thread context switches'
          key: 'system.stat[faults,cs]'
          value_type: FLOAT
          tags:
            - tag: component
              value: cpu
        - uuid: a1e13d2dbd8b4086974ea32a2cd743b1
          name: 'Device interrupts'
          key: 'system.stat[faults,in]'
          value_type: FLOAT
          tags:
            - tag: component
              value: cpu
        - uuid: 883c7a12b1d54f4d8189ca0d9cc43102
          name: 'System calls'
          key: 'system.stat[faults,sy]'
          value_type: FLOAT
          tags:
            - tag: component
              value: cpu
        - uuid: f027ed1c43464d4ab9a13d4b9f647e7e
          name: 'Length of the swap queue'
          key: 'system.stat[kthr,b]'
          value_type: FLOAT
          tags:
            - tag: component
              value: memory
        - uuid: 6795c2b6914d4303bf30c71c7405ff7d
          name: 'Length of the run queue'
          key: 'system.stat[kthr,r]'
          value_type: FLOAT
          tags:
            - tag: component
              value: cpu
        - uuid: 12142f133863448c9c937c671e183bbb
          name: 'Active virtual pages'
          key: 'system.stat[memory,avm]'
          tags:
            - tag: component
              value: memory
        - uuid: 3b4a5ff768654ff5a87b955684a0d7b5
          name: 'Free real memory'
          key: 'system.stat[memory,fre]'
          tags:
            - tag: component
              value: memory
        - uuid: bf890bf5cd1748a5af9528a111ba43c4
          name: 'File page-ins per second'
          key: 'system.stat[page,fi]'
          value_type: FLOAT
          tags:
            - tag: component
              value: memory
        - uuid: 19c4f7132b6c46aa9522bd46da3e8f03
          name: 'File page-outs per second'
          key: 'system.stat[page,fo]'
          value_type: FLOAT
          tags:
            - tag: component
              value: memory
        - uuid: 9ff3f7faa76c414aae7c5babb91fe065
          name: 'Pages freed (page replacement)'
          key: 'system.stat[page,fr]'
          value_type: FLOAT
          tags:
            - tag: component
              value: memory
        - uuid: 6009d8a0fc2f486db979b226eb975e78
          name: 'Pages paged in from paging space'
          key: 'system.stat[page,pi]'
          value_type: FLOAT
          tags:
            - tag: component
              value: memory
        - uuid: 26fb1471e08c4c46800e4887d8bccd80
          name: 'Pages paged out to paging space'
          key: 'system.stat[page,po]'
          value_type: FLOAT
          tags:
            - tag: component
              value: memory
        - uuid: 83b1456726d448d6a756e03c0ec02342
          name: 'Pages scanned by page-replacement algorithm'
          key: 'system.stat[page,sr]'
          value_type: FLOAT
          tags:
            - tag: component
              value: memory
        - uuid: d0ef675d313849269890d06c7e003c9e
          name: 'System information'
          key: system.uname
          delay: 1h
          value_type: CHAR
          description: 'Information as normally returned by `uname -a`.'
          inventory_link: OS
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: 3a736e64211744aea480a60b2c48a036
              expression: 'last(/AIX by Zabbix agent/system.uname,#1)<>last(/AIX by Zabbix agent/system.uname,#2)'
              name: 'AIX: Host information was changed'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: 2e0ff86c992c4a098af8cb1bee0f0001
          name: 'System uptime'
          key: system.uptime
          delay: 10m
          units: uptime
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: 03a2cd88b6a64d3ea4c9bb2abbc4ae2d
              expression: 'change(/AIX by Zabbix agent/system.uptime)<0'
              name: 'AIX: Server has just been restarted'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: 980a59760ef9481298ed35322841f939
          name: 'Number of logged in users'
          key: system.users.num
          description: 'The number of users who are currently logged in.'
          tags:
            - tag: component
              value: os
        - uuid: 4771d6d33c2247d6843198152a7065a8
          name: 'Checksum of /etc/passwd'
          key: 'vfs.file.cksum[/etc/passwd,sha256]'
          delay: 15m
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: security
          triggers:
            - uuid: c75ee957fd6c43b2aba9919d5e1af4a1
              expression: 'last(/AIX by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/AIX by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2)'
              name: 'AIX: /etc/passwd has been changed'
              priority: WARNING
              tags:
                - tag: scope
                  value: security
        - uuid: 95e14453e9ee4b6ea036fab09bf2b194
          name: 'Get filesystems'
          key: vfs.fs.get
          history: '0'
          value_type: TEXT
          description: 'The `vfs.fs.get` key acquires raw information set about the filesystems. Later to be extracted by preprocessing in dependent items.'
          tags:
            - tag: component
              value: raw
        - uuid: 6d4d9deab17b42f4a953c5210acac6f1
          name: 'Available memory'
          key: 'vm.memory.size[available]'
          units: B
          description: 'Defined as free + cached + buffers.'
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 80b6406fb8474fa9801e9dffb2ccd368
              expression: 'last(/AIX by Zabbix agent/vm.memory.size[available])<20M'
              name: 'AIX: Lack of available memory on server'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: 57d30ccd5db64dc8b9498a36efe768e9
          name: 'Total memory'
          key: 'vm.memory.size[total]'
          delay: 1h
          units: B
          description: 'Total memory expressed in bytes.'
          tags:
            - tag: component
              value: memory
        - uuid: 304a3e9bb7594c83b027a32c34aeab28
          name: 'Zabbix agent availability'
          type: INTERNAL
          key: 'zabbix[host,agent,available]'
          description: 'Used for monitoring the availability status of the agent.'
          valuemap:
            name: zabbix.host.available
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: f0b9ecafede8476b94fd8dcab74cea87
              expression: 'max(/AIX by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0'
              name: 'AIX: Zabbix agent is not available'
              event_name: 'AIX: Zabbix agent is not available (for {$AGENT.TIMEOUT})'
              priority: AVERAGE
              description: 'For passive checks only. The availability of the agent(s) and a host is used with `{$AGENT.TIMEOUT}` as the time threshold.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 409cce8967b4494bbcc5193a26c69b06
          name: 'Network interface discovery'
          key: net.if.discovery
          delay: 1h
          filter:
            conditions:
              - macro: '{#IFNAME}'
                value: '@Network interfaces for discovery'
          description: 'Used for the discovery of network interfaces.'
          item_prototypes:
            - uuid: df9710a48eaa4a72911de3971b37c596
              name: 'Interface {#IFNAME}: Incoming network traffic'
              key: 'net.if.in[{#IFNAME}]'
              units: bps
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 0704fb302aa94f73bedade3a998a0fa3
              name: 'Interface {#IFNAME}: Outgoing network traffic'
              key: 'net.if.out[{#IFNAME}]'
              units: bps
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#IFNAME}'
          graph_prototypes:
            - uuid: 366a988491344fd487561d02ed499fe0
              name: 'Interface {#IFNAME}: Network traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'AIX by Zabbix agent'
                    key: 'net.if.in[{#IFNAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'AIX by Zabbix agent'
                    key: 'net.if.out[{#IFNAME}]'
        - uuid: 4a0b17decdf1449d9463cf00720a843d
          name: 'Mounted filesystem discovery'
          type: DEPENDENT
          key: vfs.fs.dependent.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#FSNAME}'
                value: '{$VFS.FS.FSNAME.MATCHES}'
              - macro: '{#FSNAME}'
                value: '{$VFS.FS.FSNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#FSTYPE}'
                value: '{$VFS.FS.FSTYPE.MATCHES}'
              - macro: '{#FSTYPE}'
                value: '{$VFS.FS.FSTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'The discovery of mounted filesystems with different types.'
          item_prototypes:
            - uuid: ee5ae5de6f7b40b4a9b064bdc733de91
              name: 'FS [{#FSNAME}]: Inodes: Free, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.inode[{#FSNAME},pfree]'
              value_type: FLOAT
              units: '%'
              description: 'Free metadata space expressed in %.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.inodes.pfree
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
              trigger_prototypes:
                - uuid: 185959350a954c35a08ab6a9bf6c1d46
                  expression: 'min(/AIX by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}'
                  name: 'AIX: FS [{#FSNAME}]: Running out of free inodes'
                  event_name: 'AIX: {#FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}%)'
                  opdata: 'Free inodes: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Disk writing may fail if index nodes are exhausted, leading to error messages like "No space left on device" or "Disk is full", despite available free space.'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
                - uuid: 6ce467d05e8745409a177799bed34bb3
                  expression: 'min(/AIX by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}'
                  name: 'AIX: FS [{#FSNAME}]: Running out of free inodes'
                  event_name: 'AIX: FS [{#FSNAME}]: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}%)'
                  opdata: 'Free inodes: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Disk writing may fail if index nodes are exhausted, leading to error messages like "No space left on device" or "Disk is full", despite available free space.'
                  dependencies:
                    - name: 'AIX: FS [{#FSNAME}]: Running out of free inodes'
                      expression: 'min(/AIX by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
            - uuid: 13e212598f744a7fa535c23731190c61
              name: 'FS [{#FSNAME}]: Space: Available'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},free]'
              units: B
              description: 'Available storage space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.free
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 428b0314dd574df1970dd2cae7e8889b
              name: 'FS [{#FSNAME}]: Space: Available, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},pfree]'
              value_type: FLOAT
              units: '%'
              description: |
                Deprecated metric.
                Space availability expressed as a percentage, calculated using the current and maximum available spaces.
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.pfree
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: deprecated
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: e0c53ff31b8145b5bb887bb61d077fc4
              name: 'FS [{#FSNAME}]: Space: Used, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},pused]'
              value_type: FLOAT
              units: '%'
              description: 'Calculated as the percentage of currently used space compared to the maximum available space.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.pused
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
              trigger_prototypes:
                - uuid: 6b3a81f7c4a24307a099c07fb537a8ca
                  expression: 'min(/AIX by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
                  name: 'AIX: FS [{#FSNAME}]: Space is critically low'
                  event_name: 'AIX: FS [{#FSNAME}]: Space is critically low (used > {$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%, total {{?last(//vfs.fs.dependent.size[{#FSNAME},total])/1024/1024/1024}.fmtnum(1)}GB)'
                  opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
                  priority: AVERAGE
                  description: |
                    The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%` limit.
                    The trigger expression is based on the current used and maximum available spaces.
                    Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: capacity
                - uuid: 74a1fc62bfe24b7eabe4e244c70dc384
                  expression: 'min(/AIX by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}'
                  name: 'AIX: FS [{#FSNAME}]: Space is low'
                  event_name: 'AIX: FS [{#FSNAME}]: Space is low (used > {$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%, total {{?last(//vfs.fs.dependent.size[{#FSNAME},total])/1024/1024/1024}.fmtnum(1)}GB)'
                  opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
                  priority: WARNING
                  description: |
                    The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%` limit.
                    The trigger expression is based on the current used and maximum available spaces.
                    Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
                  manual_close: 'YES'
                  dependencies:
                    - name: 'AIX: FS [{#FSNAME}]: Space is critically low'
                      expression: 'min(/AIX by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: capacity
            - uuid: 6f6c92bc72014612b2efb92d12d8c425
              name: 'FS [{#FSNAME}]: Space: Total'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},total]'
              units: B
              description: 'Total space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.total
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 915e72271f134684b2d10d05d4035962
              name: 'FS [{#FSNAME}]: Space: Used'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},used]'
              units: B
              description: 'Used storage expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.used
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 0c21ec9b14884057bdd2080b4871756e
              name: 'FS [{#FSNAME}]: Get data'
              type: DEPENDENT
              key: 'vfs.fs.dependent[{#FSNAME},data]'
              history: 1h
              value_type: TEXT
              description: 'Intermediate data of `{#FSNAME}` filesystem.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.fsname==''{#FSNAME}'')].first()'
              master_item:
                key: vfs.fs.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: cd96a2d7e708495cbc5d11a14ea9c876
              name: 'FS [{#FSNAME}]: Option: Read-only'
              type: DEPENDENT
              key: 'vfs.fs.dependent[{#FSNAME},readonly]'
              description: 'The filesystem is mounted as read-only. It is available only for Zabbix agents 6.4 and higher.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.options
                  error_handler: DISCARD_VALUE
                - type: REGEX
                  parameters:
                    - '(?:^|,)ro\b'
                    - '1'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
              trigger_prototypes:
                - uuid: 05ec0e80333d4f7688b71a2865d0365e
                  expression: 'last(/AIX by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly],#2)=0 and last(/AIX by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly])=1'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/AIX by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly])=0'
                  name: 'AIX: FS [{#FSNAME}]: Filesystem has become read-only'
                  priority: AVERAGE
                  description: 'The filesystem has become read-only, possibly due to an I/O error. Available only for Zabbix agents 6.4 and higher.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
          graph_prototypes:
            - uuid: 6649ab6a9568418493be79dfb63b07b4
              name: 'FS [{#FSTYPE}({#FSNAME})]: Space usage graph, in % (relative to max available)'
              width: '600'
              height: '340'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - drawtype: FILLED_REGION
                  color: F63100
                  calc_fnc: ALL
                  item:
                    host: 'AIX by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},pused]'
            - uuid: cfd16b36331145a881249d88e105c731
              name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
              width: '600'
              height: '340'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: '787878'
                  calc_fnc: LAST
                  type: GRAPH_SUM
                  item:
                    host: 'AIX by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},total]'
                - sortorder: '1'
                  color: F63100
                  calc_fnc: LAST
                  item:
                    host: 'AIX by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},used]'
                - sortorder: '2'
                  color: 199C09
                  calc_fnc: LAST
                  item:
                    host: 'AIX by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},free]'
          master_item:
            key: vfs.fs.get
          lld_macro_paths:
            - lld_macro: '{#FSNAME}'
              path: $.fsname
            - lld_macro: '{#FSTYPE}'
              path: $.fstype
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var filesystems = JSON.parse(value);
                  
                  result = filesystems.map(function (filesystem) {
                  	return {
                  		'fsname': filesystem.fsname,
                  		'fstype': filesystem.fstype
                  	};
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Skip metadata collection for dynamic FS'
              step: '1'
              filter:
                conditions:
                  - macro: '{#FSTYPE}'
                    value: ^(btrfs|zfs)$
              operations:
                - operator: LIKE
                  value: Inodes
                  discover: NO_DISCOVER
      tags:
        - tag: class
          value: os
        - tag: target
          value: aix
      macros:
        - macro: '{$AGENT.TIMEOUT}'
          value: 3m
          description: 'Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).'
          config:
            type: TEXT
            priority: '1'
            section_name: Other
            label: 'Seconds since the last Zabbix agent seen'
            description: 'Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).'
        - macro: '{$VFS.FS.FSNAME.MATCHES}'
          value: .+
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '3'
            section_name: Filters
            label: 'Filter for filesystems by name'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSNAME.NOT_MATCHES}'
          value: ^(/dev|/sys|/run|/proc|.+/shm$)
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '2'
            section_name: Filters
            label: 'Filter for filesystems by name (exclude)'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSTYPE.MATCHES}'
          value: ^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Filter for filesystems by type'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSTYPE.NOT_MATCHES}'
          value: ^\s$
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for filesystems by type (exclude)'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.INODE.PFREE.MIN.CRIT}'
          value: '10'
          description: 'The critical threshold of the filesystem metadata utilization.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Threshold of the filesystem metadata utilization (critical)'
            description: 'The critical threshold of the filesystem metadata utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.INODE.PFREE.MIN.WARN}'
          value: '20'
          description: 'The warning threshold of the filesystem metadata utilization.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Threshold of the filesystem metadata utilization'
            description: 'The warning threshold of the filesystem metadata utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.PUSED.MAX.CRIT}'
          value: '90'
          description: 'The critical threshold of the filesystem utilization.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Threshold for filesystem utilization (critical)'
            description: 'The critical threshold of the filesystem utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.PUSED.MAX.WARN}'
          value: '80'
          description: 'The warning threshold of the filesystem utilization.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Threshold for filesystem utilization (warning)'
            description: 'The warning threshold of the filesystem utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 5b5e04508ef3402a9432ec9f3d581179
          name: Filesystems
          pages:
            - name: Overview
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '3'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'AIX by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
                    - type: STRING
                      name: reference
                      value: AAAEB
                - type: graphprototype
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'AIX by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space usage graph, in % (relative to max available)'
                    - type: STRING
                      name: reference
                      value: AAAEC
        - uuid: 873e38e16ef94f2b9b743a3251db0fbb
          name: 'System performance'
          pages:
            - widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'AIX by Zabbix agent'
                        name: 'AIX: CPU load'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'AIX by Zabbix agent'
                        name: 'AIX: CPU utilization'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graphprototype
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '3'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'AIX by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
                    - type: STRING
                      name: reference
                      value: AAAEA
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'AIX by Zabbix agent'
                        name: 'AIX: CPU jumps'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'AIX by Zabbix agent'
                        name: 'AIX: Memory usage'
                    - type: STRING
                      name: reference
                      value: AAAAD
      valuemaps:
        - uuid: 4a25a6b3d6e4482ab2a748c79cb55524
          name: zabbix.host.available
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: f2885fb5e52946f8bce8eb96a60f433a
          name: 'Zabbix agent ping status'
          mappings:
            - value: '1'
              newvalue: Up
    - uuid: a8d91e4f36794e32b73090d5edf3d7ae
      template: 'Apache by Zabbix agent'
      name: 'Apache by Zabbix agent'
      description: |
        Get metrics from mod_status module using HTTP agent.
        https://httpd.apache.org/docs/current/mod/mod_status.html
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384764-discussion-thread-for-official-zabbix-template-apache
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for the effortless deployment of Apache monitoring by Zabbix via Zabbix agent and doesn't require any external scripts.
        The template `Apache by Zabbix agent` - collects metrics by polling [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html) locally with Zabbix agent:
          
        ```text
        127.0.0.1
        ServerVersion: Apache/2.4.41 (Unix)
        ServerMPM: event
        Server Built: Aug 14 2019 00:35:10
        CurrentTime: Friday, 16-Aug-2019 12:38:40 UTC
        RestartTime: Wednesday, 14-Aug-2019 07:58:26 UTC
        ParentServerConfigGeneration: 1
        ParentServerMPMGeneration: 0
        ServerUptimeSeconds: 189613
        ServerUptime: 2 days 4 hours 40 minutes 13 seconds
        Load1: 4.60
        Load5: 1.20
        Load15: 0.47
        Total Accesses: 27860
        Total kBytes: 33011
        Total Duration: 54118
        CPUUser: 18.02
        CPUSystem: 31.76
        CPUChildrenUser: 0
        CPUChildrenSystem: 0
        CPULoad: .0262535
        Uptime: 189613
        ReqPerSec: .146931
        BytesPerSec: 178.275
        BytesPerReq: 1213.33
        DurationPerReq: 1.9425
        BusyWorkers: 7
        IdleWorkers: 93
        Processes: 4
        Stopping: 0
        BusyWorkers: 7
        IdleWorkers: 93
        ConnsTotal: 13
        ConnsAsyncWriting: 0
        ConnsAsyncKeepAlive: 5
        ConnsAsyncClosing: 0
        Scoreboard: ...
        
        ```
          
        It also uses Zabbix agent to collect `Apache` Linux process statistics such as CPU usage, memory usage, and whether the process is running or not.
        
        ## Setup
        
        See the setup instructions for [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html).
        
        Check the availability of the module with this command line: `httpd -M 2>/dev/null | grep status_module`
        
        This is an example configuration of the Apache web server:
        
        ```text
        <Location "/server-status">
          SetHandler server-status
          Require host example.com
        </Location>
        ```
        
        If you use another path, then do not forget to change the `Apache status page path` host wizard configuration field.
      vendor:
        name: Zabbix
        version: 8.0-0
      groups:
        - name: Templates/Applications
      items:
        - uuid: 2d3ebb059bd944ee8a7b95e2c60b08f0
          name: 'Total bytes'
          type: DEPENDENT
          key: apache.bytes
          value_type: FLOAT
          units: B
          description: 'The total bytes served.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$["Total kBytes"]'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: network
        - uuid: be97c53d82f846cdbc2d0ec640435b6f
          name: 'Bytes per second'
          type: DEPENDENT
          key: apache.bytes.rate
          value_type: FLOAT
          units: Bps
          description: |
            It is calculated as a rate of change for total bytes statistics.
            `BytesPerSec` is not used, as it counts the average since the last Apache server start.
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$["Total kBytes"]'
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: network
        - uuid: 5919f29c692b468fb5642e83f408c2e5
          name: 'Total requests'
          type: DEPENDENT
          key: apache.requests
          description: 'The total number of the Apache server accesses.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$["Total Accesses"]'
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: network
        - uuid: 7e1e674a23d24fafa31b76a048fe9fd0
          name: 'Requests per second'
          type: DEPENDENT
          key: apache.requests.rate
          value_type: FLOAT
          description: |
            It is calculated as a rate of change for the "Total requests" statistics.
            `ReqPerSec` is not used, as it counts the average since the last Apache server start.
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$["Total Accesses"]'
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: network
        - uuid: 5a4bd2d6c2874d888ec4c82409e1c711
          name: Uptime
          type: DEPENDENT
          key: apache.uptime
          units: uptime
          description: 'The service uptime expressed in seconds.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ServerUptimeSeconds
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 7872d9665c234f45941ca26206e0255c
              expression: 'last(/Apache by Zabbix agent/apache.uptime)<10m'
              name: 'Apache: Service has been restarted'
              event_name: 'Apache: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 78a611c2b15c4ae8949257b6fdf922f1
          name: Version
          type: DEPENDENT
          key: apache.version
          value_type: CHAR
          description: 'The Apache service version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ServerVersion
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 5124b17918f545758ca5c936332f51cd
              expression: 'last(/Apache by Zabbix agent/apache.version,#1)<>last(/Apache by Zabbix agent/apache.version,#2) and length(last(/Apache by Zabbix agent/apache.version))>0'
              name: 'Apache: Version has changed'
              event_name: 'Apache: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'Apache version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 35f48761ec6d451bbb8b0d80cd0ccd91
          name: 'Workers idle cleanup'
          type: DEPENDENT
          key: apache.workers.cleanup
          description: 'The number of workers in cleanup state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.cleanup
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: ebd391702cbd432ab458578a3cb45361
          name: 'Workers closing connection'
          type: DEPENDENT
          key: apache.workers.closing
          description: 'The number of workers in closing state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.closing
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 6a961707e7084d8ebc09f572b15ef1fd
          name: 'Workers DNS lookup'
          type: DEPENDENT
          key: apache.workers.dnslookup
          description: 'The number of workers in `dnslookup` state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.dnslookup
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: fd383c9ace4647deb9d3e3882554b8d0
          name: 'Workers finishing'
          type: DEPENDENT
          key: apache.workers.finishing
          description: 'The number of workers in finishing state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.finishing
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 2a02413c0e9144b4a70b8a5a71d680e0
          name: 'Workers keepalive (read)'
          type: DEPENDENT
          key: apache.workers.keepalive
          description: 'The number of workers in `keepalive` state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.keepalive
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: ed71fb2ec75f4537a2937293add75274
          name: 'Workers logging'
          type: DEPENDENT
          key: apache.workers.logging
          description: 'The number of workers in logging state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.logging
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 6c38147f9f3449a194f36a6e6d828865
          name: 'Workers reading request'
          type: DEPENDENT
          key: apache.workers.reading
          description: 'The number of workers in reading state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.reading
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 47856ac3b68644e0861b593d3083d35b
          name: 'Workers sending reply'
          type: DEPENDENT
          key: apache.workers.sending
          description: 'The number of workers in sending state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.sending
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 60cf954a40594cf69afdd1bf0319c031
          name: 'Workers slot with no current process'
          type: DEPENDENT
          key: apache.workers.slot
          description: 'The number of slots with no current process.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.slot
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 441c797164bf4c8da8112d78240abc43
          name: 'Workers starting up'
          type: DEPENDENT
          key: apache.workers.starting
          description: 'The number of workers in starting state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.starting
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: ec87e89ee9304acd8c7a76e863cb4443
          name: 'Workers waiting for connection'
          type: DEPENDENT
          key: apache.workers.waiting
          description: 'The number of workers in waiting state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.waiting
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: b52addb50ccb415fb63eaf67076991c1
          name: 'Total workers busy'
          type: DEPENDENT
          key: apache.workers_total.busy
          description: 'The total number of busy worker threads/processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.BusyWorkers
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 6955f78c203b435987b5ab75a1114867
          name: 'Total workers idle'
          type: DEPENDENT
          key: apache.workers_total.idle
          description: 'The total number of idle worker threads/processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.IdleWorkers
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 267ca6fe038346e5be1113f3bf9b4023
          name: 'Service response time'
          key: 'net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
          value_type: FLOAT
          units: s
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
        - uuid: 369f00e2970048c786ce3bd609e65566
          name: 'Service ping'
          key: 'net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
        - uuid: 99b1a38ed45b4212974b0bea72b076d2
          name: 'Get processes summary'
          key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
          history: '0'
          value_type: TEXT
          description: 'The aggregated data of summary metrics for all processes.'
          tags:
            - tag: component
              value: raw
        - uuid: 115413a0f5ab4caba418ab841ad81eba
          name: 'Get status'
          key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          history: 1h
          value_type: TEXT
          description: |
            Getting data from a machine-readable version of the Apache status page.
            For more information see Apache Module [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html).
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var lines = value.split('\n');
                  var output = {},
                  	workers = {
                  		'_': 0, 'S': 0, 'R': 0, 'W': 0,
                  		'K': 0, 'D': 0, 'C': 0, 'L': 0,
                  		'G': 0, 'I': 0, '.': 0
                  	};
                  
                  for (var i = 0; i < lines.length; i++) {
                  	var line = lines[i].match(/([A-z0-9 ]+): (.*)/);
                  
                  	if (line !== null) {
                  		output[line[1]] = isNaN(line[2]) ? line[2] : Number(line[2]);
                  	}
                  }
                  
                  output.ServerUptimeSeconds = output.ServerUptimeSeconds || output.Uptime;
                  output.ServerVersion = output.ServerVersion || output.Server;
                  
                  if (typeof output.Scoreboard === 'string') {
                  	for (var i = 0; i < output.Scoreboard.length; i++) {
                  		var char = output.Scoreboard[i];
                  
                  		workers[char]++;
                  	}
                  }
                  
                  output.Workers = {
                  	waiting: workers['_'], starting: workers['S'], reading: workers['R'],
                  	sending: workers['W'], keepalive: workers['K'], dnslookup: workers['D'],
                  	closing: workers['C'], logging: workers['L'], finishing: workers['G'],
                  	cleanup: workers['I'], slot: workers['.']
                  };
                  
                  return JSON.stringify(output);
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: 36a82bdda7754c51a05da3bb0b65b83e
          name: 'Event MPM discovery'
          type: DEPENDENT
          key: apache.mpm.event.discovery
          description: |
            The discovery of additional metrics if the event Multi-Processing Module (MPM) is used.
            For more details see [Apache MPM event](https://httpd.apache.org/docs/current/mod/event.html).
          item_prototypes:
            - uuid: 99df2ff5970b4497887371bcd16d5ada
              name: 'Bytes per request'
              type: DEPENDENT
              key: 'apache.bytes[per_request{#SINGLETON}]'
              value_type: FLOAT
              units: B
              description: 'The average number of client requests per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.BytesPerReq
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: 2e0692f36b924b52ab7b2ff7788b641d
              name: 'Connections async closing'
              type: DEPENDENT
              key: 'apache.connections[async_closing{#SINGLETON}]'
              description: 'The number of asynchronous connections in closing state (applicable only to the event MPM).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConnsAsyncClosing
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: 33d3fec8f45c493097bab986d5ea1e55
              name: 'Connections async keepalive'
              type: DEPENDENT
              key: 'apache.connections[async_keep_alive{#SINGLETON}]'
              description: 'The number of asynchronous connections in keepalive state (applicable only to the event MPM).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConnsAsyncKeepAlive
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: 9ad0e5c49e7c4b939eb7977a5158953f
              name: 'Connections async writing'
              type: DEPENDENT
              key: 'apache.connections[async_writing{#SINGLETON}]'
              description: 'The number of asynchronous connections in writing state (applicable only to the event MPM).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConnsAsyncWriting
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: 0fbfbfae187040c790bb4d68f9e2fae5
              name: 'Connections total'
              type: DEPENDENT
              key: 'apache.connections[total{#SINGLETON}]'
              description: 'The number of total connections.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConnsTotal
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: 778a1bfeaa1b474ba529e6c0a55a9949
              name: 'Number of async processes'
              type: DEPENDENT
              key: 'apache.process[num{#SINGLETON}]'
              description: 'The number of asynchronous processes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Processes
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: system
          graph_prototypes:
            - uuid: 4845e6716bd74e7698406e6d8389eba5
              name: 'Apache: Current async connections{#SINGLETON}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Apache by Zabbix agent'
                    key: 'apache.connections[async_closing{#SINGLETON}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Apache by Zabbix agent'
                    key: 'apache.connections[async_keep_alive{#SINGLETON}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Apache by Zabbix agent'
                    key: 'apache.connections[async_writing{#SINGLETON}]'
                - sortorder: '3'
                  drawtype: BOLD_LINE
                  color: F7941D
                  item:
                    host: 'Apache by Zabbix agent'
                    key: 'apache.connections[total{#SINGLETON}]'
            - uuid: 19ecb4e04c3742daac1a0e06d5f98c0c
              name: 'Apache: Current async processes{#SINGLETON}'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Apache by Zabbix agent'
                    key: 'apache.process[num{#SINGLETON}]'
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  return JSON.stringify(JSON.parse(value).ServerMPM === 'event'
                  	? [{'{#SINGLETON}': ''}] : []);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 357a2a1f056a4f59985e858d72e0bdae
          name: 'Apache process discovery'
          type: DEPENDENT
          key: apache.proc.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#APACHE.NAME}'
                value: '{$APACHE.PROCESS_NAME}'
          description: 'The discovery of the Apache process summary.'
          item_prototypes:
            - uuid: 458bfecc83f64540838e3ffc3a7f3cb1
              name: 'Get process data'
              type: DEPENDENT
              key: 'apache.proc.get[{#APACHE.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'The summary metrics aggregated by a process {#APACHE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@["name"]=="{#APACHE.NAME}")].first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: 'Failed to retrieve process {#APACHE.NAME} data'
              master_item:
                key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
              tags:
                - tag: component
                  value: raw
            - uuid: 233b5466014640e4b990ffd81fa19fa1
              name: 'Number of running processes'
              type: DEPENDENT
              key: 'apache.proc.num[{#APACHE.NAME}]'
              description: 'The number of running processes {#APACHE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.processes
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'apache.proc.get[{#APACHE.NAME}]'
              tags:
                - tag: component
                  value: system
              trigger_prototypes:
                - uuid: b62f49b09d6b4c6ca01ff60cd9dd2209
                  expression: 'last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])=0'
                  name: 'Apache: Process is not running'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 683d4489dbb549f3bb5b45d3c2696c4f
              name: 'Memory usage, %'
              type: DEPENDENT
              key: 'apache.proc.pmem[{#APACHE.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of real memory used by a process {#APACHE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pmem
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'apache.proc.get[{#APACHE.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: 384bf197e6a241b3b63bb89d009bba6b
              name: 'Memory usage (rss)'
              type: DEPENDENT
              key: 'apache.proc.rss[{#APACHE.NAME}]'
              units: B
              description: 'The summary of resident set size memory used by a process {#APACHE.NAME} expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rss
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'apache.proc.get[{#APACHE.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: f20b7a01ff134a128c54ea83af8557e2
              name: 'Memory usage (vsize)'
              type: DEPENDENT
              key: 'apache.proc.vmem[{#APACHE.NAME}]'
              units: B
              description: 'The summary of virtual memory used by a process {#APACHE.NAME} expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.vsize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'apache.proc.get[{#APACHE.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: b73280fb0af64c7899abfc74cc074b13
              name: 'CPU utilization'
              key: 'proc.cpu.util[{#APACHE.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of the CPU utilization by a process {#APACHE.NAME}.'
              tags:
                - tag: component
                  value: cpu
          trigger_prototypes:
            - uuid: 0166ec63913e4bbea25c54b458b3213a
              expression: 'nodata(/Apache by Zabbix agent/web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"],30m)=1 and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
              name: 'Apache: Failed to fetch status page'
              event_name: 'Apache: Failed to fetch status page (or no data for 30m)'
              priority: WARNING
              description: 'Zabbix has not received any data for items for the last 30 minutes.'
              manual_close: 'YES'
              dependencies:
                - name: 'Apache: Service is down'
                  expression: 'last(/Apache by Zabbix agent/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
              tags:
                - tag: scope
                  value: availability
            - uuid: e24dbf9b89c34d839cb12a22b1103df3
              expression: 'last(/Apache by Zabbix agent/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
              name: 'Apache: Service is down'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
            - uuid: 128905793a4b4a1db5a49f87e87d3383
              expression: 'min(/Apache by Zabbix agent/net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"],5m)>{$APACHE.RESPONSE_TIME.MAX.WARN} and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
              name: 'Apache: Service response time is too high'
              event_name: 'Apache: Service response time is too high (over {$APACHE.RESPONSE_TIME.MAX.WARN}s for 5m)'
              priority: WARNING
              manual_close: 'YES'
              dependencies:
                - name: 'Apache: Service is down'
                  expression: 'last(/Apache by Zabbix agent/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent/apache.proc.num[{#APACHE.NAME}])>0'
              tags:
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: d317a2ccde4f4a2ab20e983b27ae64e2
              name: 'Apache: Memory usage[{#APACHE.NAME}]'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  item:
                    host: 'Apache by Zabbix agent'
                    key: 'apache.proc.vmem[{#APACHE.NAME}]'
                - sortorder: '1'
                  drawtype: BOLD_LINE
                  color: F63100
                  item:
                    host: 'Apache by Zabbix agent'
                    key: 'apache.proc.rss[{#APACHE.NAME}]'
          master_item:
            key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
          lld_macro_paths:
            - lld_macro: '{#APACHE.NAME}'
              path: $.name
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: webserver
        - tag: target
          value: apache
      macros:
        - macro: '{$APACHE.PROCESS.NAME.PARAMETER}'
          description: 'The process name of the Apache web server used in the item key `proc.get`. It could be specified if the correct process name is known.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Apache process name'
            description: 'Process name of the Apache web server Used in the item key `proc.get`.'
        - macro: '{$APACHE.PROCESS_NAME}'
          value: (httpd|apache2)
          description: 'The process name filter for the Apache process discovery.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Apache process name LLD filter'
            description: 'Process name filter for the Apache process discovery.'
        - macro: '{$APACHE.RESPONSE_TIME.MAX.WARN}'
          value: '10'
          description: 'The maximum Apache response time expressed in seconds for a trigger expression.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'Maximum Apache response time'
            description: 'Maximum Apache response time expressed in seconds for a trigger expression. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$APACHE.STATUS.HOST}'
          value: 127.0.0.1
          description: 'The hostname or IP address of the Apache status page.'
          config:
            type: TEXT
            priority: '1'
            label: 'Apache status host'
            description: 'Hostname or IP address of the Apache status page host.'
            required: 'YES'
        - macro: '{$APACHE.STATUS.PATH}'
          value: 'server-status?auto'
          description: 'The URL path of the Apache status page.'
          config:
            type: TEXT
            priority: '3'
            label: 'Apache status page path'
            description: 'URL path of the Apache status page.'
            required: 'YES'
        - macro: '{$APACHE.STATUS.PORT}'
          value: '80'
          description: 'The port of the Apache status page.'
          config:
            type: TEXT
            priority: '2'
            label: 'Apache status page port'
            description: 'In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$APACHE.STATUS.SCHEME}'
          value: http
          description: 'The request scheme, which may be either HTTP or HTTPS.'
          config:
            type: LIST
            priority: '4'
            label: 'Request scheme'
            description: 'Request scheme, which may be either HTTP or HTTPS.'
            options:
              - value: http
                text: HTTP
              - value: https
                text: HTTPS
      dashboards:
        - uuid: c27c68fb9c234a09b4023076b45affc1
          name: 'Apache performance'
          pages:
            - name: General
              widgets:
                - type: graph
                  width: '72'
                  height: '7'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent'
                        name: 'Apache: Worker states'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '7'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent'
                        name: 'Apache: Requests per second'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graphprototype
                  'y': '12'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent'
                        name: 'Apache: Current async connections{#SINGLETON}'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '7'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent'
                        name: 'Apache: Workers total'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graphprototype
                  x: '36'
                  'y': '12'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent'
                        name: 'Apache: Current async processes{#SINGLETON}'
                    - type: STRING
                      name: reference
                      value: AAAAE
      valuemaps:
        - uuid: 452297e814a84b08a72730a7b777e378
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: aa3286a824464020863ead141e8f0afc
      template: 'Apache by Zabbix agent active'
      name: 'Apache by Zabbix agent active'
      description: |
        Get metrics from mod_status module using HTTP agent.
        https://httpd.apache.org/docs/current/mod/mod_status.html
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384764-discussion-thread-for-official-zabbix-template-apache
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for the effortless deployment of Apache monitoring by Zabbix via Zabbix agent and doesn't require any external scripts.
        The template `Apache by Zabbix agent` - collects metrics by polling [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html) locally with Zabbix agent:
          
        ```text
        127.0.0.1
        ServerVersion: Apache/2.4.41 (Unix)
        ServerMPM: event
        Server Built: Aug 14 2019 00:35:10
        CurrentTime: Friday, 16-Aug-2019 12:38:40 UTC
        RestartTime: Wednesday, 14-Aug-2019 07:58:26 UTC
        ParentServerConfigGeneration: 1
        ParentServerMPMGeneration: 0
        ServerUptimeSeconds: 189613
        ServerUptime: 2 days 4 hours 40 minutes 13 seconds
        Load1: 4.60
        Load5: 1.20
        Load15: 0.47
        Total Accesses: 27860
        Total kBytes: 33011
        Total Duration: 54118
        CPUUser: 18.02
        CPUSystem: 31.76
        CPUChildrenUser: 0
        CPUChildrenSystem: 0
        CPULoad: .0262535
        Uptime: 189613
        ReqPerSec: .146931
        BytesPerSec: 178.275
        BytesPerReq: 1213.33
        DurationPerReq: 1.9425
        BusyWorkers: 7
        IdleWorkers: 93
        Processes: 4
        Stopping: 0
        BusyWorkers: 7
        IdleWorkers: 93
        ConnsTotal: 13
        ConnsAsyncWriting: 0
        ConnsAsyncKeepAlive: 5
        ConnsAsyncClosing: 0
        Scoreboard: ...
        
        ```
          
        It also uses Zabbix agent to collect `Apache` Linux process statistics such as CPU usage, memory usage, and whether the process is running or not.
        
        ## Setup
        
        See the setup instructions for [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html).
        
        Check the availability of the module with this command line: `httpd -M 2>/dev/null | grep status_module`
        
        This is an example configuration of the Apache web server:
        
        ```text
        <Location "/server-status">
          SetHandler server-status
          Require host example.com
        </Location>
        ```
        
        If you use another path, then do not forget to change the `Apache status page path` host wizard configuration field.
      vendor:
        name: Zabbix
        version: 8.0-0
      groups:
        - name: Templates/Applications
      items:
        - uuid: 4f77b3a553d446619715e681799ea92c
          name: 'Total bytes'
          type: DEPENDENT
          key: apache.bytes
          value_type: FLOAT
          units: B
          description: 'The total bytes served.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$["Total kBytes"]'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: network
        - uuid: a15b5f65e81440a49fc5918afd31d73b
          name: 'Bytes per second'
          type: DEPENDENT
          key: apache.bytes.rate
          value_type: FLOAT
          units: Bps
          description: |
            It is calculated as a rate of change for total bytes statistics.
            `BytesPerSec` is not used, as it counts the average since the last Apache server start.
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$["Total kBytes"]'
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: network
        - uuid: b0726bf9933a4349854bce2005e66f77
          name: 'Total requests'
          type: DEPENDENT
          key: apache.requests
          description: 'The total number of the Apache server accesses.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$["Total Accesses"]'
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: network
        - uuid: 864887722e62444a8d8f0756f161fc23
          name: 'Requests per second'
          type: DEPENDENT
          key: apache.requests.rate
          value_type: FLOAT
          description: |
            It is calculated as a rate of change for the "Total requests" statistics.
            `ReqPerSec` is not used, as it counts the average since the last Apache server start.
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$["Total Accesses"]'
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: network
        - uuid: af675fca551a45659f823cdf2e06175c
          name: Uptime
          type: DEPENDENT
          key: apache.uptime
          units: uptime
          description: 'The service uptime expressed in seconds.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ServerUptimeSeconds
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 2f9e1d5e188f4f6190088986f6fc3f70
              expression: 'last(/Apache by Zabbix agent active/apache.uptime)<10m'
              name: 'Apache: Service has been restarted'
              event_name: 'Apache: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 67523f1351814d388f95178363a106ff
          name: Version
          type: DEPENDENT
          key: apache.version
          value_type: CHAR
          description: 'The Apache service version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.ServerVersion
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 80d8c27a060347a4a852c3f6481244c3
              expression: 'last(/Apache by Zabbix agent active/apache.version,#1)<>last(/Apache by Zabbix agent active/apache.version,#2) and length(last(/Apache by Zabbix agent active/apache.version))>0'
              name: 'Apache: Version has changed'
              event_name: 'Apache: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'Apache version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 93beadab3d194772ac1a6f1950b20cad
          name: 'Workers idle cleanup'
          type: DEPENDENT
          key: apache.workers.cleanup
          description: 'The number of workers in cleanup state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.cleanup
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 657a21b70a104778b32805226a05b27a
          name: 'Workers closing connection'
          type: DEPENDENT
          key: apache.workers.closing
          description: 'The number of workers in closing state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.closing
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 86afd9d804f146b1adeed8844223d38b
          name: 'Workers DNS lookup'
          type: DEPENDENT
          key: apache.workers.dnslookup
          description: 'The number of workers in `dnslookup` state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.dnslookup
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 70565d82384a439587ff6a32fa09ee1e
          name: 'Workers finishing'
          type: DEPENDENT
          key: apache.workers.finishing
          description: 'The number of workers in finishing state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.finishing
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 7a2c9e6039b942c09ff30d8ff77b9658
          name: 'Workers keepalive (read)'
          type: DEPENDENT
          key: apache.workers.keepalive
          description: 'The number of workers in `keepalive` state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.keepalive
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 0c3f9385fcc047d6ae8ee523f7bebb79
          name: 'Workers logging'
          type: DEPENDENT
          key: apache.workers.logging
          description: 'The number of workers in logging state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.logging
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 7a4580dcfd974c7f9d59b8703054e77f
          name: 'Workers reading request'
          type: DEPENDENT
          key: apache.workers.reading
          description: 'The number of workers in reading state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.reading
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 63d775979b934e72a2ed474419cf5c03
          name: 'Workers sending reply'
          type: DEPENDENT
          key: apache.workers.sending
          description: 'The number of workers in sending state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.sending
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 8acd6c143a074c6faa46aa64869afc9b
          name: 'Workers slot with no current process'
          type: DEPENDENT
          key: apache.workers.slot
          description: 'The number of slots with no current process.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.slot
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 86200cce3b7d47798cc35bab713f87aa
          name: 'Workers starting up'
          type: DEPENDENT
          key: apache.workers.starting
          description: 'The number of workers in starting state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.starting
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 64b26283b39946fe92d729ac00afeca0
          name: 'Workers waiting for connection'
          type: DEPENDENT
          key: apache.workers.waiting
          description: 'The number of workers in waiting state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.Workers.waiting
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 90757d625da543b18e136da7a0099be6
          name: 'Total workers busy'
          type: DEPENDENT
          key: apache.workers_total.busy
          description: 'The total number of busy worker threads/processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.BusyWorkers
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 87be88163d4940658400ddf762faaeb6
          name: 'Total workers idle'
          type: DEPENDENT
          key: apache.workers_total.idle
          description: 'The total number of idle worker threads/processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.IdleWorkers
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          tags:
            - tag: component
              value: system
        - uuid: 3ac09d338f0847288eda20732bf5aa10
          name: 'Service response time'
          type: ZABBIX_ACTIVE
          key: 'net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
          value_type: FLOAT
          units: s
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
        - uuid: e4252071d0864fd5bf7c60c4d6e4915d
          name: 'Service ping'
          type: ZABBIX_ACTIVE
          key: 'net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"]'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
        - uuid: 37f15f5a28364399aa66aad31d0acc08
          name: 'Get processes summary'
          type: ZABBIX_ACTIVE
          key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
          history: '0'
          value_type: TEXT
          description: 'The aggregated data of summary metrics for all processes.'
          tags:
            - tag: component
              value: raw
        - uuid: d103e519e5044dfd982d535a0981bc84
          name: 'Get status'
          type: ZABBIX_ACTIVE
          key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          history: 1h
          value_type: TEXT
          description: |
            Getting data from a machine-readable version of the Apache status page.
            For more information see Apache Module [mod_status](https://httpd.apache.org/docs/current/mod/mod_status.html).
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var lines = value.split('\n');
                  var output = {},
                  	workers = {
                  		'_': 0, 'S': 0, 'R': 0, 'W': 0,
                  		'K': 0, 'D': 0, 'C': 0, 'L': 0,
                  		'G': 0, 'I': 0, '.': 0
                  	};
                  
                  for (var i = 0; i < lines.length; i++) {
                  	var line = lines[i].match(/([A-z0-9 ]+): (.*)/);
                  
                  	if (line !== null) {
                  		output[line[1]] = isNaN(line[2]) ? line[2] : Number(line[2]);
                  	}
                  }
                  
                  output.ServerUptimeSeconds = output.ServerUptimeSeconds || output.Uptime;
                  output.ServerVersion = output.ServerVersion || output.Server;
                  
                  if (typeof output.Scoreboard === 'string') {
                  	for (var i = 0; i < output.Scoreboard.length; i++) {
                  		var char = output.Scoreboard[i];
                  
                  		workers[char]++;
                  	}
                  }
                  
                  output.Workers = {
                  	waiting: workers['_'], starting: workers['S'], reading: workers['R'],
                  	sending: workers['W'], keepalive: workers['K'], dnslookup: workers['D'],
                  	closing: workers['C'], logging: workers['L'], finishing: workers['G'],
                  	cleanup: workers['I'], slot: workers['.']
                  };
                  
                  return JSON.stringify(output);
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: 973011cd85cb4ef58d25bc5e0a1118b6
          name: 'Event MPM discovery'
          type: DEPENDENT
          key: apache.mpm.event.discovery
          description: |
            The discovery of additional metrics if the event Multi-Processing Module (MPM) is used.
            For more details see [Apache MPM event](https://httpd.apache.org/docs/current/mod/event.html).
          item_prototypes:
            - uuid: a640f7cba9314dd595d609ef79286548
              name: 'Bytes per request'
              type: DEPENDENT
              key: 'apache.bytes[per_request{#SINGLETON}]'
              value_type: FLOAT
              units: B
              description: 'The average number of client requests per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.BytesPerReq
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: 3f1daaa5642545f1bdd5ab9b50ec49c9
              name: 'Connections async closing'
              type: DEPENDENT
              key: 'apache.connections[async_closing{#SINGLETON}]'
              description: 'The number of asynchronous connections in closing state (applicable only to the event MPM).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConnsAsyncClosing
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: 0beb4c6e7915408691264f8aa8073d67
              name: 'Connections async keepalive'
              type: DEPENDENT
              key: 'apache.connections[async_keep_alive{#SINGLETON}]'
              description: 'The number of asynchronous connections in keepalive state (applicable only to the event MPM).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConnsAsyncKeepAlive
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: da590c6635484f178d4d26de5863f00e
              name: 'Connections async writing'
              type: DEPENDENT
              key: 'apache.connections[async_writing{#SINGLETON}]'
              description: 'The number of asynchronous connections in writing state (applicable only to the event MPM).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConnsAsyncWriting
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: c11f36a9483444e38cecb5e7ae667735
              name: 'Connections total'
              type: DEPENDENT
              key: 'apache.connections[total{#SINGLETON}]'
              description: 'The number of total connections.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConnsTotal
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: connection
            - uuid: ca00fe11b10140f6ad791c8fcc012082
              name: 'Number of async processes'
              type: DEPENDENT
              key: 'apache.process[num{#SINGLETON}]'
              description: 'The number of asynchronous processes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Processes
              master_item:
                key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
              tags:
                - tag: component
                  value: system
          graph_prototypes:
            - uuid: 43fb144dfa5b47afbdd146231e185c13
              name: 'Apache: Current async connections{#SINGLETON}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Apache by Zabbix agent active'
                    key: 'apache.connections[async_closing{#SINGLETON}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Apache by Zabbix agent active'
                    key: 'apache.connections[async_keep_alive{#SINGLETON}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Apache by Zabbix agent active'
                    key: 'apache.connections[async_writing{#SINGLETON}]'
                - sortorder: '3'
                  drawtype: BOLD_LINE
                  color: F7941D
                  item:
                    host: 'Apache by Zabbix agent active'
                    key: 'apache.connections[total{#SINGLETON}]'
            - uuid: 1ab50e84f1d94ea98bb7e5c9d0cf159c
              name: 'Apache: Current async processes{#SINGLETON}'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Apache by Zabbix agent active'
                    key: 'apache.process[num{#SINGLETON}]'
          master_item:
            key: 'web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  return JSON.stringify(JSON.parse(value).ServerMPM === 'event'
                  	? [{'{#SINGLETON}': ''}] : []);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 7c4b0d02427b4cf199817b5d5ae66378
          name: 'Apache process discovery'
          type: DEPENDENT
          key: apache.proc.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#APACHE.NAME}'
                value: '{$APACHE.PROCESS_NAME}'
          description: 'The discovery of the Apache process summary.'
          item_prototypes:
            - uuid: 68c53fcf8d8545ac98e923c04945aec4
              name: 'Get process data'
              type: DEPENDENT
              key: 'apache.proc.get[{#APACHE.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'The summary metrics aggregated by a process {#APACHE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@["name"]=="{#APACHE.NAME}")].first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: 'Failed to retrieve process {#APACHE.NAME} data'
              master_item:
                key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
              tags:
                - tag: component
                  value: raw
            - uuid: 5f29e764f0024047bd955388b6585442
              name: 'Number of running processes'
              type: DEPENDENT
              key: 'apache.proc.num[{#APACHE.NAME}]'
              description: 'The number of running processes {#APACHE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.processes
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'apache.proc.get[{#APACHE.NAME}]'
              tags:
                - tag: component
                  value: system
              trigger_prototypes:
                - uuid: 653a0f021ece4993aaaef441172366b3
                  expression: 'last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])=0'
                  name: 'Apache: Process is not running'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 77f232c075384a11a3aefd31a55c0113
              name: 'Memory usage, %'
              type: DEPENDENT
              key: 'apache.proc.pmem[{#APACHE.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of real memory used by a process {#APACHE.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pmem
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'apache.proc.get[{#APACHE.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: 0ded808ba0b34d03865a288dd9bb0672
              name: 'Memory usage (rss)'
              type: DEPENDENT
              key: 'apache.proc.rss[{#APACHE.NAME}]'
              units: B
              description: 'The summary of resident set size memory used by a process {#APACHE.NAME} expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rss
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'apache.proc.get[{#APACHE.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: ba4d0197f2cb484597175ffd8f693dce
              name: 'Memory usage (vsize)'
              type: DEPENDENT
              key: 'apache.proc.vmem[{#APACHE.NAME}]'
              units: B
              description: 'The summary of virtual memory used by a process {#APACHE.NAME} expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.vsize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'apache.proc.get[{#APACHE.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: b1e48077179f4e439e2d3c3b918c9a03
              name: 'CPU utilization'
              type: ZABBIX_ACTIVE
              key: 'proc.cpu.util[{#APACHE.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of the CPU utilization by a process {#APACHE.NAME}.'
              tags:
                - tag: component
                  value: cpu
          trigger_prototypes:
            - uuid: c848c1449cef42bd90af13e6767bd2c9
              expression: 'nodata(/Apache by Zabbix agent active/web.page.get["{$APACHE.STATUS.SCHEME}://{$APACHE.STATUS.HOST}:{$APACHE.STATUS.PORT}/{$APACHE.STATUS.PATH}"],30m)=1 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
              name: 'Apache: Failed to fetch status page'
              event_name: 'Apache: Failed to fetch status page (or no data for 30m)'
              priority: WARNING
              description: 'Zabbix has not received any data for items for the last 30 minutes.'
              manual_close: 'YES'
              dependencies:
                - name: 'Apache: Service is down'
                  expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
              tags:
                - tag: scope
                  value: availability
            - uuid: 4b460b835cb14513b5aace3275827c79
              expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
              name: 'Apache: Service is down'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
            - uuid: 93157365ee90446fa8191dfc5d623874
              expression: 'min(/Apache by Zabbix agent active/net.tcp.service.perf[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"],5m)>{$APACHE.RESPONSE_TIME.MAX.WARN} and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
              name: 'Apache: Service response time is too high'
              event_name: 'Apache: Service response time is too high (over {$APACHE.RESPONSE_TIME.MAX.WARN}s for 5m)'
              priority: WARNING
              manual_close: 'YES'
              dependencies:
                - name: 'Apache: Service is down'
                  expression: 'last(/Apache by Zabbix agent active/net.tcp.service[http,"{$APACHE.STATUS.HOST}","{$APACHE.STATUS.PORT}"])=0 and last(/Apache by Zabbix agent active/apache.proc.num[{#APACHE.NAME}])>0'
              tags:
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: 5427aef4eaad4519b193b38cdc71fde1
              name: 'Apache: Memory usage[{#APACHE.NAME}]'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  item:
                    host: 'Apache by Zabbix agent active'
                    key: 'apache.proc.vmem[{#APACHE.NAME}]'
                - sortorder: '1'
                  drawtype: BOLD_LINE
                  color: F63100
                  item:
                    host: 'Apache by Zabbix agent active'
                    key: 'apache.proc.rss[{#APACHE.NAME}]'
          master_item:
            key: 'proc.get[{$APACHE.PROCESS.NAME.PARAMETER},,,summary]'
          lld_macro_paths:
            - lld_macro: '{#APACHE.NAME}'
              path: $.name
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: webserver
        - tag: target
          value: apache
      macros:
        - macro: '{$APACHE.PROCESS.NAME.PARAMETER}'
          description: 'The process name of the Apache web server used in the item key `proc.get`. It could be specified if the correct process name is known.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Apache process name'
            description: 'Process name of the Apache web server Used in the item key `proc.get`.'
        - macro: '{$APACHE.PROCESS_NAME}'
          value: (httpd|apache2)
          description: 'The process name filter for the Apache process discovery.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Apache process name LLD filter'
            description: 'Process name filter for the Apache process discovery.'
        - macro: '{$APACHE.RESPONSE_TIME.MAX.WARN}'
          value: '10'
          description: 'The maximum Apache response time expressed in seconds for a trigger expression.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'Maximum Apache response time'
            description: 'Maximum Apache response time expressed in seconds for a trigger expression. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$APACHE.STATUS.HOST}'
          value: 127.0.0.1
          description: 'The hostname or IP address of the Apache status page.'
          config:
            type: TEXT
            priority: '1'
            label: 'Apache status host'
            description: 'Hostname or IP address of the Apache status page host.'
            required: 'YES'
        - macro: '{$APACHE.STATUS.PATH}'
          value: 'server-status?auto'
          description: 'The URL path of the Apache status page.'
          config:
            type: TEXT
            priority: '3'
            label: 'Apache status page path'
            description: 'URL path of the Apache status page.'
            required: 'YES'
        - macro: '{$APACHE.STATUS.PORT}'
          value: '80'
          description: 'The port of the Apache status page.'
          config:
            type: TEXT
            priority: '2'
            label: 'Apache status page port'
            description: 'In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$APACHE.STATUS.SCHEME}'
          value: http
          description: 'The request scheme, which may be either HTTP or HTTPS.'
          config:
            type: LIST
            priority: '4'
            label: 'Request scheme'
            description: 'Request scheme, which may be either HTTP or HTTPS.'
            options:
              - value: http
                text: HTTP
              - value: https
                text: HTTPS
      dashboards:
        - uuid: dd69695bb88241e6b457d06da37967fc
          name: 'Apache performance'
          pages:
            - name: General
              widgets:
                - type: graph
                  width: '72'
                  height: '7'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent active'
                        name: 'Apache: Worker states'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '7'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent active'
                        name: 'Apache: Requests per second'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graphprototype
                  'y': '12'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent active'
                        name: 'Apache: Current async connections{#SINGLETON}'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '7'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent active'
                        name: 'Apache: Workers total'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graphprototype
                  x: '36'
                  'y': '12'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Apache by Zabbix agent active'
                        name: 'Apache: Current async processes{#SINGLETON}'
                    - type: STRING
                      name: reference
                      value: AAAAE
      valuemaps:
        - uuid: 872ac3dadab34de9a69acd71d68cd7ea
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 3cc8c9ae7055458c9a803597007f70bd
      template: 'Apache Tomcat by JMX'
      name: 'Apache Tomcat by 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
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        Metrics are collected by JMX.
        
        1. Enable and configure JMX access to Apache Tomcat.
         See documentation for [instructions](https://tomcat.apache.org/tomcat-10.0-doc/monitoring.html#Enabling_JMX_Remote) (chose your version).
        2. If your Tomcat installation require authentication for JMX, set values in host wizard configuration fields `Username` and `Password`.
        3. You can set custom macro values and add macros with context for specific metrics following macro description.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 7f6ec0e48d41456896799f487cd8243e
          name: Version
          type: JMX
          key: 'jmx["Catalina:type=Server",serverInfo]'
          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: component
              value: system
          triggers:
            - uuid: 152d235652914aa2af78334385334214
              expression: 'last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#1)<>last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo],#2) and length(last(/Apache Tomcat by JMX/jmx["Catalina:type=Server",serverInfo]))>0'
              name: 'Apache Tomcat: Version has been changed'
              event_name: 'Apache Tomcat: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The Tomcat version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: a478be537e5f48fe95310997d0df0eda
          name: 'Protocol handlers discovery'
          type: JMX
          key: 'jmx.discovery[attributes,"Catalina:type=ProtocolHandler,port=*"]'
          delay: 1h
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JMXATTR}'
                value: ^name$
          description: 'Discovery for ProtocolHandler'
          item_prototypes:
            - uuid: 830f58f8ad6640d989a70c01f7aa2ad8
              name: '{#JMXVALUE}: Gzip compression status'
              type: JMX
              key: 'jmx[{#JMXOBJ},compression]'
              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: component
                  value: protocol-handler
                - tag: protocol-handler
                  value: '{#JMXVALUE}'
              trigger_prototypes:
                - uuid: 7d707de73a164f1db6b69e4dcb8c6ae9
                  expression: 'find(/Apache Tomcat by JMX/jmx[{#JMXOBJ},compression],,"like","off") = 1'
                  name: 'Apache Tomcat: {#JMXVALUE}: Gzip compression is disabled'
                  priority: INFO
                  description: 'gzip compression is disabled for connector {#JMXVALUE}.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        - uuid: 77175f79fe844bb8bca66de437a3ba32
          name: 'Global request processors discovery'
          type: JMX
          key: 'jmx.discovery[beans,"Catalina:type=GlobalRequestProcessor,name=*"]'
          delay: 1h
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JMXNAME}'
                value: '{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES}'
              - macro: '{#JMXNAME}'
                value: '{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for GlobalRequestProcessor'
          item_prototypes:
            - uuid: d7cb07f3f5e04792850332c416284dd9
              name: '{#JMXNAME}: Bytes received per second'
              type: JMX
              key: 'jmx[{#JMXOBJ},bytesReceived]'
              units: B
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Bytes received rate by processor {#JMXNAME}'
              preprocessing:
                - type: CHANGE_PER_SECOND
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: request
                - tag: jmx-name
                  value: '{#JMXNAME}'
                - tag: jmx-type
                  value: '{#JMXTYPE}'
            - uuid: abad7332ed6b417c92f6038ce12ae000
              name: '{#JMXNAME}: Bytes sent per second'
              type: JMX
              key: 'jmx[{#JMXOBJ},bytesSent]'
              units: B
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Bytes sent rate by processor {#JMXNAME}'
              preprocessing:
                - type: CHANGE_PER_SECOND
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: request
                - tag: jmx-name
                  value: '{#JMXNAME}'
                - tag: jmx-type
                  value: '{#JMXTYPE}'
            - uuid: 1596a335401d47d6b2bde7a5b0de7b07
              name: '{#JMXNAME}: Errors per second'
              type: JMX
              key: 'jmx[{#JMXOBJ},errorCount]'
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Error rate of request processor {#JMXNAME}'
              preprocessing:
                - type: CHANGE_PER_SECOND
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: request
                - tag: jmx-name
                  value: '{#JMXNAME}'
                - tag: jmx-type
                  value: '{#JMXTYPE}'
            - uuid: 985d3eeacd9d404385bfcef693add39a
              name: '{#JMXNAME}: Requests processing time'
              type: JMX
              key: 'jmx[{#JMXOBJ},processingTime]'
              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: component
                  value: request
                - tag: jmx-name
                  value: '{#JMXNAME}'
                - tag: jmx-type
                  value: '{#JMXTYPE}'
            - uuid: 8e0307b5063549dab118e0e374a62aad
              name: '{#JMXNAME}: Requests per second'
              type: JMX
              key: 'jmx[{#JMXOBJ},requestCount]'
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Rate of requests served by request processor {#JMXNAME}'
              preprocessing:
                - type: CHANGE_PER_SECOND
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: request
                - tag: jmx-name
                  value: '{#JMXNAME}'
                - tag: jmx-type
                  value: '{#JMXTYPE}'
          graph_prototypes:
            - uuid: 87de97d55baa4be1964652957a051fc2
              name: '{#JMXNAME}: Traffic'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},bytesSent]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},bytesReceived]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        - uuid: cf1badf064714d9b9e3b7110696432f9
          name: 'Contexts discovery'
          type: JMX
          key: 'jmx.discovery[beans,"Catalina:type=Manager,host=*,context=*"]'
          delay: 1h
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JMXHOST}'
                value: '{$TOMCAT.LLD.FILTER.MANAGER.MATCHES}'
              - macro: '{#JMXHOST}'
                value: '{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for contexts'
          item_prototypes:
            - uuid: c20bb67db247471ba686d2ea371b7c73
              name: '{#JMXHOST}{#JMXCONTEXT}: Sessions active'
              type: JMX
              key: 'jmx[{#JMXOBJ},activeSessions]'
              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: component
                  value: context
                - tag: jmx-context
                  value: '{#JMXCONTEXT}'
                - tag: jmx-host
                  value: '{#JMXHOST}'
            - uuid: bc3c2a3cff614f3eaf001463df1b2364
              name: '{#JMXHOST}{#JMXCONTEXT}: Sessions allowed maximum'
              type: JMX
              key: 'jmx[{#JMXOBJ},maxActiveSessions]'
              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: component
                  value: context
                - tag: jmx-context
                  value: '{#JMXCONTEXT}'
                - tag: jmx-host
                  value: '{#JMXHOST}'
            - uuid: fd8678e68cf440939af2dd8f3568a42f
              name: '{#JMXHOST}{#JMXCONTEXT}: Sessions active maximum so far'
              type: JMX
              key: 'jmx[{#JMXOBJ},maxActive]'
              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: component
                  value: context
                - tag: jmx-context
                  value: '{#JMXCONTEXT}'
                - tag: jmx-host
                  value: '{#JMXHOST}'
            - uuid: 34702e2d6b2142ec9aa43bea1059a98a
              name: '{#JMXHOST}{#JMXCONTEXT}: Sessions rejected per second'
              type: JMX
              key: 'jmx[{#JMXOBJ},rejectedSessions]'
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Rate of sessions we rejected due to maxActive being reached.'
              preprocessing:
                - type: CHANGE_PER_SECOND
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: context
                - tag: jmx-context
                  value: '{#JMXCONTEXT}'
                - tag: jmx-host
                  value: '{#JMXHOST}'
            - uuid: eb28f9bd99d440f4a50d1c24ae758029
              name: '{#JMXHOST}{#JMXCONTEXT}: Sessions created per second'
              type: JMX
              key: 'jmx[{#JMXOBJ},sessionCounter]'
              username: '{$TOMCAT.USER}'
              password: '{$TOMCAT.PASSWORD}'
              description: 'Rate of sessions created by this application per second.'
              preprocessing:
                - type: CHANGE_PER_SECOND
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: context
                - tag: jmx-context
                  value: '{#JMXCONTEXT}'
                - tag: jmx-host
                  value: '{#JMXHOST}'
          graph_prototypes:
            - uuid: dfd46f5443f9438fb21ae23dfd4010c0
              name: '{#JMXHOST}{#JMXCONTEXT}: Sessions'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},maxActive]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},activeSessions]'
                - sortorder: '2'
                  drawtype: GRADIENT_LINE
                  color: 00611C
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},rejectedSessions]'
                - sortorder: '3'
                  drawtype: GRADIENT_LINE
                  color: F7941D
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},maxActiveSessions]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        - uuid: 05752834671f416fb2fdac1006308c3e
          name: 'Thread pools discovery'
          type: JMX
          key: 'jmx.discovery[beans,"Catalina:type=ThreadPool,name=*"]'
          delay: 1h
          username: '{$TOMCAT.USER}'
          password: '{$TOMCAT.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JMXNAME}'
                value: '{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES}'
              - macro: '{#JMXNAME}'
                value: '{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery for ThreadPool'
          item_prototypes:
            - uuid: 7d7418c72ced48eca2a92e30021b611b
              name: '{#JMXNAME}: Threads count'
              type: JMX
              key: 'jmx[{#JMXOBJ},currentThreadCount]'
              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: component
                  value: thread-pool
                - tag: jmx-name
                  value: '{#JMXNAME}'
                - tag: jmx-type
                  value: '{#JMXTYPE}'
            - uuid: 35b1e99fbc44448083b5aad0ce1239a1
              name: '{#JMXNAME}: Threads busy'
              type: JMX
              key: 'jmx[{#JMXOBJ},currentThreadsBusy]'
              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: component
                  value: thread-pool
                - tag: jmx-name
                  value: '{#JMXNAME}'
                - tag: jmx-type
                  value: '{#JMXTYPE}'
            - uuid: 32e316ce567c4f94aecb89d9763e4d27
              name: '{#JMXNAME}: Threads limit'
              type: JMX
              key: 'jmx[{#JMXOBJ},maxThreads]'
              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: component
                  value: thread-pool
                - tag: jmx-name
                  value: '{#JMXNAME}'
                - tag: jmx-type
                  value: '{#JMXTYPE}'
          trigger_prototypes:
            - uuid: 7a15296553a447f6aebf4958631b6704
              expression: 'min(/Apache Tomcat by JMX/jmx[{#JMXOBJ},currentThreadsBusy],{$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"})>last(/Apache Tomcat by JMX/jmx[{#JMXOBJ},maxThreads])*{$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}/100'
              name: 'Apache Tomcat: {#JMXNAME}: Busy worker threads count is high'
              event_name: 'Apache Tomcat: {#JMXNAME}: Busy worker threads count are more than {$TOMCAT.THREADS.MAX.PCT:"{#JMXNAME}"}% of the limit for {$TOMCAT.THREADS.MAX.TIME:"{#JMXNAME}"}'
              priority: HIGH
              description: 'When current threads busy counter reaches the limit, no more requests could be handled, and the application chokes.'
              tags:
                - tag: scope
                  value: notice
          graph_prototypes:
            - uuid: d8236335204a42488c6221c8b2d31e77
              name: '{#JMXNAME}: Worker threads'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},maxThreads]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},currentThreadCount]'
                - sortorder: '2'
                  drawtype: GRADIENT_LINE
                  color: 00611C
                  item:
                    host: 'Apache Tomcat by JMX'
                    key: 'jmx[{#JMXOBJ},currentThreadsBusy]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: containers
        - tag: subclass
          value: development
        - tag: target
          value: tomcat
      macros:
        - macro: '{$TOMCAT.LLD.FILTER.MANAGER.MATCHES}'
          value: '.*'
          description: 'Filter for discoverable managers.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Managers filter (include)'
            description: 'Filter for discoverable managers.'
        - macro: '{$TOMCAT.LLD.FILTER.MANAGER.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude managers.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Managers filter (exclude)'
            description: 'Filter to exclude managers.'
        - macro: '{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.MATCHES}'
          value: '.*'
          description: 'Filter for discoverable global request processors.'
          config:
            type: TEXT
            priority: '3'
            section_name: Filters
            label: 'Global request processors filter (include)'
            description: 'Filter for discoverable global request processors.'
        - macro: '{$TOMCAT.LLD.FILTER.REQUEST_PROCESSOR.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude global request processors.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Global request processors filter (exclude)'
            description: 'Filter to exclude global request processors.'
        - macro: '{$TOMCAT.LLD.FILTER.THREAD_POOL.MATCHES}'
          value: '.*'
          description: 'Filter for discoverable thread pools.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Thread pools filter (include)'
            description: 'Filter for discoverable thread pools.'
        - macro: '{$TOMCAT.LLD.FILTER.THREAD_POOL.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude thread pools.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Thread pools filter (exclude)'
            description: 'Filter to exclude thread pools.'
        - macro: '{$TOMCAT.PASSWORD}'
          description: 'Password for JMX'
          config:
            type: TEXT
            priority: '2'
            label: Password
            description: 'Password for JMX'
            required: 'YES'
        - macro: '{$TOMCAT.THREADS.MAX.PCT}'
          value: '75'
          description: 'Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Busy worker threads threshold'
            description: 'Threshold for busy worker threads trigger. Can be used with {#JMXNAME} as context.'
        - macro: '{$TOMCAT.THREADS.MAX.TIME}'
          value: 5m
          description: 'The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Busy threads duration above threshold'
            description: 'The time during which the number of busy threads can exceed the threshold. Can be used with {#JMXNAME} as context.'
        - macro: '{$TOMCAT.USER}'
          description: 'User for JMX'
          config:
            type: TEXT
            priority: '1'
            label: Username
            description: 'User for JMX'
            required: 'YES'
      dashboards:
        - uuid: 330fa4902aed4d45b8747ddb2c8c7d70
          name: 'Tomcat: Overview'
          pages:
            - name: General
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '15'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Apache Tomcat by JMX'
                        name: '{#JMXHOST}{#JMXCONTEXT}: Sessions'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '3'
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '15'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Apache Tomcat by JMX'
                        name: '{#JMXNAME}: Worker threads'
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: rows
                      value: '3'
    - uuid: a3dc630729e443139f4e608954fa6e19
      template: 'FreeBSD by Zabbix agent'
      name: 'FreeBSD by Zabbix agent'
      description: |
        This is an official FreeBSD template. It requires Zabbix agent 8.0 or newer.
        
        Notes on filesystem (FS) discovery:
          - The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
          - BTRFS allocates a default of 10% of the volume for its own needs.
          - To mitigate potential disasters, FS usage triggers are based on the maximum available space.
            - Utilization formula: 'pused = 100 - 100 * (available / total - free + available)'
          - The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This is an official FreeBSD template. It requires Zabbix agent 8.0 or newer.
        
        #### Notes on filesystem (FS) discovery:
        - The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
        - BTRFS allocates a default of 10% of the volume for its own needs.
        - To mitigate potential disasters, FS usage triggers are based on the maximum available space.
          - Utilization formula: `pused = 100 - 100 * (available / total - free + available)`
        - The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.
        
        
        ## Setup
        
        Install Zabbix agent on FreeBSD according to Zabbix documentation.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: 'Templates/Operating systems'
      items:
        - uuid: 74bc1a15ef314d5f9b26332531885c0d
          name: 'Host name of Zabbix agent running'
          key: agent.hostname
          delay: 1h
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: da59d099f7614653b37b8eaaa518ebd2
          name: 'Zabbix agent ping'
          key: agent.ping
          description: 'The agent always returns "1" for this item. May be used in combination with `nodata()` for the availability check.'
          valuemap:
            name: 'Zabbix agent ping status'
          tags:
            - tag: component
              value: system
        - uuid: e2b84269401e41acb973bc29666b9e7a
          name: 'Version of Zabbix agent running'
          key: agent.version
          delay: 1h
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: application
        - uuid: d1b2d3cc2b7e44af8f9bfee11e04bf21
          name: 'Maximum number of opened files'
          key: kernel.maxfiles
          delay: 1h
          description: 'May be increased by using the `sysctl` utility or modifying the file `/etc/sysctl.conf`.'
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: 00f035b7890d4227a84a942ba5730df3
              expression: 'last(/FreeBSD by Zabbix agent/kernel.maxfiles)<1024'
              name: 'FreeBSD: Configured max number of opened files is too low on {HOST.NAME}'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
                - tag: scope
                  value: performance
        - uuid: 58244a8e72694ffcbba5a78a910ae818
          name: 'Maximum number of processes'
          key: kernel.maxproc
          delay: 1h
          description: 'May be increased by using the `sysctl` utility or modifying the file `/etc/sysctl.conf`.'
          tags:
            - tag: component
              value: os
            - tag: component
              value: processes
          triggers:
            - uuid: 0d2417112c1e4ef38a4b763872cbb18b
              expression: 'last(/FreeBSD by Zabbix agent/kernel.maxproc)<256'
              name: 'FreeBSD: Configured max number of processes is too low on {HOST.NAME}'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
                - tag: scope
                  value: performance
        - uuid: 448c6de07b244281a4b1defe2e811773
          name: 'Number of running processes'
          key: 'proc.num[,,run]'
          description: 'Number of processes in a running state.'
          tags:
            - tag: component
              value: os
            - tag: component
              value: processes
          triggers:
            - uuid: 837fdc71174246d987a6f7f277d65f6c
              expression: 'avg(/FreeBSD by Zabbix agent/proc.num[,,run],5m)>30'
              name: 'FreeBSD: Too many processes running on {HOST.NAME}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
                - tag: scope
                  value: performance
        - uuid: 5fd5b351d8214eac8f4f4649594c27eb
          name: 'Number of processes'
          key: 'proc.num[]'
          description: 'Total number of processes in any state.'
          tags:
            - tag: component
              value: os
            - tag: component
              value: processes
          triggers:
            - uuid: 0d5ac85120734fa98d3eef01b6f4033b
              expression: 'avg(/FreeBSD by Zabbix agent/proc.num[],5m)>300'
              name: 'FreeBSD: Too many processes on {HOST.NAME}'
              priority: WARNING
              tags:
                - tag: scope
                  value: notice
                - tag: scope
                  value: performance
        - uuid: 4a533b30c43e42fb8c9eabada0817186
          name: 'Host boot time'
          key: system.boottime
          delay: 10m
          units: unixtime
          tags:
            - tag: component
              value: os
        - uuid: db555e8318cf4e7aa7beb85aa0250697
          name: 'Interrupts per second'
          key: system.cpu.intr
          units: ips
          description: 'Number of interrupts processed.'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: cpu
        - uuid: 2336b2ec03a846f3bed1e64384b2532e
          name: 'Processor load (1 min average per core)'
          key: 'system.cpu.load[percpu,avg1]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 8c339065ecc54b7d8c2e4405f2149f27
              expression: 'avg(/FreeBSD by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5'
              name: 'FreeBSD: Processor load is too high on {HOST.NAME}'
              priority: WARNING
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: de68f40fc96648c0925c1f6a4ca6776e
          name: 'Processor load (5 min average per core)'
          key: 'system.cpu.load[percpu,avg5]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
        - uuid: ad9ebf859f7346ca885c1edcb7333d78
          name: 'Processor load (15 min average per core)'
          key: 'system.cpu.load[percpu,avg15]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
        - uuid: 0a140185a5114dd29451bfac68abdde5
          name: 'Context switches per second'
          key: system.cpu.switches
          units: sps
          description: 'The combined rate at which all processors on the computer are switched from one thread to another.'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: cpu
        - uuid: 7612803821c845889bda84b7f1ac9ae5
          name: 'CPU idle time'
          key: 'system.cpu.util[,idle]'
          value_type: FLOAT
          units: '%'
          description: 'Time the CPU has spent doing nothing.'
          tags:
            - tag: component
              value: cpu
        - uuid: f2acc3cd432546e5a223095a0ea2f096
          name: 'CPU interrupt time'
          key: 'system.cpu.util[,interrupt]'
          value_type: FLOAT
          units: '%'
          description: 'Time the CPU has spent servicing hardware interrupts.'
          tags:
            - tag: component
              value: cpu
        - uuid: efa92492bec0437ba74f47d694500cab
          name: 'CPU nice time'
          key: 'system.cpu.util[,nice]'
          value_type: FLOAT
          units: '%'
          description: 'Time the CPU has spent running users'' processes that have been niced.'
          tags:
            - tag: component
              value: cpu
        - uuid: c9479b02b04141128b1ce7c8f3726c09
          name: 'CPU system time'
          key: 'system.cpu.util[,system]'
          value_type: FLOAT
          units: '%'
          description: 'Time the CPU has spent running the kernel and its processes.'
          tags:
            - tag: component
              value: cpu
        - uuid: 1f3bc82009e04b59845a0e15004637ad
          name: 'CPU user time'
          key: 'system.cpu.util[,user]'
          value_type: FLOAT
          units: '%'
          description: 'Time the CPU has spent running users'' processes that are not niced.'
          tags:
            - tag: component
              value: cpu
        - uuid: c17d001bd20a4732b8ef487366c6aa42
          name: 'Host name'
          key: system.hostname
          delay: 1h
          value_type: CHAR
          description: 'The host name of the system.'
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: f48fb8ce1229492dae62de362c8c9539
              expression: 'last(/FreeBSD by Zabbix agent/system.hostname,#1)<>last(/FreeBSD by Zabbix agent/system.hostname,#2)'
              name: 'FreeBSD: Hostname was changed on {HOST.NAME}'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: 4095ed7d606a47439294097a98af2c4f
          name: 'Host local time'
          key: system.localtime
          units: unixtime
          description: 'The local system time of the host.'
          tags:
            - tag: component
              value: os
        - uuid: 63fc1259011f4250901889979cdf472c
          name: 'Free swap space'
          key: 'system.swap.size[,free]'
          units: B
          description: 'The free space of the swap volume/file expressed in bytes.'
          tags:
            - tag: component
              value: memory
        - uuid: 187d11e610b94b468d18b88ca38f2c32
          name: 'Free swap space in %'
          key: 'system.swap.size[,pfree]'
          value_type: FLOAT
          units: '%'
          description: 'The free space of the swap volume/file expressed in %.'
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: a125b6786d55426eb19afe284cee1f76
              expression: 'last(/FreeBSD by Zabbix agent/system.swap.size[,pfree])<50'
              name: 'FreeBSD: Lack of free swap space on {HOST.NAME}'
              priority: WARNING
              description: 'The system might need more physical memory.'
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: 9647b0b857074c4b9c14f15bb04af096
          name: 'Total swap space'
          key: 'system.swap.size[,total]'
          delay: 1h
          units: B
          description: 'Total space of the swap volume/file expressed in bytes.'
          tags:
            - tag: component
              value: memory
        - uuid: 4523ae069e0b4e16bcb5182c6dbf63f2
          name: 'System information'
          key: system.uname
          delay: 1h
          value_type: CHAR
          description: 'Information as normally returned by `uname -a`.'
          inventory_link: OS
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: ea2f9c186798420da781bd835fa0eaed
              expression: 'last(/FreeBSD by Zabbix agent/system.uname,#1)<>last(/FreeBSD by Zabbix agent/system.uname,#2)'
              name: 'FreeBSD: Host information was changed on {HOST.NAME}'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: a49b956d592c4e2ba41caac3671e009f
          name: 'System uptime'
          key: system.uptime
          delay: 10m
          units: uptime
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: 809e57eb897b43fb8538e76ec7dd6602
              expression: 'change(/FreeBSD by Zabbix agent/system.uptime)<0'
              name: 'FreeBSD: {HOST.NAME} has just been restarted'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: fec3e877764e4bfd98e77da9d8c73606
          name: 'Number of logged in users'
          key: system.users.num
          description: 'The number of users who are currently logged in.'
          tags:
            - tag: component
              value: os
        - uuid: 2bb327cd5f8c49d9b680142825b9c030
          name: 'Checksum of /etc/passwd'
          key: 'vfs.file.cksum[/etc/passwd,sha256]'
          delay: 15m
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: security
          triggers:
            - uuid: 27b4e5de411949a4befa7171a2af6441
              expression: 'last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/FreeBSD by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2)'
              name: 'FreeBSD: /etc/passwd has been changed on {HOST.NAME}'
              priority: WARNING
              tags:
                - tag: scope
                  value: security
        - uuid: 9695b40b38f74bb3bb5d127af1ba13ce
          name: 'Get filesystems'
          key: vfs.fs.get
          history: '0'
          value_type: TEXT
          description: 'The `vfs.fs.get` key acquires raw information set about the filesystems. Later to be extracted by preprocessing in dependent items.'
          tags:
            - tag: component
              value: raw
        - uuid: 561c7a383b944bca9ec5f7c44e322fed
          name: 'Available memory'
          key: 'vm.memory.size[available]'
          units: B
          description: 'Defined as free + cached + buffers.'
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: f8fcce1904ab46088fa80433b85f2e83
              expression: 'last(/FreeBSD by Zabbix agent/vm.memory.size[available])<20M'
              name: 'FreeBSD: Lack of available memory on server {HOST.NAME}'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: ffa54e82b7914672a3f7134134ac2638
          name: 'Total memory'
          key: 'vm.memory.size[total]'
          delay: 1h
          units: B
          description: 'Total memory expressed in bytes.'
          tags:
            - tag: component
              value: memory
        - uuid: cbfaa94dc7bc4606a792aaf357054075
          name: 'Zabbix agent availability'
          type: INTERNAL
          key: 'zabbix[host,agent,available]'
          description: 'Used for monitoring the availability status of the agent.'
          valuemap:
            name: zabbix.host.available
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: fd9d36aaedff45f59017b1e714a5db69
              expression: 'max(/FreeBSD by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0'
              name: 'FreeBSD: Zabbix agent is not available'
              event_name: 'FreeBSD: Zabbix agent is not available (for {$AGENT.TIMEOUT})'
              priority: AVERAGE
              description: 'For passive checks only. The availability of the agent(s) and a host is used with `{$AGENT.TIMEOUT}` as the time threshold.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: cac3466488a544198f766d1152878456
          name: 'Network interface discovery'
          key: net.if.discovery
          delay: 1h
          filter:
            conditions:
              - macro: '{#IFNAME}'
                value: '@Network interfaces for discovery'
          description: 'Used for the discovery of network interfaces.'
          item_prototypes:
            - uuid: b1f9e472c6ed467d8cb0cc1739c39b59
              name: 'Interface {#IFNAME}: Incoming network traffic'
              key: 'net.if.in[{#IFNAME}]'
              units: bps
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: ac93068d05084aa0a32a1bee78df3bd8
              name: 'Interface {#IFNAME}: Outgoing network traffic'
              key: 'net.if.out[{#IFNAME}]'
              units: bps
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
          graph_prototypes:
            - uuid: 1f52d0c9ee934eb3a5198ab53fdf4679
              name: 'Interface {#IFNAME}: Network traffic'
              ymin_type_1: FIXED
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 00AA00
                  item:
                    host: 'FreeBSD by Zabbix agent'
                    key: 'net.if.in[{#IFNAME}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 3333FF
                  item:
                    host: 'FreeBSD by Zabbix agent'
                    key: 'net.if.out[{#IFNAME}]'
        - uuid: 4fd60a606c6343e9a7d7808d1d1f6008
          name: 'Mounted filesystem discovery'
          type: DEPENDENT
          key: vfs.fs.dependent.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#FSNAME}'
                value: '{$VFS.FS.FSNAME.MATCHES}'
              - macro: '{#FSNAME}'
                value: '{$VFS.FS.FSNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#FSTYPE}'
                value: '{$VFS.FS.FSTYPE.MATCHES}'
              - macro: '{#FSTYPE}'
                value: '{$VFS.FS.FSTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'The discovery of mounted filesystems with different types.'
          item_prototypes:
            - uuid: a5cdfe771122483fa1a88b2ea5c26b36
              name: 'FS [{#FSNAME}]: Inodes: Free, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.inode[{#FSNAME},pfree]'
              value_type: FLOAT
              units: '%'
              description: 'Free metadata space expressed in %.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.inodes.pfree
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
              trigger_prototypes:
                - uuid: b9f632d35efd4958bd665ac0764c6da4
                  expression: 'min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}'
                  name: 'FreeBSD: FS [{#FSNAME}]: Running out of free inodes'
                  event_name: 'FreeBSD: {#FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}%)'
                  opdata: 'Free inodes: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Disk writing may fail if index nodes are exhausted, leading to error messages like "No space left on device" or "Disk is full", despite available free space.'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
                - uuid: 2b87c38f49b146f1b801319d03a19dc3
                  expression: 'min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}'
                  name: 'FreeBSD: FS [{#FSNAME}]: Running out of free inodes'
                  event_name: 'FreeBSD: FS [{#FSNAME}]: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}%)'
                  opdata: 'Free inodes: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Disk writing may fail if index nodes are exhausted, leading to error messages like "No space left on device" or "Disk is full", despite available free space.'
                  dependencies:
                    - name: 'FreeBSD: FS [{#FSNAME}]: Running out of free inodes'
                      expression: 'min(/FreeBSD by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
            - uuid: 2ed6230d292a4037b67fe549c719e7ee
              name: 'FS [{#FSNAME}]: Space: Available'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},free]'
              units: B
              description: 'Available storage space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.free
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: aa0dd0eb957a4485b1a62f715381019a
              name: 'FS [{#FSNAME}]: Space: Available, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},pfree]'
              value_type: FLOAT
              units: '%'
              description: |
                Deprecated metric.
                Space availability expressed as a percentage, calculated using the current and maximum available spaces.
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.pfree
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: deprecated
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 5db5afc2278744efadcf71d8531e40fa
              name: 'FS [{#FSNAME}]: Space: Used, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},pused]'
              value_type: FLOAT
              units: '%'
              description: 'Calculated as the percentage of currently used space compared to the maximum available space.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.pused
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
              trigger_prototypes:
                - uuid: a14b0a2369404525aa1e079a16a222f1
                  expression: 'min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
                  name: 'FreeBSD: FS [{#FSNAME}]: Space is critically low'
                  event_name: 'FreeBSD: FS [{#FSNAME}]: Space is critically low (used > {$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%, total {{?last(//vfs.fs.dependent.size[{#FSNAME},total])/1024/1024/1024}.fmtnum(1)}GB)'
                  opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
                  priority: AVERAGE
                  description: |
                    The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%` limit.
                    The trigger expression is based on the current used and maximum available spaces.
                    Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: capacity
                - uuid: 01ea8e7f30564586af3b48adb3c930c1
                  expression: 'min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}'
                  name: 'FreeBSD: FS [{#FSNAME}]: Space is low'
                  event_name: 'FreeBSD: FS [{#FSNAME}]: Space is low (used > {$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%, total {{?last(//vfs.fs.dependent.size[{#FSNAME},total])/1024/1024/1024}.fmtnum(1)}GB)'
                  opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
                  priority: WARNING
                  description: |
                    The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%` limit.
                    The trigger expression is based on the current used and maximum available spaces.
                    Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
                  manual_close: 'YES'
                  dependencies:
                    - name: 'FreeBSD: FS [{#FSNAME}]: Space is critically low'
                      expression: 'min(/FreeBSD by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: capacity
            - uuid: 6daede58ae8f4e42a4aa2539a552ab08
              name: 'FS [{#FSNAME}]: Space: Total'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},total]'
              units: B
              description: 'Total space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.total
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 6efb08c26e1b439181a17d462ec1dab8
              name: 'FS [{#FSNAME}]: Space: Used'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},used]'
              units: B
              description: 'Used storage expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.used
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 94deedece667494398cbc537314911dd
              name: 'FS [{#FSNAME}]: Get data'
              type: DEPENDENT
              key: 'vfs.fs.dependent[{#FSNAME},data]'
              history: 1h
              value_type: TEXT
              description: 'Intermediate data of `{#FSNAME}` filesystem.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.fsname==''{#FSNAME}'')].first()'
              master_item:
                key: vfs.fs.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 5e2e9d6a08e34a37832bced869a75b1e
              name: 'FS [{#FSNAME}]: Option: Read-only'
              type: DEPENDENT
              key: 'vfs.fs.dependent[{#FSNAME},readonly]'
              description: 'The filesystem is mounted as read-only. It is available only for Zabbix agents 6.4 and higher.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.options
                  error_handler: DISCARD_VALUE
                - type: REGEX
                  parameters:
                    - '(?:^|,)read-only\b'
                    - '1'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
              trigger_prototypes:
                - uuid: f5a2fc8328d647d48eb3c2ebda361dc3
                  expression: 'last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly],#2)=0 and last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly])=1'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/FreeBSD by Zabbix agent/vfs.fs.dependent[{#FSNAME},readonly])=0'
                  name: 'FreeBSD: FS [{#FSNAME}]: Filesystem has become read-only'
                  priority: AVERAGE
                  description: 'The filesystem has become read-only, possibly due to an I/O error. Available only for Zabbix agents 6.4 and higher.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
          graph_prototypes:
            - uuid: 6c07aee93f0f4da696112b276ef7ca65
              name: 'FS [{#FSTYPE}({#FSNAME})]: Space usage graph, in % (relative to max available)'
              width: '600'
              height: '340'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - drawtype: FILLED_REGION
                  color: F63100
                  calc_fnc: ALL
                  item:
                    host: 'FreeBSD by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},pused]'
            - uuid: 7db8f820b1f74bae9bd1a7dbe08c2ef5
              name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
              width: '600'
              height: '340'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: '787878'
                  calc_fnc: LAST
                  type: GRAPH_SUM
                  item:
                    host: 'FreeBSD by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},total]'
                - sortorder: '1'
                  color: F63100
                  calc_fnc: LAST
                  item:
                    host: 'FreeBSD by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},used]'
                - sortorder: '2'
                  color: 199C09
                  calc_fnc: LAST
                  item:
                    host: 'FreeBSD by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},free]'
          master_item:
            key: vfs.fs.get
          lld_macro_paths:
            - lld_macro: '{#FSNAME}'
              path: $.fsname
            - lld_macro: '{#FSTYPE}'
              path: $.fstype
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var filesystems = JSON.parse(value);
                  
                  result = filesystems.map(function (filesystem) {
                  	return {
                  		'fsname': filesystem.fsname,
                  		'fstype': filesystem.fstype
                  	};
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Skip metadata collection for dynamic FS'
              step: '1'
              filter:
                conditions:
                  - macro: '{#FSTYPE}'
                    value: ^(btrfs|zfs)$
              operations:
                - operator: LIKE
                  value: Inodes
                  discover: NO_DISCOVER
      tags:
        - tag: class
          value: os
        - tag: target
          value: freebsd
      macros:
        - macro: '{$AGENT.TIMEOUT}'
          value: 3m
          description: 'Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).'
          config:
            type: TEXT
            priority: '1'
            section_name: Other
            label: 'Seconds since the last Zabbix agent seen'
            description: 'Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).'
        - macro: '{$VFS.FS.FSNAME.MATCHES}'
          value: .+
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '3'
            section_name: Filters
            label: 'Filter for filesystems by name'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSNAME.NOT_MATCHES}'
          value: ^(/dev|/sys|/run|/proc|.+/shm$)
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '2'
            section_name: Filters
            label: 'Filter for filesystems by name (exclude)'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSTYPE.MATCHES}'
          value: ^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Filter for filesystems by type'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSTYPE.NOT_MATCHES}'
          value: ^\s$
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for filesystems by type (exclude)'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.INODE.PFREE.MIN.CRIT}'
          value: '10'
          description: 'The critical threshold of the filesystem metadata utilization.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Threshold of the filesystem metadata utilization (critical)'
            description: 'The critical threshold of the filesystem metadata utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.INODE.PFREE.MIN.WARN}'
          value: '20'
          description: 'The warning threshold of the filesystem metadata utilization.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Threshold of the filesystem metadata utilization'
            description: 'The warning threshold of the filesystem metadata utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.PUSED.MAX.CRIT}'
          value: '90'
          description: 'The critical threshold of the filesystem utilization.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Threshold for filesystem utilization (critical)'
            description: 'The critical threshold of the filesystem utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.PUSED.MAX.WARN}'
          value: '80'
          description: 'The warning threshold of the filesystem utilization.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Threshold for filesystem utilization (warning)'
            description: 'The warning threshold of the filesystem utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: ccdd4aba5a154cd39cffb59e39f96c08
          name: Filesystems
          pages:
            - name: Overview
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '3'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FreeBSD by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
                    - type: STRING
                      name: reference
                      value: AAAEB
                - type: graphprototype
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FreeBSD by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space usage graph, in % (relative to max available)'
                    - type: STRING
                      name: reference
                      value: AAAEC
        - uuid: 618c8fc9d4b640999b3389960f5bead4
          name: 'System performance'
          pages:
            - widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FreeBSD by Zabbix agent'
                        name: 'FreeBSD: CPU load'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FreeBSD by Zabbix agent'
                        name: 'FreeBSD: Memory usage'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graphprototype
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '3'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FreeBSD by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FreeBSD by Zabbix agent'
                        name: 'FreeBSD: CPU utilization'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FreeBSD by Zabbix agent'
                        name: 'FreeBSD: Swap usage'
                    - type: STRING
                      name: reference
                      value: AAAAD
      valuemaps:
        - uuid: 9c02af203e354ac6ac87a742e85f683b
          name: zabbix.host.available
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: b82f35541efe4fc1a432c049eba5d082
          name: 'Zabbix agent ping status'
          mappings:
            - value: '1'
              newvalue: Up
    - uuid: 72aab08f7f27406a8f2c291648e5ba95
      template: 'Generic Java JMX'
      name: 'Generic Java JMX'
      description: 'Generated by official Zabbix template tool "Templator"'
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Official JMX Template from Zabbix distribution. Could be useful for many Java Applications (JMX).
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: d16a651b35234011876b4f0c98126988
          name: 'ClassLoading: Loaded class count'
          type: JMX
          key: 'jmx["java.lang:type=ClassLoading","LoadedClassCount"]'
          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: component
              value: class
        - uuid: fc79c5ac074f4266a88d5c239fa0fb70
          name: 'ClassLoading: Total loaded class count'
          type: JMX
          key: 'jmx["java.lang:type=ClassLoading","TotalLoadedClassCount"]'
          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: component
              value: class
        - uuid: b7620bdebd044fb1b1d2cb293ea8912c
          name: 'ClassLoading: Unloaded class count'
          type: JMX
          key: 'jmx["java.lang:type=ClassLoading","UnloadedClassCount"]'
          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: component
              value: class
        - uuid: 0d6880c07fcd42bebddc41f5f2eb7bdd
          name: 'Compilation: Name of the current JIT compiler'
          type: JMX
          key: 'jmx["java.lang:type=Compilation","Name"]'
          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: component
              value: compilation
          triggers:
            - uuid: 691f051584d74995b757b4be5e3824fe
              expression: 'find(/Generic Java JMX/jmx["java.lang:type=Compilation","Name"],,"like","Client")=1'
              name: 'Generic Java JMX: Compilation: {HOST.NAME} uses suboptimal JIT compiler'
              priority: INFO
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: c097ea2de6034d1d94f528533562b896
          name: 'Compilation: Accumulated time spent'
          type: JMX
          key: 'jmx["java.lang:type=Compilation","TotalCompilationTime"]'
          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: component
              value: compilation
        - uuid: d98a8d00639742f4b62a29e0c7394d61
          name: 'Memory: Heap memory committed'
          type: JMX
          key: 'jmx["java.lang:type=Memory","HeapMemoryUsage.committed"]'
          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: component
              value: memory
        - uuid: e757e0d3d72548df97066632448dd18c
          name: 'Memory: Heap memory maximum size'
          type: JMX
          key: 'jmx["java.lang:type=Memory","HeapMemoryUsage.max"]'
          value_type: FLOAT
          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: component
              value: memory
        - uuid: 0c24cd559cd74ddb9ff0b167a3d37c23
          name: 'Memory: Heap memory used'
          type: JMX
          key: 'jmx["java.lang:type=Memory","HeapMemoryUsage.used"]'
          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: component
              value: memory
        - uuid: 50bb1ecb0a2141bbba128dfc842a1e34
          name: 'Memory: Non-Heap memory committed'
          type: JMX
          key: 'jmx["java.lang:type=Memory","NonHeapMemoryUsage.committed"]'
          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: component
              value: memory
        - uuid: 0c6301dfec1c4e6c8ab26091e9372e91
          name: 'Memory: Non-Heap memory maximum size'
          type: JMX
          key: 'jmx["java.lang:type=Memory","NonHeapMemoryUsage.max"]'
          value_type: FLOAT
          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: component
              value: memory
        - uuid: 58d2bb1791994cbcacb75d029ed8a21b
          name: 'Memory: Non-Heap memory used'
          type: JMX
          key: 'jmx["java.lang:type=Memory","NonHeapMemoryUsage.used"]'
          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: component
              value: memory
        - uuid: e309472afb794a2c9cd581275931db79
          name: 'Memory: Object pending finalization count'
          type: JMX
          key: 'jmx["java.lang:type=Memory","ObjectPendingFinalizationCount"]'
          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: component
              value: memory
        - uuid: 4c847c1239654be7b4f4d03fbb45ea4f
          name: 'OperatingSystem: File descriptors maximum count'
          type: JMX
          key: 'jmx["java.lang:type=OperatingSystem","MaxFileDescriptorCount"]'
          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: component
              value: os
        - uuid: f72ee698db964f3c9ce84bbb4a1274d7
          name: 'OperatingSystem: File descriptors opened'
          type: JMX
          key: 'jmx["java.lang:type=OperatingSystem","OpenFileDescriptorCount"]'
          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 are opening file descriptors and never closing them.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: os
        - uuid: 3c252493c9304aabbb2930b9a82a1cbf
          name: 'OperatingSystem: Process CPU Load'
          type: JMX
          key: 'jmx["java.lang:type=OperatingSystem","ProcessCpuLoad"]'
          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: component
              value: os
          triggers:
            - uuid: cc6cc7942e434b8589ff28a0b3112fc7
              expression: 'min(/Generic Java JMX/jmx["java.lang:type=OperatingSystem","ProcessCpuLoad"],{$JMX.CPU.LOAD.TIME})>{$JMX.CPU.LOAD.MAX}'
              name: 'Generic Java JMX: OperatingSystem: Process CPU Load is high'
              event_name: 'Generic Java JMX: OperatingSystem: Process CPU Load more than {$JMX.CPU.LOAD.MAX}% for {$JMX.CPU.LOAD.TIME}'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: capacity
        - uuid: 00007954da00442b9631e15995ef6cab
          name: 'Runtime: JVM uptime'
          type: JMX
          key: 'jmx["java.lang:type=Runtime","Uptime"]'
          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: component
              value: runtime
          triggers:
            - uuid: c82c23dc5be34bb68ec8b152b3be367b
              expression: 'nodata(/Generic Java JMX/jmx["java.lang:type=Runtime","Uptime"],5m)=1'
              name: 'Generic Java JMX: Runtime: JVM is not reachable'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: e824c36de524425eaac253bcf3a1f3ec
          name: 'Runtime: JVM name'
          type: JMX
          key: 'jmx["java.lang:type=Runtime","VmName"]'
          delay: 1h
          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: component
              value: runtime
          triggers:
            - uuid: 560edfbeb7654f1eb7315389f08ef1b3
              expression: 'find(/Generic Java JMX/jmx["java.lang:type=Runtime","VmName"],,"like","Server")<>1'
              name: 'Generic Java JMX: Runtime: {HOST.NAME} runs suboptimal VM type'
              priority: INFO
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: a8675d659349414fa10cc11a1cd4ddd7
          name: 'Runtime: JVM version'
          type: JMX
          key: 'jmx["java.lang:type=Runtime","VmVersion"]'
          delay: 1h
          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: component
              value: runtime
        - uuid: f2f0836103ea4358a740abc0010336ca
          name: 'Threading: Daemon thread count'
          type: JMX
          key: 'jmx["java.lang:type=Threading","DaemonThreadCount"]'
          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: component
              value: threading
        - uuid: 1793243b7ed147f1a182876fda905ebc
          name: 'Threading: Peak thread count'
          type: JMX
          key: 'jmx["java.lang:type=Threading","PeakThreadCount"]'
          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: component
              value: threading
        - uuid: ca198e0473384025aecbc16913800c0c
          name: 'Threading: Thread count'
          type: JMX
          key: 'jmx["java.lang:type=Threading","ThreadCount"]'
          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: component
              value: threading
        - uuid: 9db83653dfa6449c95ffec2b0e6c8b5d
          name: 'Threading: Total started thread count'
          type: JMX
          key: 'jmx["java.lang:type=Threading","TotalStartedThreadCount"]'
          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: component
              value: threading
      discovery_rules:
        - uuid: 7e0c60c6b1b34b5c99fa446076f35c28
          name: 'Garbage collector discovery'
          type: JMX
          key: 'jmx.discovery["beans","java.lang:name=*,type=GarbageCollector"]'
          delay: 4h
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          description: 'Garbage collectors metrics discovery.'
          item_prototypes:
            - uuid: 61ad48ae9013481184d33222c7660bef
              name: 'GarbageCollector: {#JMXNAME} number of collections per second'
              type: JMX
              key: 'jmx["java.lang:name={#JMXNAME},type=GarbageCollector","CollectionCount"]'
              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
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: collection
                  value: '{#JMXNAME}'
                - tag: component
                  value: garbage-collector
            - uuid: 8e3db2efbe714f918ece15216fae628b
              name: 'GarbageCollector: {#JMXNAME} accumulated time spent in collection'
              type: JMX
              key: 'jmx["java.lang:name={#JMXNAME},type=GarbageCollector","CollectionTime"]'
              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: collection
                  value: '{#JMXNAME}'
                - tag: component
                  value: garbage-collector
          graph_prototypes:
            - uuid: 4794916f3ad84955a5406f9c6aea2792
              name: 'GarbageCollector: Garbage Collector {#JMXNAME} collections per second'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Generic Java JMX'
                    key: 'jmx["java.lang:name={#JMXNAME},type=GarbageCollector","CollectionCount"]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        - uuid: b5dfe8bb0a754289a716092ad305ceed
          name: 'Memory pool discovery'
          type: JMX
          key: 'jmx.discovery["beans","java.lang:name=*,type=MemoryPool"]'
          delay: 4h
          username: '{$JMX.USER}'
          password: '{$JMX.PASSWORD}'
          filter:
            conditions:
              - macro: '{#JMXNAME}'
                value: '{$JMX.MEM.POOL.NAME.MATCHES}'
          description: 'Memory pools metrics discovery.'
          item_prototypes:
            - uuid: 8b3da0f9b0b64b58b25ffed71a679ed0
              name: 'Memory pool: {#JMXNAME} committed'
              type: JMX
              key: 'jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.committed"]'
              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: component
                  value: memory
                - tag: pool
                  value: '{#JMXNAME}'
            - uuid: f8504be0098b41a6b789c67f88f1c861
              name: 'Memory pool: {#JMXNAME} maximum size'
              type: JMX
              key: 'jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.max"]'
              value_type: FLOAT
              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.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: memory
                - tag: pool
                  value: '{#JMXNAME}'
            - uuid: 74f11991286a474b838898036ebb82e5
              name: 'Memory pool: {#JMXNAME} used'
              type: JMX
              key: 'jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.used"]'
              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: component
                  value: memory
                - tag: pool
                  value: '{#JMXNAME}'
          trigger_prototypes:
            - uuid: 60a9825fc01f4cc9bd79d306bb19e8e0
              expression: 'min(/Generic Java JMX/jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.used"],{$JMX.MP.USAGE.TIME:"{#JMXNAME}"})>(last(/Generic Java JMX/jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.max"])*{$JMX.MP.USAGE.MAX:"{#JMXNAME}"}/100) and last(/Generic Java JMX/jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.max"])>0'
              name: 'Generic Java JMX: Memory pool: {#JMXNAME} memory usage is high'
              event_name: 'Generic Java JMX: Memory pool: {#JMXNAME} memory usage more than {$JMX.MP.USAGE.MAX:"{#JMXNAME}"}% for {$JMX.MP.USAGE.TIME:"{#JMXNAME}"}'
              priority: WARNING
              tags:
                - tag: scope
                  value: capacity
          graph_prototypes:
            - uuid: 70552d982dfa4455ac8c5c5c847f6248
              name: 'Memory pool: Memory pool {#JMXNAME}'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Generic Java JMX'
                    key: 'jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.max"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Generic Java JMX'
                    key: 'jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.committed"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Generic Java JMX'
                    key: 'jmx["java.lang:name={#JMXNAME},type=MemoryPool","Usage.used"]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
      tags:
        - tag: class
          value: software
        - tag: target
          value: java
      macros:
        - macro: '{$JMX.CPU.LOAD.MAX}'
          value: '85'
          description: 'A threshold in percent for CPU utilization trigger.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'CPU usage threshold (%)'
            description: 'A threshold in percent for CPU utilization trigger. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JMX.CPU.LOAD.TIME}'
          value: 5m
          description: 'The time during which the CPU utilization may exceed the threshold.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'CPU usage threshold duration'
            description: 'The time during which the CPU utilization may exceed the threshold.'
        - macro: '{$JMX.FILE.DESCRIPTORS.MAX}'
          value: '85'
          description: 'A threshold in percent for file descriptors count trigger.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'File descriptors usage threshold (%)'
            description: 'A threshold in percent for file descriptors count trigger. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JMX.FILE.DESCRIPTORS.TIME}'
          value: 3m
          description: 'The time during which the file descriptors count may exceed the threshold.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'File descriptors threshold duration'
            description: 'The time during which the file descriptors count may exceed the threshold.'
        - macro: '{$JMX.HEAP.MEM.USAGE.MAX}'
          value: '85'
          description: 'A threshold in percent for Heap memory utilization trigger.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Heap memory usage threshold (%)'
            description: 'A threshold in percent for Heap memory utilization trigger. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JMX.HEAP.MEM.USAGE.TIME}'
          value: 10m
          description: 'The time during which the Heap memory utilization may exceed the threshold.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Heap memory threshold duration'
            description: 'The time during which the Heap memory utilization may exceed the threshold.'
        - macro: '{$JMX.MEM.POOL.NAME.MATCHES}'
          value: 'Old Gen|G1|Perm Gen|Code Cache|Tenured Gen'
          description: 'This macro used in memory pool discovery as a filter.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Memory pool discovery filter'
            description: 'This macro used in memory pool discovery as a filter.'
        - macro: '{$JMX.MP.USAGE.MAX}'
          value: '85'
          description: 'A threshold in percent for memory pools utilization trigger. Use a context to change the threshold for a specific pool.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Memory pools usage threshold (%)'
            description: 'A threshold in percent for memory pools utilization trigger. Use a context to change the threshold for a specific pool. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JMX.MP.USAGE.TIME}'
          value: 10m
          description: 'The time during which the memory pools utilization may exceed the threshold.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Memory pools threshold duration'
            description: 'The time during which the memory pools utilization may exceed the threshold.'
        - macro: '{$JMX.NONHEAP.MEM.USAGE.MAX}'
          value: '85'
          description: 'A threshold in percent for Non-heap memory utilization trigger.'
          config:
            type: TEXT
            priority: '1'
            section_name: Thresholds
            label: 'Non-heap memory usage threshold (%)'
            description: 'A threshold in percent for Non-heap memory utilization trigger. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JMX.NONHEAP.MEM.USAGE.TIME}'
          value: 10m
          description: 'The time during which the Non-heap memory utilization may exceed the threshold.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Non-heap memory threshold duration'
            description: 'The time during which the Non-heap memory utilization may exceed the threshold.'
        - macro: '{$JMX.PASSWORD}'
          description: 'JMX password.'
          config:
            type: TEXT
            priority: '13'
            label: 'JMX password'
            description: 'JMX password.'
        - macro: '{$JMX.USER}'
          description: 'JMX username.'
          config:
            type: TEXT
            priority: '12'
            label: 'JMX username'
            description: 'JMX username.'
      dashboards:
        - uuid: 5fe21df982614cba90093a8d948b34b2
          name: 'Java: Overview'
          pages:
            - name: General
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Generic Java JMX'
                        name: 'Threading: Threads'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Generic Java JMX'
                        name: 'ClassLoading: Class Loader'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Generic Java JMX'
                        name: 'OperatingSystem: File Descriptors'
                    - type: STRING
                      name: reference
                      value: AAAAB
            - name: Memory
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '15'
                  fields:
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Generic Java JMX'
                        name: 'Memory pool: Memory pool {#JMXNAME}'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: INTEGER
                      name: rows
                      value: '3'
            - name: 'Garbage Collectors'
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '15'
                  fields:
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Generic Java JMX'
                        name: 'GarbageCollector: Garbage Collector {#JMXNAME} collections per second'
                    - type: STRING
                      name: reference
                      value: AAAAE
                    - type: INTEGER
                      name: rows
                      value: '3'
    - uuid: c9e1acd3ae4a427ab39724b6bcaf839e
      template: 'IBM IMM by SNMP'
      name: 'IBM IMM by SNMP'
      description: |
        Template Server IBM IMM
        
        MIBs used:
        IMM-MIB
        HOST-RESOURCES-MIB
        SNMPv2-MIB
        
        Known Issues:
        
          Description: Some IMMs (IMM1) do not return disks
          Version: IMM1
          Device: IBM x3250M3
        
          Description: Some IMMs (IMM1) do not return fan status: fanHealthStatus
          Version: IMM1
          Device: IBM x3250M3
        
          Description: IMM1 servers (M2, M3 generations) sysObjectID is NET-SNMP-MIB::netSnmpAgentOIDs.10
          Version: IMM1
          Device: IMM1 servers (M2,M3 generations)
        
          Description: IMM1 servers (M2, M3 generations) only Ambient temperature sensor available
          Version: IMM1
          Device: IMM1 servers (M2,M3 generations)
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        for IMM2 and IMM1 IBM serverX hardware
        
        ### Known Issues:
        
        Description: Some IMMs (IMM1) do not return disks
         - version: IMM1
         - device: IBM x3250M3
        
        Description: Some IMMs (IMM1) do not return fan status: fanHealthStatus
         - version: IMM1
         - device: IBM x3250M3
        
        Description: IMM1 servers (M2, M3 generations) sysObjectID is NET-SNMP-MIB::netSnmpAgentOIDs.10
         - version: IMM1
         - device: IMM1 servers (M2,M3 generations)
        
        Description: IMM1 servers (M2, M3 generations) only Ambient temperature sensor available
         - version: IMM1
         - device: IMM1 servers (M2,M3 generations)
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Server hardware'
      items:
        - uuid: 303807b2799f4f7cace3d781e9ed1715
          name: 'ICMP ping'
          type: SIMPLE
          key: icmpping
          description: |
            The host accessibility by ICMP ping.
            
            0 - ICMP ping fails;
            1 - ICMP ping successful.
          valuemap:
            name: 'Service state'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 937225d93eea44b3a8328eee03cf66f0
              expression: 'max(/IBM IMM by SNMP/icmpping,#3)=0'
              name: 'IBM IMM: Unavailable by ICMP ping'
              priority: HIGH
              description: 'Last three attempts returned timeout. Please check device connectivity.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 4af423253e1b4960825b49041d9c8feb
          name: 'ICMP loss'
          type: SIMPLE
          key: icmppingloss
          value_type: FLOAT
          units: '%'
          description: 'The percentage of lost packets.'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: ec37a141b33c46308b8d810069ce9142
              expression: 'min(/IBM IMM by SNMP/icmppingloss,5m)>{$ICMP_LOSS_WARN} and min(/IBM IMM by SNMP/icmppingloss,5m)<100'
              name: 'IBM IMM: High ICMP ping loss'
              opdata: 'Loss: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'ICMP packets loss detected.'
              dependencies:
                - name: 'IBM IMM: Unavailable by ICMP ping'
                  expression: 'max(/IBM IMM by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: b1659e3298fb447f8ee93e8bab98a22d
          name: 'ICMP response time'
          type: SIMPLE
          key: icmppingsec
          value_type: FLOAT
          units: s
          description: 'The ICMP ping response time (in seconds).'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 0541700de60549da8439f9b75cf83e7f
              expression: 'avg(/IBM IMM by SNMP/icmppingsec,5m)>{$ICMP_RESPONSE_TIME_WARN}'
              name: 'IBM IMM: High ICMP ping response time'
              opdata: 'Value: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Average ICMP response time is too high.'
              dependencies:
                - name: 'IBM IMM: High ICMP ping loss'
                  expression: 'min(/IBM IMM by SNMP/icmppingloss,5m)>{$ICMP_LOSS_WARN} and min(/IBM IMM by SNMP/icmppingloss,5m)<100'
                - name: 'IBM IMM: Unavailable by ICMP ping'
                  expression: 'max(/IBM IMM by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: e0a1cdb1df4d408087a8ed3d473ce1fe
          name: 'SNMP traps (fallback)'
          type: SNMP_TRAP
          key: snmptrap.fallback
          value_type: LOG
          description: 'The item is used to collect all SNMP traps unmatched by other snmptrap items'
          logtimefmt: 'hh:mm:sszyyyy/MM/dd'
          tags:
            - tag: component
              value: network
        - uuid: 6686560b390540b593a2d3bb3289ea41
          name: 'System contact details'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: 'system.contact[sysContact.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            The textual identification of the contact person for this managed node, together with information on how to contact this person. If no contact information is known, the value is the zero-length string.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 905c91ce799849dfb56b800c93849826
          name: 'System description'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: 'system.descr[sysDescr.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            A textual description of the entity. This value should
            include the full name and version identification of the system's hardware type, software operating-system, and
            networking software.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 7075609a2d2545828a93f701d7b02c17
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.5.2.1.5.0]'
          key: system.hw.model
          delay: 1h
          value_type: CHAR
          description: 'MIB: IMM-MIB'
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: db393421a28b44148b0a1e1273186900
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.5.2.1.3.0]'
          key: system.hw.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: IMM-MIB
            Machine serial number VPD information
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: b2bf06198d5840c6905ea6cf6d9e443c
              expression: 'last(/IBM IMM by SNMP/system.hw.serialnumber,#1)<>last(/IBM IMM by SNMP/system.hw.serialnumber,#2) and length(last(/IBM IMM by SNMP/system.hw.serialnumber))>0'
              name: 'IBM IMM: Device has been replaced'
              event_name: 'IBM IMM: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'Device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 81e5ed7d945d40f780eb9bd872ea1832
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: 'system.hw.uptime[hrSystemUptime.0]'
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized. Note that this is different from sysUpTime in the SNMPv2-MIB [RFC1907] because sysUpTime is the uptime of the network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 589def06a1b74a7f8ada7cc4576aa9eb
          name: 'System location'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: 'system.location[sysLocation.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            Physical location of the node (e.g., `equipment room`, `3rd floor`). If not provided, the value is a zero-length string.
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 596ce9f7e6b848e4869cd195996c7114
          name: 'System name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: system.name
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            An administratively-assigned name for this managed node.By convention, this is the node's fully-qualified domain name. If the name is unknown, the value is the zero-length string.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 188852025e644d5ab583f9d7a9dea06c
              expression: 'last(/IBM IMM by SNMP/system.name,#1)<>last(/IBM IMM by SNMP/system.name,#2) and length(last(/IBM IMM by SNMP/system.name))>0'
              name: 'IBM IMM: System name has changed'
              event_name: 'IBM IMM: System name has changed (new name: {ITEM.VALUE})'
              priority: INFO
              description: 'The name of the system has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
                - tag: scope
                  value: security
        - uuid: 97cd7cf6a9a545788a2f709bacb925ed
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: 'system.net.uptime[sysUpTime.0]'
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: SNMPv2-MIB
            Time (in hundredths of a second) since the network management portion of the system was last re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: ad8eada79b464821a14759f32f6d7f2a
          name: 'System object ID'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.2.0]'
          key: 'system.objectid[sysObjectID.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            The vendor's authoritative identification of the network management subsystem contained in the entity. This value is allocated within the SMI enterprises subtree (1.3.6.1.4.1) and provides an easy and unambiguous means for determining`what kind of box' is being managed.  For example, if vendor`Flintstones, Inc.' was assigned the subtree1.3.6.1.4.1.4242, it could assign the identifier 1.3.6.1.4.1.4242.1.1 to its `Fred Router'.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 33572e0e11214d8b8454e6947e0d282d
          name: 'Overall system health status'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.4.1.0]'
          key: 'system.status[systemHealthStat.0]'
          delay: 30s
          trends: '0'
          description: |
            MIB: IMM-MIB
            Indicates status of system health for the system in which the IMM resides. Value of 'nonRecoverable' indicates a severe error has occurred and the system may not be functioning. A value of 'critical' indicates that an error has occurred but the system is currently functioning properly. A value of 'nonCritical' indicates that a condition has occurred that may change the state of the system in the future but currently the system is working properly. A value of 'normal' indicates that the system is operating normally.
          valuemap:
            name: 'IMM-MIB::systemHealthStat'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: ea8fbc9446d34033b60a8214b8199ea1
              expression: 'count(/IBM IMM by SNMP/system.status[systemHealthStat.0],#1,"eq","{$HEALTH_DISASTER_STATUS}")=1'
              name: 'IBM IMM: System is in unrecoverable state!'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Please check the device for faults'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
            - uuid: a76c198aeb7d452a8c710ddde21aa12e
              expression: 'count(/IBM IMM by SNMP/system.status[systemHealthStat.0],#1,"eq","{$HEALTH_CRIT_STATUS}")=1'
              name: 'IBM IMM: System status is in critical state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Please check the device for errors'
              dependencies:
                - name: 'IBM IMM: System is in unrecoverable state!'
                  expression: 'count(/IBM IMM by SNMP/system.status[systemHealthStat.0],#1,"eq","{$HEALTH_DISASTER_STATUS}")=1'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
            - uuid: acd147a3d41b49478410f4d49562cde2
              expression: 'count(/IBM IMM by SNMP/system.status[systemHealthStat.0],#1,"eq","{$HEALTH_WARN_STATUS}")=1'
              name: 'IBM IMM: System status is in warning state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Please check the device for warnings'
              dependencies:
                - name: 'IBM IMM: System is in unrecoverable state!'
                  expression: 'count(/IBM IMM by SNMP/system.status[systemHealthStat.0],#1,"eq","{$HEALTH_DISASTER_STATUS}")=1'
                - name: 'IBM IMM: System status is in critical state'
                  expression: 'count(/IBM IMM by SNMP/system.status[systemHealthStat.0],#1,"eq","{$HEALTH_CRIT_STATUS}")=1'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: 59d2bec423a84ca186d5785ddea5270b
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          description: |
            Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list.
            Possible values:
            0 - not available
            1 - available
            2 - unknown
          valuemap:
            name: zabbix.host.available
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: fbec2f12ac244723bb31dec5efcc6f85
              expression: 'max(/IBM IMM by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'IBM IMM: No SNMP data collection'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'SNMP is not available for polling. Please check device connectivity and SNMP settings.'
              dependencies:
                - name: 'IBM IMM: Unavailable by ICMP ping'
                  expression: 'max(/IBM IMM by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: c93e3c9379a4434f84334e5989ec2592
          name: 'FAN Discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#FAN_DESCR},1.3.6.1.4.1.2.3.51.3.1.3.2.1.2]'
          key: fan.discovery
          delay: 1h
          description: 'IMM-MIB::fanDescr'
          item_prototypes:
            - uuid: 3281ba9d16754ff79a9ed0e2bb328129
              name: '{#FAN_DESCR}: Fan speed, %'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.3.2.1.3.{#SNMPINDEX}]'
              key: 'sensor.fan.speed.percentage[fanSpeed.{#SNMPINDEX}]'
              units: '%'
              description: |
                MIB: IMM-MIB
                Fan speed expressed in percent(%) of maximum RPM.
                An octet string expressed as 'ddd% of maximum' where:d is a decimal digit or blank space for a leading zero.
                If the fan is determined not to be running or the fan speed cannot be determined, the string will indicate 'Offline'.
              preprocessing:
                - type: REGEX
                  parameters:
                    - '(\d{1,3}) *%( of maximum)?'
                    - \1
              tags:
                - tag: component
                  value: fan
            - uuid: 6e576c4059c84b6fa80376ee59fd373b
              name: '{#FAN_DESCR}: Fan status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.3.2.1.10.{#SNMPINDEX}]'
              key: 'sensor.fan.status[fanHealthStatus.{#SNMPINDEX}]'
              delay: 3m
              value_type: CHAR
              description: |
                MIB: IMM-MIB
                A description of the fan component status.
              tags:
                - tag: component
                  value: fan
              trigger_prototypes:
                - uuid: b2d4ae5922174af6b0ef274accc8ae21
                  expression: 'count(/IBM IMM by SNMP/sensor.fan.status[fanHealthStatus.{#SNMPINDEX}],#1,"ne","{$FAN_OK_STATUS}")=1'
                  name: 'IBM IMM: {#FAN_DESCR}: Fan is not in normal state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: INFO
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: notice
        - uuid: dbf08da1d50c4a919bd2bbb1ee15f77e
          name: 'Physical Disk Discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.2.3.51.3.1.12.2.1.1]'
          key: physicalDisk.discovery
          delay: 1h
          item_prototypes:
            - uuid: 08f626e126bf45fa8f978a2324118626
              name: '{#SNMPINDEX}: Physical disk part number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.12.2.1.2.{#SNMPINDEX}]'
              key: 'system.hw.physicaldisk.part_number[diskFruName.{#SNMPINDEX}]'
              delay: 1h
              value_type: CHAR
              description: |
                MIB: IMM-MIB
                disk module FRU name.
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
            - uuid: da7aa00e553c4014a70fe08f5fdb67fd
              name: '{#SNMPINDEX}: Physical disk status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.12.2.1.3.{#SNMPINDEX}]'
              key: 'system.hw.physicaldisk.status[diskHealthStatus.{#SNMPINDEX}]'
              delay: 3m
              value_type: CHAR
              description: 'MIB: IMM-MIB'
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 45eb3fe3369a41b199179e2eca725027
                  expression: 'count(/IBM IMM by SNMP/system.hw.physicaldisk.status[diskHealthStatus.{#SNMPINDEX}],#1,"ne","{$DISK_OK_STATUS}")=1'
                  name: 'IBM IMM: {#SNMPINDEX}: Physical disk is not in OK state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check physical disk for warnings or errors'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: e83e43db572d4a25b80629a115214ae8
          name: 'PSU Discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#PSU_DESCR},1.3.6.1.4.1.2.3.51.3.1.11.2.1.2]'
          key: psu.discovery
          delay: 1h
          description: 'IMM-MIB::powerFruName'
          item_prototypes:
            - uuid: e8c7e01f5c3f40d29cdaa7506e293c80
              name: '{#PSU_DESCR}: Power supply status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.11.2.1.6.{#SNMPINDEX}]'
              key: 'sensor.psu.status[powerHealthStatus.{#SNMPINDEX}]'
              delay: 3m
              value_type: CHAR
              description: |
                MIB: IMM-MIB
                A description of the power module status.
              tags:
                - tag: component
                  value: power
              trigger_prototypes:
                - uuid: 4e7767484cff49b098e73b068ef04160
                  expression: 'count(/IBM IMM by SNMP/sensor.psu.status[powerHealthStatus.{#SNMPINDEX}],#1,"ne","{$PSU_OK_STATUS}")=1'
                  name: 'IBM IMM: {#PSU_DESCR}: Power supply is not in normal state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: INFO
                  description: 'Please check the power supply unit for errors'
                  tags:
                    - tag: scope
                      value: notice
        - uuid: b5ac4b78efca4e8a9d8b2eb875f49c49
          name: 'Temperature Discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.2.3.51.3.1.1.2.1.2]'
          key: tempDescr.discovery
          delay: 1h
          filter:
            conditions:
              - macro: '{#SNMPVALUE}'
                value: '(DIMM|PSU|PCH|RAID|RR|PCI).*'
          description: 'Scanning IMM-MIB::tempTable'
          item_prototypes:
            - uuid: 02af08c624bc444aae5d1f1b8f8b5d4a
              name: '{#SNMPVALUE}: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.1.2.1.3.{#SNMPINDEX}]'
              key: 'sensor.temp.value[tempReading.{#SNMPINDEX}]'
              delay: 3m
              value_type: FLOAT
              units: °C
              description: |
                MIB: IMM-MIB
                Temperature readings of testpoint: {#SNMPVALUE}
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 958eebe18bd94670b2b9029064a84bc9
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.{#SNMPINDEX}],5m)>{$TEMP_CRIT:"{#SNMPVALUE}"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.{#SNMPINDEX}],5m)<{$TEMP_CRIT:"{#SNMPVALUE}"}-3'
                  name: 'IBM IMM: {#SNMPVALUE}: Temperature is above critical threshold'
                  event_name: 'IBM IMM: {#SNMPVALUE}: Temperature is above critical threshold: >{$TEMP_CRIT:"{#SNMPVALUE}"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: ecb8ac5828e44a94a32164dce9811fbc
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.{#SNMPINDEX}],5m)>{$TEMP_WARN:"{#SNMPVALUE}"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.{#SNMPINDEX}],5m)<{$TEMP_WARN:"{#SNMPVALUE}"}-3'
                  name: 'IBM IMM: {#SNMPVALUE}: Temperature is above warning threshold'
                  event_name: 'IBM IMM: {#SNMPVALUE}: Temperature is above warning threshold: >{$TEMP_WARN:"{#SNMPVALUE}"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  dependencies:
                    - name: 'IBM IMM: {#SNMPVALUE}: Temperature is above critical threshold'
                      expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.{#SNMPINDEX}],5m)>{$TEMP_CRIT:"{#SNMPVALUE}"}'
                      recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.{#SNMPINDEX}],5m)<{$TEMP_CRIT:"{#SNMPVALUE}"}-3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 8ff82421c9f74d509766e7dc139ab2c8
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.{#SNMPINDEX}],5m)<{$TEMP_CRIT_LOW:"{#SNMPVALUE}"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'min(/IBM IMM by SNMP/sensor.temp.value[tempReading.{#SNMPINDEX}],5m)>{$TEMP_CRIT_LOW:"{#SNMPVALUE}"}+3'
                  name: 'IBM IMM: {#SNMPVALUE}: Temperature is too low'
                  event_name: 'IBM IMM: {#SNMPVALUE}: Temperature is too low: <{$TEMP_CRIT_LOW:"{#SNMPVALUE}"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 1e4d30dcff7f48bc872127d11f2e22b8
          name: 'Temperature Discovery Ambient'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.2.3.51.3.1.1.2.1.2]'
          key: tempDescr.discovery.ambient
          delay: 1h
          filter:
            conditions:
              - macro: '{#SNMPVALUE}'
                value: 'Ambient.*'
          description: 'Scanning IMM-MIB::tempTable with Ambient filter'
          item_prototypes:
            - uuid: c29ef915c0a6419eabd041ea34775c45
              name: 'Ambient: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.1.2.1.3.{#SNMPINDEX}]'
              key: 'sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}]'
              delay: 3m
              value_type: FLOAT
              units: °C
              description: |
                MIB: IMM-MIB
                Temperature readings of testpoint: Ambient
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 615967071d6b40f6b02e386c9586a66e
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}],5m)>{$TEMP_CRIT:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}],5m)<{$TEMP_CRIT:"Ambient"}-3'
                  name: 'IBM IMM: Ambient: Temperature is above critical threshold'
                  event_name: 'IBM IMM: Ambient: Temperature is above critical threshold: >{$TEMP_CRIT:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: e6bcdf201e304471aa84cc8d34b290ec
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}],5m)>{$TEMP_WARN:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}],5m)<{$TEMP_WARN:"Ambient"}-3'
                  name: 'IBM IMM: Ambient: Temperature is above warning threshold'
                  event_name: 'IBM IMM: Ambient: Temperature is above warning threshold: >{$TEMP_WARN:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  dependencies:
                    - name: 'IBM IMM: Ambient: Temperature is above critical threshold'
                      expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}],5m)>{$TEMP_CRIT:"Ambient"}'
                      recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}],5m)<{$TEMP_CRIT:"Ambient"}-3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: dd773e52746840e4b6f7517740873102
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}],5m)<{$TEMP_CRIT_LOW:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'min(/IBM IMM by SNMP/sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}],5m)>{$TEMP_CRIT_LOW:"Ambient"}+3'
                  name: 'IBM IMM: Ambient: Temperature is too low'
                  event_name: 'IBM IMM: Ambient: Temperature is too low: <{$TEMP_CRIT_LOW:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 7eb45db4b05e42d39e0e2cf889dec2b8
          name: 'Temperature Discovery CPU'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SNMPVALUE},1.3.6.1.4.1.2.3.51.3.1.1.2.1.2]'
          key: tempDescr.discovery.cpu
          delay: 1h
          filter:
            conditions:
              - macro: '{#SNMPVALUE}'
                value: 'CPU [0-9]* Temp'
          description: 'Scanning IMM-MIB::tempTable with CPU filter'
          item_prototypes:
            - uuid: 87da5286971d4f6487c3220c85850658
              name: 'CPU: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.2.3.51.3.1.1.2.1.3.{#SNMPINDEX}]'
              key: 'sensor.temp.value[tempReading.CPU.{#SNMPINDEX}]'
              delay: 3m
              value_type: FLOAT
              units: °C
              description: |
                MIB: IMM-MIB
                Temperature readings of testpoint: CPU
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: e994d3d8398147c49062bc712dc4c204
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.CPU.{#SNMPINDEX}],5m)>{$TEMP_CRIT:"CPU"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.CPU.{#SNMPINDEX}],5m)<{$TEMP_CRIT:"CPU"}-3'
                  name: 'IBM IMM: CPU: Temperature is above critical threshold'
                  event_name: 'IBM IMM: CPU: Temperature is above critical threshold: >{$TEMP_CRIT:"CPU"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 3b7396311de1487e90416aa2c42cb03d
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.CPU.{#SNMPINDEX}],5m)>{$TEMP_WARN:"CPU"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.CPU.{#SNMPINDEX}],5m)<{$TEMP_WARN:"CPU"}-3'
                  name: 'IBM IMM: CPU: Temperature is above warning threshold'
                  event_name: 'IBM IMM: CPU: Temperature is above warning threshold: >{$TEMP_WARN:"CPU"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  dependencies:
                    - name: 'IBM IMM: CPU: Temperature is above critical threshold'
                      expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.CPU.{#SNMPINDEX}],5m)>{$TEMP_CRIT:"CPU"}'
                      recovery_expression: 'max(/IBM IMM by SNMP/sensor.temp.value[tempReading.CPU.{#SNMPINDEX}],5m)<{$TEMP_CRIT:"CPU"}-3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: e39d0e009efb4216ac7cbbe544ad4bc0
                  expression: 'avg(/IBM IMM by SNMP/sensor.temp.value[tempReading.CPU.{#SNMPINDEX}],5m)<{$TEMP_CRIT_LOW:"CPU"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'min(/IBM IMM by SNMP/sensor.temp.value[tempReading.CPU.{#SNMPINDEX}],5m)>{$TEMP_CRIT_LOW:"CPU"}+3'
                  name: 'IBM IMM: CPU: Temperature is too low'
                  event_name: 'IBM IMM: CPU: Temperature is too low: <{$TEMP_CRIT_LOW:"CPU"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
      tags:
        - tag: class
          value: hardware
        - tag: subclass
          value: management
        - tag: target
          value: ibm
        - tag: target
          value: imm
      macros:
        - macro: '{$DISK_OK_STATUS}'
          value: Normal
          config:
            type: TEXT
            priority: '9'
            section_name: Other
            label: 'Disk OK status'
        - macro: '{$FAN_OK_STATUS}'
          value: Normal
          config:
            type: TEXT
            priority: '11'
            section_name: Other
            label: 'Fan OK status'
        - macro: '{$HEALTH_CRIT_STATUS}'
          value: '2'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'Health critical status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH_DISASTER_STATUS}'
          value: '0'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'Health disaster status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH_WARN_STATUS}'
          value: '4'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Health warning status'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ICMP_LOSS_WARN}'
          value: '20'
          description: 'Warning threshold of ICMP packet loss in %.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Threshold of ICMP packet loss'
            description: 'Warning threshold of ICMP packet loss in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$ICMP_RESPONSE_TIME_WARN}'
          value: '0.15'
          description: 'Warning threshold of the average ICMP response time in seconds.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'Threshold of the average ICMP response'
            description: 'Warning threshold of the average ICMP response time in seconds. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PSU_OK_STATUS}'
          value: Normal
          config:
            type: TEXT
            priority: '10'
            section_name: Other
            label: 'Power supply OK status'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'Time interval for the SNMP availability trigger.'
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Time interval'
            description: 'Time interval for the SNMP availability trigger.'
        - macro: '{$TEMP_CRIT}'
          value: '60'
          config:
            type: TEXT
            priority: '1'
            section_name: Thresholds
            label: 'Threshold for temperature (critical)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TEMP_CRIT:"Ambient"}'
          value: '35'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Threshold for ambient temperature (critical)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TEMP_CRIT_LOW}'
          value: '5'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Threshold for low temperature (critical)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TEMP_WARN}'
          value: '50'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for temperature (warning)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TEMP_WARN:"Ambient"}'
          value: '30'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Threshold for ambient temperature (warning)'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: bb225bac9cfd482198a8bc767744f2f1
          name: 'IBM IMM: Overview'
          pages:
            - name: Temperature
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'IBM IMM by SNMP'
                        key: 'sensor.temp.value[tempReading.{#SNMPINDEX}]'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'IBM IMM by SNMP'
                        key: 'sensor.temp.value[tempReading.Ambient.{#SNMPINDEX}]'
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: source_type
                      value: '3'
                - type: graphprototype
                  'y': '8'
                  width: '72'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'IBM IMM by SNMP'
                        key: 'sensor.temp.value[tempReading.CPU.{#SNMPINDEX}]'
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: INTEGER
                      name: source_type
                      value: '3'
            - name: Fan
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'IBM IMM by SNMP'
                        key: 'sensor.fan.speed.percentage[fanSpeed.{#SNMPINDEX}]'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: INTEGER
                      name: source_type
                      value: '3'
      valuemaps:
        - uuid: 61bded84be1d419083d8bd8a8bd25152
          name: 'IMM-MIB::systemHealthStat'
          mappings:
            - value: '0'
              newvalue: nonRecoverable
            - value: '2'
              newvalue: critical
            - value: '4'
              newvalue: nonCritical
            - value: '255'
              newvalue: normal
        - uuid: 2fa79738fa194e04bfaeee91a2e4396f
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
        - uuid: c446435a96c24db2845ba0651eb44c94
          name: zabbix.host.available
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
    - uuid: c7c7e5dc319b4801982e719beb1c5191
      template: 'IIS by Zabbix agent'
      name: 'IIS by Zabbix agent'
      description: |
        Get metrics from IIS using Zabbix agent running on Windows.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/401862-discussion-thread-for-official-zabbix-template-internet-information-services
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        The template to monitor IIS (Internet Information Services) by Zabbix that works without any external scripts.
        
        ## Setup
        
        You have to enable the following Windows Features (Control Panel > Programs and Features > Turn Windows features on or off) on your server
        ```text
        Web Server (IIS)
        Web Server (IIS)\Management Tools\IIS Management Scripts and Tools
        ```
        
        Optionally, it is possible to customize the template:
        - Set value for the host wizard configuration field `Max app pool request queue length (trigger)`, if you want to receive alerts when a number of requests in the application pool queue exceeds the threshold.
        - If you use a non-standard port for the IIS, don't forget to update the host wizard configuration fields `Service type` and `Listening port`.
        - Change the value of host wizard configuration field `Monitoring status for discovered app pools` to "0", if you want to disable all notifications about application pools state.<br>
        You can also add additional context macro `{$IIS.APPPOOL.MONITORED:<AppPoolName>}` for excluding specific application pools from monitoring.
        - Change regexp in the host wizard configuration fields `Application pools filter (include)` and `Application pools filter (exclude)` used for filtering application pools discovery results.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 96f2dd86997d4e259875b2fa9b1a3169
          name: '{$IIS.PORT} port ping'
          type: SIMPLE
          key: 'net.tcp.service[{$IIS.SERVICE},,{$IIS.PORT}]'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: da7d9c749f884c179a105b0c9475e6bd
              expression: 'last(/IIS by Zabbix agent/net.tcp.service[{$IIS.SERVICE},,{$IIS.PORT}])=0'
              name: 'IIS: Port {$IIS.PORT} is down'
              priority: AVERAGE
              manual_close: 'YES'
              dependencies:
                - name: 'IIS: The World Wide Web Publishing Service (W3SVC) is not running'
                  expression: 'last(/IIS by Zabbix agent/service.info[W3SVC])<>0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 50d8f5a08bbc494b8525f26eedbee781
          name: 'Anonymous users per second'
          key: 'perf_counter_en["\Web Service(_Total)\Anonymous Users/sec", 60]'
          value_type: FLOAT
          description: 'The number of requests from users over an anonymous connection per second. Average per minute.'
          tags:
            - tag: component
              value: users
        - uuid: ac80660edbb74c1fb4739368806900d5
          name: 'Bytes Received per second'
          key: 'perf_counter_en["\Web Service(_Total)\Bytes Received/sec", 60]'
          value_type: FLOAT
          units: Bps
          description: 'The average rate per minute at which data bytes are received by the service at the Application Layer. Does not include protocol headers or control bytes.'
          tags:
            - tag: component
              value: network
        - uuid: 5a0648316a164446bbf605930469d4c4
          name: 'Bytes Sent per second'
          key: 'perf_counter_en["\Web Service(_Total)\Bytes Sent/sec", 60]'
          value_type: FLOAT
          units: Bps
          description: 'The average rate per minute at which data bytes are sent by the service.'
          tags:
            - tag: component
              value: network
        - uuid: f086d17b51254e16bd43b57b39dc000e
          name: 'Bytes Total per second'
          key: 'perf_counter_en["\Web Service(_Total)\Bytes Total/Sec", 60]'
          value_type: FLOAT
          units: Bps
          description: 'The average rate per minute of total bytes/sec transferred by the Web service (sum of bytes sent/sec and bytes received/sec).'
          tags:
            - tag: component
              value: network
        - uuid: b94dc0df81234c7d97197fe30875d5e9
          name: 'Method CGI requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\CGI Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of CGI requests that are simultaneously being processed by the Web service. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 1e8244ebb5524c72af1d506df7bb2982
          name: 'Connection attempts per second'
          key: 'perf_counter_en["\Web Service(_Total)\Connection Attempts/Sec", 60]'
          value_type: FLOAT
          description: 'The average rate per minute that connections using the Web service are being attempted. The count is the average for all Web sites combined.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: connections
        - uuid: 2b4cb17b486643eda9a560b43af70d74
          name: 'Method COPY requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Copy Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests made using the COPY method. Copy requests are used for copying files and directories. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 1baed2823f1a4d2ca618cac5ab8bbcbb
          name: 'Current connections'
          key: 'perf_counter_en["\Web Service(_Total)\Current Connections"]'
          value_type: FLOAT
          description: 'The number of active connections.'
          tags:
            - tag: component
              value: connections
        - uuid: 350a6c7fac354570bbba04aa2fd6c98a
          name: 'Method DELETE requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Delete Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the DELETE method made. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 6ae641f632ae4422a6f71898078dc2ee
          name: 'Method GET requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Get Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests made using the GET method. GET requests are generally used for basic file retrievals or image maps, though they can be used with forms. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 5e37ff2d4d1b4bf6bad855a3d09ec6c7
          name: 'Method HEAD requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Head Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the HEAD method made. HEAD requests generally indicate a client is querying the state of a document they already have to see if it needs to be refreshed. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 18217a40ddbc421fb2db1b19d1fb7d59
          name: 'Method ISAPI requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\ISAPI Extension Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of ISAPI Extension requests that are simultaneously being processed by the Web service. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: b7634ae2a9d5454bbac631b55e896277
          name: 'Locked errors per second'
          key: 'perf_counter_en["\Web Service(_Total)\Locked Errors/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of errors due to requests that couldn''t be satisfied by the server because the requested document was locked. These are generally reported as an HTTP 423 error code to the client. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: errors
        - uuid: 069548a7c9e840bb8975f9b02b582c51
          name: 'Method LOCK requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Lock Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests made using the LOCK method. Lock requests are used to lock a file for one user so that only that user can modify the file. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 02c1fe0d15d94744959e4b53b21309fe
          name: 'Method MKCOL requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Mkcol Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the MKCOL method made. Mkcol requests are used to create directories on the server. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 6395e8edb1394396bd7602f621cf4b00
          name: 'Method MOVE requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Move Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the MOVE method made. Move requests are used for moving files and directories. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: d67523ef47464f8c9735d0a0359b5c77
          name: 'NonAnonymous users per second'
          key: 'perf_counter_en["\Web Service(_Total)\NonAnonymous Users/sec", 60]'
          value_type: FLOAT
          description: 'The number of requests from users over a non-anonymous connection per second. Average per minute.'
          tags:
            - tag: component
              value: users
        - uuid: 11d9995d25114e4fad666a1b75734c01
          name: 'Not Found errors per second'
          key: 'perf_counter_en["\Web Service(_Total)\Not Found Errors/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of errors due to requests that couldn''t be satisfied by the server because the requested document could not be found. These are generally reported to the client with HTTP error code 404. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: errors
        - uuid: 22ececa2db2d488587b1194883723ea6
          name: 'Method OPTIONS requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Options Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the OPTIONS method made. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 1653ca4c0c6743f39d9b1e764022da7c
          name: 'Method Total Other requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Other Request Methods/Sec", 60]'
          value_type: FLOAT
          description: 'Total Other Request Methods is the number of HTTP requests that are not OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, MOVE, COPY, MKCOL, PROPFIND, PROPPATCH, SEARCH, LOCK or UNLOCK methods (since service startup). Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 5f1210173665453e84f8f330a8c15eea
          name: 'Method POST requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Post Requests/Sec", 60]'
          value_type: FLOAT
          description: 'Rate of HTTP requests using POST method. Generally used for forms or gateway requests. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: f197e93e03d04025bc855d4d77c35010
          name: 'Method PROPFIND requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Propfind Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the PROPFIND method made. Propfind requests retrieve property values on files and directories. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 55c71bab45b04a2ca2afb526bf7c3e7f
          name: 'Method PROPPATCH requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Proppatch Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the PROPPATCH method made. Proppatch requests set property values on files and directories. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: d1d19cf6c920465184aa2b2a8b4439c9
          name: 'Method PUT requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Put Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the PUT method made. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 20ae8a67912045dc9b69c83d68e5e8ea
          name: 'Method MS-SEARCH requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Search Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the MS-SEARCH method made. Search requests are used to query the server to find resources that match a set of conditions provided by the client. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 4aa9419482eb484a8fc1773bee8b2993
          name: Uptime
          key: 'perf_counter_en["\Web Service(_Total)\Service Uptime"]'
          value_type: FLOAT
          units: s
          description: 'The service uptime expressed in seconds.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 7bbf8a836c66422abd4469d28afbcc00
              expression: 'last(/IIS by Zabbix agent/perf_counter_en["\Web Service(_Total)\Service Uptime"])<10m'
              name: 'IIS: Service has been restarted'
              event_name: 'IIS: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 805f7dca2ac74f5bbfb81c5e7bfa6e09
          name: 'Total connection attempts'
          key: 'perf_counter_en["\Web Service(_Total)\Total Connection Attempts (all instances)"]'
          value_type: FLOAT
          description: 'The total number of connections to the Web or FTP service that have been attempted since service startup. The count is the total for all Web sites or FTP sites combined.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: connections
        - uuid: 90eb19d7d37f439da2c78c44d85784ef
          name: 'Method Total requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Total Method Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of all HTTP requests received. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: c2ddd72243ba4a499a7a1e9ba6e4046c
          name: 'Method TRACE requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Trace Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the TRACE method made. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 05a19416695b436daf701d9750b015a8
          name: 'Method TRACE requests per second'
          key: 'perf_counter_en["\Web Service(_Total)\Unlock Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the UNLOCK method made. Unlock requests are used to remove locks from files. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 1e4b39ec2cca49fb9fb5a306c2724568
          name: 'Files cache hits percentage'
          key: 'perf_counter_en["\Web Service Cache\File Cache Hits %"]'
          value_type: FLOAT
          description: 'The ratio of user-mode file cache hits to total cache requests (since service startup). Note: This value might be low if the Kernel URI cache hits percentage is high.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: cache
        - uuid: d9c46d370afc496ba0a0ad0c141b4490
          name: 'File cache misses'
          key: 'perf_counter_en["\Web Service Cache\File Cache Misses"]'
          value_type: FLOAT
          description: 'The total number of unsuccessful lookups in the user-mode file cache since service startup.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: cache
        - uuid: 566f0bea097e4b0bb7042e4f0302ff26
          name: 'URIs cache hits percentage'
          key: 'perf_counter_en["\Web Service Cache\URI Cache Hits %"]'
          value_type: FLOAT
          description: 'The ratio of user-mode URI Cache Hits to total cache requests (since service startup)'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: cache
        - uuid: ab1884be28b54ea7bb187bbe843bb6a7
          name: 'URI cache misses'
          key: 'perf_counter_en["\Web Service Cache\URI Cache Misses"]'
          value_type: FLOAT
          description: 'The total number of unsuccessful lookups in the user-mode URI cache since service startup.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: cache
        - uuid: 7d76ec3d35f6446c842595c4831fabf4
          name: 'World Wide Web Publishing Service (W3SVC) state'
          key: 'service.info[W3SVC]'
          description: 'The World Wide Web Publishing Service (W3SVC) provides web connectivity and administration of websites through the IIS snap-in. If the World Wide Web Publishing Service stops, the operating system cannot serve any form of web request. This service was dependent on "Windows Process Activation Service".'
          valuemap:
            name: 'Windows service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
          triggers:
            - uuid: cac6bbb13ce84772a976275da0805179
              expression: 'last(/IIS by Zabbix agent/service.info[W3SVC])<>0'
              name: 'IIS: The World Wide Web Publishing Service (W3SVC) is not running'
              priority: HIGH
              description: 'The World Wide Web Publishing Service (W3SVC) is not in the running state. IIS cannot start.'
              dependencies:
                - name: 'IIS: Windows process Activation Service (WAS) is not running'
                  expression: 'last(/IIS by Zabbix agent/service.info[WAS])<>0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 38858eb3cc2f4580a0a3c56c11fdeba5
          name: 'Windows Process Activation Service (WAS) state'
          key: 'service.info[WAS]'
          description: 'Windows Process Activation Service (WAS) is a tool for managing worker processes that contain applications that host Windows Communication Foundation (WCF) services. Worker processes handle requests that are sent to a Web Server for specific application pools. Each application pool sets boundaries for the applications it contains.'
          valuemap:
            name: 'Windows service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
          triggers:
            - uuid: 98fc8e403ac0405e84bf533336c4102c
              expression: 'last(/IIS by Zabbix agent/service.info[WAS])<>0'
              name: 'IIS: Windows process Activation Service (WAS) is not running'
              priority: HIGH
              description: 'Windows Process Activation Service (WAS) is not in the running state. IIS cannot start.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 6148952d54d54982af404c6c845ccbf2
          name: 'Application pools discovery'
          key: 'wmi.getall[root\webAdministration, select Name from ApplicationPool]'
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#APPPOOL}'
                value: '{$IIS.APPPOOL.MATCHES}'
              - macro: '{#APPPOOL}'
                value: '{$IIS.APPPOOL.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 270068fe6e6844ae9bbf993509eda7e0
              name: 'AppPool {#APPPOOL} state'
              key: 'perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool State"]'
              description: 'The state of the application pool.'
              valuemap:
                name: 'Application pool state'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              tags:
                - tag: application-pool
                  value: '{#APPPOOL}'
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 56c6df39f3d1419ca4ce67c70f464ab7
                  expression: 'last(/IIS by Zabbix agent/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool State"])<>3 and {$IIS.APPPOOL.MONITORED:"{#APPPOOL}"}=1'
                  name: 'IIS: Application pool {#APPPOOL} is not in Running state'
                  priority: HIGH
                  dependencies:
                    - name: 'IIS: The World Wide Web Publishing Service (W3SVC) is not running'
                      expression: 'last(/IIS by Zabbix agent/service.info[W3SVC])<>0'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: f039a53351d54132ab9ad046282389d8
              name: '{#APPPOOL} Uptime'
              key: 'perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool Uptime"]'
              value_type: FLOAT
              units: s
              description: 'The web application uptime period since the last restart.'
              tags:
                - tag: application-pool
                  value: '{#APPPOOL}'
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 53afe8614ac542feaed1d656152bafd2
                  expression: 'last(/IIS by Zabbix agent/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool Uptime"])<10m'
                  name: 'IIS: {#APPPOOL} has been restarted'
                  event_name: 'IIS: {#APPPOOL} has been restarted (uptime < 10m)'
                  priority: INFO
                  description: 'Uptime is less than 10 minutes.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 4700b5729ca440869de976ae347598cf
              name: 'AppPool {#APPPOOL} recycles'
              key: 'perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Total Application Pool Recycles"]'
              description: 'The number of times the application pool has been recycled since Windows Process Activation Service (WAS) started.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              tags:
                - tag: application-pool
                  value: '{#APPPOOL}'
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 665d5fbd0b9247e890a9cfa1b39fa415
                  expression: 'last(/IIS by Zabbix agent/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Total Application Pool Recycles"],#1)<>last(/IIS by Zabbix agent/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Total Application Pool Recycles"],#2) and {$IIS.APPPOOL.MONITORED:"{#APPPOOL}"}=1'
                  name: 'IIS: Application pool {#APPPOOL} has been recycled'
                  priority: INFO
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 193642cad7214206a00db4f710bfbef8
              name: 'AppPool {#APPPOOL} current queue size'
              key: 'perf_counter_en["\HTTP Service Request Queues({#APPPOOL})\CurrentQueueSize"]'
              delay: 30s
              description: 'The number of requests in the queue.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              tags:
                - tag: application-pool
                  value: '{#APPPOOL}'
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 8cebd49164154999903dab2c03fd4be9
                  expression: 'min(/IIS by Zabbix agent/perf_counter_en["\HTTP Service Request Queues({#APPPOOL})\CurrentQueueSize"],{$IIS.QUEUE.MAX.TIME})>{$IIS.QUEUE.MAX.WARN}'
                  name: 'IIS: Request queue of {#APPPOOL} is too large'
                  event_name: 'IIS: Request queue of {#APPPOOL} is too large (over {$IIS.QUEUE.MAX.WARN})'
                  priority: WARNING
                  dependencies:
                    - name: 'IIS: Application pool {#APPPOOL} is not in Running state'
                      expression: 'last(/IIS by Zabbix agent/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool State"])<>3 and {$IIS.APPPOOL.MONITORED:"{#APPPOOL}"}=1'
                  tags:
                    - tag: scope
                      value: performance
          lld_macro_paths:
            - lld_macro: '{#APPPOOL}'
              path: $.Name
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: webserver
        - tag: target
          value: iis
      macros:
        - macro: '{$IIS.APPPOOL.MATCHES}'
          value: .+
          description: 'This macro is used in application pools discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Application pools filter (include)'
            description: 'This macro is used in application pools discovery. Can be overridden on the host or linked template level.'
        - macro: '{$IIS.APPPOOL.MONITORED}'
          value: '1'
          description: 'Monitoring status for discovered application pools. Use context to avoid trigger firing for specific application pools. "1" - enabled, "0" - disabled.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Monitoring status for discovered app pools'
            description: 'Monitoring status for discovered application pools. Use context to avoid trigger firing for specific application pools. "1" - enabled, "0" - disabled.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IIS.APPPOOL.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'This macro is used in application pools discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Application pools filter (exclude)'
            description: 'This macro is used in application pools discovery. Can be overridden on the host or linked template level.'
        - macro: '{$IIS.PORT}'
          value: '80'
          description: 'Listening port.'
          config:
            type: TEXT
            priority: '1'
            label: 'Listening port'
            description: 'Listening port. In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IIS.QUEUE.MAX.TIME}'
          value: 5m
          description: 'The time during which the queue length may exceed the threshold.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Time queue length may exceed threshold'
            description: 'The time during which the queue length may exceed the threshold.'
        - macro: '{$IIS.QUEUE.MAX.WARN}'
          description: 'Maximum application pool''s request queue length for trigger expression.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Max app pool request queue length (trigger)'
            description: 'Maximum application pool''s request queue length for trigger expression.'
        - macro: '{$IIS.SERVICE}'
          value: http
          description: 'The service (http/https/etc) for port check. See "net.tcp.service" documentation page for more information: https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/simple_checks'
          config:
            type: TEXT
            priority: '2'
            label: 'Service type'
            description: 'The service (http/https/etc) for port check. See "net.tcp.service" documentation page for more information: https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/simple_checks'
            required: 'YES'
      dashboards:
        - uuid: 4851a7b0882642e193e73f4ffc3286d5
          name: 'IIS Overview'
          pages:
            - widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'IIS by Zabbix agent'
                        name: 'IIS: Requests rate'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'IIS by Zabbix agent'
                        name: 'IIS: Cache misses'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'IIS by Zabbix agent'
                        name: 'IIS: Cache hits percentage'
                    - type: STRING
                      name: reference
                      value: AAAAB
      valuemaps:
        - uuid: 63d1ad6b4cf643da870b14c53da6c52f
          name: 'Application pool state'
          mappings:
            - value: '1'
              newvalue: Uninitialized
            - value: '2'
              newvalue: Initialized
            - value: '3'
              newvalue: Running
            - value: '4'
              newvalue: Disabling
            - value: '5'
              newvalue: Disabled
            - value: '6'
              newvalue: 'Shutdown Pending'
            - value: '7'
              newvalue: 'Delete Pending'
        - uuid: 5f3f78a3470c48b69442d942f21d11d0
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
        - uuid: d65f1af3c1e24a338983c52c5aa07d27
          name: 'Windows service state'
          mappings:
            - value: '0'
              newvalue: Running
            - value: '1'
              newvalue: Paused
            - value: '2'
              newvalue: 'Start pending'
            - value: '3'
              newvalue: 'Pause pending'
            - value: '4'
              newvalue: 'Continue pending'
            - value: '5'
              newvalue: 'Stop pending'
            - value: '6'
              newvalue: Stopped
            - value: '7'
              newvalue: Unknown
            - value: '255'
              newvalue: 'No such service'
    - uuid: 4677be3e07bf4f3285496f2f4230b928
      template: 'IIS by Zabbix agent active'
      name: 'IIS by Zabbix agent active'
      description: |
        Get metrics from IIS using Zabbix agent running on Windows.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/401862-discussion-thread-for-official-zabbix-template-internet-information-services
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        The template to monitor IIS (Internet Information Services) by Zabbix that works without any external scripts.
        
        ## Setup
        
        You have to enable the following Windows Features (Control Panel > Programs and Features > Turn Windows features on or off) on your server
        ```text
        Web Server (IIS)
        Web Server (IIS)\Management Tools\IIS Management Scripts and Tools
        ```
        
        Optionally, it is possible to customize the template:
        - Set value for the host wizard configuration field `Max app pool request queue length (trigger)`, if you want to receive alerts when a number of requests in the application pool queue exceeds the threshold.
        - If you use a non-standard port for the IIS, don't forget to update the host wizard configuration fields `Service type` and `Listening port`.
        - Change the value of host wizard configuration field `Monitoring status for discovered app pools` to "0", if you want to disable all notifications about application pools state.<br>
        You can also add additional context macro `{$IIS.APPPOOL.MONITORED:<AppPoolName>}` for excluding specific application pools from monitoring.
        - Change regexp in the host wizard configuration fields `Application pools filter (include)` and `Application pools filter (exclude)` used for filtering application pools discovery results.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 8fa6b28b8226408db07a2317a99581a5
          name: '{$IIS.PORT} port ping'
          type: SIMPLE
          key: 'net.tcp.service[{$IIS.SERVICE},,{$IIS.PORT}]'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 2b73bb4c09404d748e019ef2257a9e20
              expression: 'last(/IIS by Zabbix agent active/net.tcp.service[{$IIS.SERVICE},,{$IIS.PORT}])=0'
              name: 'IIS: Port {$IIS.PORT} is down'
              priority: AVERAGE
              manual_close: 'YES'
              dependencies:
                - name: 'IIS: The World Wide Web Publishing Service (W3SVC) is not running'
                  expression: 'last(/IIS by Zabbix agent active/service.info[W3SVC])<>0'
              tags:
                - tag: scope
                  value: availability
        - uuid: e70f872ed9184757b8a62c732658faa5
          name: 'Anonymous users per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Anonymous Users/sec", 60]'
          value_type: FLOAT
          description: 'The number of requests from users over an anonymous connection per second. Average per minute.'
          tags:
            - tag: component
              value: users
        - uuid: 64816de795864c8fae879e670dfe9e93
          name: 'Bytes Received per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Bytes Received/sec", 60]'
          value_type: FLOAT
          units: Bps
          description: 'The average rate per minute at which data bytes are received by the service at the Application Layer. Does not include protocol headers or control bytes.'
          tags:
            - tag: component
              value: network
        - uuid: 1b0b636e0bbd4948b3047071a4b964fc
          name: 'Bytes Sent per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Bytes Sent/sec", 60]'
          value_type: FLOAT
          units: Bps
          description: 'The average rate per minute at which data bytes are sent by the service.'
          tags:
            - tag: component
              value: network
        - uuid: 5abf01f6e7a7419d9a1de9803ccf1060
          name: 'Bytes Total per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Bytes Total/Sec", 60]'
          value_type: FLOAT
          units: Bps
          description: 'The average rate per minute of total bytes/sec transferred by the Web service (sum of bytes sent/sec and bytes received/sec).'
          tags:
            - tag: component
              value: network
        - uuid: 37b23949ca94466eb552c6fd8239b650
          name: 'Method CGI requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\CGI Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of CGI requests that are simultaneously being processed by the Web service. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: d32eb1398fa7454eb91329aa39d1e90e
          name: 'Connection attempts per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Connection Attempts/Sec", 60]'
          value_type: FLOAT
          description: 'The average rate per minute that connections using the Web service are being attempted. The count is the average for all Web sites combined.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: connections
        - uuid: 182bceaa31194bdd8c906cf226039b0b
          name: 'Method COPY requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Copy Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests made using the COPY method. Copy requests are used for copying files and directories. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 8b316e2896f041dca9b4adc601093b5c
          name: 'Current connections'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Current Connections"]'
          value_type: FLOAT
          description: 'The number of active connections.'
          tags:
            - tag: component
              value: connections
        - uuid: 7da6cf8a65b94b6f8d89dc53c7de38eb
          name: 'Method DELETE requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Delete Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the DELETE method made. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 5381bfc071524f32bb5290379d2e978d
          name: 'Method GET requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Get Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests made using the GET method. GET requests are generally used for basic file retrievals or image maps, though they can be used with forms. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 414b17c9eb11460cb55d35aeb7b8c071
          name: 'Method HEAD requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Head Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the HEAD method made. HEAD requests generally indicate a client is querying the state of a document they already have to see if it needs to be refreshed. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: d5b38b5472214d629e832d2709c64b3c
          name: 'Method ISAPI requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\ISAPI Extension Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of ISAPI Extension requests that are simultaneously being processed by the Web service. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 74fed9efa0ae4301aab2f73d76fd8357
          name: 'Locked errors per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Locked Errors/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of errors due to requests that couldn''t be satisfied by the server because the requested document was locked. These are generally reported as an HTTP 423 error code to the client. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: errors
        - uuid: cdf63d485cd1419385caabc050eb533c
          name: 'Method LOCK requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Lock Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests made using the LOCK method. Lock requests are used to lock a file for one user so that only that user can modify the file. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: edbe50383897434cb33378b973628061
          name: 'Method MKCOL requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Mkcol Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the MKCOL method made. Mkcol requests are used to create directories on the server. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 51a74530b894484a9ba101eb1176a982
          name: 'Method MOVE requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Move Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the MOVE method made. Move requests are used for moving files and directories. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 6dfe3dbde2544c5080c3845d54c83219
          name: 'NonAnonymous users per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\NonAnonymous Users/sec", 60]'
          value_type: FLOAT
          description: 'The number of requests from users over a non-anonymous connection per second. Average per minute.'
          tags:
            - tag: component
              value: users
        - uuid: 13e65fdff0704e6f87133b8efe34704f
          name: 'Not Found errors per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Not Found Errors/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of errors due to requests that couldn''t be satisfied by the server because the requested document could not be found. These are generally reported to the client with HTTP error code 404. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: errors
        - uuid: dcb0338dc59d4c95b9f712fed84a3aa2
          name: 'Method OPTIONS requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Options Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the OPTIONS method made. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: eb6a098fef824b2e9abe80b4331190f4
          name: 'Method Total Other requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Other Request Methods/Sec", 60]'
          value_type: FLOAT
          description: 'Total Other Request Methods is the number of HTTP requests that are not OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, MOVE, COPY, MKCOL, PROPFIND, PROPPATCH, SEARCH, LOCK or UNLOCK methods (since service startup). Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 222bb49332214781bc48a0eb610035c2
          name: 'Method POST requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Post Requests/Sec", 60]'
          value_type: FLOAT
          description: 'Rate of HTTP requests using POST method. Generally used for forms or gateway requests. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 011fff85fb0440b78ca7857454577c08
          name: 'Method PROPFIND requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Propfind Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the PROPFIND method made. Propfind requests retrieve property values on files and directories. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 3b8a1eea86034a268ac37031c08d3740
          name: 'Method PROPPATCH requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Proppatch Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the PROPPATCH method made. Proppatch requests set property values on files and directories. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: c4615d7155d14f98b76705df1a5778e4
          name: 'Method PUT requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Put Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the PUT method made. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: a1cfef3952c346ccb39e85038e49ae63
          name: 'Method MS-SEARCH requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Search Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the MS-SEARCH method made. Search requests are used to query the server to find resources that match a set of conditions provided by the client. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: d53040c921324b2195045dacb3738d6f
          name: Uptime
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Service Uptime"]'
          value_type: FLOAT
          units: s
          description: 'The service uptime expressed in seconds.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: f68768567f334d369d52797309f95c41
              expression: 'last(/IIS by Zabbix agent active/perf_counter_en["\Web Service(_Total)\Service Uptime"])<10m'
              name: 'IIS: Service has been restarted'
              event_name: 'IIS: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: f181123b522946018d9ac90599693cfe
          name: 'Total connection attempts'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Total Connection Attempts (all instances)"]'
          value_type: FLOAT
          description: 'The total number of connections to the Web or FTP service that have been attempted since service startup. The count is the total for all Web sites or FTP sites combined.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: connections
        - uuid: ff70ce9edf1c45ba8263d33847992baf
          name: 'Method Total requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Total Method Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of all HTTP requests received. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: fff9e968d5474adfbfd4ae9e19d836d9
          name: 'Method TRACE requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Trace Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the TRACE method made. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 0b6b770a6b014b8c857277e1d9cf6ffe
          name: 'Method TRACE requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service(_Total)\Unlock Requests/Sec", 60]'
          value_type: FLOAT
          description: 'The rate of HTTP requests using the UNLOCK method made. Unlock requests are used to remove locks from files. Average per minute.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: requests
        - uuid: 5ef9aec68d5b4fe79b17453ab8988b59
          name: 'Files cache hits percentage'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service Cache\File Cache Hits %"]'
          value_type: FLOAT
          description: 'The ratio of user-mode file cache hits to total cache requests (since service startup). Note: This value might be low if the Kernel URI cache hits percentage is high.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: cache
        - uuid: a041713a95e746f5b4797a7aecaed9a5
          name: 'File cache misses'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service Cache\File Cache Misses"]'
          value_type: FLOAT
          description: 'The total number of unsuccessful lookups in the user-mode file cache since service startup.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: cache
        - uuid: 5488881cba254b6b8f49ebacae2bc4c4
          name: 'URIs cache hits percentage'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service Cache\URI Cache Hits %"]'
          value_type: FLOAT
          description: 'The ratio of user-mode URI Cache Hits to total cache requests (since service startup)'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: cache
        - uuid: ffd18aef119f4c7c845c6a3e76fb747d
          name: 'URI cache misses'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\Web Service Cache\URI Cache Misses"]'
          value_type: FLOAT
          description: 'The total number of unsuccessful lookups in the user-mode URI cache since service startup.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: cache
        - uuid: 31d4f21ce4c6412b912ca65fe9aee83c
          name: 'World Wide Web Publishing Service (W3SVC) state'
          type: ZABBIX_ACTIVE
          key: 'service.info[W3SVC]'
          description: 'The World Wide Web Publishing Service (W3SVC) provides web connectivity and administration of websites through the IIS snap-in. If the World Wide Web Publishing Service stops, the operating system cannot serve any form of web request. This service was dependent on "Windows Process Activation Service".'
          valuemap:
            name: 'Windows service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
          triggers:
            - uuid: ca139b8b27c44f7fb22938fd3419cff5
              expression: 'last(/IIS by Zabbix agent active/service.info[W3SVC])<>0'
              name: 'IIS: The World Wide Web Publishing Service (W3SVC) is not running'
              priority: HIGH
              description: 'The World Wide Web Publishing Service (W3SVC) is not in the running state. IIS cannot start.'
              dependencies:
                - name: 'IIS: Windows process Activation Service (WAS) is not running'
                  expression: 'last(/IIS by Zabbix agent active/service.info[WAS])<>0'
              tags:
                - tag: scope
                  value: availability
        - uuid: 7f016ce3ab3941b78741dfb72c6d7693
          name: 'Windows Process Activation Service (WAS) state'
          type: ZABBIX_ACTIVE
          key: 'service.info[WAS]'
          description: 'Windows Process Activation Service (WAS) is a tool for managing worker processes that contain applications that host Windows Communication Foundation (WCF) services. Worker processes handle requests that are sent to a Web Server for specific application pools. Each application pool sets boundaries for the applications it contains.'
          valuemap:
            name: 'Windows service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
          triggers:
            - uuid: d7a16291f196424ca9c39af4271ab78f
              expression: 'last(/IIS by Zabbix agent active/service.info[WAS])<>0'
              name: 'IIS: Windows process Activation Service (WAS) is not running'
              priority: HIGH
              description: 'Windows Process Activation Service (WAS) is not in the running state. IIS cannot start.'
              tags:
                - tag: scope
                  value: availability
        - uuid: bfe53ca77e2046d6bb9ece5250e227f1
          name: 'Active agent availability'
          type: INTERNAL
          key: 'zabbix[host,active_agent,available]'
          description: |
            Availability of active checks on the host. The value of this item corresponds to availability icons in the host list.
            Possible values:
            0 - unknown
            1 - available
            2 - not available
          valuemap:
            name: zabbix.host.active_agent.available
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: b9d8edc865f54e8eb56e84392817ff5b
              expression: 'min(/IIS by Zabbix agent active/zabbix[host,active_agent,available],{$AGENT.TIMEOUT})=2'
              name: 'IIS: Active checks are not available'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Active checks are considered unavailable. Agent is not sending heartbeat for prolonged time.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 1dfb7339b81b4237a4e90b29328de297
          name: 'Application pools discovery'
          type: ZABBIX_ACTIVE
          key: 'wmi.getall[root\webAdministration, select Name from ApplicationPool]'
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#APPPOOL}'
                value: '{$IIS.APPPOOL.MATCHES}'
              - macro: '{#APPPOOL}'
                value: '{$IIS.APPPOOL.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 82c0636b84d84863a2051d6b708d841b
              name: 'AppPool {#APPPOOL} state'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool State"]'
              description: 'The state of the application pool.'
              valuemap:
                name: 'Application pool state'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              tags:
                - tag: application-pool
                  value: '{#APPPOOL}'
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: a7184495eb684293ada387292c812b0f
                  expression: 'last(/IIS by Zabbix agent active/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool State"])<>3 and {$IIS.APPPOOL.MONITORED:"{#APPPOOL}"}=1'
                  name: 'IIS: Application pool {#APPPOOL} is not in Running state'
                  priority: HIGH
                  dependencies:
                    - name: 'IIS: The World Wide Web Publishing Service (W3SVC) is not running'
                      expression: 'last(/IIS by Zabbix agent active/service.info[W3SVC])<>0'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: f0a6fe8a4cc44582a3048f1a00442736
              name: '{#APPPOOL} Uptime'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool Uptime"]'
              value_type: FLOAT
              units: s
              description: 'The web application uptime period since the last restart.'
              tags:
                - tag: application-pool
                  value: '{#APPPOOL}'
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: d2a9854722a44253a39c8eaab67f7677
                  expression: 'last(/IIS by Zabbix agent active/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool Uptime"])<10m'
                  name: 'IIS: {#APPPOOL} has been restarted'
                  event_name: 'IIS: {#APPPOOL} has been restarted (uptime < 10m)'
                  priority: INFO
                  description: 'Uptime is less than 10 minutes.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: e2cfc77aebab4b14bf6a690dbdd0c2b1
              name: 'AppPool {#APPPOOL} recycles'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Total Application Pool Recycles"]'
              description: 'The number of times the application pool has been recycled since Windows Process Activation Service (WAS) started.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              tags:
                - tag: application-pool
                  value: '{#APPPOOL}'
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 27a93967a29849f3aef833db136e1b8e
                  expression: 'last(/IIS by Zabbix agent active/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Total Application Pool Recycles"],#1)<>last(/IIS by Zabbix agent active/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Total Application Pool Recycles"],#2) and {$IIS.APPPOOL.MONITORED:"{#APPPOOL}"}=1'
                  name: 'IIS: Application pool {#APPPOOL} has been recycled'
                  priority: INFO
                  tags:
                    - tag: scope
                      value: notice
            - uuid: d525c1c47ee2402d9635ae276a5e58ec
              name: 'AppPool {#APPPOOL} current queue size'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\HTTP Service Request Queues({#APPPOOL})\CurrentQueueSize"]'
              delay: 30s
              description: 'The number of requests in the queue.'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              tags:
                - tag: application-pool
                  value: '{#APPPOOL}'
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 68499a4737d24ee6846aaea2a37b7b4f
                  expression: 'min(/IIS by Zabbix agent active/perf_counter_en["\HTTP Service Request Queues({#APPPOOL})\CurrentQueueSize"],{$IIS.QUEUE.MAX.TIME})>{$IIS.QUEUE.MAX.WARN}'
                  name: 'IIS: Request queue of {#APPPOOL} is too large'
                  event_name: 'IIS: Request queue of {#APPPOOL} is too large (over {$IIS.QUEUE.MAX.WARN})'
                  priority: WARNING
                  dependencies:
                    - name: 'IIS: Application pool {#APPPOOL} is not in Running state'
                      expression: 'last(/IIS by Zabbix agent active/perf_counter_en["\APP_POOL_WAS({#APPPOOL})\Current Application Pool State"])<>3 and {$IIS.APPPOOL.MONITORED:"{#APPPOOL}"}=1'
                  tags:
                    - tag: scope
                      value: performance
          lld_macro_paths:
            - lld_macro: '{#APPPOOL}'
              path: $.Name
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: webserver
        - tag: target
          value: iis
      macros:
        - macro: '{$AGENT.TIMEOUT}'
          value: 5m
          description: 'Timeout after which agent is considered unavailable.'
          config:
            type: TEXT
            priority: '8'
            section_name: Other
            label: 'Agent timeout (when agent is offline)'
            description: 'Timeout after which agent is considered unavailable.'
        - macro: '{$IIS.APPPOOL.MATCHES}'
          value: .+
          description: 'This macro is used in application pools discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Application pools filter (include)'
            description: 'This macro is used in application pools discovery. Can be overridden on the host or linked template level.'
        - macro: '{$IIS.APPPOOL.MONITORED}'
          value: '1'
          description: 'Monitoring status for discovered application pools. Use context to avoid trigger firing for specific application pools. "1" - enabled, "0" - disabled.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Monitoring status for discovered app pools'
            description: 'Monitoring status for discovered application pools. Use context to avoid trigger firing for specific application pools. "1" - enabled, "0" - disabled.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IIS.APPPOOL.NOT_MATCHES}'
          value: '<CHANGE_IF_NEEDED>'
          description: 'This macro is used in application pools discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Application pools filter (exclude)'
            description: 'This macro is used in application pools discovery. Can be overridden on the host or linked template level.'
        - macro: '{$IIS.PORT}'
          value: '80'
          description: 'Listening port.'
          config:
            type: TEXT
            priority: '1'
            label: 'Listening port'
            description: 'Listening port. In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IIS.QUEUE.MAX.TIME}'
          value: 5m
          description: 'The time during which the queue length may exceed the threshold.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Time queue length may exceed threshold'
            description: 'The time during which the queue length may exceed the threshold.'
        - macro: '{$IIS.QUEUE.MAX.WARN}'
          description: 'Maximum application pool''s request queue length for trigger expression.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Max app pool request queue length (trigger)'
            description: 'Maximum application pool''s request queue length for trigger expression.'
        - macro: '{$IIS.SERVICE}'
          value: http
          description: 'The service (http/https/etc) for port check. See "net.tcp.service" documentation page for more information: https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/simple_checks'
          config:
            type: TEXT
            priority: '2'
            label: 'Service type'
            description: 'The service (http/https/etc) for port check. See "net.tcp.service" documentation page for more information: https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/simple_checks'
            required: 'YES'
      dashboards:
        - uuid: 5fab732455514f558e99fc392a1a7e7e
          name: 'IIS Overview'
          pages:
            - widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'IIS by Zabbix agent active'
                        name: 'IIS: Requests rate'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'IIS by Zabbix agent active'
                        name: 'IIS: Cache misses'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'IIS by Zabbix agent active'
                        name: 'IIS: Cache hits percentage'
                    - type: STRING
                      name: reference
                      value: AAAAB
      valuemaps:
        - uuid: 636c6915a8154b6ea1ea5b00f015c149
          name: 'Application pool state'
          mappings:
            - value: '1'
              newvalue: Uninitialized
            - value: '2'
              newvalue: Initialized
            - value: '3'
              newvalue: Running
            - value: '4'
              newvalue: Disabling
            - value: '5'
              newvalue: Disabled
            - value: '6'
              newvalue: 'Shutdown Pending'
            - value: '7'
              newvalue: 'Delete Pending'
        - uuid: 41be60c561114627b861677603b92acb
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
        - uuid: 6dc834d8e50842d3a7337b0f88540b61
          name: 'Windows service state'
          mappings:
            - value: '0'
              newvalue: Running
            - value: '1'
              newvalue: Paused
            - value: '2'
              newvalue: 'Start pending'
            - value: '3'
              newvalue: 'Pause pending'
            - value: '4'
              newvalue: 'Continue pending'
            - value: '5'
              newvalue: 'Stop pending'
            - value: '6'
              newvalue: Stopped
            - value: '7'
              newvalue: Unknown
            - value: '255'
              newvalue: 'No such service'
        - uuid: c63064c6717e4604805491ce54166356
          name: zabbix.host.active_agent.available
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: 'not available'
    - uuid: a6fe3640b23544e7ae15d438b38ce1cd
      template: 'InfluxDB by HTTP'
      name: 'InfluxDB by HTTP'
      description: |
        Get InfluxDB metrics by HTTP agent from Prometheus metrics endpoint.
        For organization discovery template need to use Authorization via API token. See docs: https://docs.influxdata.com/influxdb/v2.0/security/tokens/
        
        Don't forget change macros {$INFLUXDB.URL}, {$INFLUXDB.API.TOKEN}.
        Some metrics may not be collected depending on your InfluxDB instance version and configuration.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        This template works with self-hosted InfluxDB instances. Internal service metrics are collected from InfluxDB /metrics endpoint.
        For organization discovery template need to use Authorization via API token. See docs: https://docs.influxdata.com/influxdb/v2.0/security/tokens/
        
        Don't forget to change the host wizard configuration fields `InfluxDB instance URL`,  `InfluxDB API token`.
        *NOTE.* Some metrics may not be collected depending on your InfluxDB instance version and configuration.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 286bb866060e47948c02408ebc841f1f
          name: 'Get instance metrics'
          type: HTTP_AGENT
          key: influx.get_metrics
          history: '0'
          value_type: TEXT
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
            - type: PROMETHEUS_TO_JSON
              parameters:
                - ''
          url: '{$INFLUXDB.URL}/metrics'
          tags:
            - tag: component
              value: raw
        - uuid: f8f514943c9040d7b41f14db92ca6c91
          name: 'Instance status'
          type: HTTP_AGENT
          key: influx.healthcheck
          description: 'Get the health of an instance.'
          valuemap:
            name: 'InfluxDB healthcheck'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"status":"fail"}]}'
            - type: JAVASCRIPT
              parameters:
                - 'return JSON.parse(value).status == ''pass'' ? 1: 0'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          url: '{$INFLUXDB.URL}/health'
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: de130833b4514481aa56d3ba06e648fc
              expression: 'last(/InfluxDB by HTTP/influx.healthcheck)=0'
              name: 'InfluxDB: Health check was failed'
              priority: HIGH
              description: 'The InfluxDB instance is not available or unhealthy.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 56b1a9f2eb454a9b96a0e0a73d5439cf
          name: 'Boltdb reads, rate'
          type: DEPENDENT
          key: influxdb.boltdb_reads.rate
          value_type: FLOAT
          description: 'Total number of boltdb reads per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="boltdb_reads_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: boltdb
        - uuid: 7bd505a8abb944c2bed17f8e4e5a8c84
          name: 'Boltdb writes, rate'
          type: DEPENDENT
          key: influxdb.boltdb_writes.rate
          value_type: FLOAT
          description: 'Total number of boltdb writes per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="boltdb_writes_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: boltdb
        - uuid: 5d5e26ee272a4af6ac979e69a83de74d
          name: 'Buckets, total'
          type: DEPENDENT
          key: influxdb.buckets.total
          description: 'Number of total buckets on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_buckets_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: buckets
        - uuid: 1c5931f514804a95ac4bfba3ec4a7d82
          name: 'Dashboards, total'
          type: DEPENDENT
          key: influxdb.dashboards.total
          description: 'Number of total dashboards on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_dashboards_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: dashboards
        - uuid: 915f00d9dc9847bb8bc8007d034bb80d
          name: 'Organizations, total'
          type: DEPENDENT
          key: influxdb.organizations.total
          description: 'Number of total organizations on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_organizations_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: organizations
        - uuid: e05aa2c424c140afa3794878ed2c3baa
          name: 'Scrapers, total'
          type: DEPENDENT
          key: influxdb.scrapers.total
          description: 'Number of total scrapers on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_scrapers_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: scrapers
        - uuid: f77894d5ede9481381a268670bc88766
          name: 'Task runs failed, rate'
          type: DEPENDENT
          key: influxdb.task_executor_complete.failed.rate
          description: 'Total number of failure runs across all tasks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="task_executor_total_runs_complete" && @.labels.status == "failed")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: tasks
          triggers:
            - uuid: f0d2137905bc477f979d035c06111844
              expression: 'min(/InfluxDB by HTTP/influxdb.task_executor_complete.failed.rate,5m)>{$INFLUXDB.TASK.RUN.FAIL.MAX.WARN}'
              name: 'InfluxDB: Too many tasks failure runs'
              event_name: 'InfluxDB: Too many tasks failure runs (over {$INFLUXDB.TASK.RUN.FAIL.MAX.WARN} for 5m)'
              priority: WARNING
              description: '"Number of failure runs completed across all tasks is too high."'
              tags:
                - tag: scope
                  value: performance
        - uuid: a0183b6d934c4612b358c027c75eda6e
          name: 'Task runs successful, rate'
          type: DEPENDENT
          key: influxdb.task_executor_complete.successful.rate
          description: 'Total number of runs successful completed across all tasks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="task_executor_total_runs_complete" && @.labels.status == "success")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: tasks
        - uuid: c3f147a2afb3438d8bacbb41fac6b1d0
          name: 'Workers currently running'
          type: DEPENDENT
          key: influxdb.task_executor_runs_active.total
          description: 'Total number of workers currently running tasks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="task_executor_total_runs_active")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: tasks
        - uuid: 25595754557d49fca7c671df3f6a898c
          name: 'Workers busy, pct'
          type: DEPENDENT
          key: influxdb.task_executor_workers_busy.pct
          units: '%'
          description: 'Percent of total available workers that are currently busy.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="task_executor_workers_busy")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: tasks
        - uuid: 94d98714ecce4847be0bdb7b8802f1ec
          name: 'Telegrafs, total'
          type: DEPENDENT
          key: influxdb.telegrafs.total
          description: 'Number of total telegraf configurations on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_telegrafs_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: telegraf
        - uuid: 23bad615af024a2e9f06d4541cf6f910
          name: 'Telegraf plugins, total'
          type: DEPENDENT
          key: influxdb.telegraf_plugins.total
          description: 'Number of individual telegraf plugins configured.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_telegraf_plugins_count")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: telegraf
        - uuid: 079c1eee7d93484b9126598b23921e9d
          name: 'Tokens, total'
          type: DEPENDENT
          key: influxdb.tokens.total
          description: 'Number of total tokens on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_tokens_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: tokens
        - uuid: 8699e951b7944659993422334a4cddc0
          name: Uptime
          type: DEPENDENT
          key: influxdb.uptime
          value_type: FLOAT
          units: s
          description: 'InfluxDB process uptime in seconds.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_uptime_seconds")].value.first()'
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: uptime
          triggers:
            - uuid: 335f27fb002544838f7150b11238d86b
              expression: 'last(/InfluxDB by HTTP/influxdb.uptime)<10m'
              name: 'InfluxDB: Service has been restarted'
              event_name: 'InfluxDB: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 86357d43721f4e6aa6b1dd7e63dd2f47
          name: 'Users, total'
          type: DEPENDENT
          key: influxdb.users.total
          description: 'Number of total users on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_users_total")].value.first()'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: tokens
        - uuid: d31e0d0823af4f6c999cae3d49b3815b
          name: Version
          type: DEPENDENT
          key: influxdb.version
          value_type: CHAR
          description: 'Version of the InfluxDB instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="influxdb_info")].labels.version.first()'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: influx.get_metrics
          tags:
            - tag: component
              value: version
          triggers:
            - uuid: d2b02cc426c748608968ae08c0823461
              expression: 'last(/InfluxDB by HTTP/influxdb.version,#1)<>last(/InfluxDB by HTTP/influxdb.version,#2) and length(last(/InfluxDB by HTTP/influxdb.version))>0'
              name: 'InfluxDB: Version has changed'
              event_name: 'InfluxDB: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'InfluxDB version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: 41766fd081804c399c3a7e70dd1fbf03
          name: 'Organizations discovery'
          type: HTTP_AGENT
          key: influxdb.orgs.discovery
          delay: 10m
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ORG_NAME}'
                value: '{$INFLUXDB.ORG_NAME.MATCHES}'
              - macro: '{#ORG_NAME}'
                value: '{$INFLUXDB.ORG_NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of organizations metrics.'
          item_prototypes:
            - uuid: c84ae278bd7c4387873bc8bbf6d8ba8f
              name: '[{#ORG_NAME}] Query response bytes, failed'
              type: DEPENDENT
              key: 'influxdb.org.http_query_response_bytes.failed.rate["{#ORG_NAME}"]'
              value_type: FLOAT
              units: Bps
              description: 'Count of bytes returned with status not 200 per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name=="http_query_response_bytes" && @.labels.status != "200" && @.labels.endpoint == "/api/v2/query" && @.labels.org_id == "{#ORG_ID}") ].value.first()'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: influx.get_metrics
              tags:
                - tag: component
                  value: queries
                - tag: organization
                  value: '{#ORG_NAME}'
            - uuid: fb13e133cf054e8783ba6bf5deaf1686
              name: '[{#ORG_NAME}] Query response bytes, success'
              type: DEPENDENT
              key: 'influxdb.org.http_query_response_bytes.success.rate["{#ORG_NAME}"]'
              value_type: FLOAT
              units: Bps
              description: 'Count of bytes returned with status 200 per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name=="http_query_response_bytes" && @.labels.status == "200" && @.labels.endpoint == "/api/v2/query" && @.labels.org_id == "{#ORG_ID}") ].value.first()'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: influx.get_metrics
              tags:
                - tag: component
                  value: queries
                - tag: organization
                  value: '{#ORG_NAME}'
            - uuid: 9688861c4268455193772389a957264f
              name: '[{#ORG_NAME}] Query requests, failed'
              type: DEPENDENT
              key: 'influxdb.org.query_request.failed.rate["{#ORG_NAME}"]'
              value_type: FLOAT
              units: Rps
              description: 'Total number of query requests with status not 200 per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name=="http_query_request_count" && @.labels.status != "200" && @.labels.endpoint == "/api/v2/query" && @.labels.org_id == "{#ORG_ID}") ].value.first()'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: influx.get_metrics
              tags:
                - tag: component
                  value: queries
                - tag: organization
                  value: '{#ORG_NAME}'
              trigger_prototypes:
                - uuid: 893fa5755b514c36aa177c4f4e25b254
                  expression: 'min(/InfluxDB by HTTP/influxdb.org.query_request.failed.rate["{#ORG_NAME}"],5m)>{$INFLUXDB.REQ.FAIL.MAX.WARN}'
                  name: 'InfluxDB: [{#ORG_NAME}]: Too many requests failures'
                  event_name: 'InfluxDB: [{#ORG_NAME}]: Too many requests failures (over {$INFLUXDB.REQ.FAIL.MAX.WARN} for 5m)'
                  priority: WARNING
                  description: 'Too many query requests failed.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: da53d3185ba744c38fc264993c72b1b9
              name: '[{#ORG_NAME}] Query requests, success'
              type: DEPENDENT
              key: 'influxdb.org.query_request.success.rate["{#ORG_NAME}"]'
              value_type: FLOAT
              units: Rps
              description: 'Total number of query requests with status 200 per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name=="http_query_request_count" && @.labels.status == "200" && @.labels.endpoint == "/api/v2/query" && @.labels.org_id == "{#ORG_ID}") ].value.first()'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: influx.get_metrics
              tags:
                - tag: component
                  value: queries
                - tag: organization
                  value: '{#ORG_NAME}'
            - uuid: 4f8dbb16f7a842678e4fb4343c88b560
              name: '[{#ORG_NAME}] Query requests bytes, failed'
              type: DEPENDENT
              key: 'influxdb.org.query_request_bytes.failed.rate["{#ORG_NAME}"]'
              value_type: FLOAT
              units: Bps
              description: 'Count of bytes received with status not 200 per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name=="http_query_request_bytes" && @.labels.status != "200" && @.labels.endpoint == "/api/v2/query" && @.labels.org_id == "{#ORG_ID}") ].value.first()'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: influx.get_metrics
              tags:
                - tag: component
                  value: queries
                - tag: organization
                  value: '{#ORG_NAME}'
            - uuid: 6bbeb22e5c9b46a2bf480dcf41b4eb0e
              name: '[{#ORG_NAME}] Query requests bytes, success'
              type: DEPENDENT
              key: 'influxdb.org.query_request_bytes.success.rate["{#ORG_NAME}"]'
              value_type: FLOAT
              units: Bps
              description: 'Count of bytes received with status 200 per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name=="http_query_request_bytes" && @.labels.status == "200" && @.labels.endpoint == "/api/v2/query" && @.labels.org_id == "{#ORG_ID}") ].value.first()'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: influx.get_metrics
              tags:
                - tag: component
                  value: queries
                - tag: organization
                  value: '{#ORG_NAME}'
          graph_prototypes:
            - uuid: 925d6b2f79b2479ab031118d795811fb
              name: 'InfluxDB: [{#ORG_NAME}]: Query requests'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'InfluxDB by HTTP'
                    key: 'influxdb.org.query_request.success.rate["{#ORG_NAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'InfluxDB by HTTP'
                    key: 'influxdb.org.query_request.failed.rate["{#ORG_NAME}"]'
            - uuid: 01921ee545c540bd8c0d51429bcce11b
              name: 'InfluxDB: [{#ORG_NAME}]: Query traffic'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'InfluxDB by HTTP'
                    key: 'influxdb.org.http_query_response_bytes.success.rate["{#ORG_NAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'InfluxDB by HTTP'
                    key: 'influxdb.org.http_query_response_bytes.failed.rate["{#ORG_NAME}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'InfluxDB by HTTP'
                    key: 'influxdb.org.query_request_bytes.failed.rate["{#ORG_NAME}"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'InfluxDB by HTTP'
                    key: 'influxdb.org.query_request_bytes.success.rate["{#ORG_NAME}"]'
          url: '{$INFLUXDB.URL}/api/v2/orgs'
          headers:
            - name: Content-type
              value: application/json
            - name: Authorization
              value: 'Token {$INFLUXDB.API.TOKEN}'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var result = [];
                  
                  JSON.parse(value).orgs.forEach(function (e) {
                  	result.push({
                  		"{#ORG_ID}": e.id,
                  		"{#ORG_NAME}": e.name,
                  		"{#ORG_DESCRIPTION}": e.description
                  	});
                  });
                  
                  return JSON.stringify(result)
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: database
        - tag: subclass
          value: nosql
        - tag: target
          value: influxdb
      macros:
        - macro: '{$INFLUXDB.API.TOKEN}'
          description: 'InfluxDB API Authorization Token'
          config:
            type: TEXT
            priority: '2'
            label: 'InfluxDB API token'
            description: 'InfluxDB API Authorization Token'
            required: 'YES'
        - macro: '{$INFLUXDB.ORG_NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable organizations'
          config:
            type: TEXT
            priority: '3'
            section_name: Filters
            label: 'Organizations filter (include)'
            description: 'Filter of discoverable organizations'
        - macro: '{$INFLUXDB.ORG_NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered organizations'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Organizations filter (exclude)'
            description: 'Filter to exclude discovered organizations'
        - macro: '{$INFLUXDB.REQ.FAIL.MAX.WARN}'
          value: '2'
          description: 'Maximum number of query requests failures for trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Max query request failures for trigger'
            description: 'Maximum number of query requests failures for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$INFLUXDB.TASK.RUN.FAIL.MAX.WARN}'
          value: '2'
          description: 'Maximum number of tasks runs failures for trigger expression.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Max task run failures for trigger'
            description: 'Maximum number of tasks runs failures for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$INFLUXDB.URL}'
          value: 'http://localhost:8086'
          description: 'InfluxDB instance URL'
          config:
            type: TEXT
            priority: '1'
            label: 'InfluxDB instance URL'
            description: 'InfluxDB instance URL'
            required: 'YES'
      dashboards:
        - uuid: 41d42bb27ae14b529b337aac88bf4685
          name: 'InfluxDB: Overview'
          pages:
            - name: Main
              widgets:
                - type: item
                  name: 'Instance status'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        key: influx.healthcheck
                    - type: INTEGER
                      name: show.0
                      value: '4'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: graph
                  name: 'InfluxDB: Tasks runs'
                  'y': '2'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        name: 'InfluxDB: Tasks runs'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: item
                  name: Uptime
                  x: '12'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        key: influxdb.uptime
                    - type: INTEGER
                      name: show.0
                      value: '4'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: item
                  name: Version
                  x: '24'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        key: influxdb.version
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: item
                  name: 'Workers busy, pct'
                  x: '36'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        key: influxdb.task_executor_workers_busy.pct
                    - type: INTEGER
                      name: show.0
                      value: '4'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: item
                  name: 'Workers currently running'
                  x: '48'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        key: influxdb.task_executor_runs_active.total
                    - type: INTEGER
                      name: show.0
                      value: '4'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: item
                  name: 'Users, total'
                  x: '60'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        key: influxdb.users.total
                    - type: INTEGER
                      name: show.0
                      value: '2'
            - name: Organizations
              widgets:
                - type: graphprototype
                  name: 'InfluxDB: Query requests'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        name: 'InfluxDB: [{#ORG_NAME}]: Query requests'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graphprototype
                  name: 'InfluxDB: Query traffic'
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'InfluxDB by HTTP'
                        name: 'InfluxDB: [{#ORG_NAME}]: Query traffic'
                    - type: STRING
                      name: reference
                      value: AAAAC
      valuemaps:
        - uuid: d1b4478bdfc44c6db79a4a262f605d92
          name: 'InfluxDB healthcheck'
          mappings:
            - value: '0'
              newvalue: Failed
            - value: '1'
              newvalue: Ok
    - uuid: f895df5b37494f668cde1a2388d7af8b
      template: 'macOS by Zabbix agent'
      name: 'macOS by Zabbix agent'
      description: |
        This is an official macOS template. It requires Zabbix agent 8.0 or newer.
        
        Notes on filesystem (FS) discovery:
          - The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
          - BTRFS allocates a default of 10% of the volume for its own needs.
          - To mitigate potential disasters, FS usage triggers are based on the maximum available space.
            - Utilization formula: 'pused = 100 - 100 * (available / total - free + available)'
          - The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This is an official MacOS template. It requires Zabbix agent 8.0 or newer.
        
        #### Notes on filesystem (FS) discovery:
        - The ext4/3/2 FS reserves space for privileged usage, typically set at 5% by default.
        - BTRFS allocates a default of 10% of the volume for its own needs.
        - To mitigate potential disasters, FS usage triggers are based on the maximum available space.
          - Utilization formula: `pused = 100 - 100 * (available / total - free + available)`
        - The FS utilization chart, derived from graph prototypes, reflects FS reserved space as the difference between used and available space from the total volume.
        
        ## Setup
        
        Install Zabbix agent on macOS according to Zabbix documentation.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: 'Templates/Operating systems'
      items:
        - uuid: 96c93b959e884934808b4d3c3b2f93d6
          name: 'Host name of Zabbix agent running'
          key: agent.hostname
          delay: 1h
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: 3e70e8cc76bb4099a3a6b96f5669f059
          name: 'Zabbix agent ping'
          key: agent.ping
          description: 'The agent always returns "1" for this item. May be used in combination with `nodata()` for the availability check.'
          valuemap:
            name: 'Zabbix agent ping status'
          tags:
            - tag: component
              value: system
        - uuid: 32e67f37a30c4fb28db9119d9e26a996
          name: 'Version of Zabbix agent running'
          key: agent.version
          delay: 1h
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: application
        - uuid: d25aa1f2eae445ceb18b7e4ee5383585
          name: 'Maximum number of opened files'
          key: kernel.maxfiles
          delay: 1h
          description: 'May be increased by using the `sysctl` utility or modifying the file `/etc/sysctl.conf`.'
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: 933b14ead0974a9c96d36c833da90ebb
              expression: 'last(/macOS by Zabbix agent/kernel.maxfiles)<1024'
              name: 'macOS: Configured max number of opened files is too low'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
                - tag: scope
                  value: performance
        - uuid: 5c376cae54854613a1533eb804bcee56
          name: 'Maximum number of processes'
          key: kernel.maxproc
          delay: 1h
          description: 'May be increased by using the `sysctl` utility or modifying the file `/etc/sysctl.conf`.'
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: 0e89b2e0cad948c0b81bc223d2ed673c
              expression: 'last(/macOS by Zabbix agent/kernel.maxproc)<256'
              name: 'macOS: Configured max number of processes is too low'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
                - tag: scope
                  value: performance
        - uuid: 951d874e6b644f9787c7a0d267bafcf8
          name: 'Incoming network traffic on en0'
          key: 'net.if.in[en0]'
          units: bps
          preprocessing:
            - type: CHANGE_PER_SECOND
            - type: MULTIPLIER
              parameters:
                - '8'
          tags:
            - tag: component
              value: network
        - uuid: ac875bd25d484d38b16cb02c30be6b67
          name: 'Outgoing network traffic on en0'
          key: 'net.if.out[en0]'
          units: bps
          preprocessing:
            - type: CHANGE_PER_SECOND
            - type: MULTIPLIER
              parameters:
                - '8'
          tags:
            - tag: component
              value: network
        - uuid: 928f973c004447d099a79e09a8b98cee
          name: 'Host boot time'
          key: system.boottime
          delay: 10m
          units: unixtime
          tags:
            - tag: component
              value: os
        - uuid: 5abd63bb64114794ae6d253dcc12afb4
          name: 'Processor load (1 min average per core)'
          key: 'system.cpu.load[percpu,avg1]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 3cf40421e61b41bab7697bbf9a2649d6
              expression: 'avg(/macOS by Zabbix agent/system.cpu.load[percpu,avg1],5m)>5'
              name: 'macOS: Processor load is too high'
              priority: WARNING
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: 7e569411a7b4415098d21aaa44068dee
          name: 'Processor load (5 min average per core)'
          key: 'system.cpu.load[percpu,avg5]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
        - uuid: 1ddc219f824541ca9c9ef30afda56df2
          name: 'Processor load (15 min average per core)'
          key: 'system.cpu.load[percpu,avg15]'
          value_type: FLOAT
          description: 'Calculated as the system CPU load divided by the number of CPU cores.'
          tags:
            - tag: component
              value: cpu
        - uuid: 9c0230c0bb944523bd781c37304bb87b
          name: 'Host name'
          key: system.hostname
          delay: 1h
          value_type: CHAR
          description: 'The host name of the system.'
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: ffb713a281a543879e4196e4207bdd62
              expression: 'last(/macOS by Zabbix agent/system.hostname,#1)<>last(/macOS by Zabbix agent/system.hostname,#2)'
              name: 'macOS: Hostname was changed'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: 5a7ce2c61d3a4696ac76e0406308e61b
          name: 'Host local time'
          key: system.localtime
          units: unixtime
          description: 'The local system time of the host.'
          tags:
            - tag: component
              value: os
        - uuid: 5c73ff0f28d24d92955c667e5245cfa0
          name: 'System information'
          key: system.uname
          delay: 1h
          value_type: CHAR
          description: 'Information as normally returned by `uname -a`.'
          inventory_link: OS
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: 55d8650af70d4aeea56345985e454df9
              expression: 'last(/macOS by Zabbix agent/system.uname,#1)<>last(/macOS by Zabbix agent/system.uname,#2)'
              name: 'macOS: Host information was changed'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: 34c001a77a904224aa90338590375870
          name: 'System uptime'
          key: system.uptime
          delay: 10m
          units: uptime
          description: 'The system uptime expressed in the following format: "N days, hh:mm:ss".'
          tags:
            - tag: component
              value: os
          triggers:
            - uuid: 1f0cc03186cc4bb98483927f425df8e9
              expression: 'change(/macOS by Zabbix agent/system.uptime)<0'
              name: 'macOS: Server has just been restarted'
              priority: INFO
              tags:
                - tag: scope
                  value: notice
        - uuid: 31ea6bafabbe440ea1b8d1b6cea74444
          name: 'Number of logged in users'
          key: system.users.num
          description: 'The number of users who are currently logged in.'
          tags:
            - tag: component
              value: os
            - tag: component
              value: security
        - uuid: 6df0d9e8694d45dfa11e433d8de7be41
          name: 'Checksum of /etc/passwd'
          key: 'vfs.file.cksum[/etc/passwd,sha256]'
          delay: 15m
          value_type: CHAR
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: security
          triggers:
            - uuid: 39cfe50a3d2a46ad9a53b9ec7443ec18
              expression: 'last(/macOS by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#1)<>last(/macOS by Zabbix agent/vfs.file.cksum[/etc/passwd,sha256],#2)'
              name: 'macOS: /etc/passwd has been changed'
              priority: WARNING
              tags:
                - tag: scope
                  value: security
        - uuid: bf99f88e47a64ecab98de4f3cfe6592f
          name: 'Get filesystems'
          key: vfs.fs.get
          history: '0'
          value_type: TEXT
          description: 'The `vfs.fs.get` key acquires raw information set about the filesystems. Later to be extracted by preprocessing in dependent items.'
          tags:
            - tag: component
              value: raw
        - uuid: daf35c33bb84443f893bb06bfe10f870
          name: 'Available memory'
          key: 'vm.memory.size[available]'
          units: B
          description: 'Defined as free + cached + buffers.'
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: c38dfc1b95d1463585d378f60d6a689a
              expression: 'last(/macOS by Zabbix agent/vm.memory.size[available])<20M'
              name: 'macOS: Lack of available memory on server'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: 83c0218324a548c4a01054801a4d8b0b
          name: 'Total memory'
          key: 'vm.memory.size[total]'
          delay: 1h
          units: B
          description: 'Total memory expressed in bytes.'
          tags:
            - tag: component
              value: memory
        - uuid: d00cf9691f6c446fa35dab03b2201aa4
          name: 'Zabbix agent availability'
          type: INTERNAL
          key: 'zabbix[host,agent,available]'
          description: 'Used for monitoring the availability status of the agent.'
          valuemap:
            name: zabbix.host.available
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 0766e9c2a02f46e7adbb86dbef67556f
              expression: 'max(/macOS by Zabbix agent/zabbix[host,agent,available],{$AGENT.TIMEOUT})=0'
              name: 'macOS: Zabbix agent is not available'
              event_name: 'macOS: Zabbix agent is not available (for {$AGENT.TIMEOUT})'
              priority: AVERAGE
              description: 'For passive checks only; the availability of the agent(s) and a host is used with `{$AGENT.TIMEOUT}` as the time threshold.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: c537fbe006d7434dab08add1dcf87537
          name: 'Mounted filesystem discovery'
          type: DEPENDENT
          key: vfs.fs.dependent.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#FSNAME}'
                value: '{$VFS.FS.FSNAME.MATCHES}'
              - macro: '{#FSNAME}'
                value: '{$VFS.FS.FSNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#FSTYPE}'
                value: '{$VFS.FS.FSTYPE.MATCHES}'
              - macro: '{#FSTYPE}'
                value: '{$VFS.FS.FSTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'The discovery of mounted filesystems with different types. Note that the option to exclude dmg software images from discovery is available only with Zabbix agents 6.4 and higher.'
          item_prototypes:
            - uuid: b7560dc2b6f743458128961cc962bcd3
              name: 'FS [{#FSNAME}]: Inodes: Free, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.inode[{#FSNAME},pfree]'
              value_type: FLOAT
              units: '%'
              description: 'Free metadata space expressed in %.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.inodes.pfree
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
              trigger_prototypes:
                - uuid: a1173b22ee4443eda7132f784f5f17bd
                  expression: 'min(/macOS by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}'
                  name: 'macOS: FS [{#FSNAME}]: Running out of free inodes'
                  event_name: 'macOS: {#FSNAME}: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}%)'
                  opdata: 'Free inodes: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Disk writing may fail if index nodes are exhausted, leading to error messages like "No space left on device" or "Disk is full", despite available free space.'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
                - uuid: 91cccd7935854a47bf4ca184b1d4d09a
                  expression: 'min(/macOS by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}'
                  name: 'macOS: FS [{#FSNAME}]: Running out of free inodes'
                  event_name: 'macOS: FS [{#FSNAME}]: Running out of free inodes (free < {$VFS.FS.INODE.PFREE.MIN.WARN:"{#FSNAME}"}%)'
                  opdata: 'Free inodes: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Disk writing may fail if index nodes are exhausted, leading to error messages like "No space left on device" or "Disk is full", despite available free space.'
                  dependencies:
                    - name: 'macOS: FS [{#FSNAME}]: Running out of free inodes'
                      expression: 'min(/macOS by Zabbix agent/vfs.fs.dependent.inode[{#FSNAME},pfree],5m)<{$VFS.FS.INODE.PFREE.MIN.CRIT:"{#FSNAME}"}'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
            - uuid: 29340ac4c5d3419cb4508641e85d787d
              name: 'FS [{#FSNAME}]: Space: Available'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},free]'
              units: B
              description: 'Available storage space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.free
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 6d9aa50bddb642499ad575a0cc71146b
              name: 'FS [{#FSNAME}]: Space: Available, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},pfree]'
              value_type: FLOAT
              units: '%'
              description: |
                Deprecated metric.
                Space availability expressed as a percentage, calculated using the current and maximum available spaces.
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.pfree
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: deprecated
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 8630aad4545e4a9ea3bcd4feabfb0444
              name: 'FS [{#FSNAME}]: Space: Used, in %'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},pused]'
              value_type: FLOAT
              units: '%'
              description: 'Calculated as the percentage of currently used space compared to the maximum available space.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.pused
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
              trigger_prototypes:
                - uuid: 7282d1a9ff1543f5afdb73b8fd985fec
                  expression: 'min(/macOS by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
                  name: 'macOS: FS [{#FSNAME}]: Space is critically low'
                  event_name: 'macOS: FS [{#FSNAME}]: Space is critically low (used > {$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%, total {{?last(//vfs.fs.dependent.size[{#FSNAME},total])/1024/1024/1024}.fmtnum(1)}GB)'
                  opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
                  priority: AVERAGE
                  description: |
                    The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}%` limit.
                    The trigger expression is based on the current used and maximum available spaces.
                    Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: capacity
                - uuid: 673dbc5aec474abda3a3b392d31b6c11
                  expression: 'min(/macOS by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}'
                  name: 'macOS: FS [{#FSNAME}]: Space is low'
                  event_name: 'macOS: FS [{#FSNAME}]: Space is low (used > {$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%, total {{?last(//vfs.fs.dependent.size[{#FSNAME},total])/1024/1024/1024}.fmtnum(1)}GB)'
                  opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
                  priority: WARNING
                  description: |
                    The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%` limit.
                    The trigger expression is based on the current used and maximum available spaces.
                    Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
                  manual_close: 'YES'
                  dependencies:
                    - name: 'macOS: FS [{#FSNAME}]: Space is critically low'
                      expression: 'min(/macOS by Zabbix agent/vfs.fs.dependent.size[{#FSNAME},pused],5m)>{$VFS.FS.PUSED.MAX.CRIT:"{#FSNAME}"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: capacity
            - uuid: c311ced2b4204b368af1c8a8c27f9c99
              name: 'FS [{#FSNAME}]: Space: Total'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},total]'
              units: B
              description: 'Total space expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.total
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: 748612098b4e4befa0f39f11b99eced4
              name: 'FS [{#FSNAME}]: Space: Used'
              type: DEPENDENT
              key: 'vfs.fs.dependent.size[{#FSNAME},used]'
              units: B
              description: 'Used storage expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytes.used
              master_item:
                key: 'vfs.fs.dependent[{#FSNAME},data]'
              tags:
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
            - uuid: c035c0bc26a24f58900e1af301007914
              name: 'FS [{#FSNAME}]: Get data'
              type: DEPENDENT
              key: 'vfs.fs.dependent[{#FSNAME},data]'
              history: 1h
              value_type: TEXT
              description: 'Intermediate data of `{#FSNAME}` filesystem.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.fsname==''{#FSNAME}'')].first()'
              master_item:
                key: vfs.fs.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: storage
                - tag: filesystem
                  value: '{#FSNAME}'
                - tag: fstype
                  value: '{#FSTYPE}'
          graph_prototypes:
            - uuid: b0cd424a8eac438ba76df6052a2bdab6
              name: 'FS [{#FSTYPE}({#FSNAME})]: Space usage graph, in % (relative to max available)'
              width: '600'
              height: '340'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - drawtype: FILLED_REGION
                  color: F63100
                  calc_fnc: ALL
                  item:
                    host: 'macOS by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},pused]'
            - uuid: 110b798942874e9d817d6028b1ea2101
              name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
              width: '600'
              height: '340'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: '787878'
                  calc_fnc: LAST
                  type: GRAPH_SUM
                  item:
                    host: 'macOS by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},total]'
                - sortorder: '1'
                  color: F63100
                  calc_fnc: LAST
                  item:
                    host: 'macOS by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},used]'
                - sortorder: '2'
                  color: 199C09
                  calc_fnc: LAST
                  item:
                    host: 'macOS by Zabbix agent'
                    key: 'vfs.fs.dependent.size[{#FSNAME},free]'
          master_item:
            key: vfs.fs.get
          lld_macro_paths:
            - lld_macro: '{#FSNAME}'
              path: $.fsname
            - lld_macro: '{#FSOPTIONS}'
              path: $.fsoptions
            - lld_macro: '{#FSTYPE}'
              path: $.fstype
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var filesystems = JSON.parse(value);
                  
                  result = filesystems.map(function (filesystem) {
                  	return {
                  		'fsname': filesystem.fsname,
                  		'fstype': filesystem.fstype,
                  		'fsoptions': filesystem.fsoptions
                  	};
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Exclude dmg'
              step: '1'
              filter:
                evaltype: AND
                conditions:
                  - macro: '{#FSOPTIONS}'
                    value: '(?:^|,)noowners\b'
                  - macro: '{#FSOPTIONS}'
                    value: '(?:^|,)read-only\b'
                  - macro: '{#FSOPTIONS}'
                    operator: EXISTS
                  - macro: '{#FSTYPE}'
                    value: hfs
              operations:
                - operator: REGEXP
                  value: .+
                  discover: NO_DISCOVER
            - name: 'Skip metadata collection for dynamic FS'
              step: '2'
              filter:
                conditions:
                  - macro: '{#FSTYPE}'
                    value: ^(btrfs|zfs)$
              operations:
                - operator: LIKE
                  value: Inodes
                  discover: NO_DISCOVER
      tags:
        - tag: class
          value: os
        - tag: target
          value: macos
      macros:
        - macro: '{$AGENT.TIMEOUT}'
          value: 3m
          description: 'Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).'
          config:
            type: TEXT
            priority: '1'
            section_name: Other
            label: 'Seconds since the last Zabbix agent seen'
            description: 'Timeout after which the agent is considered unavailable. Works only for agents reachable from Zabbix server/proxy (in passive mode).'
        - macro: '{$VFS.FS.FSNAME.MATCHES}'
          value: .+
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '3'
            section_name: Filters
            label: 'Filter for filesystems by name'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSNAME.NOT_MATCHES}'
          value: ^(/dev|/sys|/run|/proc|.+/shm$)
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '2'
            section_name: Filters
            label: 'Filter for filesystems by name (exclude)'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSTYPE.MATCHES}'
          value: ^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Filter for filesystems by type'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.FSTYPE.NOT_MATCHES}'
          value: ^\s$
          description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for filesystems by type (exclude)'
            description: 'Used for filesystem discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VFS.FS.INODE.PFREE.MIN.CRIT}'
          value: '10'
          description: 'The critical threshold of the filesystem metadata utilization.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Threshold of the filesystem metadata utilization (critical)'
            description: 'The critical threshold of the filesystem metadata utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.INODE.PFREE.MIN.WARN}'
          value: '20'
          description: 'The warning threshold of the filesystem metadata utilization.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Threshold of the filesystem metadata utilization'
            description: 'The warning threshold of the filesystem metadata utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.PUSED.MAX.CRIT}'
          value: '90'
          description: 'The critical threshold of the filesystem utilization.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Threshold for filesystem utilization (critical)'
            description: 'The critical threshold of the filesystem utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VFS.FS.PUSED.MAX.WARN}'
          value: '80'
          description: 'The warning threshold of the filesystem utilization.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Threshold for filesystem utilization (warning)'
            description: 'The warning threshold of the filesystem utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 7cd39af9717141d398b86f3e8ea1d9e0
          name: Filesystems
          pages:
            - name: Overview
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '3'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'macOS by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
                    - type: STRING
                      name: reference
                      value: AAAEB
                - type: graphprototype
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'macOS by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space usage graph, in % (relative to max available)'
                    - type: STRING
                      name: reference
                      value: AAAEC
        - uuid: d66f39e86e2047289acea0bc9a218807
          name: 'System performance'
          pages:
            - widgets:
                - type: graph
                  name: 'CPU load'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'macOS by Zabbix agent'
                        name: 'macOS: CPU load'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  name: 'Memory usage'
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'macOS by Zabbix agent'
                        name: 'macOS: Memory usage'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graphprototype
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '3'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'macOS by Zabbix agent'
                        name: 'FS [{#FSTYPE}({#FSNAME})]: Space utilization chart (relative to total)'
                    - type: STRING
                      name: reference
                      value: AAAEA
      valuemaps:
        - uuid: 0355844b2bee4fb59bddda6175ef4810
          name: zabbix.host.available
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: a72caf871acf4776a891a612932fbf2e
          name: 'Zabbix agent ping status'
          mappings:
            - value: '1'
              newvalue: Up
    - uuid: 2c96393f8f2945c1a9f03f86adf5eb57
      template: 'Mantis BT by HTTP'
      name: 'Mantis BT by HTTP'
      description: |
        Get Mantis BT issues by HTTP.
        Metrics are collected by requests to Mantis BT API.
        Please change macros {$MANTIS.URL} and {$MANTIS.TOKEN}.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        1. Generate the API token in Mantis BT. Use this [manual](https://support.mantishub.com/hc/en-us/articles/215787323-Connecting-to-MantisHub-APIs-using-API-Tokens) for detailed instructions.
        2. Change values for the `MantisBT URL` and `MantisBT Token` host wizard configuration fields.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: bf1b74b98d5b4311afeb721059c01da9
          name: 'Get projects'
          type: HTTP_AGENT
          key: mantisbt.get.projects
          delay: 1h
          history: '0'
          value_type: TEXT
          description: 'Get projects from Mantis BT.'
          timeout: 30s
          url: '{$MANTIS.URL}/api/rest/projects/'
          http_proxy: '{$MANTIS.HTTP.PROXY}'
          headers:
            - name: Authorization
              value: '{$MANTIS.TOKEN}'
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: fc1e8a60cf544b3bbc92e6b6907b5e51
          name: 'Projects discovery'
          type: DEPENDENT
          key: mantisbt.projects.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ENABLED}'
                value: 'true'
              - macro: '{#NAME}'
                value: '{$MANTIS.LLD.FILTER.PROJECTS.MATCHES}'
              - macro: '{#NAME}'
                value: '{$MANTIS.LLD.FILTER.PROJECTS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery rule for a Mantis BT projects.'
          item_prototypes:
            - uuid: baffdd6d9e51403084fc4a98bb4b9ff7
              name: 'Project [{#NAME}]: High priority issues'
              type: DEPENDENT
              key: 'mantis.project.priority.high_issues[{#NAME}]'
              description: 'Count of "high" priority issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.priority.name==''high'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 8e68e80eaa9e45c1b6fdc8289361e016
              name: 'Project [{#NAME}]: Immediate priority issues'
              type: DEPENDENT
              key: 'mantis.project.priority.immediate_issues[{#NAME}]'
              description: 'Count of "immediate" priority issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.priority.name==''immediate'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 3e53778307b649f7b22ec82ab4e27894
              name: 'Project [{#NAME}]: Low priority issues'
              type: DEPENDENT
              key: 'mantis.project.priority.low_issues[{#NAME}]'
              description: 'Count of "low" priority issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.priority.name==''low'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: f5279ccc0e84466f94f334a36e25316f
              name: 'Project [{#NAME}]: None priority issues'
              type: DEPENDENT
              key: 'mantis.project.priority.none_issues[{#NAME}]'
              description: 'Count of "none" priority issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.priority.name==''none'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 5a9ee1a754f24fcda08a1e3b42d711d7
              name: 'Project [{#NAME}]: Normal priority issues'
              type: DEPENDENT
              key: 'mantis.project.priority.normal_issues[{#NAME}]'
              description: 'Count of "normal" priority issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.priority.name==''normal'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: c712113bccd34af2bb8018a52b6c581d
              name: 'Project [{#NAME}]: Urgent priority issues'
              type: DEPENDENT
              key: 'mantis.project.priority.urgent_issues[{#NAME}]'
              description: 'Count of "urgent" priority issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.priority.name==''urgent'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 752c79c4182a427daf92c9b97f035956
              name: 'Project [{#NAME}]: Duplicate issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.duplicate_issues[{#NAME}]'
              description: 'Count of "duplicate" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''duplicate'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: c9dd80708bba4864a86b1bf8e4712b56
              name: 'Project [{#NAME}]: Fixed issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.fixed_issues[{#NAME}]'
              description: 'Count of "fixed" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''fixed'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: bdfe85927f6449ac9ed9b5015cbc9e64
              name: 'Project [{#NAME}]: Not fixable issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.not_fixable_issues[{#NAME}]'
              description: 'Count of "not fixable" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''not fixable'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 77738b7324ff439fbe57053df2cac93a
              name: 'Project [{#NAME}]: No change required issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.no_change_required_issues[{#NAME}]'
              description: 'Count of "no change required" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''no change required'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: be2a9993006e4a7f9949f231f0d9e031
              name: 'Project [{#NAME}]: Open issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.open_issues[{#NAME}]'
              description: 'Count of "open" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''open'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: bbfd75e3793a44cbbcaa21dc600d1f26
              name: 'Project [{#NAME}]: Reopened issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.reopened_issues[{#NAME}]'
              description: 'Count of "reopened" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''reopened'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: cf279da7ccad4b97bc99075d8a668bb7
              name: 'Project [{#NAME}]: Suspended issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.suspended_issues[{#NAME}]'
              description: 'Count of "suspended" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''suspended'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: c015da7c78a941baab2bebeefdbb13a9
              name: 'Project [{#NAME}]: Unable to reproduce issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.unable_to_reproduce_issues[{#NAME}]'
              description: 'Count of "unable to reproduce" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''unable to duplicate'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 5957a3ad86c94d909bcc4b4827dd5207
              name: 'Project [{#NAME}]: Will not fix issues'
              type: DEPENDENT
              key: 'mantis.project.resolution.wont_fix_issues[{#NAME}]'
              description: 'Count of "wont fix" resolution issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.resolution.name==''wont fix'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: d92c955b5c944602a56c617ea2f14777
              name: 'Project [{#NAME}]: Block severity issues'
              type: DEPENDENT
              key: 'mantis.project.severity.block_issues[{#NAME}]'
              description: 'Count of "block" severity issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.severity.name==''block'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 09d0ac69f19043ae84ada034074f8580
              name: 'Project [{#NAME}]: Crash severity issues'
              type: DEPENDENT
              key: 'mantis.project.severity.crash_issues[{#NAME}]'
              description: 'Count of "crash" severity issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.severity.name==''crash'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 22f520e836b147d9875cf8cc692b4c23
              name: 'Project [{#NAME}]: Feature severity issues'
              type: DEPENDENT
              key: 'mantis.project.severity.feature_issues[{#NAME}]'
              description: 'Count of "feature" severity issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.severity.name==''feature'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: e6f970c08dac44d6a40b01b65b87de5e
              name: 'Project [{#NAME}]: Major severity issues'
              type: DEPENDENT
              key: 'mantis.project.severity.major_issues[{#NAME}]'
              description: 'Count of "major" severity issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.severity.name==''major'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 31720b277c4948dc8de07cb8d0c274a5
              name: 'Project [{#NAME}]: Minor severity issues'
              type: DEPENDENT
              key: 'mantis.project.severity.minor_issues[{#NAME}]'
              description: 'Count of "minor" severity issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.severity.name==''minor'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 4018e9393c0f4179a4d7abf454b7d2de
              name: 'Project [{#NAME}]: Text severity issues'
              type: DEPENDENT
              key: 'mantis.project.severity.text_issues[{#NAME}]'
              description: 'Count of "text" severity issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.severity.name==''text'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 36d9f115d1084b08964abf4152402dbb
              name: 'Project [{#NAME}]: Trivial severity issues'
              type: DEPENDENT
              key: 'mantis.project.severity.trivial_issues[{#NAME}]'
              description: 'Count of "trivial" severity issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.severity.name==''trivial'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 6ba8709cfad2441cbe4752ef7dd0fc70
              name: 'Project [{#NAME}]: Tweak severity issues'
              type: DEPENDENT
              key: 'mantis.project.severity.tweak_issues[{#NAME}]'
              description: 'Count of "tweak" severity issues.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.severity.name==''tweak'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 6760e0bab28c48468f4f27de02c701b1
              name: 'Project [{#NAME}]: Acknowledged issues'
              type: DEPENDENT
              key: 'mantis.project.status.acknowledged_issues[{#NAME}]'
              description: 'Count of issues with ''acknowledged'' status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.status.name==''acknowledged'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: c72781a9c6d44fd799139a7b2cdfe67a
              name: 'Project [{#NAME}]: Assigned issues'
              type: DEPENDENT
              key: 'mantis.project.status.assigned_issues[{#NAME}]'
              description: 'Count of issues with ''assigned'' status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.status.name==''assigned'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 474bda77652147959ba3fa853c667a87
              name: 'Project [{#NAME}]: Closed issues'
              type: DEPENDENT
              key: 'mantis.project.status.closed_issues[{#NAME}]'
              description: 'Count of issues with ''closed'' status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.status.name==''closed'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: b9954705d26a40d0ba80300d444a5e8c
              name: 'Project [{#NAME}]: Confirmed issues'
              type: DEPENDENT
              key: 'mantis.project.status.confirmed_issues[{#NAME}]'
              description: 'Count of issues with ''confirmed'' status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.status.name==''confirmed'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 91148a664c3548b98b9ae0ebb99edddc
              name: 'Project [{#NAME}]: Feedback issues'
              type: DEPENDENT
              key: 'mantis.project.status.feedback_issues[{#NAME}]'
              description: 'Count of issues with ''feedback'' status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.status.name==''feedback'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 9db47ff1cfbe43849f85d445d334ee0d
              name: 'Project [{#NAME}]: New issues'
              type: DEPENDENT
              key: 'mantis.project.status.new_issues[{#NAME}]'
              description: 'Count of issues with ''new'' status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.status.name==''new'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 0954f125f47c45ba81b46702d53478fa
              name: 'Project [{#NAME}]: Resolved issues'
              type: DEPENDENT
              key: 'mantis.project.status.resolved_issues[{#NAME}]'
              description: 'Count of issues with ''resolved'' status.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.issues[?(@.status.name==''resolved'')].length()'
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: 56afe0d7c0dd471abc14cc0ed926aef7
              name: 'Project [{#NAME}]: Total issues'
              type: DEPENDENT
              key: 'mantis.project.total_issues[{#NAME}]'
              description: 'Count of issues in project.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.issues.length()
              master_item:
                key: 'mantisbt.get.issues[{#NAME}]'
              tags:
                - tag: component
                  value: project
                - tag: project
                  value: '{#NAME}'
            - uuid: f0064281917741aaa9b8e808509077e1
              name: 'Project [{#NAME}]: Get issues'
              type: HTTP_AGENT
              key: 'mantisbt.get.issues[{#NAME}]'
              delay: 20m
              history: '0'
              value_type: TEXT
              description: 'Getting project issues.'
              timeout: 30s
              url: '{$MANTIS.URL}/api/rest/issues?project_id={#ID}&page_size=0'
              http_proxy: '{$MANTIS.HTTP.PROXY}'
              headers:
                - name: Authorization
                  value: '{$MANTIS.TOKEN}'
              tags:
                - tag: component
                  value: raw
          graph_prototypes:
            - uuid: ae0b82f566b9487fa8eeb78565858616
              name: 'Mantis BT: [{#NAME}] Issues by priority'
              width: '400'
              height: '400'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: 199C0D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.priority.none_issues[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.priority.low_issues[{#NAME}]'
                - sortorder: '2'
                  color: 00611C
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.priority.normal_issues[{#NAME}]'
                - sortorder: '3'
                  color: F7941D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.priority.high_issues[{#NAME}]'
                - sortorder: '4'
                  color: FC6EA3
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.priority.urgent_issues[{#NAME}]'
                - sortorder: '5'
                  color: 6C59DC
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.priority.immediate_issues[{#NAME}]'
            - uuid: 09d08c384bfb4bc28f7620cc8e50ada5
              name: 'Mantis BT: [{#NAME}] Issues by resolution'
              width: '400'
              height: '400'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: 199C0D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.open_issues[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.fixed_issues[{#NAME}]'
                - sortorder: '2'
                  color: 00611C
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.reopened_issues[{#NAME}]'
                - sortorder: '3'
                  color: F7941D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.unable_to_reproduce_issues[{#NAME}]'
                - sortorder: '4'
                  color: FC6EA3
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.not_fixable_issues[{#NAME}]'
                - sortorder: '5'
                  color: 6C59DC
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.duplicate_issues[{#NAME}]'
                - sortorder: '6'
                  color: C7A72D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.no_change_required_issues[{#NAME}]'
                - sortorder: '7'
                  color: BA2A5D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.suspended_issues[{#NAME}]'
                - sortorder: '8'
                  color: F230E0
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.resolution.wont_fix_issues[{#NAME}]'
            - uuid: 4f53368cdfff4d6ebdd9dde250e620fe
              name: 'Mantis BT: [{#NAME}] Issues by severity'
              width: '400'
              height: '400'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: 199C0D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.severity.feature_issues[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.severity.trivial_issues[{#NAME}]'
                - sortorder: '2'
                  color: 00611C
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.severity.text_issues[{#NAME}]'
                - sortorder: '3'
                  color: F7941D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.severity.tweak_issues[{#NAME}]'
                - sortorder: '4'
                  color: FC6EA3
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.severity.minor_issues[{#NAME}]'
                - sortorder: '5'
                  color: 6C59DC
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.severity.major_issues[{#NAME}]'
                - sortorder: '6'
                  color: C7A72D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.severity.crash_issues[{#NAME}]'
                - sortorder: '7'
                  color: BA2A5D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.severity.block_issues[{#NAME}]'
            - uuid: ef79603b8e6f4acc99e62f59e651f7c5
              name: 'Mantis BT: [{#NAME}] Issues by status'
              width: '400'
              height: '400'
              type: PIE
              show_3d: 'YES'
              graph_items:
                - color: 199C0D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.status.new_issues[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.status.resolved_issues[{#NAME}]'
                - sortorder: '2'
                  color: 00611C
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.status.closed_issues[{#NAME}]'
                - sortorder: '3'
                  color: F7941D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.status.assigned_issues[{#NAME}]'
                - sortorder: '4'
                  color: FC6EA3
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.status.feedback_issues[{#NAME}]'
                - sortorder: '5'
                  color: 6C59DC
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.status.acknowledged_issues[{#NAME}]'
                - sortorder: '6'
                  color: C7A72D
                  calc_fnc: LAST
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.status.confirmed_issues[{#NAME}]'
            - uuid: 3b03ebc9ff5544ce9011aedbdf51976a
              name: 'Mantis BT: [{#NAME}] Issues total'
              graph_items:
                - color: 199C0D
                  calc_fnc: ALL
                  item:
                    host: 'Mantis BT by HTTP'
                    key: 'mantis.project.total_issues[{#NAME}]'
          master_item:
            key: mantisbt.get.projects
          lld_macro_paths:
            - lld_macro: '{#ENABLED}'
              path: $.enabled
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.projects
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: automation
        - tag: subclass
          value: communication
        - tag: target
          value: mantis-bt
      macros:
        - macro: '{$MANTIS.HTTP.PROXY}'
          description: 'Proxy for http requests.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'HTTP proxy for requests'
            description: 'Proxy for http requests.'
        - macro: '{$MANTIS.LLD.FILTER.PROJECTS.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable projects.'
          config:
            type: TEXT
            priority: '3'
            section_name: Filters
            label: 'Projects filter (include)'
            description: 'Filter of discoverable projects.'
        - macro: '{$MANTIS.LLD.FILTER.PROJECTS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered projects.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Projects filter (exclude)'
            description: 'Filter to exclude discovered projects.'
        - macro: '{$MANTIS.TOKEN}'
          type: SECRET_TEXT
          description: 'MantisBT Token.'
          config:
            type: TEXT
            priority: '2'
            label: 'MantisBT Token'
            description: 'MantisBT Token.'
            required: 'YES'
        - macro: '{$MANTIS.URL}'
          description: 'MantisBT URL.'
          config:
            type: TEXT
            priority: '1'
            label: 'MantisBT URL'
            description: 'MantisBT URL.'
            required: 'YES'
      dashboards:
        - uuid: 9ab065a6d60c4990b97529c290ff7cb9
          name: 'Mantis BT: Issues'
          pages:
            - name: 'Mantis BT: Issues'
              widgets:
                - type: graphprototype
                  name: 'Mantis BT: Issues total'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Mantis BT by HTTP'
                        name: 'Mantis BT: [{#NAME}] Issues total'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graphprototype
                  name: 'Mantis BT: Issues by priority'
                  'y': '5'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Mantis BT by HTTP'
                        name: 'Mantis BT: [{#NAME}] Issues by priority'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graphprototype
                  name: 'Mantis BT: Issues by resolution'
                  x: '18'
                  'y': '5'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Mantis BT by HTTP'
                        name: 'Mantis BT: [{#NAME}] Issues by resolution'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graphprototype
                  name: 'Mantis BT: Issues by severity'
                  x: '36'
                  'y': '5'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Mantis BT by HTTP'
                        name: 'Mantis BT: [{#NAME}] Issues by severity'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graphprototype
                  name: 'Mantis BT: Issues by status'
                  x: '54'
                  'y': '5'
                  width: '18'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Mantis BT by HTTP'
                        name: 'Mantis BT: [{#NAME}] Issues by status'
                    - type: STRING
                      name: reference
                      value: AAAAE
    - uuid: 05894ba2c9184d33992bf1bd21c347f6
      template: 'Memcached by Zabbix agent 2'
      name: 'Memcached by Zabbix agent 2'
      description: |
        Get Memcached metrics from plugin for the New Zabbix Agent (zabbix-agent2).
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/398623-discussion-thread-for-official-zabbix-template-memcached
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        Setup and configure zabbix-agent2 compiled with the Memcached monitoring [plugin](/go/plugins/memcached).
        
        Test availability: `zabbix_get -s memcached-host -k memcached.ping`
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 2c9d2fd0c59249c999cb315243ae994e
          name: 'Commands: FLUSH per second'
          type: DEPENDENT
          key: memcached.commands.flush.rate
          value_type: FLOAT
          description: 'The flush_all command invalidates all items in the database. This operation incurs a performance penalty and shouldn''t take place in production, so check your debug scripts.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.cmd_flush
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: commands
        - uuid: 1f636f46889e41cda9abf80df4ae53a7
          name: 'Commands: GET per second'
          type: DEPENDENT
          key: memcached.commands.get.rate
          value_type: FLOAT
          description: 'Number of GET requests received by server per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.cmd_get
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: commands
        - uuid: 82988c3b793841c4b99a7cbf18f9ac5f
          name: 'Commands: SET per second'
          type: DEPENDENT
          key: memcached.commands.set.rate
          value_type: FLOAT
          description: 'Number of SET requests received by server per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.cmd_set
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: commands
        - uuid: d19885f5dc5b4afaa68ae180c60117ca
          name: 'Maximum number of bytes'
          type: DEPENDENT
          key: memcached.config.limit_maxbytes
          units: B
          description: 'Maximum number of bytes allowed in cache. You can adjust this setting via a config file or the command line while starting your Memcached server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.limit_maxbytes
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: cache
        - uuid: 4ac11cc6469346aa88ad804c8af749a8
          name: 'Open connections'
          type: DEPENDENT
          key: memcached.connections.current
          description: 'The number of clients presently connected'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.curr_connections
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 2d9fee94ab6e458b953bf6f4808e9300
          name: 'Max connections'
          type: DEPENDENT
          key: memcached.connections.max
          description: 'Max number of concurrent connections'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.max_connections
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 166f2d677f0d4d31bdd5313fa7755d56
          name: 'Queued connections per second'
          type: DEPENDENT
          key: memcached.connections.queued.rate
          value_type: FLOAT
          description: 'Number of times that memcached has hit its connections limit and disabled its listener'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.listen_disabled_num
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: connections
          triggers:
            - uuid: 922a59008cd94e0688db8528be296f89
              expression: 'min(/Memcached by Zabbix agent 2/memcached.connections.queued.rate,5m)>{$MEMCACHED.CONN.QUEUED.MAX.WARN}'
              name: 'Memcached: Too many queued connections'
              event_name: 'Memcached: Too many queued connections (over {$MEMCACHED.CONN.QUEUED.MAX.WARN} in 5m)'
              priority: WARNING
              description: 'The max number of connections is reached and a new connection had to wait in the queue as a result.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 7ecc849f54be41dcbc6c037d89a6c240
          name: 'New connections per second'
          type: DEPENDENT
          key: memcached.connections.rate
          value_type: FLOAT
          description: 'Number of connections opened per second'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.total_connections
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 8c224388b06b417fbf89dd25631b10ad
          name: 'Connection structures'
          type: DEPENDENT
          key: memcached.connections.structures
          description: 'Number of  connection structures allocated by the server'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connection_structures
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 891b3347dac6440caef69c9dd7ec0a18
          name: 'Throttled connections'
          type: DEPENDENT
          key: memcached.connections.throttled.rate
          value_type: FLOAT
          description: 'Number of times a client connection was throttled. When sending GETs in batch mode and the connection contains too many requests (limited by -R parameter) the connection might be throttled to prevent starvation.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.conn_yields
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: connections
          triggers:
            - uuid: 33c9b918d21343dea3bcd2c3e3505fc5
              expression: 'min(/Memcached by Zabbix agent 2/memcached.connections.throttled.rate,5m)>{$MEMCACHED.CONN.THROTTLED.MAX.WARN}'
              name: 'Memcached: Too many throttled connections'
              event_name: 'Memcached: Too many throttled connections (over {$MEMCACHED.CONN.THROTTLED.MAX.WARN} in 5m)'
              priority: WARNING
              description: |
                Number of times a client connection was throttled is too high.
                When sending GETs in batch mode and the connection contains too many requests (limited by -R parameter) the connection might be throttled to prevent starvation.
              tags:
                - tag: scope
                  value: performance
        - uuid: f67cae24aa3d4b56b00ef7a3e3a45432
          name: 'CPU sys'
          type: DEPENDENT
          key: memcached.cpu.sys
          value_type: FLOAT
          units: s
          description: 'System CPU consumed by the Memcached server'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.rusage_system
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: a30bb4344e714b7f984e86046797b9b1
              expression: 'nodata(/Memcached by Zabbix agent 2/memcached.cpu.sys,30m)=1'
              name: 'Memcached: Failed to fetch info data'
              event_name: 'Memcached: Failed to fetch info data (or no data for 30m)'
              priority: WARNING
              description: 'Zabbix has not received any data for items for the last 30 minutes.'
              manual_close: 'YES'
              dependencies:
                - name: 'Memcached: Service is down'
                  expression: 'last(/Memcached by Zabbix agent 2/memcached.ping["{$MEMCACHED.CONN.URI}"])=0'
              tags:
                - tag: scope
                  value: notice
        - uuid: d7b2094d846243e59a092dc42bbe30c3
          name: 'CPU user'
          type: DEPENDENT
          key: memcached.cpu.user
          value_type: FLOAT
          units: s
          description: 'User CPU consumed by the Memcached server'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.rusage_user
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: cpu
        - uuid: 57a4c2e763c3430daacd4495b91c3e74
          name: Ping
          key: 'memcached.ping["{$MEMCACHED.CONN.URI}"]'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: c6184e4c3cc54e199244dc8efb3cacf8
              expression: 'last(/Memcached by Zabbix agent 2/memcached.ping["{$MEMCACHED.CONN.URI}"])=0'
              name: 'Memcached: Service is down'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 7ecd604d8f1143d6b3cf02c4d0ef22dc
          name: 'Process id'
          type: DEPENDENT
          key: memcached.process_id
          description: 'PID of the server process'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pid
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: application
        - uuid: ce294455f98a4c8c98a4ec70abb2b996
          name: 'Bytes used'
          type: DEPENDENT
          key: memcached.stats.bytes
          value_type: FLOAT
          units: B
          description: 'Current number of bytes used to store items.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bytes
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: memory
        - uuid: 7977b28169a9411d98549d0c85ffb78b
          name: 'Read bytes per second'
          type: DEPENDENT
          key: memcached.stats.bytes_read.rate
          value_type: FLOAT
          units: Bps
          description: 'The network''s read rate per second in B/sec'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bytes_read
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: network
        - uuid: e81a3fa33a124cdfba36e40d1be6edd8
          name: 'Written bytes per second'
          type: DEPENDENT
          key: memcached.stats.bytes_written.rate
          value_type: FLOAT
          units: Bps
          description: 'The network''s read rate per second in B/sec'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bytes_written
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: network
        - uuid: efc05c70a56d4be4a6ad59fa1c2915a3
          name: 'Current number of items stored'
          type: DEPENDENT
          key: memcached.stats.curr_items
          description: 'Current number of items stored by this instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.curr_items
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: keyspace
        - uuid: ce47a49ce6af46b7bc9757ed1b5cd02e
          name: 'Evictions per second'
          type: DEPENDENT
          key: memcached.stats.evictions.rate
          description: |
            "An eviction is when an item that still has time to live is removed from the cache because a brand new item needs to be allocated.
            The item is selected with a pseudo-LRU mechanism.
            A high number of evictions coupled with a low hit rate means your application is setting a large number of keys that are never used again."
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.evictions
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: keyspace
        - uuid: 07acbb8eb36049258ca414d9e314ed79
          name: 'Hits per second'
          type: DEPENDENT
          key: memcached.stats.hits.rate
          description: 'Number of successful GET requests (items requested and found) per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.get_hits
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: requests
        - uuid: 3988a6c751814573869ed3533039faac
          name: 'Misses per second'
          type: DEPENDENT
          key: memcached.stats.misses.rate
          description: 'Number of missed GET requests (items requested but not found) per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.get_misses
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: requests
        - uuid: 7c28164178fc493c9f202df0c7103bb5
          name: Threads
          type: DEPENDENT
          key: memcached.stats.threads
          description: 'Number of worker threads requested'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.threads
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: threads
        - uuid: 6bbc3deb32f947b2bc966c15f6e76726
          name: 'New items per second'
          type: DEPENDENT
          key: memcached.stats.total_items.rate
          description: 'Number of new items stored per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.total_items
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: keyspace
        - uuid: 3a096b6d7d9945fe9a25d1fb5c835f1a
          name: 'Get status'
          key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          history: '0'
          value_type: TEXT
          tags:
            - tag: component
              value: raw
        - uuid: 4e90d731c49447cf9bb6a72cb9675586
          name: Uptime
          type: DEPENDENT
          key: memcached.uptime
          units: s
          description: 'Number of seconds since Memcached server start'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.uptime
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: c53a2d7b861b41458976bfa03ab1a105
              expression: 'last(/Memcached by Zabbix agent 2/memcached.uptime)<10m'
              name: 'Memcached: Service has been restarted'
              event_name: 'Memcached: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 64986809298145ebbf8f6ded1c41f2df
          name: 'Memcached version'
          type: DEPENDENT
          key: memcached.version
          value_type: CHAR
          description: 'Version of the Memcached server'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'memcached.stats["{$MEMCACHED.CONN.URI}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 086e757b4a2048eabd5e91b4a0ccc07b
              expression: 'last(/Memcached by Zabbix agent 2/memcached.version,#1)<>last(/Memcached by Zabbix agent 2/memcached.version,#2) and length(last(/Memcached by Zabbix agent 2/memcached.version))>0'
              name: 'Memcached: Version has changed'
              event_name: 'Memcached: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The Memcached version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: utilities
        - tag: target
          value: memcached
      macros:
        - macro: '{$MEMCACHED.CONN.PRC.MAX.WARN}'
          value: '80'
          description: 'Maximum percentage of connected clients'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Max percentage of connected clients'
            description: 'Maximum percentage of connected clients In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMCACHED.CONN.QUEUED.MAX.WARN}'
          value: '1'
          description: 'Maximum number of queued connections per second'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Max queued connections per second'
            description: 'Maximum number of queued connections per second'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMCACHED.CONN.THROTTLED.MAX.WARN}'
          value: '1'
          description: 'Maximum number of throttled connections per second'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Max throttled connections per second'
            description: 'Maximum number of throttled connections per second'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMCACHED.CONN.URI}'
          value: 'tcp://localhost:11211'
          description: 'Connection string in the URI format (password is not used). This param overwrites a value configured in the "Plugins.Memcached.Uri" option of the configuration file (if it''s set), otherwise, the plugin''s default value is used: "tcp://localhost:11211"'
          config:
            type: TEXT
            priority: '1'
            label: 'Connection string'
            description: 'Connection string in the URI format (password is not used). This param overwrites a value configured in the "Plugins.Memcached.Uri" option of the configuration file (if it''s set), otherwise, the plugin''s default value is used: "tcp://localhost:11211"'
            required: 'YES'
        - macro: '{$MEMCACHED.MEM.PUSED.MAX.WARN}'
          value: '90'
          description: 'Maximum percentage of memory used'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Max percentage of memory used'
            description: 'Maximum percentage of memory used In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 6bdcf15253fb4f7692a71c6f1e16d6c6
          name: 'Memcached: Overview'
          pages:
            - name: Main
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Memcached by Zabbix agent 2'
                        name: 'Memcached: Commands'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Memcached by Zabbix agent 2'
                        name: 'Memcached: Connections'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Memcached by Zabbix agent 2'
                        name: 'Memcached: Network'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Memcached by Zabbix agent 2'
                        name: 'Memcached: Keyspace'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Memcached by Zabbix agent 2'
                        name: 'Memcached: Connections rate'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Memcached by Zabbix agent 2'
                        name: 'Memcached: Uptime'
                    - type: STRING
                      name: reference
                      value: AAAAF
      valuemaps:
        - uuid: acd57d4f29a34286a801ce49cd6553fe
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: cbf70ed444394566bcf213dd63d4d352
      template: 'Microsoft Exchange Server 2016 by Zabbix agent'
      name: 'Microsoft Exchange Server 2016 by Zabbix agent'
      description: |
        The template to monitor Microsoft Exchange Server 2016 by Zabbix that works without any external scripts.
        The metrics are collected by Zabbix agent.
        Recommended to use it with "OS Windows by Zabbix agent" template.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/415007-discussion-thread-for-official-zabbix-template-microsoft-exchange
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Official Template for Microsoft Exchange Server 2016.
        
        
        ## Setup
        
        Metrics are collected by Zabbix agent.
        
        1\. Import the template into Zabbix.
        
        2\. Link the imported template to a host with MS Exchange.
        
        Note that template doesn't provide information about Windows services state. Recommended to use it with "OS Windows by Zabbix agent" template.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: b4978a9a4cff4ce88fbc82683b61eec4
          name: 'Databases total mounted'
          key: 'perf_counter_en["\MSExchange Active Manager(_total)\Database Mounted"]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          description: 'Shows the number of active database copies on the server.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          tags:
            - tag: component
              value: application
        - uuid: 9b59700d8db8472fbde41c85c7a06ffc
          name: 'ActiveSync: ping command pending'
          key: 'perf_counter_en["\MSExchange ActiveSync\Ping Commands Pending", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of ping commands currently pending in the queue.'
          tags:
            - tag: component
              value: application
        - uuid: fa70b4e2d17c44c6945dd2d1c971c34c
          name: 'ActiveSync: requests per second'
          key: 'perf_counter_en["\MSExchange ActiveSync\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of HTTP requests received from the client via ASP.NET per second. Determines the current Exchange ActiveSync request rate. Used only to determine current user load.'
          tags:
            - tag: component
              value: application
        - uuid: 8528015c73134a239d7ac235464788dd
          name: 'ActiveSync: sync commands per second'
          key: 'perf_counter_en["\MSExchange ActiveSync\Sync Commands/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of sync commands processed per second. Clients use this command to synchronize items within a folder.'
          tags:
            - tag: component
              value: application
        - uuid: 456cb7af0b224a59afabae36d24d2cbc
          name: 'Autodiscover: requests per second'
          key: 'perf_counter_en["\MSExchangeAutodiscover\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of Autodiscover service requests processed each second. Determines current user load.'
          tags:
            - tag: component
              value: application
        - uuid: b9a539175cbb4259b064a787a25e9dbe
          name: 'Availability Service: availability requests per second'
          key: 'perf_counter_en["\MSExchange Availability Service\Availability Requests (sec)", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of requests serviced per second. The request can be only for free/ busy information or include suggestions. One request may contain multiple mailboxes. Determines the rate at which Availability service requests are occurring.'
          tags:
            - tag: component
              value: application
        - uuid: 3c2a83dfef35497baf8c38b801854882
          name: 'Outlook Web App: current unique users'
          key: 'perf_counter_en["\MSExchange OWA\Current Unique Users", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of unique users currently logged on to Outlook Web App. This value monitors the number of unique active user sessions, so that users are only removed from this counter after they log off or their session times out. Determines current user load.'
          tags:
            - tag: component
              value: application
        - uuid: 2c7fd331673e4d84aa09551222469b08
          name: 'Outlook Web App: requests per second'
          key: 'perf_counter_en["\MSExchange OWA\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of requests handled by Outlook Web App per second. Determines current user load.'
          tags:
            - tag: component
              value: application
        - uuid: 9808449df53148a9a988a69d66944371
          name: 'MSExchangeWS: requests per second'
          key: 'perf_counter_en["\MSExchangeWS\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of requests processed each second. Determines current user load.'
          tags:
            - tag: component
              value: application
      discovery_rules:
        - uuid: f3d6e34eaff844bfab582cb55d679e82
          name: 'Databases discovery'
          key: 'perf_instance.discovery["MSExchange Active Manager"]'
          delay: 1h
          description: 'Discovery of Exchange databases.'
          item_prototypes:
            - uuid: 0b2d46b766f24947b76b49d8368044a5
              name: 'Active Manager [{#INSTANCE}]: Database copy role'
              key: 'perf_counter_en["\MSExchange Active Manager({#INSTANCE})\Database Copy Role Active"]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Database copy active or passive role.'
              valuemap:
                name: 'Exchange database copy role'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
            - uuid: 9ad0743878ed411ab1e76b8e774e91e9
              name: 'Information Store [{#INSTANCE}]: Page faults per second'
              key: 'perf_counter_en["\MSExchange Database({#INF.STORE})\Database Page Fault Stalls/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Indicates the rate of page faults that can''t be serviced because there are no pages available for allocation from the database cache. If this counter is above 0, it''s an indication that the MSExchange Database\I/O Database Writes (Attached) Average Latency is too high.'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: 07e0dce4546b4d15bfbb34fa2044c319
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange Database({#INF.STORE})\Database Page Fault Stalls/sec", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.FAULTS.TIME})>{$MS.EXCHANGE.DB.FAULTS.WARN}'
                  name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: Page faults is too high'
                  event_name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: Page faults is too high (>{$MS.EXCHANGE.DB.FAULTS.WARN} for {$MS.EXCHANGE.DB.FAULTS.TIME})'
                  priority: AVERAGE
                  description: 'Too much page faults stalls for database "{#INSTANCE}". This counter should be 0 on production servers.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 1af9e0b4abb74e07af1d0d183333f0c4
              name: 'Information Store [{#INSTANCE}]: Log records stalled'
              key: 'perf_counter_en["\MSExchange Database({#INF.STORE})\Log Record Stalls/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Indicates the number of log records that can''t be added to the log buffers per second because the log buffers are full. The average value should be below 10 per second. Spikes (maximum values) shouldn''t be higher than 100 per second.'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: 688cbee95ef2432abc03c81d39049a44
                  expression: 'avg(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange Database({#INF.STORE})\Log Record Stalls/sec", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.LOG.STALLS.TIME})>{$MS.EXCHANGE.LOG.STALLS.WARN}'
                  name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: Log records stalls is too high'
                  event_name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: Log records stalls is too high (>{$MS.EXCHANGE.LOG.STALLS.WARN} for {$MS.EXCHANGE.LOG.STALLS.TIME})'
                  priority: AVERAGE
                  description: 'Stalled log records too high. The average value should be less than 10 threads waiting.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 1b53de26c73a49bdb7fe55328db03ddd
              name: 'Information Store [{#INSTANCE}]: Log threads waiting'
              key: 'perf_counter_en["\MSExchange Database({#INF.STORE})\Log Threads Waiting", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Indicates the number of threads waiting to complete an update of the database by writing their data to the log.'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
            - uuid: 1da31e52e5dd4b72bea5811a9bb06a01
              name: 'Database Counters [{#INSTANCE}]: Active database read operations per second'
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached)/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Shows the number of database read operations.'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
            - uuid: 0bc5750ca13f4f738904e45f9860b76a
              name: 'Database Counters [{#INSTANCE}]: Active database read operations latency'
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Shows the average length of time per database read operation. Should be less than 20 ms on average.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: 053583bbe81d4ce0961ee365cee5a802
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.ACTIVE.READ.TIME})>{$MS.EXCHANGE.DB.ACTIVE.READ.WARN}'
                  name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average read time latency is too high'
                  event_name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average read time latency is too high (>{$MS.EXCHANGE.DB.ACTIVE.READ.WARN}s for {$MS.EXCHANGE.DB.ACTIVE.READ.TIME})'
                  priority: WARNING
                  description: 'Should be less than 20ms on average.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 3095c843659341fd854fb297a9fdf14a
              name: 'Database Counters [{#INSTANCE}]: Passive database read operations latency'
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Shows the average length of time per passive database read operation. Should be less than 200ms on average.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: 4a07a86df67b4aa08e538d4463c2d3df
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.PASSIVE.READ.TIME})>{$MS.EXCHANGE.DB.PASSIVE.READ.WARN}'
                  name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average read time latency is too high'
                  event_name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average read time latency is too high (>{$MS.EXCHANGE.DB.PASSIVE.READ.WARN}s for {$MS.EXCHANGE.DB.PASSIVE.READ.TIME})'
                  priority: WARNING
                  description: 'Should be less than 200ms on average.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 7456bcbbac114ead9c417bcbeefa0e1c
              name: 'Database Counters [{#INSTANCE}]: Active database write operations per second'
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached)/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Shows the number of database write operations per second for each attached database instance.'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
            - uuid: e45413cc0e46458f9a00132b30c7c354
              name: 'Database Counters [{#INSTANCE}]: Active database write operations latency'
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Shows the average length of time per database write operation. Should be less than 50ms on average.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: 87cc1ca8b39541e89eb02a1c094892c0
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.ACTIVE.WRITE.TIME})>{$MS.EXCHANGE.DB.ACTIVE.WRITE.WARN}'
                  name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average write time latency is too high for {$MS.EXCHANGE.DB.ACTIVE.WRITE.TIME}'
                  priority: WARNING
                  description: 'Should be less than 50ms on average.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 5b7fc1949b67404584d2809556f3d595
              name: 'Database Counters [{#INSTANCE}]: Passive database write operations latency'
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Shows the average length of time, in ms, per passive database write operation. Should be less than the read latency for the same instance, as measured by the MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency counter.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
            - uuid: 6128c55bf63a4c48981dfccd077b4635
              name: 'Information Store [{#INSTANCE}]: Active mailboxes count'
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\Active mailboxes"]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Number of active mailboxes in this database.'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
            - uuid: 4db79306eb044db899be5e7672651959
              name: 'Information Store [{#INSTANCE}]: Database state'
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\Database State"]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: |
                Database state. Possible values:
                0: Database without any copy and dismounted.
                1: Database is a primary database and mounted.
                2: Database is a passive copy and the state is healthy.
              valuemap:
                name: 'Exchange database state'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3m
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
            - uuid: 6bc9bc6d20df4de89ff03d63f21f6eab
              name: 'Information Store [{#INSTANCE}]: RPC requests latency'
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'RPC Latency average is the average latency of RPC requests per database. Average is calculated over all RPCs since exrpc32 was loaded. Should be less than 50ms at all times, with spikes less than 100ms.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: b9b2f224082a4ec687d121534402170c
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.RPC.TIME})>{$MS.EXCHANGE.RPC.WARN}'
                  name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: RPC Requests latency is too high'
                  event_name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: RPC Requests latency is too high (>{$MS.EXCHANGE.RPC.WARN}s for {$MS.EXCHANGE.RPC.TIME})'
                  priority: WARNING
                  description: 'Should be less than 50ms at all times, with spikes less than 100ms.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 5321c367d288406d8d9eac217a444e9c
              name: 'Information Store [{#INSTANCE}]: RPC requests per second'
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC Operations/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Shows the number of RPC operations per second for each database instance.'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
            - uuid: 701d6a4fcfe14f899e0282eb75e08753
              name: 'Information Store [{#INSTANCE}]: RPC requests total'
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC requests", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Indicates the overall RPC requests currently executing within the information store process. Should be below 70 at all times.'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: 6349d2b6cd13413187b8c77e10fa96a2
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC requests", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.RPC.COUNT.TIME})>{$MS.EXCHANGE.RPC.COUNT.WARN}'
                  name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: RPC Requests total count is too high'
                  event_name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: RPC Requests total count is too high (>{$MS.EXCHANGE.RPC.COUNT.WARN} for {$MS.EXCHANGE.RPC.COUNT.TIME})'
                  priority: WARNING
                  description: 'Should be below 70 at all times.'
                  tags:
                    - tag: scope
                      value: performance
          trigger_prototypes:
            - uuid: 2eb26276a3a24ce4af517ff8740f4566
              expression: 'avg(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.PASSIVE.WRITE.TIME})>avg(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.PASSIVE.WRITE.TIME})'
              name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average write time latency is higher than read time latency for {$MS.EXCHANGE.DB.PASSIVE.WRITE.TIME}'
              priority: WARNING
              description: 'Should be less than the read latency for the same instance, as measured by the MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency counter.'
              tags:
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: d3de0d2651bf49bc856c3354437cea70
              name: 'Database Counters [{#INSTANCE}]: Read and write stats'
              graph_items:
                - color: 199C0D
                  yaxisside: RIGHT
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached)/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '1'
                  color: F63100
                  yaxisside: RIGHT
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached)/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  
                  data.forEach(function(instance) {
                  	if (instance["{#INSTANCE}"] === '_total') {
                  		instance["{#INF.STORE}"] = 'Information Store';
                  	}
                  	else {
                  		instance["{#INF.STORE}"] = 'Information Store - ' + instance["{#INSTANCE}"];
                  	}
                  })
                  
                  return JSON.stringify(data);
        - uuid: 635f8c96cf544dcd97e4a58b2e9353de
          name: 'LDAP discovery'
          key: 'perf_instance_en.discovery["MSExchange ADAccess Domain Controllers"]'
          delay: 1h
          description: 'Discovery of domain controller.'
          item_prototypes:
            - uuid: b1c046c5aca04b85bf907f83c05b4142
              name: 'Domain Controller [{#INSTANCE}]: Read time'
              key: 'perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Read Time", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Time that it takes to send an LDAP read request to the domain controller in question and get a response. Should ideally be below 50 ms; spikes below 100 ms are acceptable.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: ldap
                - tag: ldap
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: 799366198fd04746bf265431c00269ab
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Read Time", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.LDAP.TIME})>{$MS.EXCHANGE.LDAP.WARN}'
                  name: 'MS Exchange 2016: Domain Controller [{#INSTANCE}]: LDAP read time is too high'
                  event_name: 'MS Exchange 2016: Domain Controller [{#INSTANCE}]: LDAP read time is too high (>{$MS.EXCHANGE.LDAP.WARN}s for {$MS.EXCHANGE.LDAP.TIME})'
                  priority: AVERAGE
                  description: 'Should be less than 50ms at all times, with spikes less than 100ms.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: c7326e542e534afd9a1df9a8ec1226e4
              name: 'Domain Controller [{#INSTANCE}]: Search time'
              key: 'perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Search Time", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Time that it takes to send an LDAP search request and get a response. Should ideally be below 50 ms; spikes below 100 ms are acceptable.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: ldap
                - tag: ldap
                  value: '{#INSTANCE}'
              trigger_prototypes:
                - uuid: 0db1b4e3f149481e8b04fe8b5eafa508
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent/perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Search Time", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.LDAP.TIME})>{$MS.EXCHANGE.LDAP.WARN}'
                  name: 'MS Exchange 2016: Domain Controller [{#INSTANCE}]: LDAP search time is too high'
                  event_name: 'MS Exchange 2016: Domain Controller [{#INSTANCE}]: LDAP search time is too high (>{$MS.EXCHANGE.LDAP.WARN}s for {$MS.EXCHANGE.LDAP.TIME})'
                  priority: AVERAGE
                  description: 'Should be less than 50ms at all times, with spikes less than 100ms.'
                  tags:
                    - tag: scope
                      value: performance
          graph_prototypes:
            - uuid: 68caa8f72b21476f8f18695843c14328
              name: 'Domain Controller [{#INSTANCE}]: Timings'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent'
                    key: 'perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Read Time", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent'
                    key: 'perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Search Time", {$MS.EXCHANGE.PERF.INTERVAL}]'
        - uuid: 8a1cb7e22e55406e8e721a2189d7e00d
          name: 'Web services discovery'
          key: 'perf_instance_en.discovery["Web Service"]'
          delay: 1h
          description: 'Discovery of Exchange web services.'
          item_prototypes:
            - uuid: 3c3d1881bb294a31afa09605699a6965
              name: 'Web Service [{#INSTANCE}]: Current connections'
              key: 'perf_counter_en["\Web Service({#INSTANCE})\Current Connections", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Shows the current number of connections established to the each Web Service.'
              tags:
                - tag: component
                  value: web
                - tag: web
                  value: '{#INSTANCE}'
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: communication
        - tag: subclass
          value: messaging
        - tag: target
          value: ms-exchange
      macros:
        - macro: '{$MS.EXCHANGE.DB.ACTIVE.READ.TIME}'
          value: 5m
          description: 'The time during which the active database read operations latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Time allowed above threshold for active DB read latency'
            description: 'The time during which the active database read operations latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.DB.ACTIVE.READ.WARN}'
          value: '0.02'
          description: 'Threshold for active database read operations latency trigger.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Threshold for active DB read latency trigger'
            description: 'Threshold for active database read operations latency trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.DB.ACTIVE.WRITE.TIME}'
          value: 10m
          description: 'The time during which the active database write operations latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Time allowed above threshold for active DB write latency'
            description: 'The time during which the active database write operations latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.DB.ACTIVE.WRITE.WARN}'
          value: '0.05'
          description: 'Threshold for active database write operations latency trigger.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Threshold for active DB write latency trigger'
            description: 'Threshold for active database write operations latency trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.DB.FAULTS.TIME}'
          value: 5m
          description: 'The time during which the database page faults may exceed the threshold.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time allowed above threshold for database page faults'
            description: 'The time during which the database page faults may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.DB.FAULTS.WARN}'
          value: '0'
          description: 'Threshold for database page faults trigger.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for database page faults trigger'
            description: 'Threshold for database page faults trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.DB.PASSIVE.READ.TIME}'
          value: 5m
          description: 'The time during which the passive database read operations latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Time allowed above threshold for passive DB read latency'
            description: 'The time during which the passive database read operations latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.DB.PASSIVE.READ.WARN}'
          value: '0.2'
          description: 'Threshold for passive database read operations latency trigger.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Threshold for passive DB read latency trigger'
            description: 'Threshold for passive database read operations latency trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.DB.PASSIVE.WRITE.TIME}'
          value: 10m
          description: 'The time during which the passive database write operations latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'Time allowed above threshold for passive DB write latency'
            description: 'The time during which the passive database write operations latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.LDAP.TIME}'
          value: 5m
          description: 'The time during which the LDAP metrics may exceed the threshold.'
          config:
            type: TEXT
            priority: '17'
            section_name: Thresholds
            label: 'Time allowed above threshold for LDAP metrics'
            description: 'The time during which the LDAP metrics may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.LDAP.WARN}'
          value: '0.05'
          description: 'Threshold for LDAP triggers.'
          config:
            type: TEXT
            priority: '18'
            section_name: Thresholds
            label: 'Threshold for LDAP triggers'
            description: 'Threshold for LDAP triggers.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.LOG.STALLS.TIME}'
          value: 10m
          description: 'The time during which the log records stalled may exceed the threshold.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Time allowed above threshold for stalled log records'
            description: 'The time during which the log records stalled may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.LOG.STALLS.WARN}'
          value: '100'
          description: 'Threshold for log records stalled trigger.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Threshold for stalled log records trigger'
            description: 'Threshold for log records stalled trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value: '60'
          description: 'Update interval for perf_counter_en items.'
          config:
            type: TEXT
            priority: '1'
            section_name: Other
            label: 'Update interval for perf_counter_en items'
            description: 'Update interval for perf_counter_en items.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.RPC.COUNT.TIME}'
          value: 5m
          description: 'The time during which the RPC total requests may exceed the threshold.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'Time allowed above threshold for RPC total requests'
            description: 'The time during which the RPC total requests may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.RPC.COUNT.WARN}'
          value: '70'
          description: 'Threshold for LDAP triggers.'
          config:
            type: TEXT
            priority: '16'
            section_name: Thresholds
            label: 'Threshold for LDAP triggers'
            description: 'Threshold for LDAP triggers.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.RPC.TIME}'
          value: 10m
          description: 'The time during which the RPC requests latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Time allowed above threshold for RPC requests latency'
            description: 'The time during which the RPC requests latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.RPC.WARN}'
          value: '0.05'
          description: 'Threshold for RPC requests latency trigger.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'Threshold for RPC requests latency trigger'
            description: 'Threshold for RPC requests latency trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      valuemaps:
        - uuid: 4a0e19e58ade4e8c878a6b87f4021416
          name: 'Exchange database copy role'
          mappings:
            - value: '0'
              newvalue: Passive
            - value: '1'
              newvalue: Active
        - uuid: 2d131c4a033c4145a6bd66ec4c0c030a
          name: 'Exchange database state'
          mappings:
            - value: '0'
              newvalue: Dismounted
            - value: '1'
              newvalue: Mounted
            - value: '2'
              newvalue: Healthy
    - uuid: a0e05ca631034676821b7e0e1ce25488
      template: 'Microsoft Exchange Server 2016 by Zabbix agent active'
      name: 'Microsoft Exchange Server 2016 by Zabbix agent active'
      description: |
        The template to monitor Microsoft Exchange Server 2016 by Zabbix that works without any external scripts.
        The metrics are collected by Zabbix agent active.
        Recommended to use it with "OS Windows by Zabbix agent active" template.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/415007-discussion-thread-for-official-zabbix-template-microsoft-exchange
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Official Template for Microsoft Exchange Server 2016.
        
        
        ## Setup
        
        Metrics are collected by Zabbix agent active.
        
        1\. Import the template into Zabbix.
        
        2\. Link the imported template to a host with MS Exchange.
        
        Note that template doesn't provide information about Windows services state. Recommended to use it with "OS Windows by Zabbix agent active" template.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 5af1c3257c264abda20023eae10b3b86
          name: 'Databases total mounted'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchange Active Manager(_total)\Database Mounted"]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          description: 'Shows the number of active database copies on the server.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          tags:
            - tag: component
              value: application
        - uuid: bb9de29f56124a77a6ac1d3f8cbd72e9
          name: 'ActiveSync: ping command pending'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchange ActiveSync\Ping Commands Pending", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of ping commands currently pending in the queue.'
          tags:
            - tag: component
              value: application
        - uuid: 038e740be37c40339520b4c4b1b0d18b
          name: 'ActiveSync: requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchange ActiveSync\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of HTTP requests received from the client via ASP.NET per second. Determines the current Exchange ActiveSync request rate. Used only to determine current user load.'
          tags:
            - tag: component
              value: application
        - uuid: 953665dbe8f948ff821333a4d50eada6
          name: 'ActiveSync: sync commands per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchange ActiveSync\Sync Commands/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of sync commands processed per second. Clients use this command to synchronize items within a folder.'
          tags:
            - tag: component
              value: application
        - uuid: c8ed8a7e36c6453183aee1a778a4749a
          name: 'Autodiscover: requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchangeAutodiscover\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of Autodiscover service requests processed each second. Determines current user load.'
          tags:
            - tag: component
              value: application
        - uuid: 2260d98130814d369ac1c90324caaa26
          name: 'Availability Service: availability requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchange Availability Service\Availability Requests (sec)", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of requests serviced per second. The request can be only for free/ busy information or include suggestions. One request may contain multiple mailboxes. Determines the rate at which Availability service requests are occurring.'
          tags:
            - tag: component
              value: application
        - uuid: b4336fce2d27450b95de4f1bbbf947f3
          name: 'Outlook Web App: current unique users'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchange OWA\Current Unique Users", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of unique users currently logged on to Outlook Web App. This value monitors the number of unique active user sessions, so that users are only removed from this counter after they log off or their session times out. Determines current user load.'
          tags:
            - tag: component
              value: application
        - uuid: 14344546f3a748fbb8f78e503e92255f
          name: 'Outlook Web App: requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchange OWA\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of requests handled by Outlook Web App per second. Determines current user load.'
          tags:
            - tag: component
              value: application
        - uuid: e8c8e348c01e48ad92ee02060717e097
          name: 'MSExchangeWS: requests per second'
          type: ZABBIX_ACTIVE
          key: 'perf_counter_en["\MSExchangeWS\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
          delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value_type: FLOAT
          description: 'Shows the number of requests processed each second. Determines current user load.'
          tags:
            - tag: component
              value: application
        - uuid: b20b5df8198e4cdc8b584061f6815d5d
          name: 'Active agent availability'
          type: INTERNAL
          key: 'zabbix[host,active_agent,available]'
          description: |
            Availability of active checks on the host. The value of this item corresponds to availability icons in the host list.
            Possible values:
            0 - unknown
            1 - available
            2 - not available
          valuemap:
            name: zabbix.host.active_agent.available
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 8f04c3d6b3224382abf7472e8a4e38ba
              expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/zabbix[host,active_agent,available],{$AGENT.TIMEOUT})=2'
              name: 'MS Exchange 2016: Active checks are not available'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Active checks are considered unavailable. Agent is not sending heartbeat for prolonged time.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 3b23aa50517a4081b8463f694757cd0c
          name: 'Databases discovery'
          type: ZABBIX_ACTIVE
          key: 'perf_instance.discovery["MSExchange Active Manager"]'
          delay: 1h
          description: 'Discovery of Exchange databases.'
          item_prototypes:
            - uuid: 7e0a5f324690432199728f577dbcc91a
              name: 'Active Manager [{#INSTANCE}]: Database copy role'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Active Manager({#INSTANCE})\Database Copy Role Active"]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Database copy active or passive role.'
              valuemap:
                name: 'Exchange database copy role'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              tags:
                - tag: component
                  value: application
            - uuid: 947396e622b24e2090a23607ee7a06a4
              name: 'Information Store [{#INSTANCE}]: Page faults per second'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database({#INF.STORE})\Database Page Fault Stalls/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Indicates the rate of page faults that can''t be serviced because there are no pages available for allocation from the database cache. If this counter is above 0, it''s an indication that the MSExchange Database\I/O Database Writes (Attached) Average Latency is too high.'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: c3540ee98c464c3bbcf680e26ce6165a
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange Database({#INF.STORE})\Database Page Fault Stalls/sec", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.FAULTS.TIME})>{$MS.EXCHANGE.DB.FAULTS.WARN}'
                  name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: Page faults is too high'
                  event_name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: Page faults is too high (>{$MS.EXCHANGE.DB.FAULTS.WARN} for {$MS.EXCHANGE.DB.FAULTS.TIME})'
                  priority: AVERAGE
                  description: 'Too much page faults stalls for database "{#INSTANCE}". This counter should be 0 on production servers.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 8c1ca3d79ef445668e8a5ba04a278e6f
              name: 'Information Store [{#INSTANCE}]: Log records stalled'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database({#INF.STORE})\Log Record Stalls/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Indicates the number of log records that can''t be added to the log buffers per second because the log buffers are full. The average value should be below 10 per second. Spikes (maximum values) shouldn''t be higher than 100 per second.'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 1e1f575f25d74f7480f9812b54ad8f39
                  expression: 'avg(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange Database({#INF.STORE})\Log Record Stalls/sec", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.LOG.STALLS.TIME})>{$MS.EXCHANGE.LOG.STALLS.WARN}'
                  name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: Log records stalls is too high'
                  event_name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: Log records stalls is too high (>{$MS.EXCHANGE.LOG.STALLS.WARN} for {$MS.EXCHANGE.LOG.STALLS.TIME})'
                  priority: AVERAGE
                  description: 'Stalled log records too high. The average value should be less than 10 threads waiting.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 9173dba68e55434aaa324b3e38ba22bb
              name: 'Information Store [{#INSTANCE}]: Log threads waiting'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database({#INF.STORE})\Log Threads Waiting", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Indicates the number of threads waiting to complete an update of the database by writing their data to the log.'
              tags:
                - tag: component
                  value: application
            - uuid: 9ad96174c29142f6904322d08d76fe8e
              name: 'Database Counters [{#INSTANCE}]: Active database read operations per second'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached)/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Shows the number of database read operations.'
              tags:
                - tag: component
                  value: application
            - uuid: 0df865f52f304f97aa01a706e455e153
              name: 'Database Counters [{#INSTANCE}]: Active database read operations latency'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Shows the average length of time per database read operation. Should be less than 20 ms on average.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 85be5ba2d3e847a485c968ac47afc495
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.ACTIVE.READ.TIME})>{$MS.EXCHANGE.DB.ACTIVE.READ.WARN}'
                  name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average read time latency is too high'
                  event_name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average read time latency is too high (>{$MS.EXCHANGE.DB.ACTIVE.READ.WARN}s for {$MS.EXCHANGE.DB.ACTIVE.READ.TIME})'
                  priority: WARNING
                  description: 'Should be less than 20ms on average.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 8381c3c3971f4b3380cfe5d663e31416
              name: 'Database Counters [{#INSTANCE}]: Passive database read operations latency'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Shows the average length of time per passive database read operation. Should be less than 200ms on average.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 6a4fe761e26c4b6497106da05dac40fe
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.PASSIVE.READ.TIME})>{$MS.EXCHANGE.DB.PASSIVE.READ.WARN}'
                  name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average read time latency is too high'
                  event_name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average read time latency is too high (>{$MS.EXCHANGE.DB.PASSIVE.READ.WARN}s for {$MS.EXCHANGE.DB.PASSIVE.READ.TIME})'
                  priority: WARNING
                  description: 'Should be less than 200ms on average.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: defb4f7dfb6f4a97a4928bab82897845
              name: 'Database Counters [{#INSTANCE}]: Active database write operations per second'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached)/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Shows the number of database write operations per second for each attached database instance.'
              tags:
                - tag: component
                  value: application
            - uuid: 9c83e27f56f94bea9e635158037a0c8b
              name: 'Database Counters [{#INSTANCE}]: Active database write operations latency'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Shows the average length of time per database write operation. Should be less than 50ms on average.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 6feb589776294bf0ab31a55af188f1f6
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.ACTIVE.WRITE.TIME})>{$MS.EXCHANGE.DB.ACTIVE.WRITE.WARN}'
                  name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average write time latency is too high for {$MS.EXCHANGE.DB.ACTIVE.WRITE.TIME}'
                  priority: WARNING
                  description: 'Should be less than 50ms on average.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: a53596604a4c4a49bd04bfda30064d78
              name: 'Database Counters [{#INSTANCE}]: Passive database write operations latency'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Shows the average length of time, in ms, per passive database write operation. Should be less than the read latency for the same instance, as measured by the MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency counter.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: application
            - uuid: 9ef13ef1197a4ba1abba1591ae588fa8
              name: 'Information Store [{#INSTANCE}]: Active mailboxes count'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\Active mailboxes"]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Number of active mailboxes in this database.'
              tags:
                - tag: component
                  value: application
            - uuid: 0e3dbea7e5694cc48c5216d92db67f7f
              name: 'Information Store [{#INSTANCE}]: Database state'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\Database State"]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: |
                Database state. Possible values:
                0: Database without any copy and dismounted.
                1: Database is a primary database and mounted.
                2: Database is a passive copy and the state is healthy.
              valuemap:
                name: 'Exchange database state'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3m
              tags:
                - tag: component
                  value: application
            - uuid: 4a08076fdfcb4226a122474f5c2e98d9
              name: 'Information Store [{#INSTANCE}]: RPC requests latency'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'RPC Latency average is the average latency of RPC requests per database. Average is calculated over all RPCs since exrpc32 was loaded. Should be less than 50ms at all times, with spikes less than 100ms.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 42009d7b910743e1803f10b6a918a67b
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.RPC.TIME})>{$MS.EXCHANGE.RPC.WARN}'
                  name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: RPC Requests latency is too high'
                  event_name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: RPC Requests latency is too high (>{$MS.EXCHANGE.RPC.WARN}s for {$MS.EXCHANGE.RPC.TIME})'
                  priority: WARNING
                  description: 'Should be less than 50ms at all times, with spikes less than 100ms.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: c423048154634eb29f4fe56c306f5b04
              name: 'Information Store [{#INSTANCE}]: RPC requests per second'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC Operations/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Shows the number of RPC operations per second for each database instance.'
              tags:
                - tag: component
                  value: application
            - uuid: 0f4970d43155441ab0f860e4e06328e0
              name: 'Information Store [{#INSTANCE}]: RPC requests total'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC requests", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Indicates the overall RPC requests currently executing within the information store process. Should be below 70 at all times.'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 127241a9e517424687e56eea393b11db
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchangeIS Store({#INSTANCE})\RPC requests", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.RPC.COUNT.TIME})>{$MS.EXCHANGE.RPC.COUNT.WARN}'
                  name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: RPC Requests total count is too high'
                  event_name: 'MS Exchange 2016: Information Store [{#INSTANCE}]: RPC Requests total count is too high (>{$MS.EXCHANGE.RPC.COUNT.WARN} for {$MS.EXCHANGE.RPC.COUNT.TIME})'
                  priority: WARNING
                  description: 'Should be below 70 at all times.'
                  tags:
                    - tag: scope
                      value: performance
          trigger_prototypes:
            - uuid: 9c9732c8d3314c12aecd268aa445e8bc
              expression: 'avg(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.PASSIVE.WRITE.TIME})>avg(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.DB.PASSIVE.WRITE.TIME})'
              name: 'MS Exchange 2016: Database Counters [{#INSTANCE}]: Average write time latency is higher than read time latency for {$MS.EXCHANGE.DB.PASSIVE.WRITE.TIME}'
              priority: WARNING
              description: 'Should be less than the read latency for the same instance, as measured by the MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency counter.'
              tags:
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: 3749d38f7b7f478486c1181aeabd19c1
              name: 'Database Counters [{#INSTANCE}]: Read and write stats'
              graph_items:
                - color: 199C0D
                  yaxisside: RIGHT
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached)/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '1'
                  color: F63100
                  yaxisside: RIGHT
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached)/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Reads (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Attached) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
                    key: 'perf_counter_en["\MSExchange Database ==> Instances({#INF.STORE}/_Total)\I/O Database Writes (Recovery) Average Latency", {$MS.EXCHANGE.PERF.INTERVAL}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value);
                  
                  data.forEach(function(instance) {
                  	if (instance["{#INSTANCE}"] === '_total') {
                  		instance["{#INF.STORE}"] = 'Information Store';
                  	}
                  	else {
                  		instance["{#INF.STORE}"] = 'Information Store - ' + instance["{#INSTANCE}"];
                  	}
                  })
                  
                  return JSON.stringify(data);
        - uuid: c18f965b9ba6419ea578238ebc8168bb
          name: 'LDAP discovery'
          type: ZABBIX_ACTIVE
          key: 'perf_instance_en.discovery["MSExchange ADAccess Domain Controllers"]'
          delay: 1h
          description: 'Discovery of domain controller.'
          item_prototypes:
            - uuid: 577f868ff1e54113b61e8f74a084f611
              name: 'Domain Controller [{#INSTANCE}]: Read time'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Read Time", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Time that it takes to send an LDAP read request to the domain controller in question and get a response. Should ideally be below 50 ms; spikes below 100 ms are acceptable.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 3d49bb3d2bdd45998938e531dbaafd33
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Read Time", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.LDAP.TIME})>{$MS.EXCHANGE.LDAP.WARN}'
                  name: 'MS Exchange 2016: Domain Controller [{#INSTANCE}]: LDAP read time is too high'
                  event_name: 'MS Exchange 2016: Domain Controller [{#INSTANCE}]: LDAP read time is too high (>{$MS.EXCHANGE.LDAP.WARN}s for {$MS.EXCHANGE.LDAP.TIME})'
                  priority: AVERAGE
                  description: 'Should be less than 50ms at all times, with spikes less than 100ms.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 1c94a8c06c5a4d4894060b68fc44a093
              name: 'Domain Controller [{#INSTANCE}]: Search time'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Search Time", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              units: s
              description: 'Time that it takes to send an LDAP search request and get a response. Should ideally be below 50 ms; spikes below 100 ms are acceptable.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              tags:
                - tag: component
                  value: application
              trigger_prototypes:
                - uuid: 8415fc742e154f9a9455ac9c0cdc85fd
                  expression: 'min(/Microsoft Exchange Server 2016 by Zabbix agent active/perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Search Time", {$MS.EXCHANGE.PERF.INTERVAL}],{$MS.EXCHANGE.LDAP.TIME})>{$MS.EXCHANGE.LDAP.WARN}'
                  name: 'MS Exchange 2016: Domain Controller [{#INSTANCE}]: LDAP search time is too high'
                  event_name: 'MS Exchange 2016: Domain Controller [{#INSTANCE}]: LDAP search time is too high (>{$MS.EXCHANGE.LDAP.WARN}s for {$MS.EXCHANGE.LDAP.TIME})'
                  priority: AVERAGE
                  description: 'Should be less than 50ms at all times, with spikes less than 100ms.'
                  tags:
                    - tag: scope
                      value: performance
          graph_prototypes:
            - uuid: 004b61b0e602483780f7c944219cf110
              name: 'Domain Controller [{#INSTANCE}]: Timings'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
                    key: 'perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Read Time", {$MS.EXCHANGE.PERF.INTERVAL}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
                    key: 'perf_counter_en["\MSExchange ADAccess Domain Controllers({#INSTANCE})\LDAP Search Time", {$MS.EXCHANGE.PERF.INTERVAL}]'
        - uuid: 8749f11f547546ac8bf81478c798186f
          name: 'Web services discovery'
          type: ZABBIX_ACTIVE
          key: 'perf_instance_en.discovery["Web Service"]'
          delay: 1h
          description: 'Discovery of Exchange web services.'
          item_prototypes:
            - uuid: 91f7649f17bf4d7a9ded8bec70ff09e2
              name: 'Web Service [{#INSTANCE}]: Current connections'
              type: ZABBIX_ACTIVE
              key: 'perf_counter_en["\Web Service({#INSTANCE})\Current Connections", {$MS.EXCHANGE.PERF.INTERVAL}]'
              delay: '{$MS.EXCHANGE.PERF.INTERVAL}'
              value_type: FLOAT
              description: 'Shows the current number of connections established to the each Web Service.'
              tags:
                - tag: component
                  value: application
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: communication
        - tag: subclass
          value: messaging
        - tag: target
          value: ms-exchange
      macros:
        - macro: '{$AGENT.TIMEOUT}'
          value: 5m
          description: 'Timeout after which agent is considered unavailable.'
          config:
            type: TEXT
            priority: '19'
            section_name: Other
            label: 'Seconds since the last Zabbix agent seen'
            description: 'Timeout after which agent is considered unavailable.'
        - macro: '{$MS.EXCHANGE.DB.ACTIVE.READ.TIME}'
          value: 5m
          description: 'The time during which the active database read operations latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Time allowed above threshold for active DB read latency'
            description: 'The time during which the active database read operations latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.DB.ACTIVE.READ.WARN}'
          value: '0.02'
          description: 'Threshold for active database read operations latency trigger.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Threshold for active DB read latency trigger'
            description: 'Threshold for active database read operations latency trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.DB.ACTIVE.WRITE.TIME}'
          value: 10m
          description: 'The time during which the active database write operations latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Time allowed above threshold for active DB write latency'
            description: 'The time during which the active database write operations latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.DB.ACTIVE.WRITE.WARN}'
          value: '0.05'
          description: 'Threshold for active database write operations latency trigger.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Threshold for active DB write latency trigger'
            description: 'Threshold for active database write operations latency trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.DB.FAULTS.TIME}'
          value: 5m
          description: 'The time during which the database page faults may exceed the threshold.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Time allowed above threshold for database page faults'
            description: 'The time during which the database page faults may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.DB.FAULTS.WARN}'
          value: '0'
          description: 'Threshold for database page faults trigger.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold for database page faults trigger'
            description: 'Threshold for database page faults trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.DB.PASSIVE.READ.TIME}'
          value: 5m
          description: 'The time during which the passive database read operations latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Time allowed above threshold for passive DB read latency'
            description: 'The time during which the passive database read operations latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.DB.PASSIVE.READ.WARN}'
          value: '0.2'
          description: 'Threshold for passive database read operations latency trigger.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Threshold for passive DB read latency trigger'
            description: 'Threshold for passive database read operations latency trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.DB.PASSIVE.WRITE.TIME}'
          value: 10m
          description: 'The time during which the passive database write operations latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'Time allowed above threshold for passive DB write latency'
            description: 'The time during which the passive database write operations latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.LDAP.TIME}'
          value: 5m
          description: 'The time during which the LDAP metrics may exceed the threshold.'
          config:
            type: TEXT
            priority: '17'
            section_name: Thresholds
            label: 'Time allowed above threshold for LDAP metrics'
            description: 'The time during which the LDAP metrics may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.LDAP.WARN}'
          value: '0.05'
          description: 'Threshold for LDAP triggers.'
          config:
            type: TEXT
            priority: '18'
            section_name: Thresholds
            label: 'Threshold for LDAP triggers'
            description: 'Threshold for LDAP triggers.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.LOG.STALLS.TIME}'
          value: 10m
          description: 'The time during which the log records stalled may exceed the threshold.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Time allowed above threshold for stalled log records'
            description: 'The time during which the log records stalled may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.LOG.STALLS.WARN}'
          value: '100'
          description: 'Threshold for log records stalled trigger.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Threshold for stalled log records trigger'
            description: 'Threshold for log records stalled trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.PERF.INTERVAL}'
          value: '60'
          description: 'Update interval for perf_counter_en items.'
          config:
            type: TEXT
            priority: '1'
            section_name: Other
            label: 'Update interval for perf_counter_en items'
            description: 'Update interval for perf_counter_en items.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.RPC.COUNT.TIME}'
          value: 5m
          description: 'The time during which the RPC total requests may exceed the threshold.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'Time allowed above threshold for total RPC requests'
            description: 'The time during which the RPC total requests may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.RPC.COUNT.WARN}'
          value: '70'
          description: 'Threshold for LDAP triggers.'
          config:
            type: TEXT
            priority: '16'
            section_name: Thresholds
            label: 'Threshold for LDAP triggers'
            description: 'Threshold for LDAP triggers.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MS.EXCHANGE.RPC.TIME}'
          value: 10m
          description: 'The time during which the RPC requests latency may exceed the threshold.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Time allowed above threshold for RPC requests latency'
            description: 'The time during which the RPC requests latency may exceed the threshold.'
        - macro: '{$MS.EXCHANGE.RPC.WARN}'
          value: '0.05'
          description: 'Threshold for RPC requests latency trigger.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'Threshold for RPC requests latency trigger'
            description: 'Threshold for RPC requests latency trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      valuemaps:
        - uuid: 0797c152a163407aa9490a63f80a8fd1
          name: 'Exchange database copy role'
          mappings:
            - value: '0'
              newvalue: Passive
            - value: '1'
              newvalue: Active
        - uuid: a4fac47b56e4470c9c6d435d7eb06845
          name: 'Exchange database state'
          mappings:
            - value: '0'
              newvalue: Dismounted
            - value: '1'
              newvalue: Mounted
            - value: '2'
              newvalue: Healthy
        - uuid: 0407f8e83ce94d9b88db8dab241e44c0
          name: zabbix.host.active_agent.available
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: 'not available'
    - uuid: 8d5fe5b4ebb64255a2429b34c7dd3681
      template: 'Microsoft SharePoint by HTTP'
      name: 'Microsoft SharePoint by HTTP'
      description: |
        Overview:
        Template receives data via HTTP Agent.
        Setup:
        Create a new host.
        Define macros according to your Sharepoint web portal.
        It is recommended to fill in the values of the filter macros to avoid getting redundant data.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for the effortless deployment of Microsoft SharePoint monitoring by Zabbix via HTTP and doesn't require any external scripts.
        
        SharePoint includes a Representational State Transfer (REST) service. Developers can perform read operations from their SharePoint Add-ins, solutions, and client applications, using REST web technologies and standard Open Data Protocol (OData) syntax. Details in
        https://docs.microsoft.com/ru-ru/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service?tabs=csom
        
        ## Setup
        
        Create a new host.
        Define host wizard configuration fields according to your Sharepoint web portal.
        It is recommended to fill in the values of the filter host wizard configuration fields to avoid getting redundant data.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 71e23c666b84414490589a509b60c488
          name: 'Get directory structure'
          type: SCRIPT
          key: sharepoint.get_dir
          delay: '{$SHAREPOINT.GET_INTERVAL}'
          history: '0'
          value_type: TEXT
          params: |
            try {
            
            	const js_start = new Date().getTime();
            
            	var params = JSON.parse(value);
            	var result = {
            		status: 0,
            		data: {}
            	};
            
            	var req = new HttpRequest();
            
            	var out = {};
            	var queue = [];
            
            	var node;
            	var obj_iter_by_name;
            	var cpath;
            
            	var current_folder;
            	var child_folders;
            	var child_files;
            	var obj_iter_file;
            
            	req.addHeader('Accept: application/json; odata=verbose');
            	req.setHttpAuth(HTTPAUTH_NTLM, params.user, params.password);
            	queue.push({
            		patch: params.root,
            		json: []
            	});
            
            	while (queue.length) {
            		node = queue.pop();
            		obj_iter_by_name = out;
            		cpath = node.json.slice()
            
            		current_folder = JSON.parse(req.get(encodeURI(params.url + "/_api/web/GetFolderByServerRelativeUrl('" + node.patch.replace("'", "''") + "')")));
            
            		result.status = req.getStatus();
            		if (result.status != 200) {
            			throw result.status;
            		}
            
            		cpath.forEach(function (nd) {
            			obj_iter_by_name = obj_iter_by_name[nd]
            		});
            
            		obj_iter_by_name[current_folder.d.Name] = {
            			meta: {
            				size: 0,
            				created: Math.round(new Date(current_folder.d.TimeCreated).getTime() / 1000),
            				modified: Math.round(new Date(current_folder.d.TimeLastModified).getTime() / 1000)
            			},
            			data: {}
            		}
            
            		child_folders = JSON.parse(req.get(encodeURI(params.url + "/_api/web/GetFolderByServerRelativeUrl('" + node.patch.replace("'", "''") + "')/Folders")));
            
            		cpath.push(current_folder.d.Name, "data");
            		child_folders.d.results.forEach(function (dir) {
            			queue.push({
            				patch: dir.ServerRelativeUrl,
            				json: cpath
            			});
            		});
            
            		child_files = JSON.parse(req.get(encodeURI(params.url + "/_api/web/GetFolderByServerRelativeUrl('" + node.patch.replace("'", "''") + "')/Files")));
            		child_files.d.results.forEach(function (file) {
            			obj_iter_by_name[current_folder.d.Name].data[file.Name] = {
            				meta: {
            					size: file.Length,
            					created: Math.round(new Date(file.TimeCreated).getTime() / 1000),
            					modified: Math.round(new Date(file.TimeLastModified).getTime() / 1000)
            				}
            			};
            
            			obj_iter_file = out;
            			cpath.forEach(function (nd) {
            				obj_iter_file = obj_iter_file[nd];
            				if (nd != "data") {
            					obj_iter_file.meta.size += +file.Length;
            				}
            			});
            		});
            
            	}
            
            	result.data = out;
            
            } catch (error) {
            	Zabbix.log(3, "Sharepoint fs scan failed: " + params.url + " Error: " + error);
            	if (!Number.isInteger(error))
            		result.status = 520;
            }
            
            result.time = new Date().getTime() - js_start;
            return JSON.stringify(result);
          description: 'Used to get directory structure information'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"status":520,"data":{},"time":0}'
          parameters:
            - name: password
              value: '{$SHAREPOINT.PASSWORD}'
            - name: root
              value: '{$SHAREPOINT.ROOT}'
            - name: url
              value: '{$SHAREPOINT.URL}'
            - name: user
              value: '{$SHAREPOINT.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: cd47c3d00ce545b0a557e0e68c89d53e
          name: 'Get directory structure: Status'
          type: DEPENDENT
          key: sharepoint.get_dir.status
          description: 'HTTP response (status) code. Indicates whether the HTTP request was successfully completed. Additional information is available in the server log file.'
          valuemap:
            name: 'HTTP response status code'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.status
              error_handler: CUSTOM_ERROR
              error_handler_params: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: sharepoint.get_dir
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
          triggers:
            - uuid: ed1d66a1410e4af79af462e749ce979b
              expression: 'last(/Microsoft SharePoint by HTTP/sharepoint.get_dir.status)<>200'
              name: 'MS SharePoint: Error getting directory structure.'
              priority: WARNING
              description: 'Error getting directory structure. Check the Zabbix server log for more details.'
              tags:
                - tag: scope
                  value: availability
        - uuid: b2daa471665541168b2a394b9b226d73
          name: 'Get directory structure: Exec time'
          type: DEPENDENT
          key: sharepoint.get_dir.time
          units: '!ms'
          description: 'The time taken to execute the script for obtaining the data structure (in ms). Less is better.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.time
              error_handler: CUSTOM_ERROR
              error_handler_params: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: sharepoint.get_dir
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: 9e5bcc08d5f040de86afa38f5a653dd7
              expression: 'last(/Microsoft SharePoint by HTTP/sharepoint.get_dir.time)>2000'
              name: 'MS SharePoint: Server responds slowly to API request'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 7b59d767712f49b3bbc17947999ca944
          name: 'Health score'
          type: HTTP_AGENT
          key: sharepoint.health_score
          authtype: NTLM
          username: '{$SHAREPOINT.USER}'
          password: '{$SHAREPOINT.PASSWORD}'
          description: 'This item specifies a value between 0 and 10, where 0 represents a low load and a high ability to process requests and 10 represents a high load and that the server is throttling requests to maintain adequate throughput.'
          preprocessing:
            - type: REGEX
              parameters:
                - 'X-SharePointHealthScore\b:\s(\d+)'
                - \1
            - type: IN_RANGE
              parameters:
                - '0'
                - '10'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          url: '{$SHAREPOINT.URL}'
          retrieve_mode: HEADERS
          request_method: HEAD
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: 3a0451e3edda4a73aded57aa254fd813
              expression: 'last(/Microsoft SharePoint by HTTP/sharepoint.health_score)>"{$SHAREPOINT.MAX_HEALTH_SCORE}"'
              name: 'MS SharePoint: Bad health score'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: performance
      discovery_rules:
        - uuid: 0fe7e8e5480a42b7903cb7ac9bf931cc
          name: 'Directory discovery'
          type: SCRIPT
          key: sharepoint.directory.discovery
          delay: '{$SHAREPOINT.LLD_INTERVAL}'
          params: |
            try {
            
            	var params = JSON.parse(value);
            	var result = [];
            
            	var req = new HttpRequest();
            
            	var queue = [];
            
            	var node;
            	var current_folder;
            	var child_folders;
            	var child_files;
            
            	req.addHeader('Accept: application/json; odata=verbose');
            	req.setHttpAuth(HTTPAUTH_NTLM, params.user, params.password);
            	queue.push({
            		patch: params.root,
            		json_query: '$["data"]'
            	});
            
            	while (queue.length) {
            		node = queue.pop();
            
            		current_folder = JSON.parse(req.get(encodeURI(params.url + "/_api/web/GetFolderByServerRelativeUrl('" + node.patch.replace("'", "''") + "')")));
            
            		result.status = req.getStatus();
            		if (result.status != 200) {
            			throw result.status;
            		}
            
            		result.push({
            			'{#SHAREPOINT.LLD.NAME}': current_folder.d.Name,
            			'{#SHAREPOINT.LLD.TYPE}': 'FOLDER',
            			'{#SHAREPOINT.LLD.FULL_PATH}': node.patch,
            			'{#SHAREPOINT.LLD.JSON_PATH}': node.json_query + '["' + current_folder.d.Name + '"]',
            			'{#SHAREPOINT.LLD.SIZE}': 0,
            			'{#SHAREPOINT.LLD.CREATED}': Math.round(new Date(current_folder.d.TimeCreated).getTime() / 1000),
            			'{#SHAREPOINT.LLD.MODIFIED}': Math.round(new Date(current_folder.d.TimeLastModified).getTime() / 1000)
            		});
            
            		child_folders = JSON.parse(req.get(encodeURI(params.url + "/_api/web/GetFolderByServerRelativeUrl('" + node.patch.replace("'", "''") + "')/Folders")));
            
            		child_folders.d.results.forEach(function (dir) {
            			queue.push({
            				patch: dir.ServerRelativeUrl,
            				json_query: node.json_query + '["' + current_folder.d.Name + '"]["data"]'
            			});
            		});
            
            		child_files = JSON.parse(req.get(encodeURI(params.url + "/_api/web/GetFolderByServerRelativeUrl('" + node.patch.replace("'", "''") + "')/Files")));
            		child_files.d.results.forEach(function (file) {
            			result.push({
            				'{#SHAREPOINT.LLD.NAME}': file.Name,
            				'{#SHAREPOINT.LLD.TYPE}': 'FILE',
            				'{#SHAREPOINT.LLD.FULL_PATH}': file.ServerRelativeUrl,
            				'{#SHAREPOINT.LLD.JSON_PATH}': node.json_query + '["' + current_folder.d.Name + '"]' + '["data"]["' + file.Name + '"]',
            				'{#SHAREPOINT.LLD.SIZE}': file.Length,
            				'{#SHAREPOINT.LLD.CREATED}': Math.round(new Date(file.TimeCreated).getTime() / 1000),
            				'{#SHAREPOINT.LLD.MODIFIED}': Math.round(new Date(file.TimeLastModified).getTime() / 1000)
            			});
            		});
            	}
            
            } catch (error) {
            	Zabbix.log(3, "Sharepoint fs discovery failed: " + params.url + " Error: " + error);
            	return "Sharepoint fs discovery failed: " + params.url + " Error: " + error;
            }
            
            return JSON.stringify(result);
          filter:
            evaltype: AND
            conditions:
              - macro: '{#SHAREPOINT.LLD.FULL_PATH}'
                value: '{$SHAREPOINT.LLD.FILTER.FULL_PATH.MATCHES}'
              - macro: '{#SHAREPOINT.LLD.FULL_PATH}'
                value: '{$SHAREPOINT.LLD.FILTER.FULL_PATH.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#SHAREPOINT.LLD.NAME}'
                value: '{$SHAREPOINT.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#SHAREPOINT.LLD.NAME}'
                value: '{$SHAREPOINT.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#SHAREPOINT.LLD.TYPE}'
                value: '{$SHAREPOINT.LLD.FILTER.TYPE.MATCHES}'
              - macro: '{#SHAREPOINT.LLD.TYPE}'
                value: '{$SHAREPOINT.LLD.FILTER.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 337493ed37424be98abd4c0550279a0b
              name: 'Created ({#SHAREPOINT.LLD.FULL_PATH})'
              type: DEPENDENT
              key: 'sharepoint.created["{#SHAREPOINT.LLD.FULL_PATH}"]'
              units: unixtime
              description: |
                Date of creation:
                {#SHAREPOINT.LLD.FULL_PATH}
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '{{#SHAREPOINT.LLD.JSON_PATH}.regsub("(.*)", \1)}.meta.created'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: sharepoint.get_dir
              tags:
                - tag: component
                  value: storage
                - tag: full-path
                  value: '{#SHAREPOINT.LLD.FULL_PATH}'
            - uuid: b230bfba317e4d2eb2c6a816bd357d71
              name: 'Modified ({#SHAREPOINT.LLD.FULL_PATH})'
              type: DEPENDENT
              key: 'sharepoint.modified["{#SHAREPOINT.LLD.FULL_PATH}"]'
              units: unixtime
              description: |
                Date of change:
                {#SHAREPOINT.LLD.FULL_PATH}
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '{{#SHAREPOINT.LLD.JSON_PATH}.regsub("(.*)", \1)}.meta.modified'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: sharepoint.get_dir
              tags:
                - tag: component
                  value: storage
                - tag: full-path
                  value: '{#SHAREPOINT.LLD.FULL_PATH}'
              trigger_prototypes:
                - uuid: d1683e2fcdda45969ff451e43ae696c2
                  expression: 'last(/Microsoft SharePoint by HTTP/sharepoint.modified["{#SHAREPOINT.LLD.FULL_PATH}"],#1)<>last(/Microsoft SharePoint by HTTP/sharepoint.modified["{#SHAREPOINT.LLD.FULL_PATH}"],#2)'
                  name: 'MS SharePoint: Sharepoint object is changed'
                  opdata: '{#SHAREPOINT.LLD.FULL_PATH}'
                  priority: INFO
                  description: 'Updated date of modification of folder / file'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 68c3d2d2b33a494ab85ca6b883398fbb
              name: 'Size ({#SHAREPOINT.LLD.FULL_PATH})'
              type: DEPENDENT
              key: 'sharepoint.size["{#SHAREPOINT.LLD.FULL_PATH}"]'
              units: B
              description: |
                Size of:
                {#SHAREPOINT.LLD.FULL_PATH}
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '{{#SHAREPOINT.LLD.JSON_PATH}.regsub("(.*)", \1)}.meta.size'
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 24h
              master_item:
                key: sharepoint.get_dir
              tags:
                - tag: component
                  value: storage
                - tag: full-path
                  value: '{#SHAREPOINT.LLD.FULL_PATH}'
          parameters:
            - name: password
              value: '{$SHAREPOINT.PASSWORD}'
            - name: root
              value: '{$SHAREPOINT.ROOT}'
            - name: url
              value: '{$SHAREPOINT.URL}'
            - name: user
              value: '{$SHAREPOINT.USER}'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: communication
        - tag: subclass
          value: fileshare
        - tag: target
          value: microsoft
        - tag: target
          value: sharepoint
      macros:
        - macro: '{$SHAREPOINT.GET_INTERVAL}'
          value: 1m
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Get interval'
        - macro: '{$SHAREPOINT.LLD.FILTER.FULL_PATH.MATCHES}'
          value: ^/
          description: 'Filter of discoverable dictionaries by full path.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Filter for full path (include)'
            description: 'Filter of discoverable dictionaries by full path.'
        - macro: '{$SHAREPOINT.LLD.FILTER.FULL_PATH.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered dictionaries by full path.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Filter for full path (exclude)'
            description: 'Filter to exclude discovered dictionaries by full path.'
        - macro: '{$SHAREPOINT.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable dictionaries by name.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Filter for name (include)'
            description: 'Filter of discoverable dictionaries by name.'
        - macro: '{$SHAREPOINT.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered dictionaries by name.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Filter for name (exclude)'
            description: 'Filter to exclude discovered dictionaries by name.'
        - macro: '{$SHAREPOINT.LLD.FILTER.TYPE.MATCHES}'
          value: FOLDER
          description: 'Filter of discoverable types.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Filter for type (include)'
            description: 'Filter of discoverable types.'
        - macro: '{$SHAREPOINT.LLD.FILTER.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered types.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Filter for type (exclude)'
            description: 'Filter to exclude discovered types.'
        - macro: '{$SHAREPOINT.LLD_INTERVAL}'
          value: 3h
          config:
            type: TEXT
            priority: '11'
            section_name: Other
            label: 'LLD interval'
        - macro: '{$SHAREPOINT.MAX_HEALTH_SCORE}'
          value: '5'
          description: |
            Must be in the range from 0 to 10
            in details: https://docs.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-wsshp/c60ddeb6-4113-4a73-9e97-26b5c3907d33
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Max health score'
            description: |
              Must be in the range from 0 to 10
              in details: https://docs.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-wsshp/c60ddeb6-4113-4a73-9e97-26b5c3907d33 In the range from 0 to 10 inclusive.
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SHAREPOINT.PASSWORD}'
          type: SECRET_TEXT
          config:
            type: TEXT
            priority: '2'
            label: Password
            required: 'YES'
        - macro: '{$SHAREPOINT.ROOT}'
          value: '/Shared Documents'
          config:
            type: TEXT
            priority: '10'
            label: Root
        - macro: '{$SHAREPOINT.URL}'
          description: 'Portal page URL. For example http://sharepoint.companyname.local/'
          config:
            type: TEXT
            priority: '3'
            label: 'Portal page URL'
            description: 'Portal page URL. For example http://sharepoint.companyname.local/'
            required: 'YES'
        - macro: '{$SHAREPOINT.USER}'
          config:
            type: TEXT
            priority: '1'
            label: Username
            required: 'YES'
      dashboards:
        - uuid: 3f81ca5cc29a43b28e1c1d02c131cbd5
          name: 'Sharepoint: Overview'
          pages:
            - name: General
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Microsoft SharePoint by HTTP'
                        key: sharepoint.get_dir.status
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: source_type
                      value: '1'
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Microsoft SharePoint by HTTP'
                        key: sharepoint.get_dir.time
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: INTEGER
                      name: source_type
                      value: '1'
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Microsoft SharePoint by HTTP'
                        key: sharepoint.health_score
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: source_type
                      value: '1'
      valuemaps:
        - uuid: 70add725d6a84f6f9ed0917107dfffc9
          name: 'HTTP response status code'
          mappings:
            - value: '100'
              newvalue: Continue
            - value: '101'
              newvalue: 'Switching Protocols'
            - value: '102'
              newvalue: Processing
            - value: '200'
              newvalue: OK
            - value: '201'
              newvalue: Created
            - value: '202'
              newvalue: Accepted
            - value: '203'
              newvalue: 'Non-Authoritative Information'
            - value: '204'
              newvalue: 'No Content'
            - value: '205'
              newvalue: 'Reset Content'
            - value: '206'
              newvalue: 'Partial Content'
            - value: '207'
              newvalue: Multi-Status
            - value: '208'
              newvalue: 'Already Reported'
            - value: '226'
              newvalue: 'IM Used'
            - value: '300'
              newvalue: 'Multiple Choices'
            - value: '301'
              newvalue: 'Moved Permanently'
            - value: '302'
              newvalue: Found
            - value: '303'
              newvalue: 'See Other'
            - value: '304'
              newvalue: 'Not Modified'
            - value: '305'
              newvalue: 'Use Proxy'
            - value: '306'
              newvalue: 'Switch Proxy'
            - value: '307'
              newvalue: 'Temporary Redirect'
            - value: '308'
              newvalue: 'Permanent Redirect/Resume Incomplete'
            - value: '400'
              newvalue: 'Bad Request'
            - value: '401'
              newvalue: Unauthorized
            - value: '402'
              newvalue: 'Payment Required'
            - value: '403'
              newvalue: Forbidden
            - value: '404'
              newvalue: 'Not Found'
            - value: '405'
              newvalue: 'Method Not Allowed'
            - value: '406'
              newvalue: 'Not Acceptable'
            - value: '407'
              newvalue: 'Proxy Authentication Required'
            - value: '408'
              newvalue: 'Request Timeout'
            - value: '409'
              newvalue: Conflict
            - value: '410'
              newvalue: Gone
            - value: '411'
              newvalue: 'Length Required'
            - value: '412'
              newvalue: 'Precondition Failed'
            - value: '413'
              newvalue: 'Payload Too Large'
            - value: '414'
              newvalue: 'Request-URI Too Long'
            - value: '415'
              newvalue: 'Unsupported Media Type'
            - value: '416'
              newvalue: 'Requested Range Not Satisfiable'
            - value: '417'
              newvalue: 'Expectation Failed'
            - value: '418'
              newvalue: 'I''m a Teapot'
            - value: '419'
              newvalue: 'Authentication Timeout'
            - value: '420'
              newvalue: 'Method Failure/Enhance Your Calm'
            - value: '421'
              newvalue: 'Misdirected Request'
            - value: '422'
              newvalue: 'Unprocessable Entity'
            - value: '423'
              newvalue: Locked
            - value: '424'
              newvalue: 'Failed Dependency'
            - value: '426'
              newvalue: 'Upgrade Required'
            - value: '428'
              newvalue: 'Precondition Required'
            - value: '429'
              newvalue: 'Too Many Requests'
            - value: '431'
              newvalue: 'Request Header Fields Too Large'
            - value: '440'
              newvalue: 'Login Timeout'
            - value: '444'
              newvalue: 'No Response'
            - value: '449'
              newvalue: 'Retry With'
            - value: '450'
              newvalue: 'Blocked by Windows Parental Controls'
            - value: '451'
              newvalue: 'Unavailable for Legal Reasons/Redirect'
            - value: '494'
              newvalue: 'Request Header Too Large'
            - value: '495'
              newvalue: 'Cert Error'
            - value: '496'
              newvalue: 'No Cert'
            - value: '497'
              newvalue: 'HTTP to HTTPS'
            - value: '498'
              newvalue: 'Token Expired/Invalid'
            - value: '499'
              newvalue: 'Client Closed Request/Token Required'
            - value: '500'
              newvalue: 'Internal Server Error'
            - value: '501'
              newvalue: 'Not Implemented'
            - value: '502'
              newvalue: 'Bad Gateway'
            - value: '503'
              newvalue: 'Service Unavailable'
            - value: '504'
              newvalue: 'Gateway Timeout'
            - value: '505'
              newvalue: 'HTTP Version Not Supported'
            - value: '506'
              newvalue: 'Variant Also Negotiates'
            - value: '507'
              newvalue: 'Insufficient Storage'
            - value: '508'
              newvalue: 'Loop Detected'
            - value: '509'
              newvalue: 'Bandwidth Limit Exceeded'
            - value: '510'
              newvalue: 'Not Extended'
            - value: '511'
              newvalue: 'Network Authentication Required'
            - value: '520'
              newvalue: 'Unknown Error'
            - value: '598'
              newvalue: 'Network Read Timeout Error'
            - value: '599'
              newvalue: 'Network Connect Timeout Error'
    - uuid: d2cebb67b4d94a12a072db85e7be6a33
      template: 'Nginx by Zabbix agent active'
      name: 'Nginx by Zabbix agent active'
      description: |
        Get metrics from stub status module using Zabbix agent running on Linux
        https://nginx.ru/en/docs/http/ngx_http_stub_status_module.html
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/384765-discussion-thread-for-official-zabbix-template-nginx
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is developed to monitor Nginx by Zabbix that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        The template `Nginx by Zabbix agent` - collects metrics by polling the [Module ngx_http_stub_status_module](https://nginx.ru/en/docs/http/ngx_http_stub_status_module.html) locally with Zabbix agent:
        
        ```text
        Active connections: 291
        server accepts handled requests
        16630948 16630948 31070465
        Reading: 6 Writing: 179 Waiting: 106
        ```
        
        Note that this template doesn't support HTTPS and redirects (limitations of `web.page.get`).
        
        It also uses Zabbix agent to collect `Nginx` Linux process statistics, such as CPU usage, memory usage and whether the process is running or not.
        
        
        ## Setup
        
        See the setup instructions for [ngx_http_stub_status_module](https://nginx.ru/en/docs/http/ngx_http_stub_status_module.html).
        Test the availability of the `http_stub_status_module` `nginx -V 2>&1 | grep -o with-http_stub_status_module`.
        
        Example configuration of Nginx:
        ```text
        location = /basic_status {
            stub_status;
            allow 127.0.0.1;
            allow ::1;
            deny all;
        }
        ```
        
        If you use another location, then don't forget to change the `Nginx status page path` host wizard configuration field.
        
        Example answer from Nginx:
        ```text
        Active connections: 291
        server accepts handled requests
        16630948 16630948 31070465
        Reading: 6 Writing: 179 Waiting: 106
        ```
        
        Note that this template doesn't support https and redirects (limitations of web.page.get).
      vendor:
        name: Zabbix
        version: 8.0-0
      groups:
        - name: Templates/Applications
      items:
        - uuid: 09762f260f544f57afa5157c6bc632a3
          name: 'Service response time'
          type: ZABBIX_ACTIVE
          key: 'net.tcp.service.perf[http,"{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PORT}"]'
          value_type: FLOAT
          units: s
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
        - uuid: b68e4123d7c9483c9f77bc9c27fd0e7c
          name: 'Service status'
          type: ZABBIX_ACTIVE
          key: 'net.tcp.service[http,"{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PORT}"]'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
        - uuid: 8db87e1a5a6e478eb4e554b477abb5a4
          name: 'Connections accepted per second'
          type: DEPENDENT
          key: nginx.connections.accepted.rate
          value_type: FLOAT
          description: 'The total number of accepted client connections.'
          preprocessing:
            - type: REGEX
              parameters:
                - 'server accepts handled requests\s+([0-9]+) ([0-9]+) ([0-9]+)'
                - \1
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: cdc0f7d6ad334a219221d7c0b7bf866c
          name: 'Connections active'
          type: DEPENDENT
          key: nginx.connections.active
          description: 'The current number of active client connections including waiting connections.'
          preprocessing:
            - type: REGEX
              parameters:
                - 'Active connections: ([0-9]+)'
                - \1
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 7dea09085ee84f79837e6f43485f39df
          name: 'Connections dropped per second'
          type: DEPENDENT
          key: nginx.connections.dropped.rate
          value_type: FLOAT
          description: 'The total number of dropped client connections.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var a = value.match(/server accepts handled requests\s+([0-9]+) ([0-9]+) ([0-9]+)/)
                  if (a) {
                  	return a[1]-a[2]
                  }
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: eb25d53ee75148fa890054b116fb8960
          name: 'Connections handled per second'
          type: DEPENDENT
          key: nginx.connections.handled.rate
          value_type: FLOAT
          description: 'The total number of handled connections. Generally, the parameter value is the same as for the accepted connections, unless some resource limits have been reached (for example, the `worker_connections limit`).'
          preprocessing:
            - type: REGEX
              parameters:
                - 'server accepts handled requests\s+([0-9]+) ([0-9]+) ([0-9]+)'
                - \2
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 22d33954da1243c8a2c015f873f7cff3
          name: 'Connections reading'
          type: DEPENDENT
          key: nginx.connections.reading
          description: 'The current number of connections where Nginx is reading the request header.'
          preprocessing:
            - type: REGEX
              parameters:
                - 'Reading: ([0-9]+) Writing: ([0-9]+) Waiting: ([0-9]+)'
                - \1
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 92c8ccf4863d46e1848fe2c61e0a86e2
          name: 'Connections waiting'
          type: DEPENDENT
          key: nginx.connections.waiting
          description: 'The current number of idle client connections waiting for a request.'
          preprocessing:
            - type: REGEX
              parameters:
                - 'Reading: ([0-9]+) Writing: ([0-9]+) Waiting: ([0-9]+)'
                - \3
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: e5c99f0d7d714168a5ecd100aa42a63a
          name: 'Connections writing'
          type: DEPENDENT
          key: nginx.connections.writing
          description: 'The current number of connections where Nginx is writing a response back to the client.'
          preprocessing:
            - type: REGEX
              parameters:
                - 'Reading: ([0-9]+) Writing: ([0-9]+) Waiting: ([0-9]+)'
                - \2
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 9276808621ea44e19afd6e42ed4002ee
          name: 'Requests total'
          type: DEPENDENT
          key: nginx.requests.total
          description: 'The total number of client requests.'
          preprocessing:
            - type: REGEX
              parameters:
                - 'server accepts handled requests\s+([0-9]+) ([0-9]+) ([0-9]+)'
                - \3
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: requests
        - uuid: bc688f502c2940d584f22ace27342b92
          name: 'Requests per second'
          type: DEPENDENT
          key: nginx.requests.total.rate
          value_type: FLOAT
          description: 'The total number of client requests.'
          preprocessing:
            - type: REGEX
              parameters:
                - 'server accepts handled requests\s+([0-9]+) ([0-9]+) ([0-9]+)'
                - \3
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: requests
        - uuid: 3667a75132654b01b1e0aff6ed059353
          name: Version
          type: DEPENDENT
          key: nginx.version
          value_type: CHAR
          preprocessing:
            - type: REGEX
              parameters:
                - '(?i)Server: nginx\/(.+(?<!\r))'
                - \1
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: bc987aa081b543b2becd7c0863553f27
              expression: 'last(/Nginx by Zabbix agent active/nginx.version,#1)<>last(/Nginx by Zabbix agent active/nginx.version,#2) and length(last(/Nginx by Zabbix agent active/nginx.version))>0'
              name: 'Nginx: Version has changed'
              event_name: 'Nginx: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The Nginx version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 94bb17445cf14e909fede8b7060c0211
          name: 'Get processes summary'
          type: ZABBIX_ACTIVE
          key: 'proc.get[{$NGINX.PROCESS.NAME.PARAMETER},,,summary]'
          history: '0'
          value_type: TEXT
          description: 'The aggregated data of summary metrics for all processes.'
          tags:
            - tag: component
              value: raw
        - uuid: 04ed4f82a84b4a81aa8d1682e7a70b5f
          name: 'Get stub status page'
          type: ZABBIX_ACTIVE
          key: 'web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"]'
          history: 1h
          value_type: TEXT
          description: |
            The following status information is provided:
            `Active connections` - the current number of active client connections including waiting connections.
            `Accepted` - the total number of accepted client connections.
            `Handled` - the total number of handled connections. Generally, the parameter value is the same as for the accepted connections, unless some resource limits have been reached (for example, the `worker_connections` limit).
            `Requests` - the total number of client requests.
            `Reading` - the current number of connections where Nginx is reading the request header.
            `Writing` - the current number of connections where Nginx is writing a response back to the client.
            `Waiting` - the current number of idle client connections waiting for a request.
            
            See also [Module ngx_http_stub_status_module](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html).
          tags:
            - tag: component
              value: application
            - tag: component
              value: health
      discovery_rules:
        - uuid: b0fa23a0c13b4c11b79369d6cfadc0bb
          name: 'Nginx process discovery'
          type: DEPENDENT
          key: nginx.proc.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NGINX.NAME}'
                value: '{$NGINX.PROCESS_NAME}'
          description: 'The discovery of Nginx process summary.'
          item_prototypes:
            - uuid: 4a897c7bc31f4413b8c0d0eb050d0eac
              name: 'Get process data'
              type: DEPENDENT
              key: 'nginx.proc.get[{#NGINX.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'The summary metrics aggregated by a process {#NGINX.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@["name"]=="{#NGINX.NAME}")].first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: 'Failed to retrieve process {#NGINX.NAME} data'
              master_item:
                key: 'proc.get[{$NGINX.PROCESS.NAME.PARAMETER},,,summary]'
              tags:
                - tag: component
                  value: raw
            - uuid: f75fa5d7714941d0b25c9e8767a7a7f7
              name: 'Number of running processes'
              type: DEPENDENT
              key: 'nginx.proc.num[{#NGINX.NAME}]'
              description: 'The number of running processes {#NGINX.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.processes
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'nginx.proc.get[{#NGINX.NAME}]'
              tags:
                - tag: component
                  value: system
              trigger_prototypes:
                - uuid: c95c9632cded4bf48df1c736ec7078c5
                  expression: 'last(/Nginx by Zabbix agent active/nginx.proc.num[{#NGINX.NAME}])=0'
                  name: 'Nginx: Process is not running'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 73bee8a0acc84c678a0b1974dbb82964
              name: 'Memory usage, %'
              type: DEPENDENT
              key: 'nginx.proc.pmem[{#NGINX.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of real memory used by a process {#NGINX.NAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pmem
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'nginx.proc.get[{#NGINX.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: e799880b7374482196780173461213af
              name: 'Memory usage (rss)'
              type: DEPENDENT
              key: 'nginx.proc.rss[{#NGINX.NAME}]'
              units: B
              description: 'The summary of resident set size memory used by a process {#NGINX.NAME} expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rss
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'nginx.proc.get[{#NGINX.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: d993483fab9a41f5b5a6457e09647288
              name: 'Memory usage (vsize)'
              type: DEPENDENT
              key: 'nginx.proc.vmem[{#NGINX.NAME}]'
              units: B
              description: 'The summary of virtual memory used by a process {#NGINX.NAME} expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.vsize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'nginx.proc.get[{#NGINX.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: 6045ce9aba4747f2a6a1475fc3f8b428
              name: 'CPU utilization'
              type: ZABBIX_ACTIVE
              key: 'proc.cpu.util[{#NGINX.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of the CPU utilization by a process {#NGINX.NAME}.'
              tags:
                - tag: component
                  value: cpu
          trigger_prototypes:
            - uuid: 17f59999c0ee40788aa20979f396616b
              expression: |
                (find(/Nginx by Zabbix agent active/web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"],,"iregexp","HTTP\\/[\\d.]+\\s+200")=0 or
                nodata(/Nginx by Zabbix agent active/web.page.get["{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PATH}","{$NGINX.STUB_STATUS.PORT}"],30m)) and last(/Nginx by Zabbix agent active/nginx.proc.num[{#NGINX.NAME}])>0
              name: 'Nginx: Failed to fetch stub status page'
              event_name: 'Nginx: Failed to fetch stub status page (or no data for 30m)'
              priority: WARNING
              description: 'Zabbix has not received any data for items for the last 30 minutes.'
              manual_close: 'YES'
              dependencies:
                - name: 'Nginx: Service is down'
                  expression: 'last(/Nginx by Zabbix agent active/net.tcp.service[http,"{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PORT}"])=0 and last(/Nginx by Zabbix agent active/nginx.proc.num[{#NGINX.NAME}])>0'
              tags:
                - tag: scope
                  value: availability
            - uuid: ff0d5f7f9ae740e3966af8cba9856a00
              expression: 'min(/Nginx by Zabbix agent active/nginx.connections.dropped.rate,5m) > {$NGINX.DROP_RATE.MAX.WARN} and last(/Nginx by Zabbix agent active/nginx.proc.num[{#NGINX.NAME}])>0'
              name: 'Nginx: High connections drop rate'
              event_name: 'Nginx: High connections drop rate (more than {$NGINX.DROP_RATE.MAX.WARN} for 5m)'
              opdata: 'Current rate: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The rate of dropping connections has been greater than {$NGINX.DROP_RATE.MAX.WARN} for the last 5 minutes.'
              dependencies:
                - name: 'Nginx: Service is down'
                  expression: 'last(/Nginx by Zabbix agent active/net.tcp.service[http,"{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PORT}"])=0 and last(/Nginx by Zabbix agent active/nginx.proc.num[{#NGINX.NAME}])>0'
              tags:
                - tag: scope
                  value: performance
            - uuid: 5ed915dd28814134bcbf78738ad8173c
              expression: 'last(/Nginx by Zabbix agent active/net.tcp.service[http,"{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PORT}"])=0 and last(/Nginx by Zabbix agent active/nginx.proc.num[{#NGINX.NAME}])>0'
              name: 'Nginx: Service is down'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
            - uuid: bc6c56323e694cd391f6a80ebbac0c35
              expression: 'min(/Nginx by Zabbix agent active/net.tcp.service.perf[http,"{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PORT}"],5m)>{$NGINX.RESPONSE_TIME.MAX.WARN} and last(/Nginx by Zabbix agent active/nginx.proc.num[{#NGINX.NAME}])>0'
              name: 'Nginx: Service response time is too high'
              event_name: 'Nginx: Service response time is too high (over {$NGINX.RESPONSE_TIME.MAX.WARN}s for 5m)'
              priority: WARNING
              manual_close: 'YES'
              dependencies:
                - name: 'Nginx: Service is down'
                  expression: 'last(/Nginx by Zabbix agent active/net.tcp.service[http,"{$NGINX.STUB_STATUS.HOST}","{$NGINX.STUB_STATUS.PORT}"])=0 and last(/Nginx by Zabbix agent active/nginx.proc.num[{#NGINX.NAME}])>0'
              tags:
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: 60d7f859559246fe902edd8a12ab4c70
              name: 'Nginx: Memory usage[{#NGINX.NAME}]'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  item:
                    host: 'Nginx by Zabbix agent active'
                    key: 'nginx.proc.vmem[{#NGINX.NAME}]'
                - sortorder: '1'
                  drawtype: BOLD_LINE
                  color: F63100
                  item:
                    host: 'Nginx by Zabbix agent active'
                    key: 'nginx.proc.rss[{#NGINX.NAME}]'
          master_item:
            key: 'proc.get[{$NGINX.PROCESS.NAME.PARAMETER},,,summary]'
          lld_macro_paths:
            - lld_macro: '{#NGINX.NAME}'
              path: $.name
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: webserver
        - tag: target
          value: nginx
      macros:
        - macro: '{$NGINX.DROP_RATE.MAX.WARN}'
          value: '1'
          description: 'The critical rate of the dropped connections for a trigger expression.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Critical rate of the dropped connections'
            description: 'Critical rate of the dropped connections for a trigger expression. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NGINX.PROCESS.NAME.PARAMETER}'
          description: 'The process name of the Nginx server used in the item key `proc.get`. It could be specified if the correct process name is known.'
          config:
            type: TEXT
            priority: '5'
            label: 'Nginx process name'
            description: 'Process name of the Nginx server Used in the item key `proc.get`.'
        - macro: '{$NGINX.PROCESS_NAME}'
          value: nginx
          description: 'The process name filter for the Nginx process discovery.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Nginx process name LLD filter'
            description: 'Process name filter for the Nginx process discovery.'
        - macro: '{$NGINX.RESPONSE_TIME.MAX.WARN}'
          value: '10'
          description: 'The maximum response time of Nginx expressed in seconds for a trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Maximum Nginx response time'
            description: 'Maximum response time of Nginx expressed in seconds for a trigger expression. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NGINX.STUB_STATUS.HOST}'
          value: localhost
          description: 'The hostname or IP address of the Nginx host or Nginx container of `astub_status`.'
          config:
            type: TEXT
            priority: '1'
            label: 'Nginx status host'
            description: 'Hostname or IP address of the Nginx host or Nginx container of a stub_status.'
            required: 'YES'
        - macro: '{$NGINX.STUB_STATUS.PATH}'
          value: basic_status
          description: 'The path of the `Nginx stub_status` page.'
          config:
            type: TEXT
            priority: '2'
            label: 'Nginx status page path'
            description: 'Path of the `Nginx stub_status` page.'
            required: 'YES'
        - macro: '{$NGINX.STUB_STATUS.PORT}'
          value: '80'
          description: 'The port of the `Nginx stub_status` host or container.'
          config:
            type: TEXT
            priority: '3'
            label: 'Nginx status page port'
            description: 'Port of the `Nginx stub_status` host or container. In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: d066178c8aa942a5b82e7a6fdbd21880
          name: 'Nginx performance'
          pages:
            - widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Nginx by Zabbix agent active'
                        name: 'Nginx: Connections by state'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Nginx by Zabbix agent active'
                        name: 'Nginx: Connections per second'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Nginx by Zabbix agent active'
                        name: 'Nginx: Requests per second'
                    - type: STRING
                      name: reference
                      value: AAAAB
      valuemaps:
        - uuid: 664f36475a624b6bbf6a23c430baaa9b
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 8098b3c157ab456abd55d3840eef79c1
      template: 'OpenWeatherMap by HTTP'
      name: 'OpenWeatherMap by HTTP'
      description: |
        Get weather metrics from OpenWeatherMap current weather API by HTTP.
        It works without any external scripts and uses the Script item.
        
        Setup:
          1. Create a host.
        
          2. Link the template to the host.
        
          3. Customize the values of {$OPENWEATHERMAP.API.TOKEN} and {$LOCATION} macros.  
              OpenWeatherMap API Tokens are available in your OpenWeatherMap account https://home.openweathermap.org/api_keys.  
              Locations can be set by few ways:
                - by geo coordinates (for example: 56.95,24.0833)
                - by location name (for example: Riga)
                - by location ID. Link to the list of city ID: http://bulk.openweathermap.org/sample/city.list.json.gz
                - by zip/post code with a country code (for example: 94040,us)
              A few locations can be added to the macro at the same time by "|" delimiter. 
              For example: 43.81821,7.76115|Riga|2643743|94040,us.
              Please note that API requests by city name, zip-codes and city id will be deprecated soon.
              
              Language and units macros can be customized too if necessary.
              List of available languages: https://openweathermap.org/current#multi.
              Available units of measurement are: standard, metric and imperial https://openweathermap.org/current#data.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        1. Create a host.
        
        2. Link the template to the host.
        
        3. Customize the values of `Token` and `Location` host wizard configuration fields.  
            OpenWeatherMap API Tokens are available in your OpenWeatherMap account https://home.openweathermap.org/api_keys.  
            Locations can be set by few ways:
              - by geo coordinates (for example: 56.95,24.0833)
              - by location name (for example: Riga)
              - by location ID. Link to the list of city ID: http://bulk.openweathermap.org/sample/city.list.json.gz
              - by zip/post code with a country code (for example: 94040,us)
            A few locations can be added to the host wizard configuration field at the same time by `|` delimiter.
            For example: `43.81821,7.76115|Riga|2643743|94040,us`.
            Please note that API requests by city name, zip-codes and city id will be deprecated soon.
            
            Language and units host wizard configuration fields can be customized too if necessary.
            List of available languages: https://openweathermap.org/current#multi.
            Available units of measurement are: standard, metric and imperial https://openweathermap.org/current#data.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 7db240f752294b2eb86537d6c06cac5e
          name: 'Get data'
          type: SCRIPT
          key: openweathermap.get.data
          delay: 10m
          history: '0'
          value_type: TEXT
          params: |
            var params = JSON.parse(value),
            	request = new HttpRequest(),
            	data = [],
            	error_msg = [],
            	measurement,
            	temp_unit,
            	wind_unit,
            	errors_only = [],
            	error_locations = [],
            	unique_errors,
            	new_error_msg;
            
            function getHttpData(query) {
            	url = params.api_endpoint + query + '&appid=' + params.apikey + '&units=' + params.units + '&lang=' + params.lang;
            	response = request.get(url);
            	Zabbix.log(4, '[ Openweathermap ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            	if (response !== null) {
            		try {
            			response = JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response.';
            		}
            	}
            
            	if (request.getStatus() !== 200) {
            		if (response.error && response.error.message) {
            			throw response.error.message;
            		}
            		else {
            			throw 'Failed to receive data. Invalid response status code: ' + request.getStatus();
            		}
            	}
            	return response;
            }
            
            switch (params.units) {
            	case 'metric':
            		measurement = 'metric';
            		temp_unit = 'C';
            		wind_unit = 'meter/sec';
            		break;
            	case 'imperial':
            		measurement = 'imperial';
            		temp_unit = 'F';
            		wind_unit = 'miles/hour';
            		break;
            	default:
            		measurement = 'standard';
            		temp_unit = 'K';
            		wind_unit = 'meter/sec';
            }
            
            locations = params.location.split('|');
            for (var i in locations) {
            	try {
            		if (/^[0-9]+$/g.test(locations[i])) {
            			result = getHttpData('id=' + locations[i]);
            		}
            		else if (/^.*,[\w]+$/g.test(locations[i])) {
            			result = getHttpData('zip=' + locations[i]);
            		}
            		else if (/^(\-)?[0-9]{1,2}(\.[0-9]+)?,(\-)?[0-9]{1,2}(\.[0-9]+)?/g.test(locations[i])) {
            			coordinates = locations[i].split(',');
            			result = getHttpData('lat=' + coordinates[0] + '&lon=' + coordinates[1]);
            		}
            		else {
            			result = getHttpData('q=' + encodeURIComponent(locations[i]));
            		}
            		if (!data.filter(function (location) { return location.id === result.id; }).length) {
            			result.measurement = measurement;
            			result.temp_unit = temp_unit;
            			result.wind_unit = wind_unit;
            			data.push(result);
            		}
            	} catch (error) {
            		errors = {};
            		errors.location = locations[i];
            		errors.error = error.toString();
            		error_msg.push(errors);
            		errors_only.push(error.toString());
            	}
            }
            
            if (error_msg.length === 0) {
            	return JSON.stringify({
            		'data': data,
            		'errors': error_msg.toString()
            	});
            } else {
            	unique_errors = errors_only.filter(function (value, index, self) {
            		return self.indexOf(value) == index;
            	});
            
            	if (unique_errors.length === 1) {
            		for (var j in error_msg) {
            			error_locations.push(error_msg[j].location);
            		}
            		new_error_msg = 'Failed to retrieve data for the following locations: ' + error_locations + '. ' + unique_errors[0];
            		return JSON.stringify({
            			'data': data,
            			'errors': new_error_msg
            		});
            	} else {
            		return JSON.stringify({
            			'data': data,
            			'errors': error_msg
            		});
            	}
            }
          description: 'JSON array with result of OpenWeatherMap API requests.'
          parameters:
            - name: apikey
              value: '{$OPENWEATHERMAP.API.TOKEN}'
            - name: api_endpoint
              value: '{$OPENWEATHERMAP.API.ENDPOINT}'
            - name: lang
              value: '{$LANG}'
            - name: location
              value: '{$LOCATION}'
            - name: units
              value: '{$UNITS}'
          tags:
            - tag: component
              value: raw
        - uuid: 2eb0520627084f2596743f53552c3744
          name: 'Get data collection errors'
          type: DEPENDENT
          key: openweathermap.get.errors
          value_type: TEXT
          description: 'Errors from get data requests by script item.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.errors
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: openweathermap.get.data
          tags:
            - tag: component
              value: application
            - tag: component
              value: errors
          triggers:
            - uuid: 8c2c6f81e1e74f97a28538e714eee474
              expression: 'length(last(/OpenWeatherMap by HTTP/openweathermap.get.errors))>0'
              name: 'OpenWeatherMap: There are errors in requests to OpenWeatherMap API'
              opdata: '{ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Zabbix has received errors in requests to OpenWeatherMap API.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 8d3f96f4a23c43a2a28b75f078cc1ff2
          name: 'Locations discovery'
          type: DEPENDENT
          key: openweathermap.locations.discovery
          lifetime: 0d
          description: 'Weather metrics discovery by location.'
          item_prototypes:
            - uuid: 8d19b2e691a440dcb014a6518b7bb0d6
              name: '[{#LOCATION}, {#COUNTRY}]: Cloudiness'
              type: DEPENDENT
              key: 'openweathermap.clouds[{#ID}]'
              units: '%'
              description: 'Cloudiness in %.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.clouds.all
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: 02463505cab64ae0bbc4554531372818
              name: '[{#LOCATION}, {#COUNTRY}]: Short weather status'
              type: DEPENDENT
              key: 'openweathermap.description[{#ID}]'
              value_type: CHAR
              description: 'Short weather status description.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.weather..description.first()
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: 5f8fa36c0be5475bad5c5c9074afa7e4
              name: '[{#LOCATION}, {#COUNTRY}]: Humidity'
              type: DEPENDENT
              key: 'openweathermap.humidity[{#ID}]'
              units: '%'
              description: 'Humidity in %.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.main.humidity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: 51f79e4be0734ad5b548617eb535fae4
              name: '[{#LOCATION}, {#COUNTRY}]: Data'
              type: DEPENDENT
              key: 'openweathermap.location.data[{#ID}]'
              history: '0'
              value_type: TEXT
              description: 'JSON with result of OpenWeatherMap API request by location.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.data.[?(@.id==''{#ID}'')].first()'
              master_item:
                key: openweathermap.get.data
              tags:
                - tag: component
                  value: raw
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: a9ef27e9702c4f41bfbb95579ff2014e
              name: '[{#LOCATION}, {#COUNTRY}]: Atmospheric pressure'
              type: DEPENDENT
              key: 'openweathermap.pressure[{#ID}]'
              units: Pa
              description: 'Atmospheric pressure in Pa.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.main.pressure
                - type: MULTIPLIER
                  parameters:
                    - '100'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: 6a0f10ae39a347319026ff147f1dc470
              name: '[{#LOCATION}, {#COUNTRY}]: Rain volume for the last one hour'
              type: DEPENDENT
              key: 'openweathermap.rain[{#ID}]'
              value_type: FLOAT
              units: m
              description: 'Rain volume for the lat one hour in m.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rain.1h
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: 8310f65dceeb4b348f1a769b806d5239
              name: '[{#LOCATION}, {#COUNTRY}]: Snow volume for the last one hour'
              type: DEPENDENT
              key: 'openweathermap.snow[{#ID}]'
              value_type: FLOAT
              units: m
              description: 'Snow volume for the lat one hour in m.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.snow.1h
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: d30b8a4a56344ddd830d0bd633507b78
              name: '[{#LOCATION}, {#COUNTRY}]: Temperature'
              type: DEPENDENT
              key: 'openweathermap.temp[{#ID}]'
              value_type: FLOAT
              units: '{#TEMP.UNIT}'
              description: 'Atmospheric temperature value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.main.temp
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
              trigger_prototypes:
                - uuid: 3b7e55f13c6a4ba2930709d5c51c8a09
                  expression: 'min(/OpenWeatherMap by HTTP/openweathermap.temp[{#ID}],#3)>{$TEMP.CRIT.HIGH}'
                  name: 'OpenWeatherMap: [{#LOCATION}, {#COUNTRY}]: Temperature is too high'
                  event_name: 'OpenWeatherMap: [{#LOCATION}, {#COUNTRY}]: Temperature is too high (over {$TEMP.CRIT.HIGH} for 30m)'
                  opdata: 'Current temp: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Temperature value is too high.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 7c98d2784a2e42faa76e67348a0df7ff
                  expression: 'max(/OpenWeatherMap by HTTP/openweathermap.temp[{#ID}],#3)<{$TEMP.CRIT.LOW}'
                  name: 'OpenWeatherMap: [{#LOCATION}, {#COUNTRY}]: Temperature is too low'
                  event_name: 'OpenWeatherMap: [{#LOCATION}, {#COUNTRY}]: Temperature is too low (below {$TEMP.CRIT.LOW} for 30m)'
                  opdata: 'Current temp: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Temperature value is too low.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 23d4152f794d46f6af705749b9443100
              name: '[{#LOCATION}, {#COUNTRY}]: Visibility'
              type: DEPENDENT
              key: 'openweathermap.visibility[{#ID}]'
              units: m
              description: 'Visibility in m.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.visibility
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: f3350dcbd4f247e7878c06b8695beddd
              name: '[{#LOCATION}, {#COUNTRY}]: Wind direction'
              type: DEPENDENT
              key: 'openweathermap.wind.direction[{#ID}]'
              value_type: FLOAT
              units: deg
              description: 'Wind direction in degrees.'
              valuemap:
                name: 'Wind direction'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wind.deg
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
            - uuid: 67decabd27774e9fb6d9212621c43a54
              name: '[{#LOCATION}, {#COUNTRY}]: Wind speed'
              type: DEPENDENT
              key: 'openweathermap.wind.speed[{#ID}]'
              value_type: FLOAT
              units: '{#WIND.UNIT}'
              description: 'Wind speed value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wind.speed
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'openweathermap.location.data[{#ID}]'
              tags:
                - tag: component
                  value: environment
                - tag: country
                  value: '{#COUNTRY}'
                - tag: location
                  value: '{#LOCATION}'
          graph_prototypes:
            - uuid: 62ba0562f77d46e0b04a387d82c1a51e
              name: '[{#LOCATION}, {#COUNTRY}]: Atmospheric pressure'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'OpenWeatherMap by HTTP'
                    key: 'openweathermap.pressure[{#ID}]'
            - uuid: 6196267a6d974ef2acbebdb9b33f6b71
              name: '[{#LOCATION}, {#COUNTRY}]: Rain volume'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'OpenWeatherMap by HTTP'
                    key: 'openweathermap.rain[{#ID}]'
            - uuid: 27b47b89606e43f5a4180e9dde29d7d6
              name: '[{#LOCATION}, {#COUNTRY}]: Snow volume'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'OpenWeatherMap by HTTP'
                    key: 'openweathermap.snow[{#ID}]'
            - uuid: 3561e247237548f3a26c702924d05894
              name: '[{#LOCATION}, {#COUNTRY}]: Temperature'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'OpenWeatherMap by HTTP'
                    key: 'openweathermap.temp[{#ID}]'
          master_item:
            key: openweathermap.get.data
          lld_macro_paths:
            - lld_macro: '{#COUNTRY}'
              path: $.sys.country
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#LOCATION}'
              path: $.name
            - lld_macro: '{#TEMP.UNIT}'
              path: $.temp_unit
            - lld_macro: '{#WIND.UNIT}'
              path: $.wind_unit
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data
            - type: NOT_MATCHES_REGEX
              parameters:
                - '\[\]'
              error_handler: CUSTOM_ERROR
              error_handler_params: 'Failed to receive data about required locations from API'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: weather
        - tag: target
          value: openweathermap
      macros:
        - macro: '{$LANG}'
          value: en
          description: 'List of available languages https://openweathermap.org/current#multi.'
          config:
            type: TEXT
            priority: '2'
            label: Language
            description: 'List of available languages https://openweathermap.org/current#multi.'
            required: 'YES'
        - macro: '{$LOCATION}'
          value: Riga
          description: |
            Locations can be set by few ways:
            1. by geo coordinates (for example: 56.95,24.0833)
            2. by location name (for example: Riga)
            3. by location ID. Link to the list of city ID: http://bulk.openweathermap.org/sample/city.list.json.gz
            4. by zip/post code with a country code (for example: 94040,us)
            A few locations can be added to the macro at the same time by `|` delimiter. 
            For example: `43.81821,7.76115|Riga|2643743|94040,us`.
            Please note that API requests by city name, zip-codes and city id will be deprecated soon.
          config:
            type: TEXT
            priority: '3'
            label: Location
            description: |
              Locations can be set by few ways:
              1. by geo coordinates (for example: 56.95,24.0833)
              2. by location name (for example: Riga)
              3. by location ID. Link to the list of city ID: http://bulk.openweathermap.org/sample/city.list.json.gz
              4. by zip/post code with a country code (for example: 94040,us)
              A few locations can be added to the macro at the same time by `|` delimiter. 
              For example: `43.81821,7.76115|Riga|2643743|94040,us`.
              Please note that API requests by city name, zip-codes and city id will be deprecated soon.
            required: 'YES'
        - macro: '{$OPENWEATHERMAP.API.ENDPOINT}'
          value: 'api.openweathermap.org/data/2.5/weather?'
          description: 'OpenWeatherMap API endpoint.'
          config:
            type: TEXT
            priority: '4'
            label: URL
            description: 'OpenWeatherMap API endpoint.'
            required: 'YES'
        - macro: '{$OPENWEATHERMAP.API.TOKEN}'
          type: SECRET_TEXT
          description: 'Specify openweathermap API key.'
          config:
            type: TEXT
            priority: '1'
            label: Token
            description: 'Specify openweathermap API key.'
            required: 'YES'
        - macro: '{$TEMP.CRIT.HIGH}'
          value: '30'
          description: 'Threshold for high temperature trigger.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'High temperature threshold'
            description: 'Threshold for high temperature trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TEMP.CRIT.LOW}'
          value: '-20'
          description: 'Threshold for low temperature trigger.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Low temperature threshold'
            description: 'Threshold for low temperature trigger.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$UNITS}'
          value: metric
          description: 'Available units of measurement are standard, metric and imperial https://openweathermap.org/current#data.'
          config:
            type: TEXT
            priority: '5'
            label: Units
            description: 'Available units of measurement are standard, metric and imperial https://openweathermap.org/current#data.'
      dashboards:
        - uuid: 23d93d156d4d459db69000f3cdd3d788
          name: 'Openweathermap: General'
          pages:
            - name: 'Openweathermap: General'
              widgets:
                - type: graphprototype
                  name: Atmospheric.pressure
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'OpenWeatherMap by HTTP'
                        name: '[{#LOCATION}, {#COUNTRY}]: Atmospheric pressure'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graphprototype
                  name: 'Snow volume'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'OpenWeatherMap by HTTP'
                        name: '[{#LOCATION}, {#COUNTRY}]: Snow volume'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graphprototype
                  name: 'Rain volume'
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'OpenWeatherMap by HTTP'
                        name: '[{#LOCATION}, {#COUNTRY}]: Rain volume'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graphprototype
                  name: Temperature
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'OpenWeatherMap by HTTP'
                        name: '[{#LOCATION}, {#COUNTRY}]: Temperature'
                    - type: STRING
                      name: reference
                      value: AAAAD
      valuemaps:
        - uuid: 9a8fdac997914722acfea90f1f9d45e9
          name: 'Wind direction'
          mappings:
            - type: IN_RANGE
              value: '0 - 11.24'
              newvalue: 'N'
            - type: IN_RANGE
              value: '11.25 - 33.74'
              newvalue: NNE
            - type: IN_RANGE
              value: '33.75 - 56.24'
              newvalue: NE
            - type: IN_RANGE
              value: '56.25 - 78.74'
              newvalue: ENE
            - type: IN_RANGE
              value: '78.75 - 101.24'
              newvalue: E
            - type: IN_RANGE
              value: '101.25 - 123.74'
              newvalue: ESE
            - type: IN_RANGE
              value: '123.75 - 146.24'
              newvalue: SE
            - type: IN_RANGE
              value: '146.25 - 168.74'
              newvalue: SSE
            - type: IN_RANGE
              value: '168.75 - 191.24'
              newvalue: S
            - type: IN_RANGE
              value: '191.25 - 213.74'
              newvalue: SSW
            - type: IN_RANGE
              value: '213.75 - 236.24'
              newvalue: SW
            - type: IN_RANGE
              value: '236.25 - 258.74'
              newvalue: WSW
            - type: IN_RANGE
              value: '258.75 - 281.24'
              newvalue: W
            - type: IN_RANGE
              value: '281.25 - 303.74'
              newvalue: WNW
            - type: IN_RANGE
              value: '303.75 - 326.24'
              newvalue: NW
            - type: IN_RANGE
              value: '326.25 - 348.74'
              newvalue: NNW
            - type: IN_RANGE
              value: '348.75 - 379.99'
              newvalue: 'N'
    - uuid: 1cbda0970410435684135884d0cb7090
      template: 'PHP-FPM by Zabbix agent'
      name: 'PHP-FPM by Zabbix agent'
      description: |
        Get PHP-FPM metrics using Zabbix agent running on Linux.
        
        Note that depending on your OS distribution, the PHP-FPM process name may vary. Please, check the actual name in the line "Name" from /proc/<pid>/status file (https://www.zabbix.com/documentation/8.0/manual/appendix/items/proc_mem_num_notes) and change {$PHP_FPM.PROCESS.NAME.PARAMETER} macro if needed.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is developed to monitor the FastCGI Process Manager (PHP-FPM) by Zabbix agent that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        The template `PHP-FPM by Zabbix agent` - collects metrics by polling the PHP-FPM status-page locally with Zabbix agent.
        
        Note that this template doesn't support HTTPS and redirects (limitations of `web.page.get`).
        
        It also uses Zabbix agent to collect `php-fpm` Linux process statistics, such as CPU usage, memory usage, and whether the process is running or not.
        
        ## Setup
        
        Note that depending on your OS distribution, the PHP-FPM executable/service name can vary. RHEL-like distributions usually name both process and service as `php-fpm`, while for Debian/Ubuntu based distributions it may include the version, for example: executable name - `php-fpm8.2`, systemd service name - `php8.2-fpm`. Adjust the following instructions accordingly if needed.
        
        1. Open the PHP-FPM configuration file and enable the status page as shown.
          ```
          pm.status_path = /status
          ping.path = /ping
          ```
        
        2. Validate the syntax to ensure it is correct before you reload the service. Replace the `<version>` in the command if needed.
          ```
          $ php-fpm -t
          ```
          or
          ```
          $ php-fpm<version> -t
          ```
        
        3. Reload the `php-fpm` service to make the change active. Replace the `<version>` in the command if needed.
          ```
          $ systemctl reload php-fpm
          ```
          or
          ```
          $ systemctl reload php<version>-fpm
          ```
        
        4. Next, edit the configuration of your web server.
        
        If you use Nginx, edit the configuration file of your Nginx server block (virtual host) and add the location block below it.
          ```
          # Enable php-fpm status page
          location ~ ^/(status|ping)$ {
          ## disable access logging for request if you prefer
          access_log off;
        
          ## Only allow trusted IPs for security, deny everyone else
          # allow 127.0.0.1;
          # allow 1.2.3.4;    # your IP here
          # deny all;
        
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_index index.php;
          include fastcgi_params;
          ## Now the port or socket of the php-fpm pool we want the status of
          fastcgi_pass 127.0.0.1:9000;
          # fastcgi_pass unix:/run/php-fpm/your_socket.sock;
          }
          ```
        If you use Apache, edit the configuration file of the virtual host and add the following location blocks.
          ```
          <LocationMatch "/status">
              Require ip 127.0.0.1
              # Require ip 1.2.3.4    # Your IP here
              # Adjust the path to the socket if needed
              ProxyPass "unix:/run/php-fpm/www.sock|fcgi://localhost/status"
          </LocationMatch>
        
          <LocationMatch "/ping">
              Require ip 127.0.0.1
              # Require ip 1.2.3.4    # Your IP here
              # Adjust the path to the socket if needed
              ProxyPass "unix:/run/php-fpm/www.sock|fcgi://localhost/ping"
          </LocationMatch>
          ```
        5. Check the web server configuration syntax. The command may vary depending on the OS distribution and web server.
          ```
          $ nginx -t
          ```
          or
          ```
          $ httpd -t
          ```
          or
          ```
          $ apachectl configtest
          ```
        
        6. Reload the web server configuration. The command may vary depending on the OS distribution and web server.
          ```
          $ systemctl reload nginx
          ```
          or
          ```
          $ systemctl reload httpd
          ```
          or
          ```
          $ systemctl reload apache2
          ```
        
        7. Verify that the pages are available with these commands.
          ```
          curl -L 127.0.0.1/status
          curl -L 127.0.0.1/ping
          ```
        
        Depending on your OS distribution, the PHP-FPM process name may vary as well. Please check the actual name in the line "Name" from /proc/\<pid\>/status file (https://www.zabbix.com/documentation/8.0/manual/appendix/items/proc_mem_num_notes) and change the `Process name` host wizard configuration field if needed.
        
        If you use another location of the status/ping pages, don't forget to change the `Status page path/Ping page path` host wizard configuration field.
        
        If you use another web server port or scheme for the location of the PHP-FPM status/ping pages, don't forget to change the host wizard configuration fields `Scheme` and `PHP-FPM port`.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 9ae9e2a8003a48a7a482ef6d6ae9886c
          name: 'Accepted connections per second'
          type: DEPENDENT
          key: php-fpm.conn_accepted.rate
          value_type: FLOAT
          description: 'The number of accepted requests per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''accepted conn'']'
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: edc6b68194fe499facfb6b22425ff0d4
          name: 'Listen queue'
          type: DEPENDENT
          key: php-fpm.listen_queue
          description: 'The current number of connections that have been initiated but not yet accepted.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''listen queue'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: listen-queue
        - uuid: aff9f072b06a4b56afb0e0f44b2c83a4
          name: 'Listen queue, len'
          type: DEPENDENT
          key: php-fpm.listen_queue_len
          description: 'The size of the socket queue of pending connections.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''listen queue len'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: listen-queue
        - uuid: de0a543bee5a46c88085b2aba2f4976f
          name: 'Listen queue, max'
          type: DEPENDENT
          key: php-fpm.listen_queue_max
          description: 'The maximum number of requests in the queue of pending connections since this FPM pool was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max listen queue'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: listen-queue
        - uuid: dfabcd55c13449c29a48b70fdce77674
          name: 'Queue usage'
          type: CALCULATED
          key: php-fpm.listen_queue_usage
          value_type: FLOAT
          units: '%'
          params: 'last(//php-fpm.listen_queue)/(last(//php-fpm.listen_queue_len)+(last(//php-fpm.listen_queue_len)=0))*100'
          description: 'The utilization of the queue.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: a11264f0e1174b7fb81b457dad1a745f
              expression: 'min(/PHP-FPM by Zabbix agent/php-fpm.listen_queue_usage,15m) > {$PHP_FPM.QUEUE.WARN.MAX}'
              name: 'PHP-FPM: Queue utilization is high'
              event_name: 'PHP-FPM: Queue utilization is high (over {$PHP_FPM.QUEUE.WARN.MAX}% for 15m)'
              priority: WARNING
              description: |
                The queue for this pool has reached `{$PHP_FPM.QUEUE.WARN.MAX}%` of its maximum capacity. 
                Items in the queue represent the current number of connections that have been initiated on this pool but not yet accepted.
              tags:
                - tag: scope
                  value: capacity
        - uuid: e9d49669cf58492a9d5ef7ff997e1a40
          name: 'Max children reached'
          type: DEPENDENT
          key: php-fpm.max_children
          description: 'The number of times that `pm.max_children` has been reached since the PHP-FPM pool was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max children reached'']'
            - type: SIMPLE_CHANGE
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
        - uuid: 830e04be30f04e50ac0fa4783ecdc677
          name: 'Pool name'
          type: DEPENDENT
          key: php-fpm.name
          value_type: CHAR
          description: 'The name of the current pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pool
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
        - uuid: 250f346008984a95829dba08d0f95838
          name: Ping
          type: DEPENDENT
          key: php-fpm.ping
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: REGEX
              parameters:
                - '{$PHP_FPM.PING.REPLY}($|\r?\n)'
                - '1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: health
        - uuid: 8ebee5fc8c854a96b34ed743e3dd0154
          name: 'Processes, active'
          type: DEPENDENT
          key: php-fpm.processes_active
          description: 'The total number of active processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''active processes'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: system
        - uuid: 11cfd028325242a58d61d9e83aee640b
          name: 'Processes, idle'
          type: DEPENDENT
          key: php-fpm.processes_idle
          description: 'The total number of idle processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''idle processes'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: system
        - uuid: 3858218f90684bb19cbe27fc9aedf404
          name: 'Processes, max active'
          type: DEPENDENT
          key: php-fpm.processes_max_active
          description: 'The highest value of "active processes" since the PHP-FPM server was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max active processes'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
        - uuid: a79af6cf38ec45518055c64aa7f1f5a2
          name: 'Processes, total'
          type: DEPENDENT
          key: php-fpm.processes_total
          description: 'The total number of server processes currently running.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''total processes'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: system
        - uuid: 5ab12fc9f4ef49e5bbf7b2c6a840879e
          name: 'Process manager'
          type: DEPENDENT
          key: php-fpm.process_manager
          value_type: CHAR
          description: 'The method used by the process manager to control the number of child processes for this pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''process manager'']'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 231e0fbfb6e94f34b790576766244602
              expression: 'last(/PHP-FPM by Zabbix agent/php-fpm.process_manager,#1)<>last(/PHP-FPM by Zabbix agent/php-fpm.process_manager,#2)'
              name: 'PHP-FPM: Manager changed'
              event_name: 'PHP-FPM: Manager changed (new value received: {ITEM.VALUE})'
              priority: INFO
              description: 'The PHP-FPM manager has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 4d17b6d89ac94d0880eac6962ebf7347
          name: 'Slow requests'
          type: DEPENDENT
          key: php-fpm.slow_requests
          description: 'The number of requests that has exceeded your `request_slowlog_timeout` value.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''slow requests'']'
            - type: SIMPLE_CHANGE
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: f30147d8e92f48aa8fedc2d28b8d7c70
              expression: 'min(/PHP-FPM by Zabbix agent/php-fpm.slow_requests,#3)>0'
              name: 'PHP-FPM: Detected slow requests'
              priority: WARNING
              description: |
                The PHP-FPM has detected a slow request. 
                The slow request means that it took more time to execute than expected (defined in the configuration of your pool).
              tags:
                - tag: scope
                  value: performance
        - uuid: 4e4d6eda8fbb4dd2ba7f48fba5723473
          name: 'Start time'
          type: DEPENDENT
          key: php-fpm.start_time
          units: unixtime
          description: 'The time when this pool was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''start time'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
        - uuid: 2a19b306712a47999e70d3ec30e39b05
          name: Uptime
          type: DEPENDENT
          key: php-fpm.uptime
          units: s
          description: 'It indicates how long has this pool been running.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''start since'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: c6966a6c3ff0452ab4fd112c9299e624
              expression: 'last(/PHP-FPM by Zabbix agent/php-fpm.uptime)<10m'
              name: 'PHP-FPM: Pool has been restarted'
              event_name: 'PHP-FPM: Pool has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: b53e2e356317468f9d6d3272eb755650
          name: Version
          type: DEPENDENT
          key: php-fpm.version
          value_type: CHAR
          description: 'The current version of the PHP. You can get it from the HTTP-Header "X-Powered-By"; it may not work if you have changed the default HTTP-headers.'
          preprocessing:
            - type: REGEX
              parameters:
                - '^[.\s\S]*X-Powered-By: PHP/([.\d]{1,})'
                - \1
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: fb110a37f0fc4a62b51df72e33bc3448
              expression: 'last(/PHP-FPM by Zabbix agent/php-fpm.version,#1)<>last(/PHP-FPM by Zabbix agent/php-fpm.version,#2) and length(last(/PHP-FPM by Zabbix agent/php-fpm.version))>0'
              name: 'PHP-FPM: Version has changed'
              event_name: 'PHP-FPM: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The PHP-FPM version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 71ea0957d99a4d48b18e73a21494c849
          name: 'Get processes summary'
          key: 'proc.get[{$PHP_FPM.PROCESS.NAME.PARAMETER},,,summary]'
          history: '0'
          value_type: TEXT
          description: 'The aggregated data of summary metrics for all processes.'
          tags:
            - tag: component
              value: raw
        - uuid: c0c438492c63453496e83938745ffffc
          name: php-fpm_ping
          key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]'
          history: '0'
          value_type: TEXT
          tags:
            - tag: component
              value: health
        - uuid: 09ec73291f21417ab8f19f56fda3331f
          name: 'Get status page'
          key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          history: '0'
          value_type: TEXT
          preprocessing:
            - type: REGEX
              parameters:
                - '^[.\s\S]*({.+})'
                - \1
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: a8abec999ac74339b077d226bdbcfcc9
          name: 'PHP-FPM process discovery'
          type: DEPENDENT
          key: php-fpm.proc.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#PHP_FPM.NAME}'
                value: '{$PHP_FPM.PROCESS_NAME}'
          description: 'The discovery of the PHP-FPM summary processes.'
          item_prototypes:
            - uuid: 985005cdf7b44332a59a5f7da7528d88
              name: 'Get process data'
              type: DEPENDENT
              key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'The summary metrics aggregated by a process `{#PHP_FPM.NAME}`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@["name"]=="{#PHP_FPM.NAME}")].first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: 'Failed to retrieve process {#PHP_FPM.NAME} data'
              master_item:
                key: 'proc.get[{$PHP_FPM.PROCESS.NAME.PARAMETER},,,summary]'
              tags:
                - tag: component
                  value: raw
            - uuid: ab8dc0d1ce344fe8ae6a22716a168fbd
              name: 'Number of running processes'
              type: DEPENDENT
              key: 'php-fpm.proc.num[{#PHP_FPM.NAME}]'
              description: 'The number of running processes `{#PHP_FPM.NAME}`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.processes
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              tags:
                - tag: component
                  value: system
              trigger_prototypes:
                - uuid: 21a03d0ada634602ae9089a2cf3b4d70
                  expression: 'last(/PHP-FPM by Zabbix agent/php-fpm.proc.num[{#PHP_FPM.NAME}])=0'
                  name: 'PHP-FPM: Process is not running'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: availability
            - uuid: ef771994ec9e482babf872d9f867d500
              name: 'Memory usage, %'
              type: DEPENDENT
              key: 'php-fpm.proc.pmem[{#PHP_FPM.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of real memory used by a process `{#PHP_FPM.NAME}`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pmem
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: f55a5ef29f864d0a8c1af25df2372f7c
              name: 'Memory usage (rss)'
              type: DEPENDENT
              key: 'php-fpm.proc.rss[{#PHP_FPM.NAME}]'
              units: B
              description: 'The summary of resident set size memory used by a process `{#PHP_FPM.NAME}` expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rss
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: 4efc6da713264e629f987106b8252355
              name: 'Memory usage (vsize)'
              type: DEPENDENT
              key: 'php-fpm.proc.vmem[{#PHP_FPM.NAME}]'
              units: B
              description: 'The summary of virtual memory used by a process `{#PHP_FPM.NAME}` expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.vsize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: a709eaae52ad4128a129c618db6525d2
              name: 'CPU utilization'
              key: 'proc.cpu.util[{#PHP_FPM.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of the CPU utilization by a process `{#PHP_FPM.NAME}`.'
              tags:
                - tag: component
                  value: cpu
          trigger_prototypes:
            - uuid: bdf9962aee2049a8aec000b037b94d60
              expression: 'nodata(/PHP-FPM by Zabbix agent/php-fpm.uptime,30m)=1 and last(/PHP-FPM by Zabbix agent/php-fpm.proc.num[{#PHP_FPM.NAME}])>0'
              name: 'PHP-FPM: Failed to fetch info data'
              event_name: 'PHP-FPM: Failed to fetch info data (or no data for 30m)'
              priority: INFO
              description: 'Zabbix has not received any data for items for the last 30 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
            - uuid: 10d92102d7a24327ada7869a41119fee
              expression: '(last(/PHP-FPM by Zabbix agent/php-fpm.ping)=0 or nodata(/PHP-FPM by Zabbix agent/php-fpm.ping,3m)=1) and last(/PHP-FPM by Zabbix agent/php-fpm.proc.num[{#PHP_FPM.NAME}])>0'
              name: 'PHP-FPM: Service is down'
              priority: HIGH
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
          graph_prototypes:
            - uuid: 628b350f5fb6439fb4965f4e053f66d5
              name: 'PHP-FPM: Memory usage[{#PHP_FPM.NAME}]'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  item:
                    host: 'PHP-FPM by Zabbix agent'
                    key: 'php-fpm.proc.vmem[{#PHP_FPM.NAME}]'
                - sortorder: '1'
                  drawtype: BOLD_LINE
                  color: F63100
                  item:
                    host: 'PHP-FPM by Zabbix agent'
                    key: 'php-fpm.proc.rss[{#PHP_FPM.NAME}]'
          master_item:
            key: 'proc.get[{$PHP_FPM.PROCESS.NAME.PARAMETER},,,summary]'
          lld_macro_paths:
            - lld_macro: '{#PHP_FPM.NAME}'
              path: $.name
      tags:
        - tag: class
          value: software
        - tag: target
          value: php-fpm
      macros:
        - macro: '{$PHP_FPM.HOST}'
          value: localhost
          description: 'The hostname or IP address of the PHP-FPM status for a host or container.'
          config:
            type: TEXT
            priority: '2'
            label: Address
            description: 'The hostname or IP address of the PHP-FPM status for a host or container.'
            required: 'YES'
        - macro: '{$PHP_FPM.PING.PAGE}'
          value: ping
          description: 'The path of the PHP-FPM ping page.'
          config:
            type: TEXT
            priority: '4'
            label: 'Ping page path'
            description: 'The path of the PHP-FPM ping page.'
        - macro: '{$PHP_FPM.PING.REPLY}'
          value: pong
          description: 'The expected reply to the ping.'
          config:
            type: TEXT
            priority: '5'
            label: 'Expected ping reply'
            description: 'The expected reply to the ping.'
        - macro: '{$PHP_FPM.PORT}'
          value: '80'
          description: 'The port of the PHP-FPM status host or container.'
          config:
            type: TEXT
            priority: '1'
            label: 'PHP-FPM port'
            description: 'The port of the PHP-FPM status host or container. In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PHP_FPM.PROCESS.NAME.PARAMETER}'
          description: 'The process name of the PHP-FPM used in the item key `proc.get`. It could be specified if the correct process name is known.'
          config:
            type: TEXT
            priority: '8'
            section_name: Other
            label: 'Process name'
            description: 'The process name of the PHP-FPM used in the item key `proc.get`. It could be specified if the correct process name is known.'
        - macro: '{$PHP_FPM.PROCESS_NAME}'
          value: php-fpm
          description: 'The process name filter for the PHP-FPM process discovery. May vary depending on your OS distribution.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Process name filter (include)'
            description: 'The process name filter for the PHP-FPM process discovery. May vary depending on your OS distribution.'
        - macro: '{$PHP_FPM.QUEUE.WARN.MAX}'
          value: '80'
          description: 'The maximum percent of the PHP-FPM queue usage for a trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Max queue usage (%)'
            description: 'The maximum percent of the PHP-FPM queue usage for a trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PHP_FPM.STATUS.PAGE}'
          value: status
          description: 'The path of the PHP-FPM status page.'
          config:
            type: TEXT
            priority: '3'
            label: 'Status page path'
            description: 'The path of the PHP-FPM status page.'
            required: 'YES'
      dashboards:
        - uuid: aec4ea16594a47719de221154e43d547
          name: 'PHP-FPM: Overview'
          pages:
            - name: Main
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'PHP-FPM by Zabbix agent'
                        name: 'PHP-FPM: Process'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'PHP-FPM by Zabbix agent'
                        name: 'PHP-FPM: Queue'
                    - type: STRING
                      name: reference
                      value: AAAAB
      valuemaps:
        - uuid: 1caa1e7c41e14c7492ab8112f93ea068
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: a9e83f950e9f41a78474d523c8376338
      template: 'PHP-FPM by Zabbix agent active'
      name: 'PHP-FPM by Zabbix agent active'
      description: |
        Get PHP-FPM metrics using Zabbix agent running on Linux.
        
        Note that depending on your OS distribution, the PHP-FPM process name may vary. Please, check the actual name in the line "Name" from /proc/<pid>/status file (https://www.zabbix.com/documentation/8.0/manual/appendix/items/proc_mem_num_notes) and change {$PHP_FPM.PROCESS.NAME.PARAMETER} macro if needed.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is developed to monitor the FastCGI Process Manager (PHP-FPM) by Zabbix agent that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        The template `PHP-FPM by Zabbix agent` - collects metrics by polling the PHP-FPM status-page locally with Zabbix agent.
        
        Note that this template doesn't support HTTPS and redirects (limitations of `web.page.get`).
        
        It also uses Zabbix agent to collect `php-fpm` Linux process statistics, such as CPU usage, memory usage, and whether the process is running or not.
        
        ## Setup
        
        Note that depending on your OS distribution, the PHP-FPM executable/service name can vary. RHEL-like distributions usually name both process and service as `php-fpm`, while for Debian/Ubuntu based distributions it may include the version, for example: executable name - `php-fpm8.2`, systemd service name - `php8.2-fpm`. Adjust the following instructions accordingly if needed.
        
        1. Open the PHP-FPM configuration file and enable the status page as shown.
          ```
          pm.status_path = /status
          ping.path = /ping
          ```
        
        2. Validate the syntax to ensure it is correct before you reload the service. Replace the `<version>` in the command if needed.
          ```
          $ php-fpm -t
          ```
          or
          ```
          $ php-fpm<version> -t
          ```
        
        3. Reload the `php-fpm` service to make the change active. Replace the `<version>` in the command if needed.
          ```
          $ systemctl reload php-fpm
          ```
          or
          ```
          $ systemctl reload php<version>-fpm
          ```
        
        4. Next, edit the configuration of your web server.
        
        If you use Nginx, edit the configuration file of your Nginx server block (virtual host) and add the location block below it.
          ```
          # Enable php-fpm status page
          location ~ ^/(status|ping)$ {
          ## disable access logging for request if you prefer
          access_log off;
        
          ## Only allow trusted IPs for security, deny everyone else
          # allow 127.0.0.1;
          # allow 1.2.3.4;    # your IP here
          # deny all;
        
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_index index.php;
          include fastcgi_params;
          ## Now the port or socket of the php-fpm pool we want the status of
          fastcgi_pass 127.0.0.1:9000;
          # fastcgi_pass unix:/run/php-fpm/your_socket.sock;
          }
          ```
        If you use Apache, edit the configuration file of the virtual host and add the following location blocks.
          ```
          <LocationMatch "/status">
              Require ip 127.0.0.1
              # Require ip 1.2.3.4    # Your IP here
              # Adjust the path to the socket if needed
              ProxyPass "unix:/run/php-fpm/www.sock|fcgi://localhost/status"
          </LocationMatch>
        
          <LocationMatch "/ping">
              Require ip 127.0.0.1
              # Require ip 1.2.3.4    # Your IP here
              # Adjust the path to the socket if needed
              ProxyPass "unix:/run/php-fpm/www.sock|fcgi://localhost/ping"
          </LocationMatch>
          ```
        5. Check the web server configuration syntax. The command may vary depending on the OS distribution and web server.
          ```
          $ nginx -t
          ```
          or
          ```
          $ httpd -t
          ```
          or
          ```
          $ apachectl configtest
          ```
        
        6. Reload the web server configuration. The command may vary depending on the OS distribution and web server.
          ```
          $ systemctl reload nginx
          ```
          or
          ```
          $ systemctl reload httpd
          ```
          or
          ```
          $ systemctl reload apache2
          ```
        
        7. Verify that the pages are available with these commands.
          ```
          curl -L 127.0.0.1/status
          curl -L 127.0.0.1/ping
          ```
        
        Depending on your OS distribution, the PHP-FPM process name may vary as well. Please check the actual name in the line "Name" from /proc/\<pid\>/status file (https://www.zabbix.com/documentation/8.0/manual/appendix/items/proc_mem_num_notes) and change the `Process name` host wizard configuration field if needed.
        
        If you use another location of the status/ping pages, don't forget to change the `Status page path/Ping page path` host wizard configuration field.
        
        If you use another web server port or scheme for the location of the PHP-FPM status/ping pages, don't forget to change the host wizard configuration fields `Scheme` and `PHP-FPM port`.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: b7e7fa57f21a440da82f4cecd2ee4354
          name: 'Accepted connections per second'
          type: DEPENDENT
          key: php-fpm.conn_accepted.rate
          value_type: FLOAT
          description: 'The number of accepted requests per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''accepted conn'']'
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 0f340ff9525d4c6ca842defe43bdfcd1
          name: 'Listen queue'
          type: DEPENDENT
          key: php-fpm.listen_queue
          description: 'The current number of connections that have been initiated but not yet accepted.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''listen queue'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: listen-queue
        - uuid: 1d49d094424b428595b712a8f9d9debd
          name: 'Listen queue, len'
          type: DEPENDENT
          key: php-fpm.listen_queue_len
          description: 'The size of the socket queue of pending connections.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''listen queue len'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: listen-queue
        - uuid: 27e0a653944e42f7a83536460e25ddc6
          name: 'Listen queue, max'
          type: DEPENDENT
          key: php-fpm.listen_queue_max
          description: 'The maximum number of requests in the queue of pending connections since this FPM pool was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max listen queue'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: listen-queue
        - uuid: bea3630fd88448228cd3e6b5808bac5f
          name: 'Queue usage'
          type: CALCULATED
          key: php-fpm.listen_queue_usage
          value_type: FLOAT
          units: '%'
          params: 'last(//php-fpm.listen_queue)/(last(//php-fpm.listen_queue_len)+(last(//php-fpm.listen_queue_len)=0))*100'
          description: 'The utilization of the queue.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: ffe46ce6fa4545ac8b2f035488c1b7ba
              expression: 'min(/PHP-FPM by Zabbix agent active/php-fpm.listen_queue_usage,15m) > {$PHP_FPM.QUEUE.WARN.MAX}'
              name: 'PHP-FPM: Queue utilization is high'
              event_name: 'PHP-FPM: Queue utilization is high (over {$PHP_FPM.QUEUE.WARN.MAX}% for 15m)'
              priority: WARNING
              description: |
                The queue for this pool has reached `{$PHP_FPM.QUEUE.WARN.MAX}%` of its maximum capacity. 
                Items in the queue represent the current number of connections that have been initiated on this pool but not yet accepted.
              tags:
                - tag: scope
                  value: capacity
        - uuid: 66c7229e59504c5ba2e669e46bf74630
          name: 'Max children reached'
          type: DEPENDENT
          key: php-fpm.max_children
          description: 'The number of times that `pm.max_children` has been reached since the PHP-FPM pool was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max children reached'']'
            - type: SIMPLE_CHANGE
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
        - uuid: b7d1aa5426ef45ca939e9de82f495008
          name: 'Pool name'
          type: DEPENDENT
          key: php-fpm.name
          value_type: CHAR
          description: 'The name of the current pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pool
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
        - uuid: 1385ea3b68944c30b0ce427ead889902
          name: Ping
          type: DEPENDENT
          key: php-fpm.ping
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: REGEX
              parameters:
                - '{$PHP_FPM.PING.REPLY}($|\r?\n)'
                - '1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: health
        - uuid: 22535e01c27b498bae7fc1738760a4a3
          name: 'Processes, active'
          type: DEPENDENT
          key: php-fpm.processes_active
          description: 'The total number of active processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''active processes'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: system
        - uuid: ab4d02aafd3241549e2224d287c19962
          name: 'Processes, idle'
          type: DEPENDENT
          key: php-fpm.processes_idle
          description: 'The total number of idle processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''idle processes'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: system
        - uuid: 057b859639cb4fcc92896cb144b1a709
          name: 'Processes, max active'
          type: DEPENDENT
          key: php-fpm.processes_max_active
          description: 'The highest value of "active processes" since the PHP-FPM server was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''max active processes'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
        - uuid: 269355114f664ee5947382f62216ce1a
          name: 'Processes, total'
          type: DEPENDENT
          key: php-fpm.processes_total
          description: 'The total number of server processes currently running.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''total processes'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: system
        - uuid: 7bd25d99f654482f9e86d50546e51aa2
          name: 'Process manager'
          type: DEPENDENT
          key: php-fpm.process_manager
          value_type: CHAR
          description: 'The method used by the process manager to control the number of child processes for this pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''process manager'']'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 380943ae41cd48e5b903f433216f3cd1
              expression: 'last(/PHP-FPM by Zabbix agent active/php-fpm.process_manager,#1)<>last(/PHP-FPM by Zabbix agent active/php-fpm.process_manager,#2)'
              name: 'PHP-FPM: Manager changed'
              event_name: 'PHP-FPM: Manager changed (new value received: {ITEM.VALUE})'
              priority: INFO
              description: 'The PHP-FPM manager has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: ae81f04c1f9a4f53a09815690d5d43ac
          name: 'Slow requests'
          type: DEPENDENT
          key: php-fpm.slow_requests
          description: 'The number of requests that has exceeded your `request_slowlog_timeout` value.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''slow requests'']'
            - type: SIMPLE_CHANGE
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 4a25c3fecad74df7ba59be94dd1df7cf
              expression: 'min(/PHP-FPM by Zabbix agent active/php-fpm.slow_requests,#3)>0'
              name: 'PHP-FPM: Detected slow requests'
              priority: WARNING
              description: |
                The PHP-FPM has detected a slow request. 
                The slow request means that it took more time to execute than expected (defined in the configuration of your pool).
              tags:
                - tag: scope
                  value: performance
        - uuid: cbd3d52676694f5f807310919511ee51
          name: 'Start time'
          type: DEPENDENT
          key: php-fpm.start_time
          units: unixtime
          description: 'The time when this pool was started.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''start time'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
        - uuid: 4b730deac04448a68dfdcea90a83c0b4
          name: Uptime
          type: DEPENDENT
          key: php-fpm.uptime
          units: s
          description: 'It indicates how long has this pool been running.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.[''start since'']'
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 77e61db3d40d4bd1ba518d27dfd05491
              expression: 'last(/PHP-FPM by Zabbix agent active/php-fpm.uptime)<10m'
              name: 'PHP-FPM: Pool has been restarted'
              event_name: 'PHP-FPM: Pool has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 0807e0c9c77f45ff9b39f6c587b33107
          name: Version
          type: DEPENDENT
          key: php-fpm.version
          value_type: CHAR
          description: 'The current version of the PHP. You can get it from the HTTP-Header "X-Powered-By"; it may not work if you have changed the default HTTP-headers.'
          preprocessing:
            - type: REGEX
              parameters:
                - '^[.\s\S]*X-Powered-By: PHP/([.\d]{1,})'
                - \1
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 27684ff67232429dad79e0eae323945d
              expression: 'last(/PHP-FPM by Zabbix agent active/php-fpm.version,#1)<>last(/PHP-FPM by Zabbix agent active/php-fpm.version,#2) and length(last(/PHP-FPM by Zabbix agent active/php-fpm.version))>0'
              name: 'PHP-FPM: Version has changed'
              event_name: 'PHP-FPM: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'The PHP-FPM version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 2e72b191ec3b481f800e100e69a85691
          name: 'Get processes summary'
          type: ZABBIX_ACTIVE
          key: 'proc.get[{$PHP_FPM.PROCESS.NAME.PARAMETER},,,summary]'
          history: '0'
          value_type: TEXT
          description: 'The aggregated data of summary metrics for all processes.'
          tags:
            - tag: component
              value: raw
        - uuid: ca300d24e4434dd8bc5e86ea859eb9f6
          name: php-fpm_ping
          type: ZABBIX_ACTIVE
          key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]'
          history: '0'
          value_type: TEXT
          tags:
            - tag: component
              value: health
        - uuid: de356fd730494b27a701cb900cd5c9b1
          name: 'Get status page'
          type: ZABBIX_ACTIVE
          key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]'
          history: '0'
          value_type: TEXT
          preprocessing:
            - type: REGEX
              parameters:
                - '^[.\s\S]*({.+})'
                - \1
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: 57c2c152cf1e4a84863d77bd05289f50
          name: 'PHP-FPM process discovery'
          type: DEPENDENT
          key: php-fpm.proc.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#PHP_FPM.NAME}'
                value: '{$PHP_FPM.PROCESS_NAME}'
          description: 'The discovery of the PHP-FPM summary processes.'
          item_prototypes:
            - uuid: 42cac727ddf24220bf93f8b987450694
              name: 'Get process data'
              type: DEPENDENT
              key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'The summary metrics aggregated by a process `{#PHP_FPM.NAME}`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@["name"]=="{#PHP_FPM.NAME}")].first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: 'Failed to retrieve process {#PHP_FPM.NAME} data'
              master_item:
                key: 'proc.get[{$PHP_FPM.PROCESS.NAME.PARAMETER},,,summary]'
              tags:
                - tag: component
                  value: raw
            - uuid: 95e07134044443c894a4ea47404b548e
              name: 'Number of running processes'
              type: DEPENDENT
              key: 'php-fpm.proc.num[{#PHP_FPM.NAME}]'
              description: 'The number of running processes `{#PHP_FPM.NAME}`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.processes
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              tags:
                - tag: component
                  value: system
              trigger_prototypes:
                - uuid: 86aabcdb709c4199b6c64e321875c60d
                  expression: 'last(/PHP-FPM by Zabbix agent active/php-fpm.proc.num[{#PHP_FPM.NAME}])=0'
                  name: 'PHP-FPM: Process is not running'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: availability
            - uuid: cceec896a859443e9323a8d738e5620f
              name: 'Memory usage, %'
              type: DEPENDENT
              key: 'php-fpm.proc.pmem[{#PHP_FPM.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of real memory used by a process `{#PHP_FPM.NAME}`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pmem
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: 2001d850797548389aca5d2b90e68dc1
              name: 'Memory usage (rss)'
              type: DEPENDENT
              key: 'php-fpm.proc.rss[{#PHP_FPM.NAME}]'
              units: B
              description: 'The summary of resident set size memory used by a process `{#PHP_FPM.NAME}` expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rss
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: 8a1114f7c4604d43b16627fcc9cc7604
              name: 'Memory usage (vsize)'
              type: DEPENDENT
              key: 'php-fpm.proc.vmem[{#PHP_FPM.NAME}]'
              units: B
              description: 'The summary of virtual memory used by a process `{#PHP_FPM.NAME}` expressed in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.vsize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'php-fpm.proc.get[{#PHP_FPM.NAME}]'
              tags:
                - tag: component
                  value: memory
            - uuid: 65c8bd5634d84552b401c15237b74de8
              name: 'CPU utilization'
              type: ZABBIX_ACTIVE
              key: 'proc.cpu.util[{#PHP_FPM.NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of the CPU utilization by a process `{#PHP_FPM.NAME}`.'
              tags:
                - tag: component
                  value: cpu
          trigger_prototypes:
            - uuid: f28aac156ea142c4b92e8d5a29ed79f2
              expression: 'nodata(/PHP-FPM by Zabbix agent active/php-fpm.uptime,30m)=1 and last(/PHP-FPM by Zabbix agent active/php-fpm.proc.num[{#PHP_FPM.NAME}])>0'
              name: 'PHP-FPM: Failed to fetch info data'
              event_name: 'PHP-FPM: Failed to fetch info data (or no data for 30m)'
              priority: INFO
              description: 'Zabbix has not received any data for items for the last 30 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
            - uuid: f33109ac78a84debb66fa4ed92384f99
              expression: '(last(/PHP-FPM by Zabbix agent active/php-fpm.ping)=0 or nodata(/PHP-FPM by Zabbix agent active/php-fpm.ping,3m)=1) and last(/PHP-FPM by Zabbix agent active/php-fpm.proc.num[{#PHP_FPM.NAME}])>0'
              name: 'PHP-FPM: Service is down'
              priority: HIGH
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
          graph_prototypes:
            - uuid: 3e0a2769bfd74c72bba0736e483fa3a1
              name: 'PHP-FPM: Memory usage[{#PHP_FPM.NAME}]'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  item:
                    host: 'PHP-FPM by Zabbix agent active'
                    key: 'php-fpm.proc.vmem[{#PHP_FPM.NAME}]'
                - sortorder: '1'
                  drawtype: BOLD_LINE
                  color: F63100
                  item:
                    host: 'PHP-FPM by Zabbix agent active'
                    key: 'php-fpm.proc.rss[{#PHP_FPM.NAME}]'
          master_item:
            key: 'proc.get[{$PHP_FPM.PROCESS.NAME.PARAMETER},,,summary]'
          lld_macro_paths:
            - lld_macro: '{#PHP_FPM.NAME}'
              path: $.name
      tags:
        - tag: class
          value: software
        - tag: target
          value: php-fpm
      macros:
        - macro: '{$PHP_FPM.HOST}'
          value: localhost
          description: 'The hostname or IP address of the PHP-FPM status for a host or container.'
          config:
            type: TEXT
            priority: '2'
            label: Address
            description: 'The hostname or IP address of the PHP-FPM status for a host or container.'
            required: 'YES'
        - macro: '{$PHP_FPM.PING.PAGE}'
          value: ping
          description: 'The path of the PHP-FPM ping page.'
          config:
            type: TEXT
            priority: '4'
            label: 'Ping page path'
            description: 'The path of the PHP-FPM ping page.'
        - macro: '{$PHP_FPM.PING.REPLY}'
          value: pong
          description: 'The expected reply to the ping.'
          config:
            type: TEXT
            priority: '5'
            label: 'Expected ping reply'
            description: 'The expected reply to the ping.'
        - macro: '{$PHP_FPM.PORT}'
          value: '80'
          description: 'The port of the PHP-FPM status host or container.'
          config:
            type: TEXT
            priority: '1'
            label: 'PHP-FPM port'
            description: 'The port of the PHP-FPM status host or container. In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PHP_FPM.PROCESS.NAME.PARAMETER}'
          description: 'The process name of the PHP-FPM used in the item key `proc.get`. It could be specified if the correct process name is known.'
          config:
            type: TEXT
            priority: '8'
            section_name: Other
            label: 'Process name'
            description: 'The process name of the PHP-FPM used in the item key `proc.get`. It could be specified if the correct process name is known.'
        - macro: '{$PHP_FPM.PROCESS_NAME}'
          value: php-fpm
          description: 'The process name filter for the PHP-FPM process discovery. May vary depending on your OS distribution.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Process name filter (include)'
            description: 'The process name filter for the PHP-FPM process discovery. May vary depending on your OS distribution.'
        - macro: '{$PHP_FPM.QUEUE.WARN.MAX}'
          value: '80'
          description: 'The maximum percent of the PHP-FPM queue usage for a trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Max queue usage (%)'
            description: 'The maximum percent of the PHP-FPM queue usage for a trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PHP_FPM.STATUS.PAGE}'
          value: status
          description: 'The path of the PHP-FPM status page.'
          config:
            type: TEXT
            priority: '3'
            label: 'Status page path'
            description: 'The path of the PHP-FPM status page.'
            required: 'YES'
      dashboards:
        - uuid: 62e8b6d8dfe04592b4fe73cb251990ae
          name: 'PHP-FPM: Overview'
          pages:
            - name: Main
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'PHP-FPM by Zabbix agent active'
                        name: 'PHP-FPM: Process'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'PHP-FPM by Zabbix agent active'
                        name: 'PHP-FPM: Queue'
                    - type: STRING
                      name: reference
                      value: AAAAB
      valuemaps:
        - uuid: a4bc71640e694328a20fe200c7c5fece
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 7b6c6228b25f4586b42cd1bf37ff8034
      template: 'SMART by Zabbix agent 2'
      name: 'SMART by Zabbix agent 2'
      description: |
        The template for monitoring S.M.A.R.T. attributes of physical disk that works without any external scripts. It collects metrics by Zabbix agent 2 version 5.0 and later with Smartmontools version 7.1 and later. Disk discovery LLD rule finds all HDD, SSD, NVMe disks with S.M.A.R.T. enabled. Attribute discovery LLD rule have pre-defined Vendor Specific Attributes for each disk, and will be discovered if attribute is present.
        
        Setup:
        
        1. Install Zabbix agent 2 and Smartmontools 7.1 or newer.
        
        2. Ensure the path to the "smartctl" executable is correctly specified. You can either provide the full path to the executable (e.g., "/usr/sbin/smartctl" on Linux or "C:\Program Files\smartctl\smartctl.exe" on Windows) in the configuration file or ensure that the folder containing the "smartctl" executable is added to the system's environment variables ("PATH"). This applies to both Linux and Windows systems.
        
        Example for Linux:      
        Plugins.Smart.Path=/usr/sbin/smartctl
        
        Example for Windows:
        Plugins.Smart.Path="C:\Program Files\smartctl\smartctl.exe"
        
        3. Grant Zabbix agent 2 super/admin user privileges for the "smartctl" utility (not required for Windows). Example for Linux (add the line that grants execution of the "smartctl" utility without the password):
        
        - Run the "visudo" command to edit the "sudoers" file:
        sudo visudo
        
        - Add the permission line and save the changes:
        zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/415662-discussion-thread-for-official-zabbix-smart-disk-monitoring
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for the effortless deployment of SMART monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
        
        It collects metrics by Zabbix agent 2 version 5.0 and later with Smartmontools version 7.1 and later.
        Disk discovery LLD rule finds all HDD, SSD, NVMe disks with S.M.A.R.T. enabled. Attribute discovery LLD rule have pre-defined Vendor Specific Attributes for each disk, and will be discovered if attribute is present.
        
        ## Setup
        
        1. Install Zabbix agent 2 and Smartmontools 7.1 or newer.
        
        2. Ensure the path to the `smartctl` executable is correctly specified. You can either provide the full path to the executable (e.g., `/usr/sbin/smartctl` on Linux or `C:\Program Files\smartctl\smartctl.exe` on Windows) in the configuration file or ensure that the folder containing the `smartctl` executable is added to the system's environment variables (`PATH`). This applies to both Linux and Windows systems.
        
        Example for Linux:
        
        `Plugins.Smart.Path=/usr/sbin/smartctl`
        
        Example for Windows:
        
        `Plugins.Smart.Path="C:\Program Files\smartctl\smartctl.exe"`
        
        3. Grant Zabbix agent 2 super/admin user privileges for the `smartctl` utility (not required for Windows). Example for Linux (add the line that grants execution of the `smartctl` utility without the password):
        
        - Run the `visudo` command to edit the `sudoers` file:
        
        `sudo visudo`
        
        - Add the permission line and save the changes:
        
        `zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl`
        
        Plugin [parameters list](https://www.zabbix.com/documentation/8.0/manual/appendix/config/zabbix_agent2_plugins/smart_plugin).
      vendor:
        name: Zabbix
        version: 8.0-3
      groups:
        - name: 'Templates/Server hardware'
      discovery_rules:
        - uuid: 4575af2717ec4bf78645edb84a966c84
          name: 'Disk discovery'
          key: 'smart.disk.discovery[{$SMART.DISK.DISCOVERY.TYPE}]'
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$SMART.DISK.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$SMART.DISK.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery SMART disks.'
          item_prototypes:
            - uuid: 643de316ae644f6d8fd92d1f03ae0360
              name: '[{#NAME}]: Bad_Block_Rate'
              type: DEPENDENT
              key: 'smart.disk.attribute.bad_block_rate[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Percentage of used reserve blocks divided by total reserve blocks.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bad_block_rate.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 2a055383835247bc83745c84fdc5dea9
              name: '[{#NAME}]: Power_Cycle_Count'
              type: DEPENDENT
              key: 'smart.disk.attribute.power_cycle_count[{#NAME}]'
              discover: NO_DISCOVER
              description: 'This attribute indicates the count of full hard disk power on/off cycles.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.power_cycle_count.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: e1fbae7fe66c453997d9aa6e6eb3b5cb
              name: '[{#NAME}]: Program_Fail_Count_Chip'
              type: DEPENDENT
              key: 'smart.disk.attribute.program_fail_count_chip[{#NAME}]'
              discover: NO_DISCOVER
              description: 'The total number of flash program operation failures since the drive was deployed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.program_fail_count_chip.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: abb098035cbd4c5b9e2d15c1e95d8e34
              name: '[{#NAME}]: Raw_Read_Error_Rate'
              type: DEPENDENT
              key: 'smart.disk.attribute.raw_read_error_rate[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Stores data related to the rate of hardware read errors that occurred when reading data from a disk surface. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.raw_read_error_rate.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 5601bfa6a38940b6b8d695bf029f534c
              name: '[{#NAME}]: Reallocated_Sector_Ct'
              type: DEPENDENT
              key: 'smart.disk.attribute.reallocated_sector_ct[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Disk discovered attribute.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reallocated_sector_ct.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: f538f4708280451eb30d20433d133012
              name: '[{#NAME}]: Reported_Uncorrect'
              type: DEPENDENT
              key: 'smart.disk.attribute.reported_uncorrect[{#NAME}]'
              discover: NO_DISCOVER
              description: 'The count of errors that could not be recovered using hardware ECC.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reported_uncorrect.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 70ac7d6cdf29431cacf02fc716c8ab0c
              name: '[{#NAME}]: Seek_Error_Rate'
              type: DEPENDENT
              key: 'smart.disk.attribute.seek_error_rate[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Rate of seek errors of the magnetic heads. If there is a partial failure in the mechanical positioning system, then seek errors will arise. Such a failure may be due to numerous factors, such as damage to a servo, or thermal widening of the hard disk. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.seek_error_rate.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 6e08c65d77ca4155b396c9615b2f45b3
              name: '[{#NAME}]: Spin_Up_Time'
              type: DEPENDENT
              key: 'smart.disk.attribute.spin_up_time[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Average time of spindle spin up (from zero RPM to fully operational [milliseconds]).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.spin_up_time.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: e428eb3368e94dbc955f2bebf8feb202
              name: '[{#NAME}]: Start_Stop_Count'
              type: DEPENDENT
              key: 'smart.disk.attribute.start_stop_count[{#NAME}]'
              discover: NO_DISCOVER
              description: 'A tally of spindle start/stop cycles. The spindle turns on, and hence the count is increased, both when the hard disk is turned on after having before been turned entirely off (disconnected from power source) and when the hard disk returns from having previously been put to sleep mode.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.start_stop_count.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: c186f7ce1b8d4311997c84fd5c239819
              name: '[{#NAME}]: Critical warning'
              type: DEPENDENT
              key: 'smart.disk.critical_warning[{#NAME}]'
              description: 'This field indicates critical warnings for the state of the controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.critical_warning
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 72f16a701cee4119b0b1865671fd448d
              name: '[{#NAME}]: Smartctl error'
              type: DEPENDENT
              key: 'smart.disk.error[{#NAME}]'
              value_type: TEXT
              description: 'This metric will contain smartctl errors.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.error
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 849a9d5c9b9d4b969a09ab5cf4629ded
              name: '[{#NAME}]: Exit status'
              type: DEPENDENT
              key: 'smart.disk.es[{#NAME}]'
              description: |
                The exit statuses of smartctl are defined by a bitmask but in decimal value. The eight different bits in the exit status have the following  meanings  for  ATA disks; some of these values may also be returned for SCSI disks.
                Bit 0: Command line did not parse.
                Bit 1: Device  open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode (see '-n' option above).
                Bit 2: Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data  structure  (see '-b' option above).
                Bit 3: SMART status check returned "DISK FAILING".
                Bit 4: We found prefail Attributes <= threshold.
                Bit 5: SMART  status  check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.
                Bit 6: The device error log contains records of errors.
                Bit 7: The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.exit_status
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
              trigger_prototypes:
                - uuid: c51b609f267c45c3bcb4a3f5f40b6d35
                  expression: |
                    ( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),8) = 8 )
                    or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),8) = 8
                    and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),8) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),8) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Check returned "DISK FAILING"'
                  priority: HIGH
                  description: 'SMART status check returned "DISK FAILING".'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 12ed61dfd27c4666883c4240a5726d06
                  expression: |
                    ( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),1) = 1 )
                    or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),1) = 1
                    and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),1) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),1) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Command line did not parse'
                  priority: HIGH
                  description: 'Command line did not parse.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 9b960cb324774b3fa5e3d39aeb3141e2
                  expression: |
                    ( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),2) = 2 )
                    or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),2) = 2
                    and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),2) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),2) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Device open failed'
                  priority: HIGH
                  description: 'Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: ccff1b75f69a47cdbb5a04c58d201a0f
                  expression: |
                    ( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),64) = 64 )
                    or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),64) = 64
                    and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),64) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),64) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Error log contains records'
                  priority: HIGH
                  description: 'The device error log contains records of errors.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 69fb021abcc841b7b35cc93358ef085c
                  expression: |
                    ( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),128) = 128 )
                    or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),128) = 128
                    and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),128) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),128) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Self-test log contains records'
                  priority: HIGH
                  description: |
                    The device self-test log contains records of errors. [ATA only]
                    Failed self-tests outdated by a newer successful extended self-test are ignored.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 4ad2fbb5b6e349f6852a489b99a2760d
                  expression: |
                    ( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),32) = 32 )
                    or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),32) = 32
                    and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),32) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),32) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Some Attributes have been <= threshold'
                  priority: HIGH
                  description: |
                    SMART status check returned "DISK OK" but we found that some (usage
                    or prefail) Attributes have been <= threshold at some time in the past.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 592e647842d048e3985e65726cdc838c
                  expression: |
                    ( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),4) = 4 )
                    or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),4) = 4
                    and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),4) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),4) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Some command to the disk failed'
                  priority: HIGH
                  description: |
                    Some SMART or other ATA command to the disk failed,
                    or there was a checksum error in a SMART data structure.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: ec137781d51249c89d8891a35a596445
                  expression: |
                    ( count(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),16) = 16 )
                    or ( bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),16) = 16
                    and bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}]),16) > bitand(last(/SMART by Zabbix agent 2/smart.disk.es[{#NAME}],#2),16) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Some prefail Attributes <= threshold'
                  priority: HIGH
                  description: 'We found prefail Attributes <= threshold.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 805e1d6f91e741ac93e87bd7d62860d5
              name: '[{#NAME}]: Get disk attributes'
              key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              history: '0'
              value_type: TEXT
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: storage
            - uuid: 365f9642f2764116923bb3e014eefa22
              name: '[{#NAME}]: Power on hours'
              type: DEPENDENT
              key: 'smart.disk.hours[{#NAME}]'
              description: |
                Count of hours in power-on state. The raw value of this attribute
                shows total count of hours (or minutes, or seconds, depending on manufacturer)
                in power-on state. "By default, the total expected lifetime of a hard disk
                in perfect condition is defined as 5 years (running every day and night on
                all days). This is equal to 1825 days in 24/7 mode or 43800 hours." On some
                pre-2005 drives, this raw value may advance erratically and/or "wrap around"
                (reset to zero periodically). https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.power_on_time
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 8478d6421fb044339e2118848ac6d56b
              name: '[{#NAME}]: Media errors'
              type: DEPENDENT
              key: 'smart.disk.media_errors[{#NAME}]'
              description: |
                Contains the number of occurrences where the controller detected
                an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC
                checksum failure, or LBA tag mismatch are included in this field.
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.media_errors
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: b6abf9b52c694600b63fce4a68fc0fbd
              name: '[{#NAME}]: Device model'
              type: DEPENDENT
              key: 'smart.disk.model[{#NAME}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model_name
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: inventory
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 6ce46d274a694eac9700bd02a936f4be
              name: '[{#NAME}]: Percentage used'
              type: DEPENDENT
              key: 'smart.disk.percentage_used[{#NAME}]'
              units: '%'
              description: |
                Contains a vendor specific estimate of the percentage of NVM subsystem
                life used based on the actual usage and the manufacturer's prediction of NVM
                life. A value of 100 indicates that the estimated endurance of the NVM in
                the NVM subsystem has been consumed, but may not indicate an NVM subsystem
                failure. The value is allowed to exceed 100. Percentages greater than 254
                shall be represented as 255. This value shall be updated once per power-on
                hour (when the controller is not in a sleep state).
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.percentage_used
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
              trigger_prototypes:
                - uuid: e2bc2b0e195446d7973037be8e41eb6f
                  expression: 'last(/SMART by Zabbix agent 2/smart.disk.percentage_used[{#NAME}])>90'
                  name: 'SMART: [{#NAME}]: NVMe disk percentage using is over 90% of estimated endurance'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 62f98419c8034f389a5be3755eac8938
              name: '[{#NAME}]: Serial number'
              type: DEPENDENT
              key: 'smart.disk.sn[{#NAME}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.serial_number
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: inventory
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
              trigger_prototypes:
                - uuid: 7257c02f398f4338ace1eb3a07cb7362
                  expression: 'last(/SMART by Zabbix agent 2/smart.disk.sn[{#NAME}],#1)<>last(/SMART by Zabbix agent 2/smart.disk.sn[{#NAME}],#2) and length(last(/SMART by Zabbix agent 2/smart.disk.sn[{#NAME}]))>0'
                  name: 'SMART: [{#NAME}]: Disk has been replaced'
                  event_name: 'SMART: [{#NAME}]: Disk has been replaced (new serial number received)'
                  priority: INFO
                  description: 'Device serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 2f5b054d7a644e029a195d17f525c191
              name: '[{#NAME}]: Temperature'
              type: DEPENDENT
              key: 'smart.disk.temperature[{#NAME}]'
              units: °C
              description: 'Current drive temperature.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.temperature
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: temperature
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
              trigger_prototypes:
                - uuid: cd09aebe3ca146119cdf5b977bf6b018
                  expression: 'avg(/SMART by Zabbix agent 2/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.CRIT}'
                  name: 'SMART: [{#NAME}]: Average disk temperature is critical'
                  event_name: 'SMART: [{#NAME}]: Average disk temperature is critical (over {$SMART.TEMPERATURE.MAX.CRIT}°C for 5m)'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: notice
                - uuid: aaa5acb3196b481f894998c0ca5ea165
                  expression: 'avg(/SMART by Zabbix agent 2/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.WARN}'
                  name: 'SMART: [{#NAME}]: Average disk temperature is too high'
                  event_name: 'SMART: [{#NAME}]: Average disk temperature is too high (over {$SMART.TEMPERATURE.MAX.WARN}°C for 5m)'
                  priority: WARNING
                  dependencies:
                    - name: 'SMART: [{#NAME}]: Average disk temperature is critical'
                      expression: 'avg(/SMART by Zabbix agent 2/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.CRIT}'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 0dc4b9566aad4f7b87e747f49f4c017a
              name: '[{#NAME}]: Self-test in progress'
              type: DEPENDENT
              key: 'smart.disk.test.progress[{#NAME}]'
              description: 'Reports if disk currently is executing SMART self-test.'
              valuemap:
                name: 'Smart self-test'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.self_test_in_progress
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'true': 1,
                      	'false': 2,
                      	'null': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: health
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 434b338d88e041dd9b6a0b7aaa403076
              name: '[{#NAME}]: Self-test passed'
              type: DEPENDENT
              key: 'smart.disk.test[{#NAME}]'
              description: 'The disk is passed the SMART self-test or not.'
              valuemap:
                name: 'Smart self-test'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.self_test_passed
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'true': 1,
                      	'false': 2,
                      	'null': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: health
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
          trigger_prototypes:
            - uuid: 5fa97df4012e45279fb55724f617ef4a
              expression: 'last(/SMART by Zabbix agent 2/smart.disk.test[{#NAME}])=2 and last(/SMART by Zabbix agent 2/smart.disk.test.progress[{#NAME}])=2'
              name: 'SMART: [{#NAME}]: Disk self-test is not passed'
              opdata: 'Result: {ITEM.LASTVALUE1}, test in progress: {ITEM.LASTVALUE2}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
          overrides:
            - name: Self-test
              step: '1'
              filter:
                conditions:
                  - macro: '{#DISKTYPE}'
                    value: nvme
              operations:
                - operator: LIKE
                  value: Self-test
                  discover: NO_DISCOVER
            - name: 'Not NVMe'
              step: '2'
              filter:
                conditions:
                  - macro: '{#DISKTYPE}'
                    value: nvme
                    operator: NOT_MATCHES_REGEX
              operations:
                - operator: REGEXP
                  value: Media|Percentage|Critical
                  discover: NO_DISCOVER
            - name: Raw_Read_Error_Rate
              step: '3'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Raw_Read_Error_Rate
              operations:
                - operator: REGEXP
                  value: Raw_Read_Error_Rate
                  discover: DISCOVER
            - name: Spin_Up_Time
              step: '4'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Spin_Up_Time
              operations:
                - operator: REGEXP
                  value: Spin_Up_Time
                  discover: DISCOVER
            - name: Start_Stop_Count
              step: '5'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Start_Stop_Count
              operations:
                - operator: REGEXP
                  value: Start_Stop_Count
                  discover: DISCOVER
            - name: Power_Cycle_Count
              step: '6'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Power_Cycle_Count
              operations:
                - operator: REGEXP
                  value: Power_Cycle_Count
                  discover: DISCOVER
            - name: Reported_Uncorrect
              step: '7'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Reported_Uncorrect
              operations:
                - operator: REGEXP
                  value: Reported_Uncorrect
                  discover: DISCOVER
            - name: Seek_Error_Rate
              step: '8'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Seek_Error_Rate
              operations:
                - operator: REGEXP
                  value: Seek_Error_Rate
                  discover: DISCOVER
            - name: Bad_Block_Rate
              step: '9'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Bad_Block_Rate
              operations:
                - operator: REGEXP
                  value: Bad_Block_Rate
                  discover: DISCOVER
            - name: Program_Fail_Count_Chip
              step: '10'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Program_Fail_Count_Chip
              operations:
                - operator: REGEXP
                  value: Program_Fail_Count_Chip
                  discover: DISCOVER
            - name: Reallocated_Sector_Ct
              step: '11'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Reallocated_Sector_Ct
              operations:
                - operator: REGEXP
                  value: Reallocated_Sector_Ct
                  discover: DISCOVER
      tags:
        - tag: class
          value: storage
        - tag: subclass
          value: logging
        - tag: subclass
          value: monitoring
        - tag: target
          value: hdd
        - tag: target
          value: ssd
      macros:
        - macro: '{$SMART.DISK.DISCOVERY.TYPE}'
          value: name
          description: 'This macro is responsible for changing how SMART disks get discovered. Only "name" or "id" values allowed.'
          config:
            type: LIST
            priority: '1'
            label: 'SMART disk discovery type'
            description: 'This macro is responsible for changing how SMART disks get discovered.'
            options:
              - value: name
                text: Name
              - value: id
                text: ID
        - macro: '{$SMART.DISK.NAME.MATCHES}'
          value: '^.*$'
          description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Disk name filter (include)'
            description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
        - macro: '{$SMART.DISK.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Disk name filter (exclude)'
            description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
        - macro: '{$SMART.TEMPERATURE.MAX.CRIT}'
          value: '65'
          description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Temperature maximum (critical)'
            description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SMART.TEMPERATURE.MAX.WARN}'
          value: '50'
          description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Temperature maximum (warning)'
            description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 074166cdd4d54f7e89bd7488283ba5be
          name: 'SMART: Overview'
          pages:
            - name: Temperature
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '20'
                  fields:
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'SMART by Zabbix agent 2'
                        key: 'smart.disk.temperature[{#NAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
                    - type: INTEGER
                      name: source_type
                      value: '3'
            - name: 'Power On'
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '20'
                  fields:
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'SMART by Zabbix agent 2'
                        key: 'smart.disk.hours[{#NAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: rows
                      value: '5'
                    - type: INTEGER
                      name: source_type
                      value: '3'
      valuemaps:
        - uuid: 82b0797d499544a4832cda04b163109a
          name: 'Smart self-test'
          mappings:
            - value: '0'
              newvalue: Undefined
            - value: '1'
              newvalue: 'True'
            - value: '2'
              newvalue: 'False'
            - value: '3'
              newvalue: 'Null'
    - uuid: e518b1340ce44d7389d2cc7c304a97b4
      template: 'SMART by Zabbix agent 2 active'
      name: 'SMART by Zabbix agent 2 active'
      description: |
        The template for monitoring S.M.A.R.T. attributes of physical disk that works without any external scripts. It collects metrics by Zabbix agent 2 version 5.0 and later with Smartmontools version 7.1 and later. Disk discovery LLD rule finds all HDD, SSD, NVMe disks with S.M.A.R.T. enabled. Attribute discovery LLD rule have pre-defined Vendor Specific Attributes for each disk, and will be discovered if attribute is present.
        
        Setup:
        
        1. Install Zabbix agent 2 and Smartmontools 7.1 or newer.
        
        2. Ensure the path to the "smartctl" executable is correctly specified. You can either provide the full path to the executable (e.g., "/usr/sbin/smartctl" on Linux or "C:\Program Files\smartctl\smartctl.exe" on Windows) in the configuration file or ensure that the folder containing the "smartctl" executable is added to the system's environment variables ("PATH"). This applies to both Linux and Windows systems.
        
        Example for Linux:      
        Plugins.Smart.Path=/usr/sbin/smartctl
        
        Example for Windows:
        Plugins.Smart.Path="C:\Program Files\smartctl\smartctl.exe"
        
        3. Grant Zabbix agent 2 super/admin user privileges for the "smartctl" utility (not required for Windows). Example for Linux (add the line that grants execution of the "smartctl" utility without the password):
        
        - Run the "visudo" command to edit the "sudoers" file:
        sudo visudo
        
        - Add the permission line and save the changes:
        zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/415662-discussion-thread-for-official-zabbix-smart-disk-monitoring
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for the effortless deployment of SMART monitoring by Zabbix via Zabbix agent 2 active and doesn't require any external scripts.
        
        It collects metrics by Zabbix agent 2 version 5.0 and later with Smartmontools version 7.1 and later.
        Disk discovery LLD rule finds all HDD, SSD, NVMe disks with S.M.A.R.T. enabled. Attribute discovery LLD rule have pre-defined Vendor Specific Attributes for each disk, and will be discovered if attribute is present.
        
        ## Setup
        
        1. Install Zabbix agent 2 and Smartmontools 7.1 or newer.
        
        2. Ensure the path to the `smartctl` executable is correctly specified. You can either provide the full path to the executable (e.g., `/usr/sbin/smartctl` on Linux or `C:\Program Files\smartctl\smartctl.exe` on Windows) in the configuration file or ensure that the folder containing the `smartctl` executable is added to the system's environment variables (`PATH`). This applies to both Linux and Windows systems.
        
        Example for Linux:
        
        `Plugins.Smart.Path=/usr/sbin/smartctl`
        
        Example for Windows:
        
        `Plugins.Smart.Path="C:\Program Files\smartctl\smartctl.exe"`
        
        3. Grant Zabbix agent 2 super/admin user privileges for the `smartctl` utility (not required for Windows). Example for Linux (add the line that grants execution of the `smartctl` utility without the password):
        
        - Run the `visudo` command to edit the `sudoers` file:
        
        `sudo visudo`
        
        - Add the permission line and save the changes:
        
        `zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl`
        
        Plugin [parameters list](https://www.zabbix.com/documentation/8.0/manual/appendix/config/zabbix_agent2_plugins/smart_plugin).
      vendor:
        name: Zabbix
        version: 8.0-3
      groups:
        - name: 'Templates/Server hardware'
      discovery_rules:
        - uuid: 0a56a348d4a446938beae1eae5ec8993
          name: 'Disk discovery'
          type: ZABBIX_ACTIVE
          key: 'smart.disk.discovery[{$SMART.DISK.DISCOVERY.TYPE}]'
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$SMART.DISK.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$SMART.DISK.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery SMART disks.'
          item_prototypes:
            - uuid: b3891b80915c4e2488f2f87cb173474a
              name: '[{#NAME}]: Bad_Block_Rate'
              type: DEPENDENT
              key: 'smart.disk.attribute.bad_block_rate[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Percentage of used reserve blocks divided by total reserve blocks.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bad_block_rate.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 512c44706bff48fda2ef444713d93b29
              name: '[{#NAME}]: Power_Cycle_Count'
              type: DEPENDENT
              key: 'smart.disk.attribute.power_cycle_count[{#NAME}]'
              discover: NO_DISCOVER
              description: 'This attribute indicates the count of full hard disk power on/off cycles.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.power_cycle_count.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 0ab9412116924ca2a9561b44e4c9d6da
              name: '[{#NAME}]: Program_Fail_Count_Chip'
              type: DEPENDENT
              key: 'smart.disk.attribute.program_fail_count_chip[{#NAME}]'
              discover: NO_DISCOVER
              description: 'The total number of flash program operation failures since the drive was deployed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.program_fail_count_chip.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: f794dc07c88a4690be8512e029f0b50c
              name: '[{#NAME}]: Raw_Read_Error_Rate'
              type: DEPENDENT
              key: 'smart.disk.attribute.raw_read_error_rate[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Stores data related to the rate of hardware read errors that occurred when reading data from a disk surface. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.raw_read_error_rate.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 643276ac0dab47b8974e849a1574ac2a
              name: '[{#NAME}]: Reallocated_Sector_Ct'
              type: DEPENDENT
              key: 'smart.disk.attribute.reallocated_sector_ct[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Disk discovered attribute.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reallocated_sector_ct.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: fa253069f1c74a0b9ee3dca5eafef17a
              name: '[{#NAME}]: Reported_Uncorrect'
              type: DEPENDENT
              key: 'smart.disk.attribute.reported_uncorrect[{#NAME}]'
              discover: NO_DISCOVER
              description: 'The count of errors that could not be recovered using hardware ECC.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reported_uncorrect.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 99df8858bc6d4fb4a9fb4abd29b6c852
              name: '[{#NAME}]: Seek_Error_Rate'
              type: DEPENDENT
              key: 'smart.disk.attribute.seek_error_rate[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Rate of seek errors of the magnetic heads. If there is a partial failure in the mechanical positioning system, then seek errors will arise. Such a failure may be due to numerous factors, such as damage to a servo, or thermal widening of the hard disk. The raw value has different structure for different vendors and is often not meaningful as a decimal number. For some drives, this number may increase during normal operation without necessarily signifying errors.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.seek_error_rate.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 422ba65b87444329b5a23d03ce89dda7
              name: '[{#NAME}]: Spin_Up_Time'
              type: DEPENDENT
              key: 'smart.disk.attribute.spin_up_time[{#NAME}]'
              discover: NO_DISCOVER
              description: 'Average time of spindle spin up (from zero RPM to fully operational [milliseconds]).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.spin_up_time.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: eee36c13fc6248f6894188102d215638
              name: '[{#NAME}]: Start_Stop_Count'
              type: DEPENDENT
              key: 'smart.disk.attribute.start_stop_count[{#NAME}]'
              discover: NO_DISCOVER
              description: 'A tally of spindle start/stop cycles. The spindle turns on, and hence the count is increased, both when the hard disk is turned on after having before been turned entirely off (disconnected from power source) and when the hard disk returns from having previously been put to sleep mode.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.start_stop_count.value
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: attribute
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: ad6a9f6f7293495c916bb0aac0bc9729
              name: '[{#NAME}]: Critical warning'
              type: DEPENDENT
              key: 'smart.disk.critical_warning[{#NAME}]'
              description: 'This field indicates critical warnings for the state of the controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.critical_warning
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: b96b496a854f4165a44662bd93400b27
              name: '[{#NAME}]: Smartctl error'
              type: DEPENDENT
              key: 'smart.disk.error[{#NAME}]'
              value_type: TEXT
              description: 'This metric will contain smartctl errors.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.error
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 952376ecd47a498cab40ec6872d20454
              name: '[{#NAME}]: Exit status'
              type: DEPENDENT
              key: 'smart.disk.es[{#NAME}]'
              description: |
                The exit statuses of smartctl are defined by a bitmask but in decimal value. The eight different bits in the exit status have the following  meanings  for  ATA disks; some of these values may also be returned for SCSI disks.
                Bit 0: Command line did not parse.
                Bit 1: Device  open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode (see '-n' option above).
                Bit 2: Some SMART or other ATA command to the disk failed, or there was a checksum error in a SMART data  structure  (see '-b' option above).
                Bit 3: SMART status check returned "DISK FAILING".
                Bit 4: We found prefail Attributes <= threshold.
                Bit 5: SMART  status  check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.
                Bit 6: The device error log contains records of errors.
                Bit 7: The device self-test log contains records of errors. [ATA only] Failed self-tests outdated by a newer successful extended self-test are ignored.
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.exit_status
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
              trigger_prototypes:
                - uuid: ec00e4aa70fa4bea92c559e145ca2e18
                  expression: |
                    ( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),8) = 8 )
                    or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),8) = 8
                    and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),8) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),8) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Check returned "DISK FAILING"'
                  priority: HIGH
                  description: 'SMART status check returned "DISK FAILING".'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 612c964798d74ab2af23cc6ec5a1d754
                  expression: |
                    ( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),1) = 1 )
                    or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),1) = 1
                    and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),1) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),1) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Command line did not parse'
                  priority: HIGH
                  description: 'Command line did not parse.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 3591c8077a894f6b8deaaf8055ca940e
                  expression: |
                    ( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),2) = 2 )
                    or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),2) = 2
                    and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),2) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),2) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Device open failed'
                  priority: HIGH
                  description: 'Device open failed, device did not return an IDENTIFY DEVICE structure, or device is in a low-power mode.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: b524364e077a4f898a93af34ef4e6e7f
                  expression: |
                    ( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) = 64 )
                    or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) = 64
                    and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),64) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),64) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Error log contains records'
                  priority: HIGH
                  description: 'The device error log contains records of errors.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 5e56f837d39b49a89d1f6ca3c45b5737
                  expression: |
                    ( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) = 128 )
                    or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) = 128
                    and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),128) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),128) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Self-test log contains records'
                  priority: HIGH
                  description: |
                    The device self-test log contains records of errors. [ATA only]
                    Failed self-tests outdated by a newer successful extended self-test are ignored.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 541318ea2fd14fb4a6f8e8a8df1e4d36
                  expression: |
                    ( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) = 32 )
                    or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) = 32
                    and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),32) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),32) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Some Attributes have been <= threshold'
                  priority: HIGH
                  description: |
                    SMART status check returned "DISK OK" but we found that some (usage
                    or prefail) Attributes have been <= threshold at some time in the past.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 00eba731f9ae495f9fe38020897c9aef
                  expression: |
                    ( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),4) = 4 )
                    or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),4) = 4
                    and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),4) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),4) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Some command to the disk failed'
                  priority: HIGH
                  description: |
                    Some SMART or other ATA command to the disk failed,
                    or there was a checksum error in a SMART data structure.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 04dc576b815e432a9cf6d8fee6b08bae
                  expression: |
                    ( count(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2) = 1 and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),16) = 16 )
                    or ( bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),16) = 16
                    and bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}]),16) > bitand(last(/SMART by Zabbix agent 2 active/smart.disk.es[{#NAME}],#2),16) )
                  recovery_mode: NONE
                  name: 'SMART: [{#NAME}]: Some prefail Attributes <= threshold'
                  priority: HIGH
                  description: 'We found prefail Attributes <= threshold.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: b26489a8ba12495dbb9687ef52ab1396
              name: '[{#NAME}]: Get disk attributes'
              type: ZABBIX_ACTIVE
              key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              history: '0'
              value_type: TEXT
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: storage
            - uuid: e5bbd606e330469389bf081588b88d17
              name: '[{#NAME}]: Power on hours'
              type: DEPENDENT
              key: 'smart.disk.hours[{#NAME}]'
              description: |
                Count of hours in power-on state. The raw value of this attribute
                shows total count of hours (or minutes, or seconds, depending on manufacturer)
                in power-on state. "By default, the total expected lifetime of a hard disk
                in perfect condition is defined as 5 years (running every day and night on
                all days). This is equal to 1825 days in 24/7 mode or 43800 hours." On some
                pre-2005 drives, this raw value may advance erratically and/or "wrap around"
                (reset to zero periodically). https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.power_on_time
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 0861b008b09a41799978e085625aaa4a
              name: '[{#NAME}]: Media errors'
              type: DEPENDENT
              key: 'smart.disk.media_errors[{#NAME}]'
              description: |
                Contains the number of occurrences where the controller detected
                an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC
                checksum failure, or LBA tag mismatch are included in this field.
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.media_errors
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: f48fe3366b194eb4942411cc776c8633
              name: '[{#NAME}]: Device model'
              type: DEPENDENT
              key: 'smart.disk.model[{#NAME}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model_name
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: inventory
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: d5cef21c49994c3e8e12ef6471d7cdcd
              name: '[{#NAME}]: Percentage used'
              type: DEPENDENT
              key: 'smart.disk.percentage_used[{#NAME}]'
              units: '%'
              description: |
                Contains a vendor specific estimate of the percentage of NVM subsystem
                life used based on the actual usage and the manufacturer's prediction of NVM
                life. A value of 100 indicates that the estimated endurance of the NVM in
                the NVM subsystem has been consumed, but may not indicate an NVM subsystem
                failure. The value is allowed to exceed 100. Percentages greater than 254
                shall be represented as 255. This value shall be updated once per power-on
                hour (when the controller is not in a sleep state).
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.percentage_used
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: storage
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
              trigger_prototypes:
                - uuid: 68f373252bee4f9e8f3b33d04fc1adbd
                  expression: 'last(/SMART by Zabbix agent 2 active/smart.disk.percentage_used[{#NAME}])>90'
                  name: 'SMART: [{#NAME}]: NVMe disk percentage using is over 90% of estimated endurance'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 189d8e8d16ed40229ba3ca52b75d2dc4
              name: '[{#NAME}]: Serial number'
              type: DEPENDENT
              key: 'smart.disk.sn[{#NAME}]'
              value_type: CHAR
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.serial_number
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: inventory
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
              trigger_prototypes:
                - uuid: 2d5cf100fe094c819d725ee598d37de8
                  expression: 'last(/SMART by Zabbix agent 2 active/smart.disk.sn[{#NAME}],#1)<>last(/SMART by Zabbix agent 2 active/smart.disk.sn[{#NAME}],#2) and length(last(/SMART by Zabbix agent 2 active/smart.disk.sn[{#NAME}]))>0'
                  name: 'SMART: [{#NAME}]: Disk has been replaced'
                  event_name: 'SMART: [{#NAME}]: Disk has been replaced (new serial number received)'
                  priority: INFO
                  description: 'Device serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: e79eaaf7ee0d40e7b91fc019f5edb19e
              name: '[{#NAME}]: Temperature'
              type: DEPENDENT
              key: 'smart.disk.temperature[{#NAME}]'
              units: °C
              description: 'Current drive temperature.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.temperature
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: temperature
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
              trigger_prototypes:
                - uuid: 7f46b24934854866849dd758cb5999d5
                  expression: 'avg(/SMART by Zabbix agent 2 active/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.CRIT}'
                  name: 'SMART: [{#NAME}]: Average disk temperature is critical'
                  event_name: 'SMART: [{#NAME}]: Average disk temperature is critical (over {$SMART.TEMPERATURE.MAX.CRIT}°C for 5m)'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: notice
                - uuid: c903a37f4b004e1593ef85ac893c3f6c
                  expression: 'avg(/SMART by Zabbix agent 2 active/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.WARN}'
                  name: 'SMART: [{#NAME}]: Average disk temperature is too high'
                  event_name: 'SMART: [{#NAME}]: Average disk temperature is too high (over {$SMART.TEMPERATURE.MAX.WARN}°C for 5m)'
                  priority: WARNING
                  dependencies:
                    - name: 'SMART: [{#NAME}]: Average disk temperature is critical'
                      expression: 'avg(/SMART by Zabbix agent 2 active/smart.disk.temperature[{#NAME}],5m)>{$SMART.TEMPERATURE.MAX.CRIT}'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: d9b2164e304c4a00a921cf11a0194e79
              name: '[{#NAME}]: Self-test in progress'
              type: DEPENDENT
              key: 'smart.disk.test.progress[{#NAME}]'
              description: 'Reports if disk currently is executing SMART self-test.'
              valuemap:
                name: 'Smart self-test'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.self_test_in_progress
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'true': 1,
                      	'false': 2,
                      	'null': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: health
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
            - uuid: 2475415cc95b4103b2933f921e62dd36
              name: '[{#NAME}]: Self-test passed'
              type: DEPENDENT
              key: 'smart.disk.test[{#NAME}]'
              description: 'The disk is passed the SMART self-test or not.'
              valuemap:
                name: 'Smart self-test'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.self_test_passed
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'true': 1,
                      	'false': 2,
                      	'null': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'smart.disk.get[{#PATH},"{#RAIDTYPE}"]'
              tags:
                - tag: component
                  value: health
                - tag: diskname
                  value: '{#NAME}'
                - tag: disktype
                  value: '{#DISKTYPE}'
          trigger_prototypes:
            - uuid: 304bd042b7644a31bb74a1e71808d196
              expression: 'last(/SMART by Zabbix agent 2 active/smart.disk.test[{#NAME}])=2 and last(/SMART by Zabbix agent 2 active/smart.disk.test.progress[{#NAME}])=2'
              name: 'SMART: [{#NAME}]: Disk self-test is not passed'
              opdata: 'Result: {ITEM.LASTVALUE1}, test in progress: {ITEM.LASTVALUE2}'
              priority: HIGH
              tags:
                - tag: scope
                  value: notice
          overrides:
            - name: Self-test
              step: '1'
              filter:
                conditions:
                  - macro: '{#DISKTYPE}'
                    value: nvme
              operations:
                - operator: LIKE
                  value: Self-test
                  discover: NO_DISCOVER
            - name: 'Not NVMe'
              step: '2'
              filter:
                conditions:
                  - macro: '{#DISKTYPE}'
                    value: nvme
                    operator: NOT_MATCHES_REGEX
              operations:
                - operator: REGEXP
                  value: Media|Percentage|Critical
                  discover: NO_DISCOVER
            - name: Raw_Read_Error_Rate
              step: '3'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Raw_Read_Error_Rate
              operations:
                - operator: REGEXP
                  value: Raw_Read_Error_Rate
                  discover: DISCOVER
            - name: Spin_Up_Time
              step: '4'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Spin_Up_Time
              operations:
                - operator: REGEXP
                  value: Spin_Up_Time
                  discover: DISCOVER
            - name: Start_Stop_Count
              step: '5'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Start_Stop_Count
              operations:
                - operator: REGEXP
                  value: Start_Stop_Count
                  discover: DISCOVER
            - name: Power_Cycle_Count
              step: '6'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Power_Cycle_Count
              operations:
                - operator: REGEXP
                  value: Power_Cycle_Count
                  discover: DISCOVER
            - name: Reported_Uncorrect
              step: '7'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Reported_Uncorrect
              operations:
                - operator: REGEXP
                  value: Reported_Uncorrect
                  discover: DISCOVER
            - name: Seek_Error_Rate
              step: '8'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Seek_Error_Rate
              operations:
                - operator: REGEXP
                  value: Seek_Error_Rate
                  discover: DISCOVER
            - name: Bad_Block_Rate
              step: '9'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Bad_Block_Rate
              operations:
                - operator: REGEXP
                  value: Bad_Block_Rate
                  discover: DISCOVER
            - name: Program_Fail_Count_Chip
              step: '10'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Program_Fail_Count_Chip
              operations:
                - operator: REGEXP
                  value: Program_Fail_Count_Chip
                  discover: DISCOVER
            - name: Reallocated_Sector_Ct
              step: '11'
              filter:
                conditions:
                  - macro: '{#ATTRIBUTES}'
                    value: Reallocated_Sector_Ct
              operations:
                - operator: REGEXP
                  value: Reallocated_Sector_Ct
                  discover: DISCOVER
      tags:
        - tag: class
          value: storage
        - tag: subclass
          value: logging
        - tag: subclass
          value: monitoring
        - tag: target
          value: hdd
        - tag: target
          value: ssd
      macros:
        - macro: '{$SMART.DISK.DISCOVERY.TYPE}'
          value: name
          description: 'This macro is responsible for changing how SMART disks get discovered. Only "name" or "id" values allowed.'
          config:
            type: LIST
            priority: '1'
            label: 'SMART disk discovery type'
            description: 'This macro is responsible for changing how SMART disks get discovered.'
            options:
              - value: name
                text: Name
              - value: id
                text: ID
        - macro: '{$SMART.DISK.NAME.MATCHES}'
          value: '^.*$'
          description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Disk name filter (include)'
            description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
        - macro: '{$SMART.DISK.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Disk name filter (exclude)'
            description: 'This macro is used in the filter of attribute and disk discoveries. It can be overridden on the host or linked on the template level.'
        - macro: '{$SMART.TEMPERATURE.MAX.CRIT}'
          value: '65'
          description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Temperature maximum (critical)'
            description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SMART.TEMPERATURE.MAX.WARN}'
          value: '50'
          description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Temperature maximum (warning)'
            description: 'This macro is used for trigger expression. It can be overridden on the host or linked on the template level.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 3168a06be7744331b78574fbbc28826e
          name: 'SMART: Overview'
          pages:
            - name: Temperature
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '20'
                  fields:
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'SMART by Zabbix agent 2 active'
                        key: 'smart.disk.temperature[{#NAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
                    - type: INTEGER
                      name: source_type
                      value: '3'
            - name: 'Power On'
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '20'
                  fields:
                    - type: ITEM_PROTOTYPE
                      name: itemid.0
                      value:
                        host: 'SMART by Zabbix agent 2 active'
                        key: 'smart.disk.hours[{#NAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: rows
                      value: '5'
                    - type: INTEGER
                      name: source_type
                      value: '3'
      valuemaps:
        - uuid: 404d3c19ceef4e8e9c14d5e34bbd2a7b
          name: 'Smart self-test'
          mappings:
            - value: '0'
              newvalue: Undefined
            - value: '1'
              newvalue: 'True'
            - value: '2'
              newvalue: 'False'
            - value: '3'
              newvalue: 'Null'
    - uuid: 8e5236f799b347a8ae90a979198be85e
      template: 'Squid by SNMP'
      name: 'Squid by SNMP'
      description: |
        Template for monitoring Squid caching proxy via SNMP
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/409339-discussion-thread-for-official-zabbix-template-squid
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        ### Setup Squid
        Enable SNMP support following [official documentation](https://wiki.squid-cache.org/Features/Snmp).
        Required parameters in squid.conf:
        ```
        snmp_port <port_number>
        acl <zbx_acl_name> snmp_community <community_name>
        snmp_access allow <zbx_acl_name> <zabbix_server_ip>
        ```
        
        ### Setup Zabbix
        1\. [Import](https://www.zabbix.com/documentation/8.0/manual/xml_export_import/templates) the template [template_app_squid_snmp.yaml](template_app_squid_snmp.yaml) into Zabbix.
        
        2\. Set values for {$SQUID.SNMP.COMMUNITY}, {$SQUID.SNMP.PORT} and {$SQUID.HTTP.PORT} as configured in squid.conf.
        
        3\. [Link](https://www.zabbix.com/documentation/8.0/manual/config/templates/linking) the imported template to a host with Squid.
        
        4\. Add SNMPv2 interface to Squid host. Set **Port** as {$SQUID.SNMP.PORT} and **SNMP community** as {$SQUID.SNMP.COMMUNITY}.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Applications
      items:
        - uuid: 86cc718ce21b4ff9b0a09479ae3fc130
          name: 'Service ping'
          type: SIMPLE
          key: 'net.tcp.service[tcp,,{$SQUID.HTTP.PORT}]'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 7e0f0a9e8a9d4f6193946e4f8cd4a2e3
              expression: 'last(/Squid by SNMP/net.tcp.service[tcp,,{$SQUID.HTTP.PORT}])=0'
              name: 'Squid: Port {$SQUID.HTTP.PORT} is down'
              priority: AVERAGE
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: 6d7f0f6b0f89462e96e86940b779eb69
          name: 'CPU usage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.5.0]'
          key: 'squid[cacheCpuUsage]'
          value_type: FLOAT
          units: '%'
          description: 'The percentage use of the CPU'
          tags:
            - tag: component
              value: cpu
        - uuid: 960b137ab773492ab3073e108575e4fc
          name: 'File descriptor count - current used'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.12.0]'
          key: 'squid[cacheCurrentFileDescrCnt]'
          value_type: FLOAT
          description: 'Number of file descriptors in use'
          tags:
            - tag: component
              value: system
        - uuid: 37b45201f8444583b01e0df5af2bc14e
          name: 'File descriptor count - current maximum'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.13.0]'
          key: 'squid[cacheCurrentFileDescrMax]'
          value_type: FLOAT
          description: 'Highest number of file descriptors in use'
          tags:
            - tag: component
              value: system
        - uuid: 910afdc20767408f90d1bc5b7a9fd6a4
          name: 'Objects LRU expiration age'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.8.0]'
          key: 'squid[cacheCurrentLRUExpiration]'
          value_type: FLOAT
          units: s
          description: 'Storage LRU Expiration Age'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: objects
        - uuid: 26b8b1a25dc74099b61813905477b414
          name: 'File descriptor count - current reserved'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.11.0]'
          key: 'squid[cacheCurrentResFileDescrCnt]'
          value_type: FLOAT
          description: 'Reserved number of file descriptors'
          tags:
            - tag: component
              value: system
        - uuid: 35f3009401b6449d95988d9ee7a621a7
          name: 'Cache swap current size'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.14.0]'
          key: 'squid[cacheCurrentSwapSize]'
          value_type: FLOAT
          units: B
          description: 'Storage Swap Size'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: storage
        - uuid: 0789a0fa3e3b42a08a5e5bf8d0307970
          name: 'Objects unlinkd requests'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.9.0]'
          key: 'squid[cacheCurrentUnlinkRequests]'
          value_type: FLOAT
          description: 'Requests given to unlinkd'
          tags:
            - tag: component
              value: objects
        - uuid: 6bc024be663b466ca677941130e11f50
          name: 'File descriptor count - current available'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.10.0]'
          key: 'squid[cacheCurrentUnusedFDescrCnt]'
          value_type: FLOAT
          description: 'Available number of file descriptors'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 40c41c87e46443f886506da5e580657e
              expression: 'last(/Squid by SNMP/squid[cacheCurrentUnusedFDescrCnt])<{$SQUID.FILE.DESC.WARN.MIN}'
              name: 'Squid: Squid is running out of file descriptors'
              event_name: 'Squid: Squid is running out of file descriptors (<{$SQUID.FILE.DESC.WARN.MIN})'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 1aecf10756f949999c8f3fe5ce9c2a32
          name: 'DNS server replies per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.4.3.2.0]'
          key: 'squid[cacheDnsReplies]'
          value_type: FLOAT
          description: 'Number of external dns server replies'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: dns
            - tag: component
              value: replies
        - uuid: e5f647c77bdb498e9cc286795bc4077c
          name: 'DNS server requests per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.4.3.1.0]'
          key: 'squid[cacheDnsRequests]'
          value_type: FLOAT
          description: 'Number of external dns server requests'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: dns
            - tag: component
              value: requests
        - uuid: 3f4366896dd84b8ab78d6e3dc8a6ab63
          name: 'DNS service time per 5 minutes'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.8.5]'
          key: 'squid[cacheDnsSvcTime.5]'
          value_type: FLOAT
          units: s
          description: 'DNS service time per 5 minutes'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: dns
        - uuid: 99448052f1a34e15a5c042124db7b651
          name: 'DNS service time per hour'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.8.60]'
          key: 'squid[cacheDnsSvcTime.60]'
          value_type: FLOAT
          units: s
          description: 'DNS service time per hour'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: dns
        - uuid: 0aea1fe702004d65919fc010c971c3b5
          name: 'FQDN cache hits per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.4.2.3.0]'
          key: 'squid[cacheFqdnHits]'
          value_type: FLOAT
          description: 'Number of FQDN Cache hits'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: dns
            - tag: component
              value: hits
        - uuid: 2dea9b707b844d32b65a2d479ddb7d72
          name: 'FQDN cache misses per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.4.2.6.0]'
          key: 'squid[cacheFqdnMisses]'
          value_type: FLOAT
          description: 'Number of FQDN Cache misses'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: dns
            - tag: component
              value: misses
        - uuid: 1dad3f381c174b869c73f55cd831b40a
          name: 'FQDN cache requests per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.4.2.2.0]'
          key: 'squid[cacheFqdnRequests]'
          value_type: FLOAT
          description: 'Number of FQDN Cache requests'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: dns
            - tag: component
              value: requests
        - uuid: 633a70cd41c44f2c895148a7ae394acd
          name: 'HTTP all service time per 5 minutes'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.2.5]'
          key: 'squid[cacheHttpAllSvcTime.5]'
          value_type: FLOAT
          units: s
          description: 'HTTP all service time per 5 minutes'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: http
        - uuid: d3aa021743134d97af9dd8840b0ef692
          name: 'HTTP all service time per hour'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.2.60]'
          key: 'squid[cacheHttpAllSvcTime.60]'
          value_type: FLOAT
          units: s
          description: 'HTTP all service time per hour'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: http
        - uuid: 7f5bd8f89ea0495ea87c294fb8c606dd
          name: 'HTTP Errors sent per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.3.0]'
          key: 'squid[cacheHttpErrors]'
          value_type: FLOAT
          description: 'Number of HTTP Errors sent to clients'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: errors
            - tag: component
              value: http
        - uuid: 0c4fd7c154a44442a3cec82ba4026b7d
          name: 'HTTP hit service time per 5 minutes'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.5.5]'
          key: 'squid[cacheHttpHitSvcTime.5]'
          value_type: FLOAT
          units: s
          description: 'HTTP hit service time per 5 minutes'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: hits
            - tag: component
              value: http
        - uuid: a642c99d6c3f4f5e8ec218459fd76f04
          name: 'HTTP hit service time per hour'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.5.60]'
          key: 'squid[cacheHttpHitSvcTime.60]'
          value_type: FLOAT
          units: s
          description: 'HTTP hit service time per hour'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: hits
            - tag: component
              value: http
        - uuid: adfe3e2fc775400991d2ea2f06218daf
          name: 'HTTP Hits sent from cache per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.2.0]'
          key: 'squid[cacheHttpHits]'
          value_type: FLOAT
          description: 'Number of HTTP Hits sent to clients from cache'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: hits
            - tag: component
              value: http
        - uuid: f2366a6008cb4dc7856904ea5c6631dd
          name: 'HTTP traffic received per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.4.0]'
          key: 'squid[cacheHttpInKb]'
          value_type: FLOAT
          units: Bps
          description: 'Number of HTTP traffic received from clients'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: http
            - tag: component
              value: network
        - uuid: f8fa271a272442369b6cbc4fb1a2decc
          name: 'HTTP miss service time per 5 minutes'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.3.5]'
          key: 'squid[cacheHttpMissSvcTime.5]'
          value_type: FLOAT
          units: s
          description: 'HTTP miss service time per 5 minutes'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: http
            - tag: component
              value: misses
        - uuid: 23e5a3bd6e9a4c50a7d54336a6afc1e1
          name: 'HTTP miss service time per hour'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.3.60]'
          key: 'squid[cacheHttpMissSvcTime.60]'
          value_type: FLOAT
          units: s
          description: 'HTTP miss service time per hour'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: http
            - tag: component
              value: misses
        - uuid: ff6b7946363d44bba5721c82c8f84df7
          name: 'HTTP traffic sent per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.5.0]'
          key: 'squid[cacheHttpOutKb]'
          value_type: FLOAT
          units: Bps
          description: 'Number of HTTP traffic sent to clients'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: http
            - tag: component
              value: network
        - uuid: bde307ead15d48859a97e35e52327d50
          name: 'ICP traffic received per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.9.0]'
          key: 'squid[cacheIcpKbRecv]'
          value_type: FLOAT
          units: Bps
          description: 'Number of ICP traffic received'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: icp
            - tag: component
              value: network
        - uuid: 7234b612b50a45e0a1bb69654e2e784d
          name: 'ICP traffic transmitted per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.8.0]'
          key: 'squid[cacheIcpKbSent]'
          value_type: FLOAT
          units: Bps
          description: 'Number of ICP traffic transmitted'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: icp
            - tag: component
              value: network
        - uuid: 9ee83c13fa6d41dfb8bfea91c02341b9
          name: 'ICP messages received per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.7.0]'
          key: 'squid[cacheIcpPktsRecv]'
          value_type: FLOAT
          description: 'Number of ICP messages received'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: icp
        - uuid: dee7d8cf211b4ad0a645a8d6d4f24c31
          name: 'ICP messages sent per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.6.0]'
          key: 'squid[cacheIcpPktsSent]'
          value_type: FLOAT
          description: 'Number of ICP messages sent'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: icp
        - uuid: cb9d0c300beb47568e99ff7966e1b10e
          name: 'ICP query service time per 5 minutes'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.6.5]'
          key: 'squid[cacheIcpQuerySvcTime.5]'
          value_type: FLOAT
          units: s
          description: 'ICP query service time per 5 minutes'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: icp
            - tag: component
              value: queries
        - uuid: 9130a0bc53144fe992b701aa9159ff70
          name: 'ICP query service time per hour'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.6.60]'
          key: 'squid[cacheIcpQuerySvcTime.60]'
          value_type: FLOAT
          units: s
          description: 'ICP query service time per hour'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: icp
            - tag: component
              value: queries
        - uuid: 35a7585432b3467585ff98b23e610d82
          name: 'ICP reply service time per 5 minutes'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.7.5]'
          key: 'squid[cacheIcpReplySvcTime.5]'
          value_type: FLOAT
          units: s
          description: 'ICP reply service time per 5 minutes'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: icp
            - tag: component
              value: replies
        - uuid: 94eab55af41a465196588d08acbacb56
          name: 'ICP reply service time per hour'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.7.60]'
          key: 'squid[cacheIcpReplySvcTime.60]'
          value_type: FLOAT
          units: s
          description: 'ICP reply service time per hour'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          tags:
            - tag: component
              value: icp
            - tag: component
              value: replies
        - uuid: c5409583483e4024aabaab500bcb637a
          name: 'IP cache hits per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.4.1.3.0]'
          key: 'squid[cacheIpHits]'
          value_type: FLOAT
          description: 'Number of IP Cache hits'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: hits
            - tag: component
              value: ip
        - uuid: 8e474d2fd410472bb03024d2a2361b5d
          name: 'IP cache misses per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.4.1.6.0]'
          key: 'squid[cacheIpMisses]'
          value_type: FLOAT
          description: 'Number of IP Cache misses'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ip
            - tag: component
              value: misses
        - uuid: dc837a887c3c463a9011d923dbbfbc0f
          name: 'IP cache requests per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.4.1.2.0]'
          key: 'squid[cacheIpRequests]'
          value_type: FLOAT
          description: 'Number of IP Cache requests'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ip
            - tag: component
              value: requests
        - uuid: 70786920f94f41eeb0fc525c2e6431cf
          name: 'Memory maximum resident size'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.6.0]'
          key: 'squid[cacheMaxResSize]'
          value_type: FLOAT
          units: B
          description: 'Maximum Resident Size'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1024'
          tags:
            - tag: component
              value: memory
        - uuid: d84c3a3633784f77bf9375bf59da490b
          name: 'Memory maximum cache size'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.2.5.1.0]'
          key: 'squid[cacheMemMaxSize]'
          value_type: FLOAT
          units: B
          description: 'The value of the cache_mem parameter'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1048576'
          tags:
            - tag: component
              value: memory
        - uuid: c14fe87f87ca48f39bbe765db60e0a41
          name: 'Memory cache usage'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.3.0]'
          key: 'squid[cacheMemUsage]'
          value_type: FLOAT
          units: B
          description: 'Total accounted memory'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1024'
          tags:
            - tag: component
              value: memory
        - uuid: 387bbd61d3bd469baa6c560afe8a18ae
          name: 'Objects count'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.7.0]'
          key: 'squid[cacheNumObjCount]'
          value_type: FLOAT
          description: 'Number of objects stored by the cache'
          tags:
            - tag: component
              value: objects
        - uuid: 1e648a20db904e92ae4ec0c3f9037a99
          name: 'HTTP requests received per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.1.1.0]'
          key: 'squid[cacheProtoClientHttpRequests]'
          value_type: FLOAT
          description: 'Number of HTTP requests received'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: http
            - tag: component
              value: requests
        - uuid: 31f3e3bb57d645ff8df6b9b8d1b70a49
          name: 'Byte hit ratio per 1 minute'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.10.1]'
          key: 'squid[cacheRequestByteRatio.1]'
          value_type: FLOAT
          description: 'Byte Hit Ratios'
          tags:
            - tag: component
              value: hits
        - uuid: e19775b9c83648d58655a1130c5771e4
          name: 'Byte hit ratio per 5 minutes'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.10.5]'
          key: 'squid[cacheRequestByteRatio.5]'
          value_type: FLOAT
          description: 'Byte Hit Ratios'
          tags:
            - tag: component
              value: hits
        - uuid: ffb3fc17631f4cd6b55ed6eefd2e6cea
          name: 'Byte hit ratio per 1 hour'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.10.60]'
          key: 'squid[cacheRequestByteRatio.60]'
          value_type: FLOAT
          description: 'Byte Hit Ratios'
          tags:
            - tag: component
              value: hits
        - uuid: a4ba5af69dd64fd8acf707ee1eaaeb32
          name: 'Request hit ratio per 1 minute'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.9.1]'
          key: 'squid[cacheRequestHitRatio.1]'
          value_type: FLOAT
          description: 'Byte Hit Ratios'
          tags:
            - tag: component
              value: hits
            - tag: component
              value: requests
        - uuid: b5ae7935e9be40e18c3020820a7865c7
          name: 'Request hit ratio per 5 minutes'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.9.5]'
          key: 'squid[cacheRequestHitRatio.5]'
          value_type: FLOAT
          description: 'Byte Hit Ratios'
          tags:
            - tag: component
              value: hits
            - tag: component
              value: requests
        - uuid: b09f7a1d9dc340b88106016586099dba
          name: 'Request hit ratio per 1 hour'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.2.2.1.9.60]'
          key: 'squid[cacheRequestHitRatio.60]'
          value_type: FLOAT
          description: 'Byte Hit Ratios'
          tags:
            - tag: component
              value: hits
            - tag: component
              value: requests
        - uuid: 69e4fb088c6949ac94eabcb892df46ab
          name: 'Cache swap high water mark'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.2.5.3.0]'
          key: 'squid[cacheSwapHighWM]'
          value_type: FLOAT
          units: '%'
          description: 'Cache Swap High Water Mark'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: storage
        - uuid: 221e583d7cf2455b9d848462de4b1e9a
          name: 'Cache swap low water mark'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.2.5.4.0]'
          key: 'squid[cacheSwapLowWM]'
          value_type: FLOAT
          units: '%'
          description: 'Cache Swap Low Water Mark'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: storage
        - uuid: 215aefddd30e41aea54e30678f290215
          name: 'Cache swap directory size'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.2.5.2.0]'
          key: 'squid[cacheSwapMaxSize]'
          value_type: FLOAT
          units: B
          description: 'The total of the cache_dir space allocated'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1048576'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: storage
        - uuid: 38ad99f9b30c4d729030ceab6575f4f5
          name: 'Sys page faults per second'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.3.1.1.0]'
          key: 'squid[cacheSysPageFaults]'
          value_type: FLOAT
          description: 'Page faults with physical I/O'
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: faults
        - uuid: 67460731d9c94166870874239c9a60da
          name: Uptime
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.1.3.0]'
          key: 'squid[cacheUptime]'
          delay: 5m
          units: s
          description: 'The Uptime of the cache in timeticks (in hundredths of a second) with preprocessing'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 89efc9400197427fa718395286dd3583
              expression: 'last(/Squid by SNMP/squid[cacheUptime])<10m'
              name: 'Squid: Squid has been restarted'
              event_name: 'Squid: Squid has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: d7c7f0faa1f64745be774e30e6f0b68f
          name: Version
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3495.1.2.3.0]'
          key: 'squid[cacheVersionId]'
          value_type: TEXT
          description: 'Cache Software Version'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: c5991152d2da4df7ae0d978233c5a859
              expression: 'last(/Squid by SNMP/squid[cacheVersionId],#1)<>last(/Squid by SNMP/squid[cacheVersionId],#2) and length(last(/Squid by SNMP/squid[cacheVersionId]))>0'
              name: 'Squid: Squid version has been changed'
              event_name: 'Squid: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'Squid version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      tags:
        - tag: class
          value: software
        - tag: target
          value: squid
      macros:
        - macro: '{$SQUID.FILE.DESC.WARN.MIN}'
          value: '100'
          description: 'The threshold for minimum number of available file descriptors'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Min available file descriptors'
            description: 'The threshold for minimum number of available file descriptors'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SQUID.HTTP.PORT}'
          value: '3128'
          description: 'http_port configured in squid.conf (Default: 3128)'
          config:
            type: TEXT
            priority: '2'
            label: 'HTTP port'
            description: 'http_port configured in squid.conf (Default: 3128) In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SQUID.PAGE.FAULT.WARN}'
          value: '90'
          description: 'The threshold for sys page faults rate in percent of received HTTP requests'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Max sys page faults rate'
            description: 'The threshold for sys page faults rate in percent of received HTTP requests In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SQUID.SNMP.COMMUNITY}'
          value: public
          description: 'SNMP community allowed by ACL in squid.conf'
          config:
            type: TEXT
            priority: '3'
            label: 'SNMP community'
            description: 'SNMP community allowed by ACL in squid.conf'
            required: 'YES'
        - macro: '{$SQUID.SNMP.PORT}'
          value: '3401'
          description: 'snmp_port configured in squid.conf (Default: 3401)'
          config:
            type: TEXT
            priority: '1'
            label: 'SNMP port'
            description: 'snmp_port configured in squid.conf (Default: 3401) In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 0d026f3b6eb44b46b21e2aa9ce8a030e
          name: 'Squid: Overview'
          pages:
            - name: 'Resource usage'
              widgets:
                - type: graph
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Squid by SNMP'
                        name: 'Squid: Memory'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Squid by SNMP'
                        name: 'Squid: File descriptor usage'
                    - type: STRING
                      name: reference
                      value: AAAAB
            - name: 'Service timing statistics'
              widgets:
                - type: graph
                  width: '72'
                  height: '10'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Squid by SNMP'
                        name: 'Squid: Service timing statistics'
                    - type: STRING
                      name: reference
                      value: AAAAC
            - name: 'Other statistics'
              widgets:
                - type: graph
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Squid by SNMP'
                        name: 'Squid: HTTP Traffic'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Squid by SNMP'
                        name: 'Squid: Objects cache statistics'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Squid by SNMP'
                        name: 'Squid: Domain name (FQDN) cache statistics'
                    - type: STRING
                      name: reference
                      value: AAAAF
                - type: graph
                  'y': '15'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Squid by SNMP'
                        name: 'Squid: DNS lookup statistics'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graph
                  'y': '20'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Squid by SNMP'
                        name: 'Squid: IP address cache statistics'
                    - type: STRING
                      name: reference
                      value: AAAAH
      valuemaps:
        - uuid: 1bd791d250e441aeb1c73e499d96e98e
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 43596328d4d74a5592906a9e08e3fd96
      template: 'TiDB PD by HTTP'
      name: 'TiDB PD by HTTP'
      description: |
        The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        Don't forget to change the macros {$PD.URL}, {$PD.PORT}.
        
        Template `TiDB PD by HTTP` — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        Template `TiDB PD by HTTP` — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
        See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
        
        
        ## Setup
        
        This template works with PD server of TiDB cluster.
        Internal service metrics are collected from PD /metrics endpoint and from monitoring API.
        See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
        Don't forget to change the host wizard configuration fields `Address`, `Port`.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Databases
      items:
        - uuid: 5ddd6354810347e4b4995a65d8429daf
          name: 'Get cluster metrics'
          type: DEPENDENT
          key: pd.cluster_status.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get cluster metrics.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "pd_cluster_status")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: pd.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: 3a1fd879a08a445cbf438f3d68078111
          name: 'Get instance metrics'
          type: HTTP_AGENT
          key: pd.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get TiDB PD instance metrics.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
            - type: PROMETHEUS_TO_JSON
              parameters:
                - ''
          url: '{$PD.URL}:{$PD.PORT}/metrics'
          tags:
            - tag: component
              value: raw
        - uuid: 7eb740eed4eb43a0a449e1c1436e582b
          name: 'Get instance status'
          type: HTTP_AGENT
          key: pd.get_status
          history: '0'
          value_type: TEXT
          description: 'Get TiDB PD instance status info.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '{"status": "0"}'
          url: '{$PD.URL}:{$PD.PORT}/pd/api/v1/status'
          tags:
            - tag: component
              value: health
            - tag: component
              value: raw
        - uuid: 101266930d0747748bf3cbd9259e2818
          name: 'gRPC Commands total, rate'
          type: DEPENDENT
          key: pd.grpc_command.rate
          value_type: FLOAT
          description: 'The rate at which gRPC commands are completed.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "grpc_server_handling_seconds_count")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: pd.get_metrics
          tags:
            - tag: component
              value: grpc
        - uuid: d6b8c44bcea14a08b7f5ed85bd596542
          name: 'Get gRPC command metrics'
          type: DEPENDENT
          key: pd.grpc_commands.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get gRPC command metrics.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "grpc_server_handling_seconds_count")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: pd.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: 7d7581a14a4e4de197a000337d7b8c41
          name: 'Get region metrics'
          type: DEPENDENT
          key: pd.regions.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get region metrics.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "pd_scheduler_region_heartbeat")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: pd.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: 6e6cc3d28b884372a2380b4732af438f
          name: 'Get region label metrics'
          type: DEPENDENT
          key: pd.region_labels.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get region label metrics.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "pd_regions_label_level")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: pd.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: 6d97b65149ef4880ae547fb3e82a68c0
          name: 'Get region status metrics'
          type: DEPENDENT
          key: pd.region_status.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get region status metrics.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "pd_regions_status")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: pd.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: 78c65105fd4a4f24b67176331ee685b5
          name: 'Get scheduler metrics'
          type: DEPENDENT
          key: pd.scheduler.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get scheduler metrics.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "pd_scheduler_status" && @.labels.type == "allow")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: pd.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: c18f702f68bf4fed94a598daffdada8a
          name: Status
          type: DEPENDENT
          key: pd.status
          value_type: CHAR
          description: 'Status of PD instance.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.status
              error_handler: CUSTOM_VALUE
              error_handler_params: '1'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: pd.get_status
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: ab1d0d23dad844099e42debb71512887
              expression: 'last(/TiDB PD by HTTP/pd.status)=0'
              name: 'TiDB PD: Instance is not responding'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: availability
        - uuid: 0b71c8a5104b46ebbeabe0d708b6676e
          name: Uptime
          type: DEPENDENT
          key: pd.uptime
          value_type: FLOAT
          units: uptime
          description: 'The runtime of each PD instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.start_timestamp
            - type: JAVASCRIPT
              parameters:
                - 'return (Math.floor(Date.now() / 1000) - Number(value));'
          master_item:
            key: pd.get_status
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 9f47a19f6f424df598e74c5a653ebf27
              expression: 'last(/TiDB PD by HTTP/pd.uptime)<10m'
              name: 'TiDB PD: Instance has been restarted'
              event_name: 'TiDB PD: Instance has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: c7e8e9bf01d04e5db25bd8eaafff3b80
          name: Version
          type: DEPENDENT
          key: pd.version
          value_type: CHAR
          description: 'Version of the PD instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: pd.get_status
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 6fb6045405af4c89b09750f57ada472a
              expression: 'last(/TiDB PD by HTTP/pd.version,#1)<>last(/TiDB PD by HTTP/pd.version,#2) and length(last(/TiDB PD by HTTP/pd.version))>0'
              name: 'TiDB PD: Version has changed'
              event_name: 'TiDB PD: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'PD version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: cd1f27cf5f1d4f6f84032386ec7f8abb
          name: 'Cluster metrics discovery'
          type: DEPENDENT
          key: pd.cluster.discovery
          description: 'Discovery cluster specific metrics.'
          item_prototypes:
            - uuid: fe49e1de54214fb0ac882feb42fdee3b
              name: 'Number of regions'
              type: DEPENDENT
              key: 'pd.cluster_status.leader_count[{#SINGLETON}]'
              description: 'The total count of cluster Regions.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "leader_count")].value.first()'
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: regions
            - uuid: 0950ba514e05447c8cfe726ec2d76944
              name: 'Current peer count'
              type: DEPENDENT
              key: 'pd.cluster_status.region_count[{#SINGLETON}]'
              description: 'The current count of all cluster peers.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "region_count")].value.first()'
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: peers
            - uuid: d39f58372e3f464c87b2ec42acdf2061
              name: 'Storage capacity'
              type: DEPENDENT
              key: 'pd.cluster_status.storage_capacity[{#SINGLETON}]'
              value_type: FLOAT
              units: B
              description: 'The total storage capacity for this TiDB cluster.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "storage_capacity")].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: storage
            - uuid: c72e6a2f89d041c4bf764021b9bc182c
              name: 'Storage size'
              type: DEPENDENT
              key: 'pd.cluster_status.storage_size[{#SINGLETON}]'
              value_type: FLOAT
              units: B
              description: 'The storage size that is currently used by the TiDB cluster.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "storage_size")].value.first()'
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: storage
            - uuid: 517cea991add45319d30047ac96fd9e4
              name: 'Disconnect stores'
              type: DEPENDENT
              key: 'pd.cluster_status.store_disconnected[{#SINGLETON}]'
              description: 'The count of disconnected stores.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "store_disconnected_count")].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: stores
              trigger_prototypes:
                - uuid: 077d39f8ea194081a9d0c5dfdec4d1b5
                  expression: 'last(/TiDB PD by HTTP/pd.cluster_status.store_disconnected[{#SINGLETON}])>0'
                  name: 'TiDB PD: There are disconnected TiKV nodes'
                  priority: WARNING
                  description: 'PD does not receive a TiKV heartbeat within 20 seconds. Normally a TiKV heartbeat comes in every 10 seconds.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 7125a7c858264f339e879c1389c6c027
              name: 'Down stores'
              type: DEPENDENT
              key: 'pd.cluster_status.store_down[{#SINGLETON}]'
              description: 'The count of down stores.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "store_down_count")].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: stores
              trigger_prototypes:
                - uuid: 526b935d3fa04825b7544eb6efd50ab5
                  expression: 'last(/TiDB PD by HTTP/pd.cluster_status.store_down[{#SINGLETON}])>0'
                  name: 'TiDB PD: There are offline TiKV nodes'
                  priority: AVERAGE
                  description: 'PD has not received a TiKV heartbeat for a long time.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: c3bd9d1e0f6c427ab5232e57769030d1
              name: 'Lowspace stores'
              type: DEPENDENT
              key: 'pd.cluster_status.store_low_space[{#SINGLETON}]'
              description: 'The count of low space stores.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "store_low_space_count")].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: stores
              trigger_prototypes:
                - uuid: 87ef0f211afd4d58adec05007ef1d263
                  expression: 'last(/TiDB PD by HTTP/pd.cluster_status.store_low_space[{#SINGLETON}])>0'
                  name: 'TiDB PD: There are low space TiKV nodes'
                  priority: AVERAGE
                  description: 'Indicates that there is no sufficient space on the TiKV node.'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 3c24fb49463b45f199dbc3955e87d01b
              name: 'Offline stores'
              type: DEPENDENT
              key: 'pd.cluster_status.store_offline[{#SINGLETON}]'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "store_offline_count")].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: stores
            - uuid: 476a1b6e3c9b4b41ae1637f0e12801c9
              name: 'Tombstone stores'
              type: DEPENDENT
              key: 'pd.cluster_status.store_tombstone[{#SINGLETON}]'
              description: 'The count of tombstone stores.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "store_tombstone_count")].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: stores
            - uuid: 89db2b996fbe41bdb6b82ccf75139090
              name: 'Unhealth stores'
              type: DEPENDENT
              key: 'pd.cluster_status.store_unhealth[{#SINGLETON}]'
              description: 'The count of unhealthy stores.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "store_unhealth_count")].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: stores
            - uuid: ff80108e2a5e45779a428a6fd31ea089
              name: 'Normal stores'
              type: DEPENDENT
              key: 'pd.cluster_status.store_up[{#SINGLETON}]'
              description: 'The count of healthy storage instances.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "store_up_count")].value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: pd.cluster_status.get_metrics
              tags:
                - tag: component
                  value: cluster
                - tag: component
                  value: stores
          trigger_prototypes:
            - uuid: 843d566b33bc401390c2a633d08bb033
              expression: 'min(/TiDB PD by HTTP/pd.cluster_status.storage_size[{#SINGLETON}],5m)/last(/TiDB PD by HTTP/pd.cluster_status.storage_capacity[{#SINGLETON}])*100>{$PD.STORAGE_USAGE.MAX.WARN}'
              name: 'TiDB PD: Current storage usage is too high'
              event_name: 'TiDB PD: Current storage usage is too high (over {$PD.STORAGE_USAGE.MAX.WARN}% for 5m)'
              priority: WARNING
              description: 'Over {$PD.STORAGE_USAGE.MAX.WARN}% of the cluster space is occupied.'
              tags:
                - tag: scope
                  value: capacity
          graph_prototypes:
            - uuid: 270de7aa73cf454cb147a3f5b39ebb35
              name: 'TiDB cluster: Storage Usage[{#SINGLETON}]'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.storage_size[{#SINGLETON}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.storage_capacity[{#SINGLETON}]'
            - uuid: 929dfe6f2ad74c9983ef6b11884b3abc
              name: 'TiDB cluster: Stores number by states[{#SINGLETON}]'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.store_up[{#SINGLETON}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.store_down[{#SINGLETON}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.store_unhealth[{#SINGLETON}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.store_low_space[{#SINGLETON}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.store_tombstone[{#SINGLETON}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.store_disconnected[{#SINGLETON}]'
                - sortorder: '6'
                  color: C7A72D
                  item:
                    host: 'TiDB PD by HTTP'
                    key: 'pd.cluster_status.store_offline[{#SINGLETON}]'
          master_item:
            key: pd.cluster_status.get_metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - 'return JSON.stringify(value != "[]" ? [{ ''{#SINGLETON}'': '''' }] : []);'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 113c6ba7d7f74051b042241441c43db0
          name: 'gRPC commands discovery'
          type: DEPENDENT
          key: pd.grpc_command.discovery
          description: 'Discovery grpc commands specific metrics.'
          item_prototypes:
            - uuid: 7b96abc0e68a405ea5693f4f445936fe
              name: 'gRPC Commands: {#GRPC_METHOD}, rate'
              type: DEPENDENT
              key: 'pd.grpc_command.rate[{#GRPC_METHOD}]'
              value_type: FLOAT
              description: 'The rate per command type at which gRPC commands are completed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.grpc_method == "{#GRPC_METHOD}")].value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: pd.grpc_commands.get_metrics
              tags:
                - tag: component
                  value: grpc
                - tag: grpc_method
                  value: '{#GRPC_METHOD}'
          master_item:
            key: pd.grpc_commands.get_metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var lookup = {},
                  	result = [];
                  
                  JSON.parse(value).forEach(function (item) {
                  	var grpc_method = item.labels.grpc_method;
                  	if (!(lookup[grpc_method])) {
                  		lookup[grpc_method] = 1;
                  		result.push({ "{#GRPC_METHOD}": grpc_method });
                  	}
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 2cb28d7c862d442a84b5942eb4b54e2f
          name: 'Region discovery'
          type: DEPENDENT
          key: pd.region.discovery
          description: 'Discovery region specific metrics.'
          item_prototypes:
            - uuid: 024bf1d31bbd40a49d683d962887c6e0
              name: 'Region heartbeat: error, rate'
              type: DEPENDENT
              key: 'pd.region_heartbeat.error.rate[{#STORE_ADDRESS}]'
              value_type: FLOAT
              description: 'The count of heartbeats with the error status per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "report" && @.labels.status == "err")].value.sum()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}]'
              tags:
                - tag: address
                  value: '{#STORE_ADDRESS}'
                - tag: component
                  value: regions
            - uuid: 963c4d34d2664e6aba984f746b80b5c4
              name: 'Get metrics: {#STORE_ADDRESS}'
              type: DEPENDENT
              key: 'pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}]'
              history: '0'
              value_type: TEXT
              description: 'Get region metrics for {#STORE_ADDRESS}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.address == "{#STORE_ADDRESS}")]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: pd.regions.get_metrics
              tags:
                - tag: address
                  value: '{#STORE_ADDRESS}'
                - tag: component
                  value: raw
            - uuid: 1d1d686f5c544a89a691a9b75e5c3b11
              name: 'Region heartbeat: active, rate'
              type: DEPENDENT
              key: 'pd.region_heartbeat.ok.rate[{#STORE_ADDRESS}]'
              value_type: FLOAT
              description: 'The count of heartbeats with the ok status per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "report" && @.labels.status == "ok")].value.sum()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}]'
              tags:
                - tag: address
                  value: '{#STORE_ADDRESS}'
                - tag: component
                  value: regions
            - uuid: c44f934ce8a144afa95252041535ef44
              name: 'Region schedule push: total, rate'
              type: DEPENDENT
              key: 'pd.region_heartbeat.push.err.rate[{#STORE_ADDRESS}]'
              value_type: FLOAT
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "push")].value.sum()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}]'
              tags:
                - tag: address
                  value: '{#STORE_ADDRESS}'
                - tag: component
                  value: regions
            - uuid: ea76344669de4251a0e7bef35d70494a
              name: 'Region heartbeat: total, rate'
              type: DEPENDENT
              key: 'pd.region_heartbeat.rate[{#STORE_ADDRESS}]'
              value_type: FLOAT
              description: 'The count of heartbeats reported to PD per instance per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "report")].value.sum()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}]'
              tags:
                - tag: address
                  value: '{#STORE_ADDRESS}'
                - tag: component
                  value: regions
          master_item:
            key: pd.regions.get_metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var lookup = {},
                  	result = [];
                  
                  JSON.parse(value).forEach(function (item) {
                  	var address = item.labels.address;
                  	if (!(lookup[address])) {
                  		lookup[address] = 1;
                  		result.push({ "{#STORE_ADDRESS}": address });
                  	}
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 771ba9e078a14ca489eb2acf906080e9
          name: 'Region labels discovery'
          type: DEPENDENT
          key: pd.region_labels.discovery
          description: 'Discovery region labels specific metrics.'
          item_prototypes:
            - uuid: 117efc3f2fe64c51a18cd3be162185ea
              name: 'Regions label: {#TYPE}'
              type: DEPENDENT
              key: 'pd.region_labels[{#TYPE}]'
              value_type: FLOAT
              description: 'The number of Regions in different label levels.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "{#TYPE}")].value.first()'
              master_item:
                key: pd.region_labels.get_metrics
              tags:
                - tag: component
                  value: regions
                - tag: type
                  value: '{#TYPE}'
          master_item:
            key: pd.region_labels.get_metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  output = JSON.parse(value).map(function (item) {
                  	return {
                  		"{#TYPE}": item.labels.type,
                  	};
                  });
                  return JSON.stringify({ "data": output });
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: ffbf9adaa72842fdbb49c008625c1575
          name: 'Region status discovery'
          type: DEPENDENT
          key: pd.region_status.discovery
          description: 'Discovery region status specific metrics.'
          item_prototypes:
            - uuid: 45ef4940b0454492b70116d8958c9b11
              name: 'Regions status: {#TYPE}'
              type: DEPENDENT
              key: 'pd.region_status[{#TYPE}]'
              value_type: FLOAT
              description: 'The health status of Regions indicated via the count of unusual Regions including pending peers, down peers, extra peers, offline peers, missing peers, learner peers and incorrect namespaces.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "{#TYPE}")].value.first()'
              master_item:
                key: pd.region_status.get_metrics
              tags:
                - tag: component
                  value: regions
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: 2bc6b48bbfd8436e80903ea947571501
                  expression: 'min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>0'
                  name: 'TiDB PD: There are unresponsive peers'
                  discover: NO_DISCOVER
                  priority: WARNING
                  description: 'The number of Regions with an unresponsive peer reported by the Raft leader.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 1f80bd81d11345f59699617113a0cad5
                  expression: 'min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>{$PD.MISS_REGION.MAX.WARN}'
                  name: 'TiDB PD: Too many missed regions'
                  event_name: 'TiDB PD: Too many missed regions (over {$PD.MISS_REGION.MAX.WARN} in 5m)'
                  discover: NO_DISCOVER
                  priority: WARNING
                  description: 'The number of Region replicas is smaller than the value of max-replicas. When a TiKV machine is down and its downtime exceeds max-down-time, it usually leads to missing replicas for some Regions during a period of time. When a TiKV node is made offline, it might result in a small number of Regions with missing replicas.'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: pd.region_status.get_metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  output = JSON.parse(value).map(function (item) {
                  	return {
                  		"{#TYPE}": item.labels.type,
                  	};
                  });
                  return JSON.stringify({ "data": output });
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Too many missed regions trigger'
              step: '1'
              filter:
                conditions:
                  - macro: '{#TYPE}'
                    value: miss_peer_region_count
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: 'Too many missed regions'
                  discover: DISCOVER
                  status: ENABLED
            - name: 'Unresponsive peers trigger'
              step: '2'
              filter:
                conditions:
                  - macro: '{#TYPE}'
                    value: down_peer_region_count
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: 'There are unresponsive peers'
                  discover: DISCOVER
                  status: ENABLED
        - uuid: b4b8007810ad4f7ba8da212cdde5b71b
          name: 'Running scheduler discovery'
          type: DEPENDENT
          key: pd.scheduler.discovery
          description: 'Discovery scheduler specific metrics.'
          item_prototypes:
            - uuid: c6748a20540f49b293795bc72480dda7
              name: 'Scheduler status: {#KIND}'
              type: DEPENDENT
              key: 'pd.scheduler[{#KIND}]'
              value_type: FLOAT
              description: 'The current running schedulers.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.kind == "{#KIND}")].value.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: pd.scheduler.get_metrics
              tags:
                - tag: component
                  value: scheduler
                - tag: scheduler
                  value: '{#KIND}'
          master_item:
            key: pd.scheduler.get_metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  output = JSON.parse(value).map(function (item) {
                  	return {
                  		"{#KIND}": item.labels.kind,
                  	};
                  });
                  return JSON.stringify({ "data": output });
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: database
        - tag: subclass
          value: sql
        - tag: target
          value: pd
        - tag: target
          value: tidb
      macros:
        - macro: '{$PD.MISS_REGION.MAX.WARN}'
          value: '100'
          description: 'Maximum number of missed regions'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Maximum number of missed regions'
            description: 'Maximum number of missed regions'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PD.PORT}'
          value: '2379'
          description: 'The port of PD server metrics web endpoint'
          config:
            type: TEXT
            priority: '1'
            label: Port
            description: 'The port of PD server metrics web endpoint In the range from 1 to 65535 inclusive.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PD.STORAGE_USAGE.MAX.WARN}'
          value: '80'
          description: 'Maximum percentage of cluster space used'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Maximum percentage of cluster space used'
            description: 'Maximum percentage of cluster space used'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PD.URL}'
          value: localhost
          description: 'PD server URL'
          config:
            type: TEXT
            priority: '2'
            label: Address
            description: 'PD server URL'
            required: 'YES'
      dashboards:
        - uuid: 5111f9dc22c645e09fd8d936ad71c792
          name: 'PD: Overview'
          pages:
            - name: Main
              widgets:
                - type: item
                  name: Status
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'TiDB PD by HTTP'
                        key: pd.status
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: graphprototype
                  'y': '2'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'TiDB PD by HTTP'
                        name: 'TiDB cluster: Storage Usage[{#SINGLETON}]'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: item
                  name: Uptime
                  x: '12'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'TiDB PD by HTTP'
                        key: pd.uptime
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: item
                  name: Version
                  x: '24'
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'TiDB PD by HTTP'
                        key: pd.version
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: graphprototype
                  x: '36'
                  'y': '2'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'TiDB PD by HTTP'
                        name: 'TiDB cluster: Stores number by states[{#SINGLETON}]'
                    - type: STRING
                      name: reference
                      value: AAAAB
      valuemaps:
        - uuid: bce54cbdf2b8487985f9c7847a4c4918
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 3a0bbbb2ec0a4c58bba3ba3a3d6ce660
      template: 'TiDB TiKV by HTTP'
      name: 'TiDB TiKV by HTTP'
      description: |
        The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        Don't forget to change the macros {$TIKV.URL}, {$TIKV.PORT}.
        
        Template `TiDB TiKV by HTTP` — collects metrics by HTTP agent from TiKV /metrics endpoint.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        Template `TiDB TiKV by HTTP` — collects metrics by HTTP agent from TiKV /metrics endpoint.
        
        
        ## Setup
        
        This template works with TiKV server of TiDB cluster.
        Internal service metrics are collected from TiKV /metrics endpoint.
        Don't forget to change the host wizard configuration fields `Address`, `Port`.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Databases
      items:
        - uuid: 449a7ba908884db3af4ec8ccc0d7ea43
          name: 'Scheduler: High priority commands total, rate'
          type: DEPENDENT
          key: tikv.commands_pri.high.rate
          value_type: FLOAT
          description: 'Total count of high priority commands per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_scheduler_commands_pri_total" && @.labels.priority == "high")].value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: scheduler
        - uuid: b5ce79ee79804e76bb7b91e17915159c
          name: 'Scheduler: Low priority commands total, rate'
          type: DEPENDENT
          key: tikv.commands_pri.low.rate
          value_type: FLOAT
          description: 'Total count of low priority commands per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_scheduler_commands_pri_total" && @.labels.priority == "low")].value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: scheduler
        - uuid: df3fa02457ac47168fad251727b300ff
          name: 'Scheduler: Normal priority commands total, rate'
          type: DEPENDENT
          key: tikv.commands_pri.normal.rate
          value_type: FLOAT
          description: 'Total count of normal priority commands per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_scheduler_commands_pri_total" && @.labels.priority == "normal")].value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: scheduler
        - uuid: dbf8288b5cab4e8a95b5e7c4355676bd
          name: 'Coprocessor: Requests, rate'
          type: DEPENDENT
          key: tikv.coprocessor_request.rate
          value_type: FLOAT
          units: Ops
          description: 'Total number of coprocessor requests per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..value.sum()
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.coprocessor_requests.metrics
          tags:
            - tag: component
              value: coprocessor
        - uuid: a4166b4e9f454e0388ee813bcf9ed429
          name: 'Get coprocessor requests metrics'
          type: DEPENDENT
          key: tikv.coprocessor_requests.metrics
          history: '0'
          value_type: TEXT
          description: 'Get metrics of coprocessor requests.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_coprocessor_request_duration_seconds_count")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: d6185382a1974b9194e68bea4f14eb75
          name: 'Coprocessor: Errors, rate'
          type: DEPENDENT
          key: tikv.coprocessor_request_error.rate
          value_type: FLOAT
          units: Ops
          description: 'Total number of push down request error per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_coprocessor_request_error")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: coprocessor
          triggers:
            - uuid: 31eca27ff6ce4ed78ee428ed3b8d8806
              expression: 'min(/TiDB TiKV by HTTP/tikv.coprocessor_request_error.rate,5m)>{$TIKV.COPROCESSOR.ERRORS.MAX.WARN}'
              name: 'TiDB TiKV: Too many coprocessor request error'
              event_name: 'TiDB TiKV: Too many coprocessor request error (over {$TIKV.COPROCESSOR.ERRORS.MAX.WARN} in 5m)'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 5567ebf02fb6441dbb6672e1bc77b3ab
          name: 'Coprocessor: Response size, rate'
          type: DEPENDENT
          key: tikv.coprocessor_response_bytes.rate
          value_type: FLOAT
          units: Bps
          description: 'The total size of coprocessor response per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_coprocessor_response_bytes")].value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: coprocessor
        - uuid: 237f6ba2973e472d8c20de1d61b4695c
          name: 'Coprocessor: RocksDB ops, rate'
          type: DEPENDENT
          key: tikv.coprocessor_rocksdb_perf.rate
          value_type: FLOAT
          units: Ops
          description: 'Total number of RocksDB internal operations from PerfContext per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_coprocessor_rocksdb_perf")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: coprocessor
        - uuid: bfcec759c0894cf89c5267fc6b3862d7
          name: 'Coprocessor: Scan keys, rate'
          type: DEPENDENT
          key: tikv.coprocessor_scan_keys_sum.rate
          value_type: FLOAT
          units: Ops
          description: 'Total number of scan keys observed per request per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_coprocessor_scan_keys")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: coprocessor
        - uuid: a76665b7a9924f8cbd4a455bc248d790
          name: 'CPU util'
          type: DEPENDENT
          key: tikv.cpu.util
          value_type: FLOAT
          units: '%'
          description: 'The CPU usage ratio on TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_thread_cpu_seconds_total")].value.sum()'
            - type: CHANGE_PER_SECOND
            - type: MULTIPLIER
              parameters:
                - '100'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: cpu
        - uuid: 4558a5a11c304584bf24a7c3d2eace23
          name: 'Bytes read'
          type: DEPENDENT
          key: tikv.engine_flow_bytes.read
          value_type: FLOAT
          units: Bps
          description: 'The total bytes of read in TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_engine_flow_bytes" && @.labels.db == "kv" && @.labels.type =~ "bytes_read|iter_bytes_read")].value.sum()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: storage
        - uuid: 0d44c3c9a7f34905b0404ae39a3bc881
          name: 'Bytes write'
          type: DEPENDENT
          key: tikv.engine_flow_bytes.write
          value_type: FLOAT
          units: Bps
          description: 'The total bytes of write in TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_engine_flow_bytes" && @.labels.db == "kv" && @.labels.type == "wal_file_bytes")].value.first()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: storage
        - uuid: f79d5daea61842b18e39c7289657ddf5
          name: 'Store size'
          type: DEPENDENT
          key: tikv.engine_size
          value_type: FLOAT
          units: B
          description: 'The storage size of TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_engine_size_bytes")].value.sum()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: storage
        - uuid: 418bcc8c0bc440468efe833bef02929d
          name: 'Get instance metrics'
          type: HTTP_AGENT
          key: tikv.get_metrics
          history: '0'
          value_type: TEXT
          description: 'Get TiKV instance metrics.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
            - type: PROMETHEUS_TO_JSON
              parameters:
                - ''
          url: '{$TIKV.URL}:{$TIKV.PORT}/metrics'
          tags:
            - tag: component
              value: raw
        - uuid: fed3db7222fa41a8bf51d2ad860a22d4
          name: 'Total query, rate'
          type: DEPENDENT
          key: tikv.grpc_msg.rate
          value_type: FLOAT
          units: Ops
          description: 'The total QPS in TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..value.sum()
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.grpc_msgs.metrics
          tags:
            - tag: component
              value: queries
        - uuid: bb14162b05c84458a66996c08deffb1e
          name: 'Get QPS metrics'
          type: DEPENDENT
          key: tikv.grpc_msgs.metrics
          history: '0'
          value_type: TEXT
          description: 'Get QPS metrics in TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_grpc_msg_duration_seconds_count")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: c68db41c184d44d98445cc66489ef39c
          name: 'Total query errors, rate'
          type: DEPENDENT
          key: tikv.grpc_msg_fail.rate
          value_type: FLOAT
          units: Ops
          description: 'The total number of gRPC message handling failure per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_grpc_msg_fail_total")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: grpc
        - uuid: 3ef3b7bf8c2645e8a953e68fdf246274
          name: 'Get failure msg metrics'
          type: DEPENDENT
          key: tikv.messages.failure.metrics
          history: '0'
          value_type: TEXT
          description: 'Get metrics of reporting failure messages.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_server_report_failure_msg_total")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: 7afa5147a1e247a5b8914d8739d31f15
          name: 'Server: failure messages total, rate'
          type: DEPENDENT
          key: tikv.messages.failure.rate
          value_type: FLOAT
          description: 'Total number of reporting failure messages per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..value.sum()
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.messages.failure.metrics
          tags:
            - tag: component
              value: application
        - uuid: e6137dd87faa496497b23cadaa37dca9
          name: 'Regions, count'
          type: DEPENDENT
          key: tikv.region_count
          description: 'The number of regions collected in TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_raftstore_region_count" && @.labels.type == "region" )].value.first()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: regions
        - uuid: 2ab7643435794ec6b5a2c3eb1dd7e913
          name: 'Regions, leader'
          type: DEPENDENT
          key: tikv.region_leader
          description: 'The number of leaders in TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_raftstore_region_count" && @.labels.type == "leader" )].value.first()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: regions
        - uuid: 1c480fa23eaa42bcb367bb5afdcb65b9
          name: 'RSS memory usage'
          type: DEPENDENT
          key: tikv.rss_bytes
          value_type: FLOAT
          units: B
          description: 'Resident memory size in bytes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "process_resident_memory_bytes")].value.first()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: memory
        - uuid: c99a6d9591674723a45de6a0ace68088
          name: 'Get scheduler metrics'
          type: DEPENDENT
          key: tikv.scheduler.metrics
          history: '0'
          value_type: TEXT
          description: 'Get metrics of scheduler commands.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_scheduler_stage_total")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: 62f856cf22804262aef64e9369049332
          name: 'Scheduler: Commands total, rate'
          type: DEPENDENT
          key: tikv.scheduler_commands.rate
          value_type: FLOAT
          description: 'Total number of commands per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..value.sum()
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.scheduler.metrics
          tags:
            - tag: component
              value: scheduler
        - uuid: 33a1b2f676134cf1b81771fbaf152f59
          name: 'Scheduler: Pending commands'
          type: DEPENDENT
          key: tikv.scheduler_contex
          description: 'The total number of pending commands. The scheduler receives commands from clients, executes them against the MVCC layer storage engine.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_scheduler_contex_total")].value.first()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: scheduler
          triggers:
            - uuid: 0f21c02b8e1c45d9bbe0c3313cea1a23
              expression: 'min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_COMMANDS.MAX.WARN}'
              name: 'TiDB TiKV: Too many pending commands'
              event_name: 'TiDB TiKV: Too many pending commands (over {$TIKV.PENDING_COMMANDS.MAX.WARN} for 5m)'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: performance
        - uuid: 8f5c9d2b9eca4a489d764420ee06e4b6
          name: 'Scheduler: Busy, rate'
          type: DEPENDENT
          key: tikv.scheduler_too_busy.rate
          value_type: FLOAT
          description: 'The total count of too busy schedulers per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_scheduler_too_busy_total")].value.sum()'
              error_handler: DISCARD_VALUE
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: scheduler
        - uuid: 0a2d0a119bcd406aadfc5c014186c5d3
          name: 'Snapshot: Applying'
          type: DEPENDENT
          key: tikv.snapshot.applying
          description: 'The total amount of raftstore snapshot traffic.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_raftstore_snapshot_traffic_total" && @.labels.type == "applying")].value.first()'
              error_handler: DISCARD_VALUE
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: snapshot
        - uuid: 58559be859d64887a1b919e36aa1e336
          name: 'Snapshot: Receiving'
          type: DEPENDENT
          key: tikv.snapshot.receiving
          description: 'The total amount of raftstore snapshot traffic.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_raftstore_snapshot_traffic_total" && @.labels.type == "receiving")].value.first()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: snapshot
        - uuid: 0ae6a2024ed3488498e22bc542d27619
          name: 'Snapshot: Sending'
          type: DEPENDENT
          key: tikv.snapshot.sending
          description: 'The total amount of raftstore snapshot traffic.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_raftstore_snapshot_traffic_total" && @.labels.type == "sending")].value.first()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: snapshot
        - uuid: ce31318a420d40668e62a47fe19d3d40
          name: 'Storage: commands total, rate'
          type: DEPENDENT
          key: tikv.storage_command.rate
          value_type: FLOAT
          description: 'Total number of commands received per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_storage_command_total")].value.sum()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: commands
        - uuid: fbfaa0d967c049c0a1bbcec5afea4bf2
          name: 'Available size'
          type: DEPENDENT
          key: tikv.store_size.available
          value_type: FLOAT
          units: B
          description: 'The available capacity of TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.labels.type == "available")].value.first()'
          master_item:
            key: tikv.store_size.metrics
          tags:
            - tag: component
              value: storage
        - uuid: 1e0c1c071b604e77998797c2f9d41dfc
          name: 'Capacity size'
          type: DEPENDENT
          key: tikv.store_size.capacity
          value_type: FLOAT
          units: B
          description: 'The capacity size of TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.labels.type == "capacity")].value.first()'
          master_item:
            key: tikv.store_size.metrics
          tags:
            - tag: component
              value: storage
        - uuid: fd4b786239d9426d9a882af47a5abe01
          name: 'Get store size metrics'
          type: DEPENDENT
          key: tikv.store_size.metrics
          history: '0'
          value_type: TEXT
          description: 'Get capacity metrics of TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_store_size_bytes")]'
              error_handler: DISCARD_VALUE
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: raw
        - uuid: f2632dbd773140398a7d61608d85f392
          name: Uptime
          type: DEPENDENT
          key: tikv.uptime
          value_type: FLOAT
          units: uptime
          description: 'The runtime of each TiKV instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name=="process_start_time_seconds")].value.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return (Math.floor(Date.now() / 1000) - Number(value));'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: ca06602fa0b64a2ba0c51ed4835c52b2
              expression: 'last(/TiDB TiKV by HTTP/tikv.uptime)<10m'
              name: 'TiDB TiKV: Instance has been restarted'
              event_name: 'TiDB TiKV: Instance has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 8b7c2dc8c60e491db76cafd2d0e1234b
          name: 'Snapshot: Pending tasks'
          type: DEPENDENT
          key: tikv.worker_pending_task
          description: 'The number of tasks currently running by the worker or pending.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.name == "tikv_worker_pending_task_total")].value.first()'
          master_item:
            key: tikv.get_metrics
          tags:
            - tag: component
              value: snapshot
          triggers:
            - uuid: f26874f910e34933983685ae43a90bee
              expression: 'min(/TiDB TiKV by HTTP/tikv.worker_pending_task,5m)>{$TIKV.PENDING_TASKS.MAX.WARN}'
              name: 'TiDB TiKV: Too many pending tasks'
              event_name: 'TiDB TiKV: Too many pending tasks (over {$TIKV.PENDING_TASKS.MAX.WARN} for 5m)'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: performance
      discovery_rules:
        - uuid: f1c7de94679e40a4ac6f569e05ad61d0
          name: 'Coprocessor metrics discovery'
          type: DEPENDENT
          key: tikv.coprocessor.discovery
          description: 'Discovery coprocessor metrics.'
          item_prototypes:
            - uuid: e5176f11fe694efba01c4a2b14f5929d
              name: 'Coprocessor: {#REQ_TYPE} metrics'
              type: DEPENDENT
              key: 'tikv.coprocessor_request.metrics[{#REQ_TYPE}]'
              history: '0'
              value_type: TEXT
              description: 'Get metrics of {#REQ_TYPE} requests.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.req == "{#REQ_TYPE}")]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: tikv.get_metrics
              tags:
                - tag: component
                  value: raw
                - tag: request
                  value: '{#REQ_TYPE}'
            - uuid: ecbe08549fef42d5aad0369e861b4c20
              name: 'Coprocessor: {#REQ_TYPE} requests, rate'
              type: DEPENDENT
              key: 'tikv.coprocessor_request.rate[{#REQ_TYPE}]'
              value_type: FLOAT
              units: Ops
              description: 'Total number of coprocessor requests per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name == "tikv_coprocessor_request_duration_seconds_count")].value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'tikv.coprocessor_request.metrics[{#REQ_TYPE}]'
              tags:
                - tag: component
                  value: coprocessor
                - tag: request
                  value: '{#REQ_TYPE}'
            - uuid: 08060401409b4fff97430c595fec7b82
              name: 'Coprocessor: {#REQ_TYPE} errors, rate'
              type: DEPENDENT
              key: 'tikv.coprocessor_request_error.rate[{#REQ_TYPE}]'
              value_type: FLOAT
              units: Ops
              description: 'Total number of push down request error per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name == "tikv_coprocessor_request_error")].value.first()'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'tikv.coprocessor_request.metrics[{#REQ_TYPE}]'
              tags:
                - tag: component
                  value: coprocessor
                - tag: request
                  value: '{#REQ_TYPE}'
            - uuid: bff6ee970f7349edba6cac1cd0da70ed
              name: 'Coprocessor: {#REQ_TYPE} RocksDB ops, rate'
              type: DEPENDENT
              key: 'tikv.coprocessor_rocksdb_perf.rate[{#REQ_TYPE}]'
              value_type: FLOAT
              units: Ops
              description: 'Total number of RocksDB internal operations from PerfContext per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name == "tikv_coprocessor_rocksdb_perf")].value.sum()'
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'tikv.coprocessor_request.metrics[{#REQ_TYPE}]'
              tags:
                - tag: component
                  value: coprocessor
                - tag: request
                  value: '{#REQ_TYPE}'
            - uuid: 8ef93de8a25b4f35b2e54f6ced4a5bd2
              name: 'Coprocessor: {#REQ_TYPE} scan keys, rate'
              type: DEPENDENT
              key: 'tikv.coprocessor_scan_keys.rate[{#REQ_TYPE}]'
              value_type: FLOAT
              units: Ops
              description: 'Total number of scan keys observed per request per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.name == "tikv_coprocessor_scan_keys_count")].value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'tikv.coprocessor_request.metrics[{#REQ_TYPE}]'
              tags:
                - tag: component
                  value: coprocessor
                - tag: request
                  value: '{#REQ_TYPE}'
          master_item:
            key: tikv.coprocessor_requests.metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  output = JSON.parse(value).map(function (item) {
                  	return {
                  		"{#REQ_TYPE}": item.labels.req,
                  	};
                  });
                  return JSON.stringify({ "data": output });
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 39e4031ee41143ed9d0c84492f817125
          name: 'QPS metrics discovery'
          type: DEPENDENT
          key: tikv.qps.discovery
          description: 'Discovery QPS metrics.'
          item_prototypes:
            - uuid: 3b1d1b10cee6465c822152072189ebbe
              name: 'Query: {#TYPE}, rate'
              type: DEPENDENT
              key: 'tikv.grpc_msg.rate[{#TYPE}]'
              value_type: FLOAT
              units: Ops
              description: 'The QPS per command in TiKV instance.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.type == "{#TYPE}")].value.first()'
                  error_handler: CUSTOM_VALUE
              master_item:
                key: tikv.grpc_msgs.metrics
              tags:
                - tag: component
                  value: grpc
                - tag: type
                  value: '{#TYPE}'
          master_item:
            key: tikv.grpc_msgs.metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  output = JSON.parse(value).map(function (item) {
                  	return {
                  		"{#TYPE}": item.labels.type,
                  	};
                  });
                  return JSON.stringify({ "data": output });
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 7168e631146546129284cbf9c52b2025
          name: 'Scheduler metrics discovery'
          type: DEPENDENT
          key: tikv.scheduler.discovery
          description: 'Discovery scheduler metrics.'
          item_prototypes:
            - uuid: c4f902a0be5444b2babb1775b89a6827
              name: 'Scheduler: commands {#STAGE}, rate'
              type: DEPENDENT
              key: 'tikv.scheduler_stage.rate[{#STAGE}]'
              value_type: FLOAT
              description: 'Total number of commands on each stage per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.stage == "{#STAGE}")].value.sum()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: tikv.scheduler.metrics
              tags:
                - tag: component
                  value: scheduler
                - tag: stage
                  value: '{#STAGE}'
          master_item:
            key: tikv.scheduler.metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var lookup = {},
                  	result = [];
                  
                  JSON.parse(value).forEach(function (item) {
                  	var stage = item.labels.stage;
                  	if (!(lookup[stage])) {
                  		lookup[stage] = 1;
                  		result.push({ "{#STAGE}": stage });
                  	}
                  });
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 5ebd2e2131ab4a9f8ca63f0e490b04a3
          name: 'Server errors discovery'
          type: DEPENDENT
          key: tikv.server_report_failure.discovery
          description: 'Discovery server errors metrics.'
          item_prototypes:
            - uuid: 064e74b5484e42e4acf3122c8ead4826
              name: 'Store_id {#STORE_ID}: failure messages "{#TYPE}", rate'
              type: DEPENDENT
              key: 'tikv.messages.failure.rate[{#STORE_ID},{#TYPE}]'
              value_type: FLOAT
              description: 'Total number of reporting failure messages. The metric has two labels: type and store_id. type represents the failure type, and store_id represents the destination peer store id.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.labels.store_id == "{#STORE_ID}"  && @.labels.type == "{#TYPE}")].value.sum()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: tikv.messages.failure.metrics
              tags:
                - tag: component
                  value: stores
                - tag: message-type
                  value: '{#TYPE}'
                - tag: store
                  value: '{#STORE_ID}'
              trigger_prototypes:
                - uuid: 1f65b64824d64852aaa609df5f3e27fd
                  expression: 'min(/TiDB TiKV by HTTP/tikv.messages.failure.rate[{#STORE_ID},{#TYPE}],5m)>{$TIKV.STORE.ERRORS.MAX.WARN}'
                  name: 'TiDB TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}"'
                  event_name: 'TiDB TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}" (over {$TIKV.STORE.ERRORS.MAX.WARN} in 5m)'
                  discover: NO_DISCOVER
                  priority: WARNING
                  description: 'Indicates that the remote TiKV cannot be connected.'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: tikv.messages.failure.metrics
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  output = JSON.parse(value).map(function (item) {
                  	return {
                  		"{#STORE_ID}": item.labels.store_id,
                  		"{#TYPE}": item.labels.type,
                  
                  	};
                  });
                  return JSON.stringify({ "data": output });
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Too many unreachable messages trigger'
              step: '1'
              filter:
                conditions:
                  - macro: '{#TYPE}'
                    value: unreachable
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: 'Too many failure messages'
                  discover: DISCOVER
                  status: ENABLED
      tags:
        - tag: class
          value: database
        - tag: subclass
          value: sql
        - tag: target
          value: tidb
        - tag: target
          value: tikv
      macros:
        - macro: '{$TIKV.COPROCESSOR.ERRORS.MAX.WARN}'
          value: '1'
          description: 'Maximum number of coprocessor request errors'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Max coprocessor request errors'
            description: 'Maximum number of coprocessor request errors'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TIKV.PENDING_COMMANDS.MAX.WARN}'
          value: '1'
          description: 'Maximum number of pending commands'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Max pending commands'
            description: 'Maximum number of pending commands'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TIKV.PENDING_TASKS.MAX.WARN}'
          value: '1'
          description: 'Maximum number of tasks currently running by the worker or pending'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Max running or pending tasks'
            description: 'Maximum number of tasks currently running by the worker or pending'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TIKV.PORT}'
          value: '20180'
          description: 'The port of TiKV server metrics web endpoint'
          config:
            type: TEXT
            priority: '1'
            label: Port
            description: 'The port of TiKV server metrics web endpoint In the range from 1 to 65535 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TIKV.STORE.ERRORS.MAX.WARN}'
          value: '1'
          description: 'Maximum number of failure messages'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Max failure messages'
            description: 'Maximum number of failure messages'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TIKV.URL}'
          value: localhost
          description: 'TiKV server URL'
          config:
            type: TEXT
            priority: '2'
            label: Address
            description: 'TiKV server URL'
      dashboards:
        - uuid: 5d700978ddb447e59b2536732377d27b
          name: 'TiKV: Overview'
          pages:
            - name: Main
              widgets:
                - type: item
                  name: Uptime
                  width: '12'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'TiDB TiKV by HTTP'
                        key: tikv.uptime
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                - type: graph
                  'y': '2'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'TiDB TiKV by HTTP'
                        name: 'TiKV: Snapshot state count'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  x: '36'
                  'y': '2'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'TiDB TiKV by HTTP'
                        name: 'TiKV: Scheduler priority commands rate'
                    - type: STRING
                      name: reference
                      value: AAAAB
    - uuid: 738085dde4e749d49199e5e6fd4d56ab
      template: 'Veeam Backup and Replication by HTTP'
      name: 'Veeam Backup and Replication by HTTP'
      description: |
        This template is designed to monitor Veeam Backup and Replication.
        
        NOTE: The RESTful API may not be available for some editions, see (https://www.veeam.com/licensing-pricing.html) for more details.
        
        Setup:
          1. Create a user to monitor the service or use an existing read-only account.
          See (https://helpcenter.veeam.com/docs/backup/vbr_rest/reference/vbr-rest-v1-rev2.html?ver=110#tag/Login/operation/CreateToken!path=grant_type&t=request) for more details. 
          2. Link the template to a host.
          3. Configure the following macros: {$VEEAM.API.URL}, {$VEEAM.USER}, and {$VEEAM.PASSWORD}.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed to monitor Veeam Backup and Replication.
        It works without any external scripts and uses the script item.
        
        ***NOTE:*** Since the RESTful API may not be available for some editions, the template will only work with the following editions of Veeam Backup and Replication:
        
        1. Veeam Universal License (VUL) editions:
        * Foundation
        * Advanced
        * Premium
        
        2. Veeam Socket License editions:
        * Enterprise Plus Socket  
        
        > See [Veeam Data Platform Feature Comparison](https://www.veeam.com/licensing-pricing.html) for more details.
        
        ## Setup
        
        1. Create a user to monitor the service or use an existing read-only account.
        > See [Veeam Help Center](https://helpcenter.veeam.com/docs/backup/vbr_rest/reference/vbr-rest-v1-rev2.html?ver=110#tag/Login/operation/CreateToken!path=grant_type&t=request) for more details. 
        2. Link the template to a host.
        3. Configure the following host wizard configuration fields: `Address`, `Username`, and `Password`.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 87224dc0114446689f0fcfc4f0f83c17
          name: 'Get errors'
          type: DEPENDENT
          key: veeam.get.errors
          value_type: TEXT
          description: 'The errors from API requests.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: veeam.get.metrics
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 3487d31a2aa540009f006c6a4eff8c79
              expression: 'length(last(/Veeam Backup and Replication by HTTP/veeam.get.errors))>0'
              name: 'Veeam Backup: There are errors in requests to API'
              opdata: '{ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Zabbix has received errors in response to API requests.'
              tags:
                - tag: scope
                  value: availability
        - uuid: f8ef587e6d204e7da6e27e56b1131ca4
          name: 'Get metrics'
          type: SCRIPT
          key: veeam.get.metrics
          delay: 5m
          history: '0'
          value_type: TEXT
          params: |
            var Veeam = {
            	params: {},
            	token: '',
            
            	setParams: function (params) {
            		['api_endpoint', 'user', 'password', 'created_after'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Veeam.params = params;
            		if (typeof Veeam.params.api_endpoint === 'string' && !Veeam.params.api_endpoint.endsWith('/')) {
            			Veeam.params.api_endpoint += '/';
            		}
            		if (Veeam.params.created_after >= 365 || Veeam.params.created_after <= 1) {
            			throw 'Incorrect "created_after" parameter given: ' + Veeam.params.created_after + '\nMust be between 1 and 365 days.';
            		}
            	},
            
            	login: function () {
            
            		var resp, login = new HttpRequest();
            		if (typeof Veeam.params.http_proxy !== 'undefined' && Veeam.params.http_proxy !== '') {
            			login.setProxy(Veeam.params.http_proxy);
            		}
            		login.addHeader('Content-Type: application/x-www-form-urlencoded');
            		login.addHeader('x-api-version: 1.0-rev2');
            		resp = login.post(Veeam.params.api_endpoint + 'api/oauth2/token',
            			'grant_type=password&username=' + encodeURIComponent(Veeam.params.user) + '&password=' + encodeURIComponent(Veeam.params.password));
            
            		if (login.getStatus() !== 200 || resp === null) {
            			throw 'Login failed with status code ' + login.getStatus() + ': ' + resp;
            		}
            
            		try {
            			resp = JSON.parse(resp);
            		}
            		catch (error) {
            			throw 'Failed to parse authentication token for the logon session.';
            		}
            		if (!resp.hasOwnProperty('access_token')) {
            			throw 'Auth response does not contain access token.';
            		}
            		Veeam.token = resp['access_token'];
            
            	},
            
            	request: function (url) {
            
            		var response, request = new HttpRequest();
            		if (typeof Veeam.params.http_proxy !== 'undefined' && Veeam.params.http_proxy !== '') {
            			request.setProxy(Veeam.params.http_proxy);
            		}
            		if (Veeam.token) {
            			request.addHeader('Authorization: Bearer ' + Veeam.token);
            			request.addHeader('x-api-version: 1.0-rev2');
            			response = request.get(url);
            		}
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API.';
            		}
            	},
            
            	getMetricsData: function () {
            		var data = {};
            		ms = 86400000;
            		start_date = new Date((new Date().getTime()) - ms * Veeam.params.created_after).toISOString().replace(/\.\d+/, '');
            		endpoints = {
            			'proxies': 'api/v1/backupInfrastructure/proxies',
            			'managedServers': 'api/v1/backupInfrastructure/managedServers',
            			'repositories_states': 'api/v1/backupInfrastructure/repositories/states',
            			'jobs_states': 'api/v1/jobs/states',
            			'sessions': 'api/v1/sessions?createdAfterFilter=' + encodeURIComponent(start_date)
            		};
            
            		Object.keys(endpoints).forEach(function (key) {
            			data[key] = Veeam.request(Veeam.params.api_endpoint + endpoints[key]);
            		});
            
            		return data;
            	}
            };
            
            try {
            	Veeam.setParams(JSON.parse(value));
            	Veeam.login();
            	return JSON.stringify(Veeam.getMetricsData());
            }
            catch (error) {
            	error += (String(error).endsWith('.')) ? '' : '.';
            	Zabbix.log(3, '[ VEEAM ] ERROR: ' + error);
            	return JSON.stringify({ 'error': error });
            }
          description: 'The result of API requests is expressed in the JSON.'
          timeout: '{$VEEAM.DATA.TIMEOUT}'
          parameters:
            - name: api_endpoint
              value: '{$VEEAM.API.URL}'
            - name: created_after
              value: '{$CREATED.AFTER}'
            - name: http_proxy
              value: '{$VEEAM.HTTP.PROXY}'
            - name: password
              value: '{$VEEAM.PASSWORD}'
            - name: user
              value: '{$VEEAM.USER}'
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: 02bac44761384a579575c16ef1740f32
          name: 'Jobs states discovery'
          type: DEPENDENT
          key: veeam.job.state.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JOB.STATUS}'
                value: '{$JOB.STATUS.MATCHES}'
              - macro: '{#JOB.STATUS}'
                value: '{$JOB.STATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#NAME}'
                value: '{$JOB.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$JOB.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: '{$JOB.TYPE.MATCHES}'
              - macro: '{#TYPE}'
                value: '{$JOB.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of the jobs states.'
          item_prototypes:
            - uuid: 120a6bf888e74e0c9b054c3bdd50473f
              name: 'Job states [{#NAME}] [{#TYPE}]: Last result'
              type: DEPENDENT
              key: 'veeam.jobs.last.result[{#ID}]'
              value_type: TEXT
              description: 'The result of the session. The enums used: `None`, `Success`, `Warning`, `Failed`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.lastResult
              master_item:
                key: 'veeam.jobs.states.raw[{#ID}]'
              tags:
                - tag: component
                  value: jobs
                - tag: job
                  value: '{#NAME}'
                - tag: workload
                  value: '{#WORKLOAD}'
              trigger_prototypes:
                - uuid: 337b1cafc2674b4fb44e5baf1076183b
                  expression: 'find(/Veeam Backup and Replication by HTTP/veeam.jobs.last.result[{#ID}],,"like","Failed")=1'
                  name: 'Veeam Backup: Last result job failed'
                  event_name: 'Veeam Backup: Failed job [{#NAME}]'
                  priority: AVERAGE
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: cd2bc50b71184c5ebf39b75a2dafa483
              name: 'Job states [{#NAME}] [{#TYPE}]: Get data'
              type: DEPENDENT
              key: 'veeam.jobs.states.raw[{#ID}]'
              history: '0'
              value_type: TEXT
              description: 'Gets raw data from the job states with the name `[{#NAME}]`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.jobs_states.data.[?(@.id==''{#ID}'')].first()'
              master_item:
                key: veeam.get.metrics
              tags:
                - tag: component
                  value: jobs
                - tag: component
                  value: raw
            - uuid: 6f3837f27334466b814728036dd65c1d
              name: 'Job states [{#NAME}] [{#TYPE}]: Status'
              type: DEPENDENT
              key: 'veeam.jobs.status[{#ID}]'
              value_type: TEXT
              description: 'The current status of the job. The enums used: `running`, `inactive`, `disabled`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
              master_item:
                key: 'veeam.jobs.states.raw[{#ID}]'
              tags:
                - tag: component
                  value: jobs
                - tag: job
                  value: '{#NAME}'
                - tag: workload
                  value: '{#WORKLOAD}'
          master_item:
            key: veeam.get.metrics
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#JOB.STATUS}'
              path: $.status
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#REPOSITORY.NAME}'
              path: $.repositoryName
            - lld_macro: '{#TYPE}'
              path: $.type
            - lld_macro: '{#WORKLOAD}'
              path: $.workload
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.jobs_states.data
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 4b1925bd0295403b8eb0d99b2f947296
          name: 'Proxies discovery'
          type: DEPENDENT
          key: veeam.proxies.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PROXIES.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PROXIES.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: '{$PROXIES.TYPE.MATCHES}'
              - macro: '{#TYPE}'
                value: '{$PROXIES.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of proxies.'
          item_prototypes:
            - uuid: 1daea1ba8ac144fc9e22296720af0b22
              name: 'Proxy [{#NAME}] [{#TYPE}]: Max Task Count'
              type: DEPENDENT
              key: 'veeam.proxy.maxtask[{#NAME}]'
              description: 'The maximum number of concurrent tasks.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.server.maxTaskCount
              master_item:
                key: 'veeam.proxy.raw[{#NAME}]'
              tags:
                - tag: component
                  value: proxies
                - tag: proxy
                  value: '{#NAME}'
            - uuid: 40d85eb402274838b00765ab91de3896
              name: 'Proxy [{#NAME}] [{#TYPE}]: Get data'
              type: DEPENDENT
              key: 'veeam.proxy.raw[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Gets raw data collected by the proxy with the name `[{#NAME}]`, `[{#TYPE}]`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.proxies.data.[?(@.id==''{#ID}'')].first()'
              master_item:
                key: veeam.get.metrics
              tags:
                - tag: component
                  value: proxies
                - tag: component
                  value: raw
                - tag: proxy
                  value: '{#NAME}'
            - uuid: 4c304283f1ad480b8251a72ade27620f
              name: 'Proxy [{#NAME}] [{#TYPE}]: Host name'
              type: DEPENDENT
              key: 'veeam.proxy.server.name[{#NAME}]'
              value_type: TEXT
              description: 'The name of the proxy server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.name
              master_item:
                key: 'veeam.proxy.server.raw[{#NAME}]'
              tags:
                - tag: component
                  value: proxies
                - tag: proxy
                  value: '{#NAME}'
            - uuid: 83e2e092ae1f4e1a9b4a426076f76467
              name: 'Server [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'veeam.proxy.server.raw[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Gets raw data collected by the proxy server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.managedServers.data.[?(@.id==''{#HOSTID}'')].first()'
              master_item:
                key: veeam.get.metrics
              tags:
                - tag: component
                  value: proxies
                - tag: component
                  value: raw
                - tag: proxy
                  value: '{#NAME}'
            - uuid: 7dca605f25854e89a7e18702e8a48fc7
              name: 'Proxy [{#NAME}] [{#TYPE}]: Host type'
              type: DEPENDENT
              key: 'veeam.proxy.server.type[{#NAME}]'
              value_type: TEXT
              description: 'The type of the proxy server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.type
              master_item:
                key: 'veeam.proxy.server.raw[{#NAME}]'
              tags:
                - tag: component
                  value: proxies
                - tag: proxy
                  value: '{#NAME}'
          master_item:
            key: veeam.get.metrics
          lld_macro_paths:
            - lld_macro: '{#DESCRIPTION}'
              path: $.description
            - lld_macro: '{#HOSTID}'
              path: $.server.hostId
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.proxies.data
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 27db09e55a3c4d638f7c10109d9b76be
          name: 'Repositories discovery'
          type: DEPENDENT
          key: veeam.repositories.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$REPOSITORIES.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$REPOSITORIES.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: '{$REPOSITORIES.TYPE.MATCHES}'
              - macro: '{#TYPE}'
                value: '{$REPOSITORIES.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of repositories.'
          item_prototypes:
            - uuid: 1c925cfa0a2b46838588471aa58a1591
              name: 'Repository [{#NAME}] [{#TYPE}]: Get data'
              type: DEPENDENT
              key: 'veeam.repositories.raw[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Gets raw data from repository with the name: `[{#NAME}]`, `[{#TYPE}]`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.repositories_states.data.[?(@.id==''{#ID}'')].first()'
              master_item:
                key: veeam.get.metrics
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: repositories
                - tag: repository
                  value: '{#NAME}'
            - uuid: 80a13587e8cc40ba886f987fcde23c13
              name: 'Repository [{#NAME}] [{#TYPE}]: Used space [{#PATH}]'
              type: DEPENDENT
              key: 'veeam.repository.capacity[{#NAME}]'
              value_type: FLOAT
              units: '!GB'
              description: 'Used space by repositories expressed in gigabytes (GB).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.usedSpaceGB
              master_item:
                key: 'veeam.repositories.raw[{#NAME}]'
              tags:
                - tag: component
                  value: repositories
                - tag: repository
                  value: '{#NAME}'
            - uuid: 882451efee0a4ce8aabc2d2f3955d0be
              name: 'Repository [{#NAME}] [{#TYPE}]: Free space [{#PATH}]'
              type: DEPENDENT
              key: 'veeam.repository.free.space[{#NAME}]'
              value_type: FLOAT
              units: '!GB'
              description: 'Free space of repositories expressed in gigabytes (GB).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.freeGB
              master_item:
                key: 'veeam.repositories.raw[{#NAME}]'
              tags:
                - tag: component
                  value: repositories
                - tag: repository
                  value: '{#NAME}'
          master_item:
            key: veeam.get.metrics
          lld_macro_paths:
            - lld_macro: '{#DESCRIPTION}'
              path: $.description
            - lld_macro: '{#HOSTID}'
              path: $.server.hostId
            - lld_macro: '{#HOSTNAME}'
              path: $.hostName
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#PATH}'
              path: $.path
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.repositories_states.data
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 06b4e666bede4d4b9f29ab7e94dcb442
          name: 'Sessions discovery'
          type: DEPENDENT
          key: veeam.sessions.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$SESSION.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$SESSION.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: '{$SESSION.TYPE.MATCHES}'
              - macro: '{#TYPE}'
                value: '{$SESSION.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of sessions.'
          item_prototypes:
            - uuid: 7224f41e5c614268bf6997ad8a49710b
              name: 'Session [{#NAME}] [{#TYPE}]: Message'
              type: DEPENDENT
              key: 'veeam.sessions.message[{#ID}]'
              value_type: TEXT
              description: 'A message that explains the session result.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.result.message
              master_item:
                key: 'veeam.sessions.raw[{#ID}]'
              tags:
                - tag: component
                  value: sessions
                - tag: creation-date
                  value: '{#CREATION.TIME}'
                - tag: session
                  value: '{#NAME}'
            - uuid: 3f449f47943b4877a32e89774712510f
              name: 'Session progress percent [{#NAME}] [{#TYPE}]'
              type: DEPENDENT
              key: 'veeam.sessions.progress.percent[{#ID}]'
              value_type: FLOAT
              units: '%'
              description: 'The progress of the session expressed as percentage.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.progressPercent
              master_item:
                key: 'veeam.sessions.raw[{#ID}]'
              tags:
                - tag: component
                  value: sessions
                - tag: creation-date
                  value: '{#CREATION.TIME}'
                - tag: session
                  value: '{#NAME}'
            - uuid: f82984e1180946c6b4bff1f46987555d
              name: 'Session [{#NAME}] [{#TYPE}]: Get data'
              type: DEPENDENT
              key: 'veeam.sessions.raw[{#ID}]'
              history: '0'
              value_type: TEXT
              description: 'Gets raw data from session with the name: `[{#NAME}]`, `[{#TYPE}]`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.sessions.data.[?(@.id==''{#ID}'')].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: veeam.get.metrics
              tags:
                - tag: component
                  value: raw
                - tag: session
                  value: '{#NAME}'
            - uuid: 5fb9dcb62bfe4d1dae94beefa329691d
              name: 'Session [{#NAME}] [{#TYPE}]: Result'
              type: DEPENDENT
              key: 'veeam.sessions.result[{#ID}]'
              value_type: TEXT
              description: 'The result of the session. The enums used: `None`, `Success`, `Warning`, `Failed`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.result.result
              master_item:
                key: 'veeam.sessions.raw[{#ID}]'
              tags:
                - tag: component
                  value: sessions
                - tag: creation-date
                  value: '{#CREATION.TIME}'
                - tag: session
                  value: '{#NAME}'
              trigger_prototypes:
                - uuid: eeb93a10f3d04eee819587c6fa4ce8f8
                  expression: 'find(/Veeam Backup and Replication by HTTP/veeam.sessions.result[{#ID}],,"like","Failed")=1'
                  name: 'Veeam Backup: Last result session failed'
                  event_name: 'Veeam Backup: Failed session [{#NAME}]'
                  priority: AVERAGE
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 8c7092e721eb4f8f8b53a07f0fb710a0
              name: 'Session [{#NAME}] [{#TYPE}]: State'
              type: DEPENDENT
              key: 'veeam.sessions.state[{#ID}]'
              value_type: TEXT
              description: 'The state of the session. The enums used: `Stopped`, `Starting`, `Stopping`, `Working`, `Pausing`, `Resuming`, `WaitingTape`, `Idle`, `Postprocessing`, `WaitingRepository`, `WaitingSlot`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.state
              master_item:
                key: 'veeam.sessions.raw[{#ID}]'
              tags:
                - tag: component
                  value: sessions
                - tag: creation-date
                  value: '{#CREATION.TIME}'
                - tag: session
                  value: '{#NAME}'
          master_item:
            key: veeam.get.metrics
          lld_macro_paths:
            - lld_macro: '{#CREATION.TIME}'
              path: $.creationTime
            - lld_macro: '{#END.TIME}'
              path: $.endTime
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#STATE}'
              path: $.state
            - lld_macro: '{#TYPE}'
              path: $.sessionType
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sessions.data
            - type: JAVASCRIPT
              parameters:
                - |
                  obj = JSON.parse(value, function (key, value) {
                  	if (key == 'creationTime') return new Date(value).toDateString();
                  	return value;
                  });
                  return JSON.stringify(obj);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: backup
        - tag: target
          value: veeam
      macros:
        - macro: '{$CREATED.AFTER}'
          value: '7'
          description: 'Returns sessions that are created after chosen days.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Created after'
            description: 'Returns sessions that are created after chosen days.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$JOB.NAME.MATCHES}'
          value: '.*'
          description: 'This macro is used in discovery rule to evaluate the states of jobs.'
          config:
            type: TEXT
            priority: '19'
            section_name: Filters
            label: 'Job name filter (include)'
            description: 'This macro is used in discovery rule to evaluate the states of jobs.'
        - macro: '{$JOB.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in discovery rule to evaluate the states of jobs.'
          config:
            type: TEXT
            priority: '20'
            section_name: Filters
            label: 'Job name filter (exclude)'
            description: 'This macro is used in discovery rule to evaluate the states of jobs.'
        - macro: '{$JOB.STATUS.MATCHES}'
          value: '.*'
          description: 'This macro is used in discovery rule to evaluate the states of jobs.'
          config:
            type: TEXT
            priority: '23'
            section_name: Filters
            label: 'Job status filter (include)'
            description: 'This macro is used in discovery rule to evaluate the states of jobs.'
        - macro: '{$JOB.STATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in discovery rule to evaluate the states of jobs.'
          config:
            type: TEXT
            priority: '24'
            section_name: Filters
            label: 'Job status filter (exclude)'
            description: 'This macro is used in discovery rule to evaluate the states of jobs.'
        - macro: '{$JOB.TYPE.MATCHES}'
          value: '.*'
          description: 'This macro is used in discovery rule to evaluate the states of jobs.'
          config:
            type: TEXT
            priority: '21'
            section_name: Filters
            label: 'Job type filter (include)'
            description: 'This macro is used in discovery rule to evaluate the states of jobs.'
        - macro: '{$JOB.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in discovery rule to evaluate the states of jobs.'
          config:
            type: TEXT
            priority: '22'
            section_name: Filters
            label: 'Job type filter (exclude)'
            description: 'This macro is used in discovery rule to evaluate the states of jobs.'
        - macro: '{$PROXIES.NAME.MATCHES}'
          value: '.*'
          description: 'This macro is used in proxies discovery rule.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Proxies name filter (include)'
            description: 'This macro is used in proxies discovery rule.'
        - macro: '{$PROXIES.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in proxies discovery rule.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Proxies name filter (exclude)'
            description: 'This macro is used in proxies discovery rule.'
        - macro: '{$PROXIES.TYPE.MATCHES}'
          value: '.*'
          description: 'This macro is used in proxies discovery rule.'
          config:
            type: TEXT
            priority: '13'
            section_name: Filters
            label: 'Proxies type filter (include)'
            description: 'This macro is used in proxies discovery rule.'
        - macro: '{$PROXIES.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in proxies discovery rule.'
          config:
            type: TEXT
            priority: '14'
            section_name: Filters
            label: 'Proxies type filter (exclude)'
            description: 'This macro is used in proxies discovery rule.'
        - macro: '{$REPOSITORIES.NAME.MATCHES}'
          value: '.*'
          description: 'This macro is used in repositories discovery rule.'
          config:
            type: TEXT
            priority: '15'
            section_name: Filters
            label: 'Repositories name filter (include)'
            description: 'This macro is used in repositories discovery rule.'
        - macro: '{$REPOSITORIES.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in repositories discovery rule.'
          config:
            type: TEXT
            priority: '16'
            section_name: Filters
            label: 'Repositories name filter (exclude)'
            description: 'This macro is used in repositories discovery rule.'
        - macro: '{$REPOSITORIES.TYPE.MATCHES}'
          value: '.*'
          description: 'This macro is used in repositories discovery rule.'
          config:
            type: TEXT
            priority: '17'
            section_name: Filters
            label: 'Repositories type filter (include)'
            description: 'This macro is used in repositories discovery rule.'
        - macro: '{$REPOSITORIES.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in repositories discovery rule.'
          config:
            type: TEXT
            priority: '18'
            section_name: Filters
            label: 'Repositories type filter (exclude)'
            description: 'This macro is used in repositories discovery rule.'
        - macro: '{$SESSION.NAME.MATCHES}'
          value: '.*'
          description: 'This macro is used in discovery rule to evaluate sessions.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Session name filter (include)'
            description: 'This macro is used in discovery rule to evaluate sessions.'
        - macro: '{$SESSION.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in discovery rule to evaluate sessions.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Session name filter (exclude)'
            description: 'This macro is used in discovery rule to evaluate sessions.'
        - macro: '{$SESSION.TYPE.MATCHES}'
          value: '.*'
          description: 'This macro is used in discovery rule to evaluate sessions.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Session type filter (include)'
            description: 'This macro is used in discovery rule to evaluate sessions.'
        - macro: '{$SESSION.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in discovery rule to evaluate sessions.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Session type filter (exclude)'
            description: 'This macro is used in discovery rule to evaluate sessions.'
        - macro: '{$VEEAM.API.URL}'
          value: 'https://localhost:9419'
          description: 'The Veeam API endpoint is a URL in the format `<scheme>://<host>:<port>`.'
          config:
            type: TEXT
            priority: '1'
            label: Address
            description: 'The Veeam API endpoint is a URL in the format `<scheme>://<host>:<port>`.'
            required: 'YES'
        - macro: '{$VEEAM.DATA.TIMEOUT}'
          value: '10'
          description: 'A response timeout for the API.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'API response timeout'
            description: 'A response timeout for the API.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VEEAM.HTTP.PROXY}'
          description: 'Sets the HTTP proxy to `http_proxy` value. If this parameter is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '2'
            section_name: Other
            label: Proxy
            description: 'Sets the HTTP proxy to `http_proxy` value. If this parameter is empty, then no proxy is used.'
        - macro: '{$VEEAM.PASSWORD}'
          type: SECRET_TEXT
          description: 'The `password` of the Veeam Backup and Replication account. It is used to obtain an access token.'
          config:
            type: TEXT
            priority: '3'
            label: Password
            description: 'The `password` of the Veeam Backup and Replication account. It is used to obtain an access token.'
            required: 'YES'
        - macro: '{$VEEAM.USER}'
          type: SECRET_TEXT
          description: 'The `username` of the Veeam Backup and Replication account. It is used to obtain an access token.'
          config:
            type: TEXT
            priority: '4'
            label: Username
            description: 'The `username` of the Veeam Backup and Replication account. It is used to obtain an access token.'
            required: 'YES'
    - uuid: 2526dce71d714e31bd545e96370c67b2
      template: 'Website by Browser'
      name: 'Website by Browser'
      description: |
        The template to monitor a website's availability and performance on the website by Browser.
        
        Zabbix server uses a web browser to perform navigation and collect performance metrics.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        
        
        ## Setup
        
        Install WebDriver.
        For more information, please refer to the [Selenium WebDriver](https://www.selenium.dev/documentation/webdriver/) page.
        Run selenium-server.
        Add in configuration file WebDriver interface HTTP[S] URL. For example http://localhost:4444
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: b5d5b396dfdc4fc99e4c2d0216728027
          name: 'Website {$WEBSITE.DOMAIN} Get data'
          type: BROWSER
          key: website.get.data
          delay: '{$WEBSITE.GET.DATA.INTERVAL}'
          history: '0'
          value_type: TEXT
          params: |
            const Website = {
                params: {},
            
                setParams(params) {
                    ['scheme', 'domain','width', 'height'].forEach(function (field) {
                        if (typeof params !== 'object' || !params[field]) {
                            throw new Error('Required param is not set: ' + field + '.');
                        }
                    });
                    this.params = params;
                },
            
                getOptions(browser) {
                    switch ((browser || '').trim().toLowerCase()) {
                        case 'firefox':
                            return Browser.firefoxOptions();
                        case 'safari':
                            return Browser.safariOptions();
                        case 'edge':
                            return Browser.edgeOptions();
                        default:
                            return Browser.chromeOptions();
                    }
                },
            
                getPerformance() {
                    const browser = new Browser(Website.getOptions(Website.params.browser));
                    const url = Website.params.scheme + '://' + Website.params.domain + '/' + Website.params.path
                    const screenshot = '';
                    browser.setScreenSize(Number(Website.params.width), Number(Website.params.height))
                    browser.navigate(url);
                    browser.collectPerfEntries();
                    screenshot = browser.getScreenshot();
                    const result = browser.getResult();
                    result.screenshot = screenshot;
            
                    return JSON.stringify(result);
                }
            };
            
            try {
                Website.setParams(JSON.parse(value));
                return Website.getPerformance();
            
            } catch (error) {
                error += (String(error).endsWith('.')) ? '' : '.';
                Zabbix.log(3, '[ Website get metrics] ERROR: ' + error);
                return JSON.stringify({ 'error': error });
            }
          description: 'Returns the JSON with performance counters of the requested website.'
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
          parameters:
            - name: browser
              value: '{$WEBSITE.BROWSER}'
            - name: domain
              value: '{$WEBSITE.DOMAIN}'
            - name: height
              value: '{$WEBSITE.SCREEN.HEIGHT}'
            - name: path
              value: '{$WEBSITE.PATH}'
            - name: scheme
              value: '{$WEBSITE.SCHEME}'
            - name: width
              value: '{$WEBSITE.SCREEN.WIDTH}'
          tags:
            - tag: component
              value: raw
        - uuid: 0de3b06fb406427499b0d4831774b540
          name: 'Get metrics check'
          type: DEPENDENT
          key: website.metrics.check
          value_type: CHAR
          description: 'Check that the performance counters of the requested website data has been received correctly.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 56970ddca5b94afdb2186741edd85362
              expression: 'length(last(/Website by Browser/website.metrics.check))>0'
              name: 'Website by Browser: Failed to get metrics data'
              event_name: 'Website by Browser: Failed to get JSON of the requested website ''{$WEBSITE.DOMAIN}'''
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Failed to get JSON with performance counters of the requested website ''{$WEBSITE.DOMAIN}''.'
              tags:
                - tag: scope
                  value: availability
        - uuid: d96d4723a8e34393bf4e3e2973eafc48
          name: 'Website {$WEBSITE.DOMAIN} Navigation DNS lookup time'
          type: DEPENDENT
          key: website.navigation.dns_lookup_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent on DNS lookup (domainLookupEnd - domainLookupStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.dns_lookup_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 760e0d852a924648a8f75bb24b888445
          name: 'Website {$WEBSITE.DOMAIN} Navigation domContentLoaded time'
          type: DEPENDENT
          key: website.navigation.dom_content_loaded_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent on DOM content loading (domContentLoadedEventEnd - domContentLoadedEventStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.dom_content_loading_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 6056b72c640a4560b90ee49df1e66171
          name: 'Website {$WEBSITE.DOMAIN} Navigation encodedBody size'
          type: DEPENDENT
          key: website.navigation.encoded_size
          value_type: FLOAT
          trends: '0'
          units: B
          description: 'Measuring of encoded size (encodedBodySize).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.encoded_size
              error_handler: DISCARD_VALUE
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: cc0e03d92cb34298a952b06f7185efd6
          name: 'Website {$WEBSITE.DOMAIN} Navigation load event time'
          type: DEPENDENT
          key: website.navigation.load_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of load finished time (loadEventEnd).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.load_finished
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
          triggers:
            - uuid: a2d63bfe681848fdb984f3b579262086
              expression: 'last(/Website by Browser/website.navigation.load_time)>{$WEBSITE.NAVIGATION.LOAD.MAX.WARN}'
              name: 'Website by Browser: Website navigation load event time is too slow'
              event_name: 'Website by Browser: Website {$WEBSITE.DOMAIN} navigation load event time > {$WEBSITE.NAVIGATION.LOAD.MAX.WARN}'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Website by Browser: Failed to get metrics data'
                  expression: 'length(last(/Website by Browser/website.metrics.check))>0'
              tags:
                - tag: scope
                  value: notice
        - uuid: 12d8df72ebfc493d90f4b47773e4101e
          name: 'Website {$WEBSITE.DOMAIN} Navigation request time'
          type: DEPENDENT
          key: website.navigation.request_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spend on the request (responseStart - requestStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.request_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 326c2f6a5d0340418a7d2f4416477fd4
          name: 'Website {$WEBSITE.DOMAIN} Navigation resource fetch time'
          type: DEPENDENT
          key: website.navigation.resource_fetch_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent to fetch the resource (without redirects) (responseEnd - fetchStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.resource_fetch_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 37d268e1ba1c42e98eeb1717e92d7c17
          name: 'Website {$WEBSITE.DOMAIN} Navigation response time'
          type: DEPENDENT
          key: website.navigation.response_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spend on the response (responseEnd - responseStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.response_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 35487bbb10ab47fe9d210cf1d4c0695d
          name: 'Website {$WEBSITE.DOMAIN} Navigation service worker processing time'
          type: DEPENDENT
          key: website.navigation.service_worker_processing_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of sum of time spend on browser''s service worker processing (fetchStart - workerStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.service_worker_processing_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 5adf88f1c63145bfb544a6e590b1b8ce
          name: 'Website {$WEBSITE.DOMAIN} Navigation TCP handshake time'
          type: DEPENDENT
          key: website.navigation.tcp_handshake_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent on TCP handshake (connectEnd - connectStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.tcp_handshake_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 34663a973a5d4b22a841d6a751dbe09c
          name: 'Website {$WEBSITE.DOMAIN} Navigation TLS negotiation time'
          type: DEPENDENT
          key: website.navigation.tls_negotiation_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent on TLS negotiation (requestStart - secureConnectionStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.tls_negotiation_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: ae62ce5db2054f40ac7e281437d38f53
          name: 'Website {$WEBSITE.DOMAIN} Navigation decodedBody size'
          type: DEPENDENT
          key: website.navigation.total_size
          value_type: FLOAT
          trends: '0'
          units: B
          description: 'Measuring of total size (decodedBodySize).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.total_size
              error_handler: DISCARD_VALUE
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 7c1d1abd30b445d69f3b73ff4a1ba356
          name: 'Website {$WEBSITE.DOMAIN} Navigation transfer size'
          type: DEPENDENT
          key: website.navigation.transferred_size
          value_type: FLOAT
          trends: '0'
          units: B
          description: 'Measuring of transferred size (transferSize).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.navigation.transferred_size
              error_handler: DISCARD_VALUE
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: navigation
        - uuid: 3557ae18d19e49839fb3012e79949b49
          name: 'Website {$WEBSITE.DOMAIN} Resource DNS lookup time'
          type: DEPENDENT
          key: website.resource.dns_lookup_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent on DNS lookup (domainLookupEnd - domainLookupStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.dns_lookup_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: 6e29d13df9d94b22b84c3522ea451917
          name: 'Website {$WEBSITE.DOMAIN} Resource domContentLoaded time'
          type: DEPENDENT
          key: website.resource.dom_content_loaded_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent on DOM content loading (domContentLoadedEventEnd - domContentLoadedEventStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.dom_content_loading_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: 09a5ead05ce64371aa731cf566b9b0f9
          name: 'Website {$WEBSITE.DOMAIN} Resource encodedBody size'
          type: DEPENDENT
          key: website.resource.encoded_size
          value_type: FLOAT
          trends: '0'
          units: B
          description: 'Measuring of encoded size (encodedBodySize).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.encoded_size
              error_handler: DISCARD_VALUE
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: 8e051253fc8c46aa9da009cb022d9023
          name: 'Website {$WEBSITE.DOMAIN} Resource fetch time'
          type: DEPENDENT
          key: website.resource.fetch_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent to fetch the resource (without redirects) (responseEnd - fetchStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.resource_fetch_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: fa84484786754da7b68a9ec3c50d63c4
          name: 'Website {$WEBSITE.DOMAIN} Resource load event time'
          type: DEPENDENT
          key: website.resource.load_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of load finished time (loadEventEnd).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.load_finished
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
          triggers:
            - uuid: 1f7fbe56f5bf49468fb597a2ff986cd7
              expression: 'last(/Website by Browser/website.resource.load_time)>{$WEBSITE.RESOURCE.LOAD.MAX.WARN}'
              name: 'Website by Browser: Website resource load event time is too slow'
              event_name: 'Website by Browser: Website {$WEBSITE.DOMAIN} resource load event time > ''{$WEBSITE.RESOURCE.LOAD.MAX.WARN}'''
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              dependencies:
                - name: 'Website by Browser: Failed to get metrics data'
                  expression: 'length(last(/Website by Browser/website.metrics.check))>0'
              tags:
                - tag: scope
                  value: notice
        - uuid: a53c136efe8141028f09cc1ca8277c10
          name: 'Website {$WEBSITE.DOMAIN} Resource request time'
          type: DEPENDENT
          key: website.resource.request_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spend on the request (responseStart - requestStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.request_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: f99d69f39c404d5a94cf00a96a3f0701
          name: 'Website {$WEBSITE.DOMAIN} Resource response time'
          type: DEPENDENT
          key: website.resource.response_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spend on the response (responseEnd - responseStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.response_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: b2199d4d0cc146aeb268e41fe65ca7ac
          name: 'Website {$WEBSITE.DOMAIN} Resource service worker processing time'
          type: DEPENDENT
          key: website.resource.service_worker_processing_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of sum of time spend on browser''s service worker processing (fetchStart - workerStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.service_worker_processing_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: 5b57473fffbf45d5bc3ca33e903e0b35
          name: 'Website {$WEBSITE.DOMAIN} Resource TCP handshake time'
          type: DEPENDENT
          key: website.resource.tcp_handshake_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent on TCP handshake (connectEnd - connectStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.tcp_handshake_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: 61071f340c6b47f2ac05fbd15e393dd3
          name: 'Website {$WEBSITE.DOMAIN} Resource TLS negotiation time'
          type: DEPENDENT
          key: website.resource.tls_negotiation_time
          value_type: FLOAT
          trends: '0'
          units: s
          description: 'Measuring of time spent on TLS negotiation (requestStart - secureConnectionStart).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.tls_negotiation_time
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '0.001'
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: 479d7c890adf46ac88e11a146f193f56
          name: 'Website {$WEBSITE.DOMAIN} Resource decodedBody size'
          type: DEPENDENT
          key: website.resource.total_size
          value_type: FLOAT
          trends: '0'
          units: B
          description: 'Measuring of total size (decodedBodySize).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.total_size
              error_handler: DISCARD_VALUE
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: 6b98ca6df6894be29b4ab7c645cac92d
          name: 'Website {$WEBSITE.DOMAIN} Resource transfer size'
          type: DEPENDENT
          key: website.resource.transferred_size
          value_type: FLOAT
          trends: '0'
          units: B
          description: 'Measuring of transferred size (transferSize).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.performance_data.summary.resource.transferred_size
              error_handler: DISCARD_VALUE
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
            - tag: performance
              value: resource
        - uuid: 931d98f67f9f45069711558083f40d33
          name: 'Website {$WEBSITE.DOMAIN} Screenshot'
          type: DEPENDENT
          key: website.screenshot
          value_type: BINARY
          description: 'Website {$WEBSITE.DOMAIN} screenshot.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.screenshot
              error_handler: DISCARD_VALUE
          master_item:
            key: website.get.data
          tags:
            - tag: component
              value: application
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: monitoring
        - tag: target
          value: browser
      macros:
        - macro: '{$WEBSITE.BROWSER}'
          value: chrome
          description: 'Browser to be used for data collection.'
          config:
            type: TEXT
            priority: '1'
            label: Browser
            description: 'Browser to be used for data collection.'
            required: 'YES'
        - macro: '{$WEBSITE.DOMAIN}'
          value: www.example.com
          description: 'The domain name.'
          config:
            type: TEXT
            priority: '2'
            label: Domain
            description: 'The domain name.'
            required: 'YES'
        - macro: '{$WEBSITE.GET.DATA.INTERVAL}'
          value: 0s;m/15
          description: 'Update interval for get raw data item.'
          config:
            type: TEXT
            priority: '9'
            section_name: Other
            label: 'Update interval'
            description: 'Update interval for get raw data item.'
        - macro: '{$WEBSITE.NAVIGATION.LOAD.MAX.WARN}'
          value: '5'
          description: 'The maximum browser response time expressed in seconds for a trigger expression.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Website navigation load maximum (warning)'
            description: 'The maximum browser response time expressed in seconds for a trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$WEBSITE.PATH}'
          description: 'The path to resource.'
          config:
            type: TEXT
            priority: '3'
            label: Path
            description: 'The path to resource.'
            required: 'YES'
        - macro: '{$WEBSITE.RESOURCE.LOAD.MAX.WARN}'
          value: '5'
          description: 'The maximum browser response time expressed in seconds for a trigger expression.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Website resource load maximum (warning)'
            description: 'The maximum browser response time expressed in seconds for a trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$WEBSITE.SCHEME}'
          value: https
          description: 'The request scheme, which may be either HTTP or HTTPS.'
          config:
            type: LIST
            priority: '4'
            label: Scheme
            description: 'The request scheme, which may be either HTTP or HTTPS.'
            required: 'YES'
            options:
              - value: http
                text: http
              - value: https
                text: https
        - macro: '{$WEBSITE.SCREEN.HEIGHT}'
          value: '1080'
          description: 'Screen size height in pixels, used for screenshot.'
          config:
            type: TEXT
            priority: '6'
            label: Height
            description: 'Screen size height in pixels, used for screenshot.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$WEBSITE.SCREEN.WIDTH}'
          value: '1920'
          description: 'Screen size width in pixels, used for screenshot.'
          config:
            type: TEXT
            priority: '5'
            label: Width
            description: 'Screen size width in pixels, used for screenshot.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 5afcfa0ecebd40d9a8fe16491ea7615e
          name: 'Website overview'
          pages:
            - name: Screenshots
              widgets:
                - type: itemhistory
                  name: Screenshots
                  width: '16'
                  height: '10'
                  hide_header: 'YES'
                  fields:
                    - type: ITEM
                      name: columns.0.itemid
                      value:
                        host: 'Website by Browser'
                        key: website.screenshot
                    - type: STRING
                      name: columns.0.name
                      value: Screenshot
                    - type: INTEGER
                      name: columns.0.show_thumbnail
                      value: '1'
                    - type: INTEGER
                      name: layout
                      value: '1'
                    - type: STRING
                      name: reference
                      value: MBTYI
                    - type: INTEGER
                      name: show_timestamp
                      value: '1'
                - type: svggraph
                  name: 'Load time'
                  x: '16'
                  width: '28'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: ds.0.fill
                      value: '4'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation load event time'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: ds.1.axisy
                      value: '1'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '4'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Resource load event time'
                    - type: INTEGER
                      name: ds.1.missingdatafunc
                      value: '1'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: OVVDR
                    - type: INTEGER
                      name: severities.0
                      value: '2'
                    - type: INTEGER
                      name: severities.1
                      value: '3'
                    - type: INTEGER
                      name: severities.2
                      value: '4'
                    - type: INTEGER
                      name: severities.3
                      value: '5'
                    - type: INTEGER
                      name: show_problems
                      value: '1'
                - type: svggraph
                  name: 'Navigation timing'
                  x: '16'
                  'y': '5'
                  width: '28'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: FF7043
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation resource fetch time'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation DNS lookup time'
                    - type: STRING
                      name: ds.2.color
                      value: 546E7A
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation TCP handshake time'
                    - type: STRING
                      name: ds.3.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation TLS negotiation time'
                    - type: STRING
                      name: ds.4.color
                      value: 3949AB
                    - type: STRING
                      name: ds.4.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation request time'
                    - type: STRING
                      name: ds.5.color
                      value: 388E3C
                    - type: STRING
                      name: ds.5.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation response time'
                    - type: STRING
                      name: reference
                      value: FBLXC
                - type: svggraph
                  name: 'Navigation size'
                  x: '44'
                  width: '28'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '666699'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation decodedBody size'
                    - type: INTEGER
                      name: ds.0.type
                      value: '3'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation encodedBody size'
                    - type: INTEGER
                      name: ds.1.type
                      value: '3'
                    - type: STRING
                      name: ds.2.color
                      value: 0EC9AC
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Navigation transfer size'
                    - type: INTEGER
                      name: ds.2.type
                      value: '3'
                    - type: STRING
                      name: reference
                      value: PXXYQ
                    - type: INTEGER
                      name: severities.0
                      value: '2'
                    - type: INTEGER
                      name: severities.1
                      value: '3'
                    - type: INTEGER
                      name: severities.2
                      value: '4'
                    - type: INTEGER
                      name: severities.3
                      value: '5'
                    - type: INTEGER
                      name: show_problems
                      value: '1'
                - type: svggraph
                  name: 'Resource timing'
                  x: '44'
                  'y': '5'
                  width: '28'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: FF8000
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Resource resource fetch time'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Resource DNS lookup time'
                    - type: STRING
                      name: ds.2.color
                      value: FFD54F
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Resource TCP handshake time'
                    - type: STRING
                      name: ds.3.color
                      value: 0EC9AC
                    - type: STRING
                      name: ds.3.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Resource TLS negotiation time'
                    - type: STRING
                      name: ds.4.color
                      value: 524BBC
                    - type: STRING
                      name: ds.4.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Resource request time'
                    - type: STRING
                      name: ds.5.color
                      value: ED1248
                    - type: STRING
                      name: ds.5.items.0
                      value: 'Website {$WEBSITE.DOMAIN} Resource response time'
                    - type: STRING
                      name: reference
                      value: ZLUHM
  triggers:
    - 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) and last(/Generic Java JMX/jmx["java.lang:type=Memory","HeapMemoryUsage.max"])>0'
      name: 'Generic Java JMX: Memory: Heap memory usage is high'
      event_name: 'Generic Java JMX: Memory: Heap memory usage more than {$JMX.HEAP.USAGE.MAX}% for {$JMX.HEAP.MEM.USAGE.TIME}'
      priority: WARNING
      tags:
        - tag: scope
          value: capacity
    - 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) and last(/Generic Java JMX/jmx["java.lang:type=Memory","NonHeapMemoryUsage.max"])>0'
      name: 'Generic Java JMX: Memory: Non-Heap memory usage is high'
      event_name: 'Generic Java JMX: Memory: Non-Heap memory usage more than {$JMX.NONHEAP.MEM.USAGE.MAX}% for {$JMX.NONHEAP.MEM.USAGE.TIME}'
      priority: WARNING
      tags:
        - tag: scope
          value: capacity
    - 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: 'Generic Java JMX: OperatingSystem: Opened file descriptor count is high'
      event_name: 'Generic Java JMX: OperatingSystem: Opened file descriptor count more than {$JMX.FILE.DESCRIPTORS.MAX}% of maximum'
      priority: WARNING
      tags:
        - tag: scope
          value: capacity
    - uuid: 7dd529ec3f1a4a59846a3a76536a7fa0
      expression: '(last(/IBM IMM by SNMP/system.hw.uptime[hrSystemUptime.0])>0 and last(/IBM IMM by SNMP/system.hw.uptime[hrSystemUptime.0])<10m) or (last(/IBM IMM by SNMP/system.hw.uptime[hrSystemUptime.0])=0 and last(/IBM IMM by SNMP/system.net.uptime[sysUpTime.0])<10m)'
      name: 'IBM IMM: Host has been restarted'
      event_name: 'IBM IMM: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: WARNING
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      dependencies:
        - name: 'IBM IMM: No SNMP data collection'
          expression: 'max(/IBM IMM by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
      tags:
        - tag: scope
          value: notice
    - uuid: e6129a8ace1945fa9020c6c0008cb19c
      expression: 'min(/Memcached by Zabbix agent 2/memcached.stats.bytes,5m)/last(/Memcached by Zabbix agent 2/memcached.config.limit_maxbytes)*100>{$MEMCACHED.MEM.PUSED.MAX.WARN}'
      name: 'Memcached: Memory usage is too high'
      event_name: 'Memcached: Memory usage is too high (over {$MEMCACHED.MEM.PUSED.MAX.WARN} in 5m)'
      priority: WARNING
      tags:
        - tag: scope
          value: capacity
    - uuid: 61021d383c9f41b990292bab2738356d
      expression: 'min(/Memcached by Zabbix agent 2/memcached.connections.current,5m)/last(/Memcached by Zabbix agent 2/memcached.connections.max)*100>{$MEMCACHED.CONN.PRC.MAX.WARN}'
      name: 'Memcached: Total number of connected clients is too high'
      event_name: 'Memcached: Total number of connected clients is too high (over {$MEMCACHED.CONN.PRC.MAX.WARN}% in 5m)'
      priority: WARNING
      description: 'When the number of connections reaches the value of the "max_connections" parameter, new connections will be rejected.'
      tags:
        - tag: scope
          value: capacity
    - uuid: 89a1cfe0f02f4da880f197c2e5605db8
      expression: 'avg(/Squid by SNMP/squid[cacheSysPageFaults],5m)>avg(/Squid by SNMP/squid[cacheProtoClientHttpRequests],5m)/100*{$SQUID.PAGE.FAULT.WARN}'
      name: 'Squid: High sys page faults rate'
      event_name: 'Squid: High sys page faults rate (>{$SQUID.PAGE.FAULT.WARN}% of received HTTP requests)'
      priority: WARNING
      tags:
        - tag: scope
          value: performance
    - uuid: 5676f1e02dc7413fb1a34543ccaf1384
      expression: 'last(/Squid by SNMP/squid[cacheCurrentSwapSize])>last(/Squid by SNMP/squid[cacheSwapHighWM])*last(/Squid by SNMP/squid[cacheSwapMaxSize])/100'
      name: 'Squid: Swap usage is more than high watermark'
      event_name: 'Squid: Swap usage is more than high watermark (>{ITEM.VALUE2}%)'
      opdata: 'Used: {ITEM.LASTVALUE1}'
      priority: HIGH
      tags:
        - tag: scope
          value: capacity
        - tag: scope
          value: performance
    - uuid: 2cf87472ebf74239bb782580448f696c
      expression: 'last(/Squid by SNMP/squid[cacheCurrentSwapSize])>last(/Squid by SNMP/squid[cacheSwapLowWM])*last(/Squid by SNMP/squid[cacheSwapMaxSize])/100'
      name: 'Squid: Swap usage is more than low watermark'
      event_name: 'Squid: Swap usage is more than low watermark (>{ITEM.VALUE2}%)'
      opdata: 'Used: {ITEM.LASTVALUE1}'
      priority: WARNING
      tags:
        - tag: scope
          value: capacity
        - tag: scope
          value: performance
  graphs:
    - uuid: a3a5bc3b07f34793bb1c8cfc688ba8a9
      name: 'AIX: CPU jumps'
      graph_items:
        - color: 199C0D
          item:
            host: 'AIX by Zabbix agent'
            key: system.cpu.switches
        - sortorder: '1'
          color: F63100
          item:
            host: 'AIX by Zabbix agent'
            key: system.cpu.intr
    - uuid: 260417d4613d405986406c272f54a5aa
      name: 'AIX: CPU load'
      graph_items:
        - color: 199C0D
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.cpu.load[percpu,avg1]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.cpu.load[percpu,avg5]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.cpu.load[percpu,avg15]'
    - uuid: a2eeb8269edf4de7ac13b7ceb1260b75
      name: 'AIX: CPU utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.stat[cpu,ec]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.stat[cpu,pc]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.stat[cpu,wa]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.stat[cpu,sy]'
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.stat[cpu,us]'
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'AIX by Zabbix agent'
            key: 'system.stat[cpu,id]'
    - uuid: 2664343cd69444e0a16850083845838f
      name: 'AIX: Memory usage'
      graph_items:
        - color: 199C0D
          item:
            host: 'AIX by Zabbix agent'
            key: 'vm.memory.size[available]'
    - uuid: dfc5334e77ce45d286145cc08d036f38
      name: 'Apache: Requests per second'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Apache by Zabbix agent'
            key: apache.requests.rate
    - uuid: 3461ebdbfb024405a8e8da6c3e970d0d
      name: 'Apache: Requests per second'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.requests.rate
    - uuid: 6f646e8c11b04e8a835b81bc17824593
      name: 'Apache: Worker states'
      graph_items:
        - color: 199C0D
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.dnslookup
        - sortorder: '1'
          color: F63100
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.cleanup
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.logging
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.reading
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.sending
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.starting
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.closing
        - sortorder: '7'
          color: BA2A5D
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.finishing
        - sortorder: '8'
          color: F230E0
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.keepalive
        - sortorder: '9'
          color: 5CCD18
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.slot
        - sortorder: '10'
          color: BB2A02
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers.waiting
    - uuid: 0183d7d9c05843b19db5b4ba94f99350
      name: 'Apache: Worker states'
      graph_items:
        - color: 199C0D
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.dnslookup
        - sortorder: '1'
          color: F63100
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.cleanup
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.logging
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.reading
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.sending
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.starting
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.closing
        - sortorder: '7'
          color: BA2A5D
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.finishing
        - sortorder: '8'
          color: F230E0
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.keepalive
        - sortorder: '9'
          color: 5CCD18
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.slot
        - sortorder: '10'
          color: BB2A02
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers.waiting
    - uuid: 121c2d4feb0b4b53b027f1566107ab29
      name: 'Apache: Workers total'
      type: STACKED
      graph_items:
        - color: 199C0D
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers_total.busy
        - sortorder: '1'
          color: F63100
          item:
            host: 'Apache by Zabbix agent'
            key: apache.workers_total.idle
    - uuid: c82c849b07564ca29e58df3b984c1da9
      name: 'Apache: Workers total'
      type: STACKED
      graph_items:
        - color: 199C0D
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers_total.busy
        - sortorder: '1'
          color: F63100
          item:
            host: 'Apache by Zabbix agent active'
            key: apache.workers_total.idle
    - uuid: 69184fc10a914cc78637625cc6cc554c
      name: 'ClassLoading: Class Loader'
      graph_items:
        - color: 199C0D
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=ClassLoading","TotalLoadedClassCount"]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=ClassLoading","UnloadedClassCount"]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=ClassLoading","LoadedClassCount"]'
    - uuid: 3ed928729f2d41139a42ca3ee0204551
      name: 'FreeBSD: CPU jumps'
      graph_items:
        - color: '009900'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: system.cpu.switches
        - sortorder: '1'
          color: '000099'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: system.cpu.intr
    - uuid: ac8b187522904c0880ea16a2b8727dfc
      name: 'FreeBSD: CPU load'
      ymin_type_1: FIXED
      graph_items:
        - color: '009900'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.cpu.load[percpu,avg1]'
        - sortorder: '1'
          color: '000099'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.cpu.load[percpu,avg5]'
        - sortorder: '2'
          color: '990000'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.cpu.load[percpu,avg15]'
    - uuid: ecdccd78d75d4255948995b510acfefb
      name: 'FreeBSD: CPU utilization'
      show_triggers: 'NO'
      type: STACKED
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - color: '009999'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.cpu.util[,interrupt]'
        - sortorder: '1'
          color: '990099'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.cpu.util[,nice]'
        - sortorder: '2'
          color: '990000'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.cpu.util[,system]'
        - sortorder: '3'
          color: '000099'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.cpu.util[,user]'
        - sortorder: '4'
          color: '009900'
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.cpu.util[,idle]'
    - uuid: 191f6c7b63204fd091d2e82c4f4b678a
      name: 'FreeBSD: Memory usage'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 00C800
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'vm.memory.size[available]'
    - uuid: 23ade54acd87415080578379ab2cca6b
      name: 'FreeBSD: Swap usage'
      width: '600'
      height: '340'
      show_work_period: 'NO'
      show_triggers: 'NO'
      type: PIE
      show_3d: 'YES'
      graph_items:
        - color: AA0000
          type: GRAPH_SUM
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.swap.size[,total]'
        - sortorder: '1'
          color: 00AA00
          item:
            host: 'FreeBSD by Zabbix agent'
            key: 'system.swap.size[,free]'
    - uuid: 3a0454724c9a444cbeb3ad0da2a3a560
      name: 'IIS: Cache hits percentage'
      type: STACKED
      graph_items:
        - color: 199C0D
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service Cache\URI Cache Hits %"]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service Cache\File Cache Hits %"]'
    - uuid: e3b3f8f973204070a37b9eb861e2a079
      name: 'IIS: Cache hits percentage'
      type: STACKED
      graph_items:
        - color: 199C0D
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service Cache\URI Cache Hits %"]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service Cache\File Cache Hits %"]'
    - uuid: 4a0a6a0b83f34a88aa753206227304da
      name: 'IIS: Cache misses'
      graph_items:
        - color: 199C0D
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service Cache\URI Cache Misses"]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service Cache\File Cache Misses"]'
    - uuid: 2ac5f3ee169b4e79ad6f08e4dffbffeb
      name: 'IIS: Cache misses'
      graph_items:
        - color: 199C0D
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service Cache\URI Cache Misses"]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service Cache\File Cache Misses"]'
    - uuid: 16cfe68447114012bd93fef6dac80be9
      name: 'IIS: Requests rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service(_Total)\Total Method Requests/Sec", 60]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service(_Total)\Other Request Methods/Sec", 60]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service(_Total)\Get Requests/Sec", 60]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service(_Total)\Post Requests/Sec", 60]'
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service(_Total)\Put Requests/Sec", 60]'
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service(_Total)\Delete Requests/Sec", 60]'
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service(_Total)\Head Requests/Sec", 60]'
        - sortorder: '7'
          color: BA2A5D
          item:
            host: 'IIS by Zabbix agent'
            key: 'perf_counter_en["\Web Service(_Total)\Trace Requests/Sec", 60]'
    - uuid: 4c488d9247ca49ac8b33d655ccbca2b3
      name: 'IIS: Requests rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service(_Total)\Total Method Requests/Sec", 60]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service(_Total)\Other Request Methods/Sec", 60]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service(_Total)\Get Requests/Sec", 60]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service(_Total)\Post Requests/Sec", 60]'
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service(_Total)\Put Requests/Sec", 60]'
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service(_Total)\Delete Requests/Sec", 60]'
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service(_Total)\Head Requests/Sec", 60]'
        - sortorder: '7'
          color: BA2A5D
          item:
            host: 'IIS by Zabbix agent active'
            key: 'perf_counter_en["\Web Service(_Total)\Trace Requests/Sec", 60]'
    - uuid: dd6b62b969594ddbb82895a8f8fc5623
      name: 'InfluxDB: Tasks runs'
      graph_items:
        - color: 199C0D
          item:
            host: 'InfluxDB by HTTP'
            key: influxdb.task_executor_complete.failed.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'InfluxDB by HTTP'
            key: influxdb.task_executor_complete.successful.rate
    - uuid: f0e648fb4c5345748b11a7bdb05f6526
      name: 'macOS: CPU load'
      ymin_type_1: FIXED
      graph_items:
        - color: '009900'
          item:
            host: 'macOS by Zabbix agent'
            key: 'system.cpu.load[percpu,avg1]'
        - sortorder: '1'
          color: '000099'
          item:
            host: 'macOS by Zabbix agent'
            key: 'system.cpu.load[percpu,avg5]'
        - sortorder: '2'
          color: '990000'
          item:
            host: 'macOS by Zabbix agent'
            key: 'system.cpu.load[percpu,avg15]'
    - uuid: 5c942cb1fe5b440aa9428d45ee85e09c
      name: 'macOS: Memory usage'
      ymin_type_1: FIXED
      ymax_type_1: ITEM
      ymax_item_1:
        host: 'macOS by Zabbix agent'
        key: 'vm.memory.size[total]'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 00C800
          item:
            host: 'macOS by Zabbix agent'
            key: 'vm.memory.size[available]'
    - uuid: 5c4b08f992c541dbb02835bbd4f0a55e
      name: 'macOS: Network traffic on en0'
      ymin_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 00AA00
          item:
            host: 'macOS by Zabbix agent'
            key: 'net.if.in[en0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: 3333FF
          item:
            host: 'macOS by Zabbix agent'
            key: 'net.if.out[en0]'
    - uuid: 72cf2b87802c4eeca5411946e6b1a29b
      name: 'Memcached: Commands'
      graph_items:
        - color: 199C0D
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.commands.flush.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.commands.set.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.commands.get.rate
    - uuid: 3d738b083ce04ffa8d4bd9bf2e394f6a
      name: 'Memcached: Connections'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.connections.max
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.connections.current
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.connections.structures
    - uuid: 195f209046ba426c9e57c6a317c76ef4
      name: 'Memcached: Connections rate'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.connections.rate
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.connections.throttled.rate
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: 00611C
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.connections.queued.rate
    - uuid: 8ace604110bf4a4d9eb7a4b6add0492d
      name: 'Memcached: Keyspace'
      graph_items:
        - color: 199C0D
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.stats.hits.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.stats.misses.rate
    - uuid: bb6305e9a84749669433e53cd2b7b8b8
      name: 'Memcached: Network'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.stats.bytes_read.rate
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.stats.bytes_written.rate
    - uuid: 599a96c18e214610a41afadef8f11e11
      name: 'Memcached: Uptime'
      graph_items:
        - color: 199C0D
          item:
            host: 'Memcached by Zabbix agent 2'
            key: memcached.uptime
    - uuid: 47dd0ffded994286a6110082c1693433
      name: 'MS Exchange [Client Access Server]: Request rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'Microsoft Exchange Server 2016 by Zabbix agent'
            key: 'perf_counter_en["\MSExchange ActiveSync\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Microsoft Exchange Server 2016 by Zabbix agent'
            key: 'perf_counter_en["\MSExchange Availability Service\Availability Requests (sec)", {$MS.EXCHANGE.PERF.INTERVAL}]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Microsoft Exchange Server 2016 by Zabbix agent'
            key: 'perf_counter_en["\MSExchange OWA\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Microsoft Exchange Server 2016 by Zabbix agent'
            key: 'perf_counter_en["\MSExchangeWS\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
    - uuid: d1e720c28aba4d48a522d509bdd7d324
      name: 'MS Exchange [Client Access Server]: Request rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
            key: 'perf_counter_en["\MSExchange ActiveSync\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
            key: 'perf_counter_en["\MSExchange Availability Service\Availability Requests (sec)", {$MS.EXCHANGE.PERF.INTERVAL}]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
            key: 'perf_counter_en["\MSExchange OWA\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Microsoft Exchange Server 2016 by Zabbix agent active'
            key: 'perf_counter_en["\MSExchangeWS\Requests/sec", {$MS.EXCHANGE.PERF.INTERVAL}]'
    - uuid: 5321b82a5beb4688b29f369acd0191c1
      name: 'Nginx: Connections by state'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'Nginx by Zabbix agent active'
            key: nginx.connections.active
        - sortorder: '1'
          color: F63100
          item:
            host: 'Nginx by Zabbix agent active'
            key: nginx.connections.waiting
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Nginx by Zabbix agent active'
            key: nginx.connections.writing
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Nginx by Zabbix agent active'
            key: nginx.connections.reading
    - uuid: 993c7b78c337451992a048be7ed028e4
      name: 'Nginx: Connections per second'
      graph_items:
        - color: 199C0D
          item:
            host: 'Nginx by Zabbix agent active'
            key: nginx.connections.accepted.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Nginx by Zabbix agent active'
            key: nginx.connections.handled.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Nginx by Zabbix agent active'
            key: nginx.connections.dropped.rate
    - uuid: d22b45b11f2746ae8a26b54417a67424
      name: 'Nginx: Requests per second'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Nginx by Zabbix agent active'
            key: nginx.requests.total.rate
    - uuid: 39c14cff77694bddb836b63609d9ae92
      name: 'OperatingSystem: File Descriptors'
      graph_items:
        - color: 199C0D
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=OperatingSystem","MaxFileDescriptorCount"]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=OperatingSystem","OpenFileDescriptorCount"]'
    - uuid: c373d777570a42fda3cea03d24bed67f
      name: 'Performance Navigation Timing'
      graph_items:
        - color: 199C0D
          item:
            host: 'Website by Browser'
            key: website.navigation.dns_lookup_time
        - sortorder: '1'
          color: F63100
          item:
            host: 'Website by Browser'
            key: website.navigation.tcp_handshake_time
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Website by Browser'
            key: website.navigation.tls_negotiation_time
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Website by Browser'
            key: website.navigation.dom_content_loaded_time
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Website by Browser'
            key: website.navigation.resource_fetch_time
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'Website by Browser'
            key: website.navigation.service_worker_processing_time
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'Website by Browser'
            key: website.navigation.request_time
        - sortorder: '7'
          color: BA2A5D
          item:
            host: 'Website by Browser'
            key: website.navigation.response_time
    - uuid: 3301237b56ea455b8e1344bb467d11b0
      name: 'Performance Resource Timing'
      graph_items:
        - color: 199C0D
          item:
            host: 'Website by Browser'
            key: website.resource.dns_lookup_time
        - sortorder: '1'
          color: F63100
          item:
            host: 'Website by Browser'
            key: website.resource.tcp_handshake_time
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Website by Browser'
            key: website.resource.tls_negotiation_time
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Website by Browser'
            key: website.resource.dom_content_loaded_time
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Website by Browser'
            key: website.resource.fetch_time
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'Website by Browser'
            key: website.resource.service_worker_processing_time
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'Website by Browser'
            key: website.resource.request_time
        - sortorder: '7'
          color: BA2A5D
          item:
            host: 'Website by Browser'
            key: website.resource.response_time
    - uuid: 36cd028132d94585877ad5726f0f9e3d
      name: 'PHP-FPM: Process'
      graph_items:
        - color: 199C0D
          item:
            host: 'PHP-FPM by Zabbix agent'
            key: php-fpm.processes_max_active
        - sortorder: '1'
          color: F63100
          item:
            host: 'PHP-FPM by Zabbix agent'
            key: php-fpm.processes_idle
        - sortorder: '2'
          color: 00611C
          item:
            host: 'PHP-FPM by Zabbix agent'
            key: php-fpm.processes_total
        - sortorder: '3'
          color: F7941D
          item:
            host: 'PHP-FPM by Zabbix agent'
            key: php-fpm.processes_active
    - uuid: 493023e7a76b4bbba062c7fa79c6395c
      name: 'PHP-FPM: Process'
      graph_items:
        - color: 199C0D
          item:
            host: 'PHP-FPM by Zabbix agent active'
            key: php-fpm.processes_max_active
        - sortorder: '1'
          color: F63100
          item:
            host: 'PHP-FPM by Zabbix agent active'
            key: php-fpm.processes_idle
        - sortorder: '2'
          color: 00611C
          item:
            host: 'PHP-FPM by Zabbix agent active'
            key: php-fpm.processes_total
        - sortorder: '3'
          color: F7941D
          item:
            host: 'PHP-FPM by Zabbix agent active'
            key: php-fpm.processes_active
    - uuid: 768a3e8aaa4741239887b55be5842f4a
      name: 'PHP-FPM: Queue'
      graph_items:
        - color: 199C0D
          item:
            host: 'PHP-FPM by Zabbix agent'
            key: php-fpm.listen_queue_len
        - sortorder: '1'
          color: F63100
          item:
            host: 'PHP-FPM by Zabbix agent'
            key: php-fpm.listen_queue
        - sortorder: '2'
          color: 00611C
          item:
            host: 'PHP-FPM by Zabbix agent'
            key: php-fpm.listen_queue_max
    - uuid: 4555442cca864b45ba34904f4e8d44d8
      name: 'PHP-FPM: Queue'
      graph_items:
        - color: 199C0D
          item:
            host: 'PHP-FPM by Zabbix agent active'
            key: php-fpm.listen_queue_len
        - sortorder: '1'
          color: F63100
          item:
            host: 'PHP-FPM by Zabbix agent active'
            key: php-fpm.listen_queue
        - sortorder: '2'
          color: 00611C
          item:
            host: 'PHP-FPM by Zabbix agent active'
            key: php-fpm.listen_queue_max
    - uuid: d8bb2c1dac8a4cb5999d29227a8510e6
      name: 'Squid: DNS lookup statistics'
      graph_items:
        - color: 199C0D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheDnsRequests]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheDnsReplies]'
    - uuid: e301cc76e0ff4e22bc66a46b19230c33
      name: 'Squid: Domain name (FQDN) cache statistics'
      graph_items:
        - color: 199C0D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheFqdnRequests]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheFqdnHits]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheFqdnMisses]'
    - uuid: 22556883f0a04b6999013d1a5ce58382
      name: 'Squid: File descriptor usage'
      graph_items:
        - color: 199C0D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheCurrentFileDescrCnt]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheCurrentUnusedFDescrCnt]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheCurrentResFileDescrCnt]'
    - uuid: 647af850b9914d7b803c7f509f4c4f71
      name: 'Squid: HTTP Traffic'
      graph_items:
        - color: 199C0D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheHttpInKb]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheHttpOutKb]'
    - uuid: c3d9ac16b3e24067b1041b93ee8aaebe
      name: 'Squid: IP address cache statistics'
      graph_items:
        - color: 199C0D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheIpRequests]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheIpHits]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheIpMisses]'
    - uuid: 7b9f0d0f6558432b83375e2fcd082812
      name: 'Squid: Memory'
      graph_items:
        - color: 199C0D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheMaxResSize]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheMemMaxSize]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheMemUsage]'
    - uuid: d4b916fb3ea14e55b3e9799b85d8e40b
      name: 'Squid: Objects cache statistics'
      graph_items:
        - color: 199C0D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheNumObjCount]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheCurrentUnlinkRequests]'
    - uuid: af823298924d47b09e17eeff093da448
      name: 'Squid: Service timing statistics'
      graph_items:
        - color: 199C0D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheHttpAllSvcTime.5]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheHttpAllSvcTime.60]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheHttpMissSvcTime.5]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheHttpMissSvcTime.60]'
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheHttpHitSvcTime.5]'
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheHttpHitSvcTime.60]'
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheIcpQuerySvcTime.5]'
        - sortorder: '7'
          color: BA2A5D
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheIcpQuerySvcTime.60]'
        - sortorder: '8'
          color: F230E0
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheIcpReplySvcTime.5]'
        - sortorder: '9'
          color: 5CCD18
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheIcpReplySvcTime.60]'
        - sortorder: '10'
          color: BB2A02
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheDnsSvcTime.5]'
        - sortorder: '11'
          color: AC41A5
          item:
            host: 'Squid by SNMP'
            key: 'squid[cacheDnsSvcTime.60]'
    - uuid: 397d90097f3f4237ac45d929ffd513e5
      name: 'Threading: Threads'
      graph_items:
        - color: 199C0D
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=Threading","PeakThreadCount"]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=Threading","DaemonThreadCount"]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Generic Java JMX'
            key: 'jmx["java.lang:type=Threading","ThreadCount"]'
    - uuid: cdca8a2bb2bb486da8c57740acc431d6
      name: 'TiKV: Scheduler priority commands rate'
      graph_items:
        - color: 199C0D
          item:
            host: 'TiDB TiKV by HTTP'
            key: tikv.commands_pri.normal.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'TiDB TiKV by HTTP'
            key: tikv.commands_pri.high.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'TiDB TiKV by HTTP'
            key: tikv.commands_pri.low.rate
    - uuid: 93a38153ed8b44a49849cb1f920f50a4
      name: 'TiKV: Snapshot state count'
      graph_items:
        - color: 199C0D
          item:
            host: 'TiDB TiKV by HTTP'
            key: tikv.snapshot.applying
        - sortorder: '1'
          color: F63100
          item:
            host: 'TiDB TiKV by HTTP'
            key: tikv.snapshot.receiving
        - sortorder: '2'
          color: 00611C
          item:
            host: 'TiDB TiKV by HTTP'
            key: tikv.snapshot.sending
