zabbix_export:
  version: '8.0'
  template_groups:
    - uuid: 748ad4d098d447d492bb935c907f652f
      name: Templates/Databases
    - uuid: 36bff6c29af64692839d077febfc7079
      name: 'Templates/Network devices'
  templates:
    - uuid: 1f38deb487fc4a8d965e407ba7c5247f
      template: 'FortiGate by SNMP'
      name: 'FortiGate by SNMP'
      description: |
        The template for monitoring FortiGate firewall by SNMP.
        
        MIBs used:
        HOST-RESOURCES-MIB
        FORTINET-FORTIGATE-MIB
        FORTINET-CORE-MIB
        SNMPv2-MIB
        IF-MIB
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      vendor:
        name: Zabbix
        version: 8.0-3
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: ea59bff13fd44c37aa5bd711146fe3d9
          name: 'HA config sync'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.13.1.5.0]'
          key: 'ha.auto.sync[fgHaAutoSync.0]'
          delay: 1h
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Configuration of an automatic configuration synchronization (enabled or disabled).
          valuemap:
            name: 'HA option status'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: ha
        - uuid: dbc47cff3e60401d9a52f590e1ed6281
          name: 'HA cluster group ID'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.13.1.2.0]'
          key: 'ha.cluster.group_id[fgHaGroupId.0]'
          delay: 1h
          trends: '0'
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            HA cluster group ID device is configured for.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: ha
        - uuid: 4e2b57a68243445e87ca0e23277bafd6
          name: 'HA cluster group name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.13.1.7.0]'
          key: 'ha.cluster.group_name[fgHaGroupName.0]'
          delay: 1h
          value_type: CHAR
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            HA cluster group name.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: ha
        - uuid: b6bdf8c8d09140ffa4087d0204a0711d
          name: 'HA cluster primary override'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.13.1.4.0]'
          key: 'ha.cluster.override[fgHaOverride.0]'
          delay: 1h
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Status of the primary override flag.
          valuemap:
            name: 'HA option status'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: ha
        - uuid: 3f1d2dfb8fd74e80aedb6fa0b7ff7215
          name: 'HA cluster priority'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.13.1.3.0]'
          key: 'ha.cluster.priority[fgHaPriority.0]'
          delay: 1h
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            HA clustering priority of the device (default = 128).
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: ha
        - uuid: ff27aa75a1d84aa5a472fbf114f8dec0
          name: 'SNMP walk HA members'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.4.1.12356.101.13.2.1.1]'
          key: ha.members.walk
          history: '0'
          value_type: TEXT
          description: 'Used for discovering HA members from FORTINET-FORTIGATE-MIB.'
          tags:
            - tag: component
              value: raw
        - uuid: 3d9bb1ddb4924d5ba4dc75fb4103cc10
          name: 'HA mode'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.13.1.1.0]'
          key: 'ha.mode[fgHaSystemMode.0]'
          delay: 1h
          trends: '0'
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            High-availability mode (Standalone, A-A or A-P).
          valuemap:
            name: 'HA system mode'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: ha
        - uuid: bd3dc8fdcb8e41569f1f81b2624e1462
          name: 'HA load-balancing schedule'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.13.1.6.0]'
          key: 'ha.schedule[fgHaSchedule.0]'
          delay: 1h
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Load-balancing schedule of cluster (in A-A mode).
          valuemap:
            name: 'HA load-balancing schedule'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: ha
        - uuid: bb422f92e3ad4eafb9f43f0167a250ee
          name: 'SNMP walk hardware sensors'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.4.1.12356.101.4.3.2.1]'
          key: hw.sensor.walk
          history: '0'
          value_type: TEXT
          description: 'Used for discovering hardware sensors from FORTINET-FORTIGATE-MIB.'
          tags:
            - tag: component
              value: raw
        - uuid: 5686859d4317437c9c23160b987a3468
          name: 'ICMP ping'
          type: SIMPLE
          key: icmpping
          description: |
            Host accessibility by ICMP.
            0 - ICMP ping failed.
            1 - ICMP ping successful.
          valuemap:
            name: 'Service state'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: a25a713c59ec44689831c2c636757603
              expression: 'max(/FortiGate by SNMP/icmpping,#3)=0'
              name: 'FortiGate: Unavailable by ICMP ping'
              priority: HIGH
              description: 'Last three attempts returned timeout. Please check device connectivity.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 60ba9ecc198840a3a92ef3221e21a97e
          name: 'ICMP loss'
          type: SIMPLE
          key: icmppingloss
          value_type: FLOAT
          units: '%'
          description: 'Percentage of lost packets.'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: d1106ac3337548bda97fb89ce36c5ee5
              expression: 'min(/FortiGate by SNMP/icmppingloss,5m)>{$ICMP_LOSS_WARN} and min(/FortiGate by SNMP/icmppingloss,5m)<100'
              name: 'FortiGate: High ICMP ping loss'
              opdata: 'Loss: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'ICMP ping loss detected.'
              dependencies:
                - name: 'FortiGate: Unavailable by ICMP ping'
                  expression: 'max(/FortiGate by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: c5c3cde736544304a76c5fe1774c1fc7
          name: 'ICMP response time'
          type: SIMPLE
          key: icmppingsec
          value_type: FLOAT
          units: s
          description: 'ICMP ping response time (in seconds).'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: e04a8517551740d8b47a5dfc88dfe779
              expression: 'avg(/FortiGate by SNMP/icmppingsec,5m)>{$ICMP_RESPONSE_TIME_WARN}'
              name: 'FortiGate: High ICMP ping response time'
              opdata: 'Value: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Average ICMP response time is too high.'
              dependencies:
                - name: 'FortiGate: High ICMP ping loss'
                  expression: 'min(/FortiGate by SNMP/icmppingloss,5m)>{$ICMP_LOSS_WARN} and min(/FortiGate by SNMP/icmppingloss,5m)<100'
                - name: 'FortiGate: Unavailable by ICMP ping'
                  expression: 'max(/FortiGate by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: 04f58b6b63b945a08a27799bee741702
          name: 'Blocked intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.2.1]'
          key: 'ips.blocked[fgIpsIntrusionsBlocked.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of intrusions blocked per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: 9a42006208224b94a64ecc13437516b6
          name: 'IPS database version'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.2.2.0]'
          key: 'ips.database.version[fgSysVersionIps.0]'
          delay: 1h
          value_type: CHAR
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            IPS signature database version installed on the device.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: ips
        - uuid: afa9709de4c34d0c82aaf87c5b4f4572
          name: 'Detected anomaly based intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.9.1]'
          key: 'ips.detected.anomaly[fgIpsAnomalyDetections.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of intrusions detected as anomalies per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: 20ceeb0c520d454bba3d032d10a5db11
          name: 'Detected critical intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.3.1]'
          key: 'ips.detected.crit[fgIpsCritSevDetections.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of critical severity intrusions detected per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: badcc4a4fe3d4b219a2c67cda182ff4c
          name: 'Detected high intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.4.1]'
          key: 'ips.detected.high[fgIpsHighSevDetections.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of high severity intrusions detected per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: f570cf723b904be593a99a8338e577de
          name: 'Detected info intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.7.1]'
          key: 'ips.detected.info[fgIpsInfoSevDetections.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of info severity intrusions detected per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: 5edd46eba610442888acf0c8bdcde2c1
          name: 'Detected low intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.6.1]'
          key: 'ips.detected.low[fgIpsLowSevDetections.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of low severity intrusions detected per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: 0e4f211aa2b6492fa461e2bc5af1723f
          name: 'Detected medium intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.5.1]'
          key: 'ips.detected.med[fgIpsMedSevDetections.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of medium severity intrusions detected per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: bf7ab7c7fdfd42a28e15545904baa6dc
          name: 'Detected signature based intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.8.1]'
          key: 'ips.detected.sign[fgIpsSignatureDetections.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of intrusions detected by signature per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: f35dea442cbe4578a221571b2dbd676f
          name: 'Total detected intrusions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.9.2.1.1.1.1]'
          key: 'ips.detected.total[fgIpsIntrusionsDetected.0]'
          value_type: FLOAT
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Total number of intrusions detected per second.
          preprocessing:
            - type: CHANGE_PER_SECOND
          tags:
            - tag: component
              value: ips
        - uuid: abd3f407b66946dab2b05f7ec8a2daf2
          name: 'SNMP walk network interfaces'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.2.1.2.2.1.8,1.3.6.1.2.1.2.2.1.7,1.3.6.1.2.1.31.1.1.1.18,1.3.6.1.2.1.31.1.1.1.1,1.3.6.1.2.1.2.2.1.2,1.3.6.1.2.1.2.2.1.3,1.3.6.1.2.1.31.1.1.1.6,1.3.6.1.2.1.31.1.1.1.10,1.3.6.1.2.1.2.2.1.14,1.3.6.1.2.1.2.2.1.20,1.3.6.1.2.1.2.2.1.19,1.3.6.1.2.1.2.2.1.13,1.3.6.1.2.1.31.1.1.1.15]'
          key: net.if.walk
          history: '0'
          value_type: TEXT
          description: 'Used for discovering interfaces from IF-MIB.'
          tags:
            - tag: component
              value: raw
        - uuid: ba89be1a4a01484f955fc6d740d1c736
          name: 'IPv4 Active sessions'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.1.8.0]'
          key: 'net.ipv4.sessions[fgSysSesCount.0]'
          delay: 5m
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of active sessions on the device.
          tags:
            - tag: component
              value: network
            - tag: component
              value: sessions
        - uuid: de401c1befce453bb9de93cb154026d4
          name: 'SNMP walk SD-WAN health-checks'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.4.1.12356.101.4.9.2.1]'
          key: sdwan_health.walk
          history: '0'
          value_type: TEXT
          description: 'Used for discovering SD-WAN health-checks from FORTINET-FORTIGATE-MIB.'
          tags:
            - tag: component
              value: raw
        - uuid: b00ecb6f04a04f579ce0a8e6a1c0984e
          name: 'SNMP traps (fallback)'
          type: SNMP_TRAP
          key: snmptrap.fallback
          value_type: LOG
          description: 'Used for collecting all SNMP traps unmatched by other `snmptrap` items.'
          logtimefmt: 'hh:mm:sszyyyy/MM/dd'
          tags:
            - tag: component
              value: network
        - uuid: cc57314e0cd143c79654e53d16f341ca
          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
            Name and contact information of the contact person for the node. If not provided, the value is a zero-length string.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: c728a8f64cff450ebc445d9abc03486d
          name: 'Number of CPUs'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.4.1.0]'
          key: system.cpu.num
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of processors.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: cpu
        - uuid: e6c36e1b4fac4242a3c3ddd4a5483dde
          name: 'CPU utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.1.3.0]'
          key: 'system.cpu.util[fgSysCpuUsage.0]'
          value_type: FLOAT
          units: '%'
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            CPU utilization in %.
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 86f157c9a85448cbac41ab5f8ee3d668
              expression: 'min(/FortiGate by SNMP/system.cpu.util[fgSysCpuUsage.0],5m)>{$CPU.UTIL.CRIT}'
              name: 'FortiGate: High CPU utilization'
              event_name: 'FortiGate: High CPU utilization (over {$CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 47d06309bad546b0b303c0c602c76415
          name: 'SNMP walk CPU'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.4.1.12356.101.4.4.2.1]'
          key: system.cpu.walk
          history: '0'
          value_type: TEXT
          description: 'Used for discovering CPU from FORTINET-FORTIGATE-MIB.'
          tags:
            - tag: component
              value: raw
        - uuid: c2a2247eaddf4908b731ef0c42627d47
          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: 277fdc82a6d04e53a0da7bb29d087de7
          name: 'Firmware version'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.1.1.0]'
          key: system.hw.firmware
          delay: 1h
          value_type: CHAR
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Firmware version of the device.
          inventory_link: SOFTWARE
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: d1cde0e8780a455db0f7aec7b6b3bc7a
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.47.1.2.1.1.2.1]'
          key: system.hw.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ENTITY-MIB
            Model of the device.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
        - uuid: 4ad23a8963e64a7da8b064463631a2f9
          name: 'Hardware serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.47.1.1.1.1.11.1]'
          key: system.hw.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: ENTITY-MIB
            Serial number of the device.
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 0aa10f525bbb4bcd91debdb2f8b3afea
              expression: |
                last(/FortiGate by SNMP/system.hw.serialnumber,#1)<>last(/FortiGate by SNMP/system.hw.serialnumber,#2) and
                length(last(/FortiGate by SNMP/system.hw.serialnumber))>0
              name: 'FortiGate: Device has been replaced'
              event_name: 'FortiGate: 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: 8adf6927a2ba4c26b31a1a527cfd33f7
          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: 07256dfb73794eaea91c9c622e617200
          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 the node (the node's fully-qualified domain name). If not provided, the value is a zero-length string.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 9db3ed37da594694a560e8a85a3f7aae
              expression: 'last(/FortiGate by SNMP/system.name,#1)<>last(/FortiGate by SNMP/system.name,#2) and length(last(/FortiGate by SNMP/system.name))>0'
              name: 'FortiGate: System name has changed'
              event_name: 'FortiGate: 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: 53aee5ecb43b4fe29a2e172f48577fa5
          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 entity as part of the vendor's SMI enterprises subtree with the prefix 1.3.6.1.4.1 (e.g., a vendor with the identifier 1.3.6.1.4.1.4242 might assign a system object with the OID 1.3.6.1.4.1.4242.1.1).
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 6b85f5f1738b46acb17157d8fbf60ecf
          name: 'System uptime'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.1.20.0]'
          key: 'system.uptime[fgSysUpTime.0]'
          units: uptime
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Time since the network management portion of the system was last re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 5c16d6334cea466386455a7c5d071d18
              expression: 'last(/FortiGate by SNMP/system.uptime[fgSysUpTime.0])<10m'
              name: 'FortiGate: Device has been restarted'
              event_name: 'FortiGate: {HOST.NAME} has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 14d4584977a74e0791bf063652bf4c39
          name: 'SNMP walk virtual domain'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.4.1.12356.101.3.2.1.1]'
          key: vdom.walk
          history: '0'
          value_type: TEXT
          description: 'Used for discovering virtual domains from FORTINET-FORTIGATE-MIB.'
          tags:
            - tag: component
              value: raw
        - uuid: c702bedf91d74cd8b2346ea0abca37c5
          name: 'Free disk space'
          type: CALCULATED
          key: vfs.fs.free
          units: B
          params: 'last(//vfs.fs.total[fgSysDiskCapacity.0])-last(//vfs.fs.used[fgSysDiskUsage.0])'
          description: 'Free hard disk capacity.'
          tags:
            - tag: component
              value: storage
        - uuid: b7001a7fd88040fe8a11512df1d9ec07
          name: 'Free disk percentage'
          type: CALCULATED
          key: vfs.fs.pfree
          value_type: FLOAT
          units: '%'
          params: '100-(last(//vfs.fs.used[fgSysDiskUsage.0])/last(//vfs.fs.total[fgSysDiskCapacity.0])*100)'
          description: 'Free disk space, expressed in %.'
          tags:
            - tag: component
              value: storage
          triggers:
            - uuid: 424ab075f1ff46e1b64f9416dee4f3f7
              expression: 'last(/FortiGate by SNMP/vfs.fs.pfree)<{$DISK.FREE.WARN}'
              name: 'FortiGate: Free disk space is low'
              event_name: 'FortiGate: Free disk space is less than {$DISK.FREE.WARN}%'
              priority: WARNING
              description: 'Available disk space is not enough.'
              dependencies:
                - name: 'FortiGate: Free disk space is too low'
                  expression: 'last(/FortiGate by SNMP/vfs.fs.pfree)<{$DISK.FREE.CRIT}'
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
            - uuid: a323a6c7a5a54ad1bf0db0ec9441bf83
              expression: 'last(/FortiGate by SNMP/vfs.fs.pfree)<{$DISK.FREE.CRIT}'
              name: 'FortiGate: Free disk space is too low'
              event_name: 'FortiGate: Free disk space is less than {$DISK.FREE.CRIT}%'
              priority: HIGH
              description: 'Available disk space is too low.'
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: 84318818c417403bbfadff759f87e4f4
          name: 'Total disk space'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.1.7.0]'
          key: 'vfs.fs.total[fgSysDiskCapacity.0]'
          units: B
          description: 'Total hard disk capacity.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1048576'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: storage
        - uuid: 3a96f25d233e49039eb03b78fc8fd509
          name: 'Used disk space'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.1.6.0]'
          key: 'vfs.fs.used[fgSysDiskUsage.0]'
          units: B
          description: 'Current hard disk usage.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1048576'
          tags:
            - tag: component
              value: storage
        - uuid: bbc42709b2d2467e8fd7963309c6090a
          name: 'Available memory'
          type: CALCULATED
          key: 'vm.memory.available[fgSysMemFree.0]'
          units: B
          params: 'last(//vm.memory.total[fgSysMemCapacity.0])-last(//vm.memory.used[fgSysMemUsage.0])'
          description: 'Total memory available for utilization.'
          tags:
            - tag: component
              value: memory
        - uuid: 5ccef71de6944c91bf7d1e330782b542
          name: 'Total memory'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.1.5.0]'
          key: 'vm.memory.total[fgSysMemCapacity.0]'
          units: B
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Total physical memory (RAM) installed.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1000'
          tags:
            - tag: component
              value: memory
        - uuid: 15fb0d4185f04b4fb8e2efc6d0ef514c
          name: 'Used memory'
          type: CALCULATED
          key: 'vm.memory.used[fgSysMemUsage.0]'
          value_type: FLOAT
          units: B
          params: '(last(//vm.memory.total[fgSysMemCapacity.0])*last(//vm.memory.util[memoryUsedPercentage.0]))/100'
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Physical memory (RAM) used calculated based on memory utilization percentage.
          tags:
            - tag: component
              value: memory
        - uuid: 29a7ec8007ef44b0b473f1c16be11059
          name: 'Memory utilization'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.4.1.4.0]'
          key: 'vm.memory.util[memoryUsedPercentage.0]'
          value_type: FLOAT
          units: '%'
          description: 'Current memory utilization (percentage).'
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 1ee0af9b389d4e5fafc5c08f46c9cc09
              expression: 'min(/FortiGate by SNMP/vm.memory.util[memoryUsedPercentage.0],5m)>{$MEMORY.UTIL.MAX}'
              name: 'FortiGate: High memory utilization'
              event_name: 'FortiGate: High memory utilization (>{$MEMORY.UTIL.MAX}% for 5m)'
              priority: AVERAGE
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: 08bf282b9b3c4e78b139f3f6fe3bcd97
          name: 'SSL VPN state'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.12.2.3.1.1.1]'
          key: 'vpn.ssl.state[fgVpnSslState.0]'
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Used to determine whether SSL-VPN is enabled on this virtual domain.
          valuemap:
            name: 'Option state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: ssl
            - tag: component
              value: vpn
        - uuid: 1699dd171a1f41d5896ac766477033ca
          name: 'Active IPsec VPN tunnels'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.12.1.1.0]'
          key: 'vpn.tunnel.active[fgVpnTunnelUpCount.0]'
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Number of IPsec VPN tunnels with at least one SA.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: vpn
        - uuid: 349a383498cd42729940d1b9e5176e3e
          name: 'SNMP walk VPN tunnels'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.4.1.12356.101.12.2.2.1.3,1.3.6.1.4.1.12356.101.12.2.2.1.20]'
          key: vpn.tunnel.walk
          history: '0'
          value_type: TEXT
          description: 'Used for discovering VPN tunnels from FORTINET-FORTIGATE-MIB.'
          tags:
            - tag: component
              value: raw
        - uuid: c9a78b70b0f54fdc92d5efbfd38a32c5
          name: 'Active SSL VPN users'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.12356.101.12.2.3.1.2.1]'
          key: 'vpn.users.count[fgVpnSslStatsLoginUsers.0]'
          description: |
            MIB: FORTINET-FORTIGATE-MIB
            Current number of users logged in through SSL-VPN tunnels in the virtual domain.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: ssl
            - tag: component
              value: vpn
        - uuid: 5135b14791f844e4b1e1cdef4817a5d2
          name: 'SNMP walk wireless AP'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.4.1.12356.101.14.4.3.1]'
          key: wireless.ap.walk
          history: '0'
          value_type: TEXT
          description: 'Used for discovering wireless access points from FORTINET-FORTIGATE-MIB.'
          tags:
            - tag: component
              value: raw
        - uuid: 3e37679441344327bf86ae38cd62f580
          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: 'Host availability status'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: e8dfc8ddd1a145ea92ab6446514a0ed5
              expression: 'max(/FortiGate by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'FortiGate: 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: 'FortiGate: Unavailable by ICMP ping'
                  expression: 'max(/FortiGate by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: c91e86ee48544c7fb225199d22b279cb
          name: 'CPU discovery'
          type: DEPENDENT
          key: cpu.discovery
          filter:
            conditions:
              - macro: '{#CPU.TYPE}'
                value: 12356.101.4.4.3.1
              - macro: '{#CPU.TYPE}'
                value: 12356.101.4.4.3.2
              - macro: '{#CPU.TYPE}'
                value: 12356.101.4.4.3.3
          description: 'Used for discovering CPUs from FORTINET-FORTIGATE-MIB.'
          item_prototypes:
            - uuid: 8223516fe91b4d17998d3846d8e6c134
              name: 'CPU Core {#CPU.ID}: Average system usage over 1min'
              type: DEPENDENT
              key: 'system.cpu.usage[fgProcessorSysUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The processor's CPU system space usage, expressed as an average calculated over the last minute.
                (Only valid for processor types that support this statistic.)
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.4.2.1.10.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: system.cpu.walk
              tags:
                - tag: component
                  value: cpu
                - tag: processor
                  value: '{#CPU.ID}'
            - uuid: e0ddf801fd874ab6a97cefe9c7096b2f
              name: 'CPU Core {#CPU.ID}: Average usage over 1min'
              type: DEPENDENT
              key: 'system.cpu.usage[fgProcessorUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The processor's CPU usage in %, expressed as an average calculated over the last minute.
                (Only valid for processor types that support this statistic.)
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.4.2.1.2.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: system.cpu.walk
              tags:
                - tag: component
                  value: cpu
                - tag: processor
                  value: '{#CPU.ID}'
            - uuid: 3351a929f6fc40cd8d7c83fbeb5da100
              name: 'CPU Core {#CPU.ID}: Average user usage over 1min'
              type: DEPENDENT
              key: 'system.cpu.usage[fgProcessorUserUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The processor's CPU user space usage, expressed as an average calculated over the last minute.
                (Only valid for processor types that support this statistic.)
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.4.2.1.9.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: system.cpu.walk
              tags:
                - tag: component
                  value: cpu
                - tag: processor
                  value: '{#CPU.ID}'
          graph_prototypes:
            - uuid: e504c1a69c4d4fd781ab3083c801f04b
              name: 'CPU Core {#CPU.ID}: Average usage per core'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'system.cpu.usage[fgProcessorUsage.{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'system.cpu.usage[fgProcessorUserUsage.{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'system.cpu.usage[fgProcessorSysUsage.{#SNMPINDEX}]'
          master_item:
            key: system.cpu.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#CPU.ID}'
                - 1.3.6.1.4.1.12356.101.4.4.2.1.1
                - '0'
                - '{#CPU.TYPE}'
                - 1.3.6.1.4.1.12356.101.4.4.2.1.4
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 0503618cc863464b86f6661a3bba5970
          name: 'HA member discovery'
          type: DEPENDENT
          key: ha.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#HA.SN}'
                value: '{$HA.MEMBER.SN.MATCHES}'
              - macro: '{#HA.SN}'
                value: '{$HA.MEMBER.SN.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering HA members from FORTINET-FORTIGATE-MIB.'
          item_prototypes:
            - uuid: 93a6937b6fbe488cbd78cf8f962f94ad
              name: 'HA {#HA.ID}: Anti-virus events'
              type: DEPENDENT
              key: 'ha.av.events[fgHaStatsAvCount.{#SNMPINDEX}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Number of anti-virus events triggered on the specified cluster member per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.10.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 8290da04f8194186966c8670c89ebf37
              name: 'HA {#HA.ID}: Bytes processed'
              type: DEPENDENT
              key: 'ha.bytes.rate[fgHaStatsByteCount.{#SNMPINDEX}]'
              value_type: FLOAT
              units: Bps
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Number of bytes processed by the specified cluster member per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.8.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 4a3763ad9d134802993b6f82c6a8ccb6
              name: 'HA {#HA.ID}: Global checksum'
              type: DEPENDENT
              key: 'ha.checksum.global[fgHaStatsGlobalChecksum.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Current HA global checksum value.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.15.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 4253edcd725844a0b438af65fe6206c7
              name: 'HA {#HA.ID}: CPU usage'
              type: DEPENDENT
              key: 'ha.cpu.usage[fgHaStatsCpuUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                CPU usage of the specified cluster member (percentage).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.3.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 22a3cd6732af4efcb2ef0b3ac07e5948
              name: 'HA {#HA.ID}: Hostname'
              type: DEPENDENT
              key: 'ha.hostname[fgHaStatsHostname.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Host name of the specified cluster member.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.11.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: ef06add0e6cc4064b3696960a627699d
              name: 'HA {#HA.ID}: IPS events'
              type: DEPENDENT
              key: 'ha.ips.events[fgHaStatsIdsCount.{#SNMPINDEX}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Number of IDS/IPS events triggered on the specified cluster member per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.9.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: e54c3edd5b1c4a73b135e24495756bca
              name: 'HA {#HA.ID}: Memory usage'
              type: DEPENDENT
              key: 'ha.mem.usage[fgHaStatsMemUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Memory usage of the specified cluster member (percentage).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.4.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 653ae601538545f1b2aeb1459497104f
              name: 'HA {#HA.ID}: Network bandwidth usage'
              type: DEPENDENT
              key: 'ha.net.usage[fgHaStatsNetUsage.{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Network bandwidth usage of the specified cluster member (bps).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.5.{#SNMPINDEX}'
                    - '0'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 1594d7c870e6425f8872991b25cba0f8
              name: 'HA {#HA.ID}: Packets processed'
              type: DEPENDENT
              key: 'ha.packets.rate[fgHaStatsPktCount.{#SNMPINDEX}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Number of packets processed by the specified cluster member per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.7.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 1af6ca37fc104d6cb5192437b4bfc881
              name: 'HA {#HA.ID}: Primary serial number'
              type: DEPENDENT
              key: 'ha.primary.serialnumber[fgHaStatsMasterSerial.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Serial number of the primary HA member during the last sync attempt (successful or not).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.16.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 1ba63c880654491a90bddd1ebde52252
              name: 'HA {#HA.ID}: Serial number'
              type: DEPENDENT
              key: 'ha.serialnumber[fgHaStatsSerial.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Serial number of the HA cluster member.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.2.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 4c8e8e4787954e89a116e56306a275d9
              name: 'HA {#HA.ID}: Session count'
              type: DEPENDENT
              key: 'ha.session.count[fgHaStatsSesCount.{#SNMPINDEX}]'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Current session count of the specified cluster member.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.6.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
            - uuid: 10e2717f461f4f8887cfc9ae0ab6d932
              name: 'HA {#HA.ID}: Sync status'
              type: DEPENDENT
              key: 'ha.sync.status[fgHaStatsSyncStatus.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Current HA sync status.
              valuemap:
                name: 'HA sync status'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.13.2.1.1.12.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: ha.members.walk
              tags:
                - tag: component
                  value: ha
                - tag: member
                  value: '{#HA.ID}'
          graph_prototypes:
            - uuid: 0ffb9affa29643f1b7a098e9c77ac412
              name: 'HA {#HA.ID}: Bytes processed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'ha.bytes.rate[fgHaStatsByteCount.{#SNMPINDEX}]'
            - uuid: c0b2565a140547dc94065bebceea2cd4
              name: 'HA {#HA.ID}: CPU usage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'ha.cpu.usage[fgHaStatsCpuUsage.{#SNMPINDEX}]'
            - uuid: 10a28c1634e24df2bcb2f0c6187a1459
              name: 'HA {#HA.ID}: HA events'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'ha.ips.events[fgHaStatsIdsCount.{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'ha.av.events[fgHaStatsAvCount.{#SNMPINDEX}]'
            - uuid: 206b306fff5f49838f52584038299df9
              name: 'HA {#HA.ID}: Memory usage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'ha.mem.usage[fgHaStatsMemUsage.{#SNMPINDEX}]'
            - uuid: 3ec1552b04014d848419d66fd17e2fe4
              name: 'HA {#HA.ID}: Network bandwidth usage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'ha.net.usage[fgHaStatsNetUsage.{#SNMPINDEX}]'
            - uuid: b076c55d490b48e3a98491f3132f49ac
              name: 'HA {#HA.ID}: Packets processed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'ha.packets.rate[fgHaStatsPktCount.{#SNMPINDEX}]'
          master_item:
            key: ha.members.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#HA.ID}'
                - 1.3.6.1.4.1.12356.101.13.2.1.1.1
                - '0'
                - '{#HA.SN}'
                - 1.3.6.1.4.1.12356.101.13.2.1.1.2
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: ece93a3dc4f8497891444c9f5daa57ca
          name: 'Hardware sensors discovery'
          type: DEPENDENT
          key: hw.sensor.discovery
          description: 'Used for discovering hardware sensors from FORTINET-FORTIGATE-MIB.'
          item_prototypes:
            - uuid: b9d76803cb8d4dd2ae27f2a36ae8d243
              name: 'Sensor {#SENSOR.NAME}: Alarm status'
              type: DEPENDENT
              key: 'hw.sensor.status[fgHwSensorEntAlarmStatus.{#SENSOR.ID}]'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                If the sensor has an alarm threshold and has exceeded it, this will indicate its status. Not all sensors have alarms.
              valuemap:
                name: 'Sensor alert status'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.3.2.1.4.{#SENSOR.ID}'
                    - '0'
              master_item:
                key: hw.sensor.walk
              tags:
                - tag: component
                  value: sensor
                - tag: sensor
                  value: '{#SENSOR.NAME}'
            - uuid: 05abe47dd00e4a2faba79be40af90402
              name: 'Sensor {#SENSOR.NAME}: Value'
              type: DEPENDENT
              key: 'hw.sensor.value[fgHwSensorEntValue.{#SENSOR.ID}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                A string representation of the value of the sensor. Because sensors can present data in different formats, string representation is the most general format. Interpretation of the value (units of measure, for example) is dependent on the individual sensor.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.3.2.1.3.{#SENSOR.ID}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: hw.sensor.walk
              tags:
                - tag: component
                  value: sensor
                - tag: sensor
                  value: '{#SENSOR.NAME}'
          master_item:
            key: hw.sensor.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#SENSOR.ID}'
                - 1.3.6.1.4.1.12356.101.4.3.2.1.1
                - '0'
                - '{#SENSOR.NAME}'
                - 1.3.6.1.4.1.12356.101.4.3.2.1.2
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: c63cc3b7fc484074b7d9eb007dfde091
          name: 'Network interface discovery'
          type: DEPENDENT
          key: net.if.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#IFADMINSTATUS}'
                value: '{$NET.IF.IFADMINSTATUS.MATCHES}'
              - macro: '{#IFADMINSTATUS}'
                value: '{$NET.IF.IFADMINSTATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFALIAS}'
                value: '{$NET.IF.IFALIAS.MATCHES}'
              - macro: '{#IFALIAS}'
                value: '{$NET.IF.IFALIAS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFDESCR}'
                value: '{$NET.IF.IFDESCR.MATCHES}'
              - macro: '{#IFDESCR}'
                value: '{$NET.IF.IFDESCR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFNAME}'
                value: '{$NET.IF.IFNAME.MATCHES}'
              - macro: '{#IFNAME}'
                value: '{$NET.IF.IFNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFOPERSTATUS}'
                value: '{$NET.IF.IFOPERSTATUS.MATCHES}'
              - macro: '{#IFOPERSTATUS}'
                value: '{$NET.IF.IFOPERSTATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFTYPE}'
                value: '{$NET.IF.IFTYPE.MATCHES}'
              - macro: '{#IFTYPE}'
                value: '{$NET.IF.IFTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering interfaces from IF-MIB.'
          item_prototypes:
            - uuid: d715da9ce25f4bdd8ea64ecdf207aba1
              name: 'Interface {#IFNAME}({#IFALIAS}): Inbound packets discarded'
              type: DEPENDENT
              key: 'net.if.in.discards[ifInDiscards.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.
                One possible reason for discarding such a packet could be to free up buffer space.
                Discontinuities in the value of this counter can occur at re-initialization of the management system and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.13.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: c148dee3d41e4846bafe885bfe860daa
              name: 'Interface {#IFNAME}({#IFALIAS}): Inbound packets with errors'
              type: DEPENDENT
              key: 'net.if.in.errors[ifInErrors.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                For packet-oriented interfaces - the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol.
                For character-oriented or fixed-length interfaces - the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol.
                Discontinuities in the value of this counter can occur at re-initialization of the management system and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.14.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 72f4527a4fae4d7493ac66d1c6436cb3
              name: 'Interface {#IFNAME}({#IFALIAS}): Bits received'
              type: DEPENDENT
              key: 'net.if.in[ifHCInOctets.{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface, including framing characters. This object is a 64-bit version of `ifInOctets`.
                Discontinuities in the value of this counter can occur at re-initialization of the management system and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 82e47cf784a24dd791fd81bc61e1cd6d
              name: 'Interface {#IFNAME}({#IFALIAS}): Outbound packets discarded'
              type: DEPENDENT
              key: 'net.if.out.discards[ifOutDiscards.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.
                One possible reason for discarding such a packet could be to free up buffer space.
                Discontinuities in the value of this counter can occur at re-initialization of the management system and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.19.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: fede8c009c8a4623b2f4acf36947c705
              name: 'Interface {#IFNAME}({#IFALIAS}): Outbound packets with errors'
              type: DEPENDENT
              key: 'net.if.out.errors[ifOutErrors.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                For packet-oriented interfaces - the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol.
                For character-oriented or fixed-length interfaces - the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol.
                Discontinuities in the value of this counter can occur at re-initialization of the management system and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.20.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: a1275c0bc1574941ac7306862034f3e3
              name: 'Interface {#IFNAME}({#IFALIAS}): Bits sent'
              type: DEPENDENT
              key: 'net.if.out[ifHCOutOctets.{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of `ifOutOctets`.
                Discontinuities in the value of this counter can occur at re-initialization of the management system and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: f52cc248bbcf4fb791ff37ab23393a35
              name: 'Interface {#IFNAME}({#IFALIAS}): Speed'
              type: DEPENDENT
              key: 'net.if.speed[ifHighSpeed.{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in units of 1,000,000 bits per second.
                If this object reports a value of `n`, then the speed of the interface is somewhere in the range of `n-500,000` to `n+499,999`.
                For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth.
                For a sub-layer which has no concept of bandwidth, this object should be zero.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}'
                    - '0'
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 8465546bcabd464eae60b7b376d864be
              name: 'Interface {#IFNAME}({#IFALIAS}): Operational status'
              type: DEPENDENT
              key: 'net.if.status[ifOperStatus.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                - The `testing(3)` state indicates that no operational packets can be passed.
                - If `ifAdminStatus` is `down(2)`, then `ifOperStatus` should be `down(2)`.
                - If `ifAdminStatus` is changed to `up(1)`, then `ifOperStatus` should change to `up(1)` if the interface is ready to transmit and receive network traffic.
                - It should change to `dormant(5)` if the interface is waiting for external actions (such as a serial line waiting for an incoming connection).
                - It should remain in the `down(2)` state if and only if there is a fault that prevents it from going to the `up(1)` state.
                - It should remain in the `notPresent(6)` state if the interface has missing (typically, hardware) components.
              valuemap:
                name: 'Interface status'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
              trigger_prototypes:
                - uuid: 192a9f0c8ecb412fa7db65c839879269
                  expression: '{$IFCONTROL:"{#IFNAME}"}=1 and last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and (last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$IFCONTROL:"{#IFNAME}"}=0'
                  name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$IFCONTROL:"{#IFNAME}"}=1` - a user can redefine the context macro to "0", marking this interface as not important. No new trigger will be fired if this interface is down.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to "1" sometime before.
                    
                    WARNING: if closed manually - it will not fire again on the next poll, because of `.diff`.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: cbe77e1fcd504385bb96a7d4094189f5
              name: 'Interface {#IFNAME}({#IFALIAS}): Interface type'
              type: DEPENDENT
              key: 'net.if.type[ifType.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: IF-MIB
                The type of interface.
                Additional values for `ifType` are assigned by the Internet Assigned Numbers Authority (IANA) through updating the syntax of the IANAifType textual convention.
              valuemap:
                name: 'Interface type'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.3.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
          trigger_prototypes:
            - uuid: bb4f3ffe2fc44a78b1e7ab2b7b700696
              expression: |
                change(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])<0 and last(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0 and (
                last(/FortiGate by SNMP/net.if.type[ifType.{#SNMPINDEX}])=6 or
                last(/FortiGate by SNMP/net.if.type[ifType.{#SNMPINDEX}])=7 or
                last(/FortiGate by SNMP/net.if.type[ifType.{#SNMPINDEX}])=11 or
                last(/FortiGate by SNMP/net.if.type[ifType.{#SNMPINDEX}])=62 or
                last(/FortiGate by SNMP/net.if.type[ifType.{#SNMPINDEX}])=69 or
                last(/FortiGate by SNMP/net.if.type[ifType.{#SNMPINDEX}])=117
                ) and (last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2)
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: |
                (change(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0 and 
                last(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}],#2)>0) or
                (last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2)
              name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): Ethernet has changed to lower speed than it was before'
              opdata: 'Current reported speed: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              dependencies:
                - name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): Link down'
                  expression: '{$IFCONTROL:"{#IFNAME}"}=1 and last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and (last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))'
                  recovery_expression: 'last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$IFCONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: performance
            - uuid: f2e0d7ffd8664f80bdd009462fa58060
              expression: |
                (avg(/FortiGate by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) or 
                avg(/FortiGate by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])) and 
                last(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: |
                avg(/FortiGate by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) and 
                avg(/FortiGate by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/FortiGate by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])
              name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): High bandwidth usage'
              event_name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): High bandwidth usage (>{$IF.UTIL.MAX:"{#IFNAME}"}%)'
              opdata: 'In: {ITEM.LASTVALUE1}, out: {ITEM.LASTVALUE3}, speed: {ITEM.LASTVALUE2}'
              priority: WARNING
              description: 'The utilization of the network interface is close to its estimated maximum bandwidth.'
              manual_close: 'YES'
              dependencies:
                - name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): Link down'
                  expression: '{$IFCONTROL:"{#IFNAME}"}=1 and last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and (last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))'
                  recovery_expression: 'last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$IFCONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: performance
            - uuid: 6ad2b85327c44f428c1416f611958783
              expression: |
                min(/FortiGate by SNMP/net.if.in.errors[ifInErrors.{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}
                or min(/FortiGate by SNMP/net.if.out.errors[ifOutErrors.{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: |
                max(/FortiGate by SNMP/net.if.in.errors[ifInErrors.{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8
                and max(/FortiGate by SNMP/net.if.out.errors[ifOutErrors.{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8
              name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): High error rate'
              event_name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): High error rate (>{$IF.ERRORS.WARN:"{#IFNAME}"} for 5m)'
              opdata: 'errors in: {ITEM.LASTVALUE1}, errors out: {ITEM.LASTVALUE2}'
              priority: WARNING
              description: 'The trigger recovers when it is below 80% of the `{$IF.ERRORS.WARN:"{#IFNAME}"}` threshold.'
              manual_close: 'YES'
              dependencies:
                - name: 'FortiGate: Interface {#IFNAME}({#IFALIAS}): Link down'
                  expression: '{$IFCONTROL:"{#IFNAME}"}=1 and last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and (last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))'
                  recovery_expression: 'last(/FortiGate by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$IFCONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: ab9438c6f148404e8853f1e8046147e6
              name: 'Interface {#IFNAME}({#IFALIAS}): Network traffic'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'net.if.in[ifHCInOctets.{#SNMPINDEX}]'
                - sortorder: '1'
                  drawtype: BOLD_LINE
                  color: F63100
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'net.if.out[ifHCOutOctets.{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  yaxisside: RIGHT
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'net.if.out.errors[ifOutErrors.{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  yaxisside: RIGHT
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'net.if.in.errors[ifInErrors.{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  yaxisside: RIGHT
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'net.if.out.discards[ifOutDiscards.{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  yaxisside: RIGHT
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'net.if.in.discards[ifInDiscards.{#SNMPINDEX}]'
          master_item:
            key: net.if.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#IFOPERSTATUS}'
                - 1.3.6.1.2.1.2.2.1.8
                - '0'
                - '{#IFADMINSTATUS}'
                - 1.3.6.1.2.1.2.2.1.7
                - '0'
                - '{#IFALIAS}'
                - 1.3.6.1.2.1.31.1.1.1.18
                - '0'
                - '{#IFNAME}'
                - 1.3.6.1.2.1.31.1.1.1.1
                - '0'
                - '{#IFDESCR}'
                - 1.3.6.1.2.1.2.2.1.2
                - '0'
                - '{#IFTYPE}'
                - 1.3.6.1.2.1.2.2.1.3
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 1359682c719440798e44e19202442f5e
          name: 'SD-WAN health-check discovery'
          type: DEPENDENT
          key: sdwan_health.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#HNAME}'
                value: '{$SDWAN.HEALTH.NAME.MATCHES}'
              - macro: '{#HNAME}'
                value: '{$SDWAN.HEALTH.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering SD-WAN health-check from FORTINET-FORTIGATE-MIB.'
          item_prototypes:
            - uuid: 63b53c82ad3b49028b4f7afe53b5d0d3
              name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Jitter'
              type: DEPENDENT
              key: 'sdwan_health.jitter[fgVWLHealthCheckLinkJitter.{#SNMPINDEX}]'
              value_type: FLOAT
              units: ms
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The average jitter of a health check on a specific member link in a float number within the last 30 probes.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.9.2.1.6.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: sdwan_health.walk
              tags:
                - tag: component
                  value: sd-wan
                - tag: health-check
                  value: '{#HNAME}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 6ffbe596aa2848b19e0d50c1b67e9365
              name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Latency'
              type: DEPENDENT
              key: 'sdwan_health.latency[fgVWLHealthCheckLinkLatency.{#SNMPINDEX}]'
              value_type: FLOAT
              units: ms
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The average latency of a health check on a specific member link in a float number within the last 30 probes.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.9.2.1.5.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: sdwan_health.walk
              tags:
                - tag: component
                  value: sd-wan
                - tag: health-check
                  value: '{#HNAME}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: d696775545be43aaadd3f0c932cac509
              name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Packets loss'
              type: DEPENDENT
              key: 'sdwan_health.loss[fgVWLHealthCheckLinkPacketLoss.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The packet loss percentage of a health check on a specific member link in a float number within the last 30 probes.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.9.2.1.9.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: sdwan_health.walk
              tags:
                - tag: component
                  value: sd-wan
                - tag: health-check
                  value: '{#HNAME}'
                - tag: interface
                  value: '{#IFNAME}'
              trigger_prototypes:
                - uuid: cdc2b26246a84feca7ad03b137cbad2a
                  expression: 'min(/FortiGate by SNMP/sdwan_health.loss[fgVWLHealthCheckLinkPacketLoss.{#SNMPINDEX}],5m)>{$SDWAN.HEALTH.IF.LOSS.WARN:"{#HNAME}"}'
                  name: 'FortiGate: SD-WAN [{#HNAME}]:[{#IFNAME}]: High packets loss'
                  opdata: 'Loss: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'High level of packet loss detected.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 5f3d834096ae4412ba849e7d9fdd27d6
              name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Packets received per second'
              type: DEPENDENT
              key: 'sdwan_health.received[fgVWLHealthCheckLinkPacketRecv.{#SNMPINDEX}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Number of packets received by a health check on a specific member link per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.9.2.1.8.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: sdwan_health.walk
              tags:
                - tag: component
                  value: sd-wan
                - tag: health-check
                  value: '{#HNAME}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: ed2f33611e39413d9fd78ba5e7185b8e
              name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Packets sent per second'
              type: DEPENDENT
              key: 'sdwan_health.sent[fgVWLHealthCheckLinkPacketSend.{#SNMPINDEX}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Number of packets sent by a health check on a specific member link per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.9.2.1.7.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: sdwan_health.walk
              tags:
                - tag: component
                  value: sd-wan
                - tag: health-check
                  value: '{#HNAME}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: c9bbd7b9bfb94033a6814fc39926e7ca
              name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Health check state'
              type: DEPENDENT
              key: 'sdwan_health.state[fgVWLHealthCheckLinkState.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Health check state on a specific member link.
              valuemap:
                name: 'Health check state'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.9.2.1.4.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: sdwan_health.walk
              tags:
                - tag: component
                  value: sd-wan
                - tag: health-check
                  value: '{#HNAME}'
                - tag: interface
                  value: '{#IFNAME}'
              trigger_prototypes:
                - uuid: 65cfabab3fa64beaac6dd7d1513359a8
                  expression: '{$SDWAN.HEALTH.IF.CONTROL:"{#HNAME}"}=1 and last(/FortiGate by SNMP/sdwan_health.state[fgVWLHealthCheckLinkState.{#SNMPINDEX}])=1 and (last(/FortiGate by SNMP/sdwan_health.state[fgVWLHealthCheckLinkState.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/sdwan_health.state[fgVWLHealthCheckLinkState.{#SNMPINDEX}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/FortiGate by SNMP/sdwan_health.state[fgVWLHealthCheckLinkState.{#SNMPINDEX}])<>2 or {$SDWAN.HEALTH.IF.CONTROL:"{#HNAME}"}=0'
                  name: 'FortiGate: SD-WAN [{#HNAME}]:[{#IFNAME}]: Health check state is dead'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the health check state is dead.
                    2. `{$SDWAN.HEALTH.IF.CONTROL:"{#HNAME}"}=1` - a user can redefine the context macro to "0", marking this health check as not important. No new trigger will be fired if this health check is dead.
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the health check state was up to "1" sometime before.
                    
                    WARNING: If closed manually, it will not fire again on the next poll because of `diff`.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: d4bfff72a3684c84becf9d58760c26ad
              name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Packets statistics'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'sdwan_health.received[fgVWLHealthCheckLinkPacketRecv.{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'sdwan_health.sent[fgVWLHealthCheckLinkPacketSend.{#SNMPINDEX}]'
                - sortorder: '2'
                  drawtype: BOLD_LINE
                  color: 00611C
                  yaxisside: RIGHT
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'sdwan_health.loss[fgVWLHealthCheckLinkPacketLoss.{#SNMPINDEX}]'
            - uuid: 12048d7400ba4246bcc20ba85825f6d2
              name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Performance'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'sdwan_health.jitter[fgVWLHealthCheckLinkJitter.{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  yaxisside: RIGHT
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'sdwan_health.latency[fgVWLHealthCheckLinkLatency.{#SNMPINDEX}]'
          master_item:
            key: sdwan_health.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#HNAME}'
                - 1.3.6.1.4.1.12356.101.4.9.2.1.2
                - '0'
                - '{#IFNAME}'
                - 1.3.6.1.4.1.12356.101.4.9.2.1.14
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 63fdcc93a41d424fb0c481d9ae50424c
          name: 'SoC3 discovery'
          type: DEPENDENT
          key: soc3.discovery
          filter:
            conditions:
              - macro: '{#CPU.TYPE}'
                value: 12356.101.4.4.3.9
          description: 'Used for discovering SoC3 NP6Lite processors from FORTINET-FORTIGATE-MIB.'
          item_prototypes:
            - uuid: 15caa12cf78b430dbe63ba27606cf04b
              name: 'SoC3 {#CPU.ID}: Packets dropped'
              type: DEPENDENT
              key: 'soc3.np6lite.pkt.dropped[fgProcessorPktDroppedCount.{#CPU.ID}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The total number of packets dropped by this processor (only valid for processor types that support this statistic).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.4.2.1.8.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: system.cpu.walk
              tags:
                - tag: component
                  value: soc3
                - tag: processor
                  value: 'np6lite #{#CPU.ID}'
            - uuid: f9b37041d4ae4ccab1b9a92835a45649
              name: 'SoC3 {#CPU.ID}: Packets received'
              type: DEPENDENT
              key: 'soc3.np6lite.pkt.received[fgProcessorPktRxCount.{#CPU.ID}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The total number of packets received by this processor (only valid for processor types that support this statistic).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.4.2.1.6.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: system.cpu.walk
              tags:
                - tag: component
                  value: soc3
                - tag: processor
                  value: 'np6lite #{#CPU.ID}'
            - uuid: 8f80b2d538ef4f20a654156e280394ab
              name: 'SoC3 {#CPU.ID}: Packets transmitted'
              type: DEPENDENT
              key: 'soc3.np6lite.pkt.transmitted[fgProcessorPktRxCount.{#CPU.ID}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The total number of packets transmitted by this processor (only valid for processor types that support this statistic).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.4.4.2.1.7.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
              master_item:
                key: system.cpu.walk
              tags:
                - tag: component
                  value: soc3
                - tag: processor
                  value: 'np6lite #{#CPU.ID}'
          graph_prototypes:
            - uuid: fcef7d91b3d94d4ebd12cfe1eb3d077e
              name: 'SoC3 {#CPU.ID}: Packets flow'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'soc3.np6lite.pkt.dropped[fgProcessorPktDroppedCount.{#CPU.ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'soc3.np6lite.pkt.received[fgProcessorPktRxCount.{#CPU.ID}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'soc3.np6lite.pkt.transmitted[fgProcessorPktRxCount.{#CPU.ID}]'
          master_item:
            key: system.cpu.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#CPU.ID}'
                - 1.3.6.1.4.1.12356.101.4.4.2.1.1
                - '0'
                - '{#CPU.TYPE}'
                - 1.3.6.1.4.1.12356.101.4.4.2.1.4
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 5c251f4a423348a49c2ac61e441d6da1
          name: 'Virtual domain discovery'
          type: DEPENDENT
          key: vdom.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#VDOM.NAME}'
                value: '{$VDOM.NAME.MATCHES}'
              - macro: '{#VDOM.NAME}'
                value: '{$VDOM.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering virtual domains from FORTINET-FORTIGATE-MIB.'
          item_prototypes:
            - uuid: f6f60e7e4fcf4bb6935a19742ac13199
              name: 'VDOM {#VDOM.NAME}: CPU usage'
              type: DEPENDENT
              key: 'vdom.cpu.usage[fgVdEntCpuUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                CPU usage of the virtual domain (percentage).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.3.2.1.1.5.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: vdom.walk
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: vdom
                - tag: vdom
                  value: '{#VDOM.NAME}'
            - uuid: 83a03691cd3c4282b731e8e9b1ffc328
              name: 'VDOM {#VDOM.NAME}: HA member state'
              type: DEPENDENT
              key: 'vdom.ha.state[fgVdEntHaState.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                HA cluster member state of the virtual domain on this device.
              valuemap:
                name: 'VDOM HA state'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.3.2.1.1.4.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: vdom.walk
              tags:
                - tag: component
                  value: vdom
                - tag: vdom
                  value: '{#VDOM.NAME}'
            - uuid: 07e67588b1c94e0ba26985883964247c
              name: 'VDOM {#VDOM.NAME}: Memory usage'
              type: DEPENDENT
              key: 'vdom.mem.usage[fgVdEntCpuUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Memory usage of the virtual domain (percentage).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.3.2.1.1.6.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: vdom.walk
              tags:
                - tag: component
                  value: memory
                - tag: component
                  value: vdom
                - tag: vdom
                  value: '{#VDOM.NAME}'
            - uuid: d5937e850b99477187b1dd84c54c5ea5
              name: 'VDOM {#VDOM.NAME}: Operation mode'
              type: DEPENDENT
              key: 'vdom.op_mode[fgVdEntOpMode.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Operation mode of the virtual domain (NAT or Transparent).
              valuemap:
                name: 'VDOM operation mode'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.3.2.1.1.3.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: vdom.walk
              tags:
                - tag: component
                  value: vdom
                - tag: vdom
                  value: '{#VDOM.NAME}'
            - uuid: 5030e68a32b644d7be5847556ecf438a
              name: 'VDOM {#VDOM.NAME}: Sessions rate'
              type: DEPENDENT
              key: 'vdom.sessions.rate[fgVdEntSesRate.{#SNMPINDEX}]'
              value_type: FLOAT
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                The session setup rate on the virtual domain per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.3.2.1.1.8.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: vdom.walk
              tags:
                - tag: component
                  value: vdom
                - tag: vdom
                  value: '{#VDOM.NAME}'
            - uuid: abeeecdb4c3d42b599f652f9bb591bef
              name: 'VDOM {#VDOM.NAME}: Active sessions'
              type: DEPENDENT
              key: 'vdom.sessions[fgVdEntSesCount.{#SNMPINDEX}]'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Number of active sessions on the virtual domain.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.3.2.1.1.7.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: vdom.walk
              tags:
                - tag: component
                  value: vdom
                - tag: vdom
                  value: '{#VDOM.NAME}'
          master_item:
            key: vdom.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#VDOM.ID}'
                - 1.3.6.1.4.1.12356.101.3.2.1.1.1
                - '0'
                - '{#VDOM.NAME}'
                - 1.3.6.1.4.1.12356.101.3.2.1.1.2
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: c9cb899a182843d79efe5c9b1d196023
          name: 'VPN tunnel discovery'
          type: DEPENDENT
          key: vpn.tunnel.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#VPN.NAME}'
                value: '{$VPN.NAME.MATCHES}'
              - macro: '{#VPN.NAME}'
                value: '{$VPN.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering VPN tunnels from FORTINET-FORTIGATE-MIB.'
          item_prototypes:
            - uuid: 7478dc658f184f1eb3718ddfab780b01
              name: 'VPN {#VPN.NAME}: Tunnel Status'
              type: DEPENDENT
              key: 'vpn.tunnel.status[fgVpnTunEntStatus.{#SNMPINDEX}]'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Current status of tunnel (up or down).
              valuemap:
                name: 'VPN status'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.12.2.2.1.20.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: vpn.tunnel.walk
              tags:
                - tag: component
                  value: vpn
                - tag: tunnel
                  value: '{#VPN.NAME}'
              trigger_prototypes:
                - uuid: 20a833f3ba1c4c939a909fda92f01ffc
                  expression: '{$VPN.STATE.CONTROL:"{#VPN.NAME}"}=1 and last(/FortiGate by SNMP/vpn.tunnel.status[fgVpnTunEntStatus.{#SNMPINDEX}])=1 and (last(/FortiGate by SNMP/vpn.tunnel.status[fgVpnTunEntStatus.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/vpn.tunnel.status[fgVpnTunEntStatus.{#SNMPINDEX}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/FortiGate by SNMP/vpn.tunnel.status[fgVpnTunEntStatus.{#SNMPINDEX}])<>1 or {$VPN.STATE.CONTROL:"{#VPN.NAME}"}=0'
                  name: 'FortiGate: VPN {#VPN.NAME}: Tunnel down'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the current tunnel state is down.
                    2. `{$VPN.STATE.CONTROL}=1` - a user can redefine the context macro to "0", marking this notification as not important. No new trigger will be fired if this tunnel is down.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: vpn.tunnel.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#VPN.NAME}'
                - 1.3.6.1.4.1.12356.101.12.2.2.1.3
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 0ec47b527d6a45269bc65b427d99b6b4
          name: 'Wireless discovery'
          type: DEPENDENT
          key: wireless.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#WC.NAME}'
                value: '{$WC.NAME.MATCHES}'
              - macro: '{#WC.NAME}'
                value: '{$WC.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering wireless access points from FORTINET-FORTIGATE-MIB.'
          item_prototypes:
            - uuid: 95946d5063f04c75aaeef7d36699da80
              name: 'WTP {#WC.NAME}: Administrative status'
              type: DEPENDENT
              key: 'wc.admin.status[fgWcWtpConfigWtpAdmin.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the administrative status of this wireless termination point (WTP).
                
                The following enumerated values are supported:
                `discovered(1)` - This WTP was discovered though discovery or join request messages.
                `disable(2)` - Controller is configured to not provide service to this WTP.
                `enable(3)` - Controller is configured to provide service to this WTP.
                `other(0)` - The administration state of the WTP is unknown.
              valuemap:
                name: 'Wireless admin status'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.2.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 6bd742c266e94630ab9eb727577a5f43
              name: 'WTP {#WC.NAME}: Background scan'
              type: DEPENDENT
              key: 'wc.background.scan[fgWcWtpConfigRadioApScan.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Whether background scan is enabled on this WTP.
              valuemap:
                name: 'Option state'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.12.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 8bdb138301f04f7dae81ef9ddd14b00e
              name: 'WTP {#WC.NAME}: Base MAC Address'
              type: DEPENDENT
              key: 'wc.base.mac[fgWcWtpSessionWtpBaseMacAddress.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the WTP's Base MAC Address, which MAY be assigned to the primary Ethernet interface.
                The instance of the object corresponds to the Base MAC Address sub-element in the CAPWAP protocol [RFC5415].
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.6.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 92512ee2f6ca4366bbd3d577c5ba10c8
              name: 'WTP {#WC.NAME}: Bootloader version'
              type: DEPENDENT
              key: 'wc.boot.version[fgWcWtpSessionWtpBootVersion.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the boot loader version of a WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.15.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 50f1359e45b24acd997d24929661d464
              name: 'WTP {#WC.NAME}: Connected clients'
              type: DEPENDENT
              key: 'wc.clients.num[fgWcWtpSessionWtpStationCount.{#SNMPINDEX}]'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the number of clients currently connected to this WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.17.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 04a94fb904ef4fd69dd45f85d1154a8c
              name: 'WTP {#WC.NAME}: Connection status'
              type: DEPENDENT
              key: 'wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the connection status of a WTP to the AC.
                
                The following enumerated values are supported:
                `offLine(1)` - The WTP is not connected.
                `onLine(2)` - The WTP is connected.
                `downloadingImage(3)` - The WTP is downloading software image from the AC on joining.
                `connectedImage(4)` - The AC is pushing a software image to the connected WTP.
                `other(0)` - The WTP connection status is unknown.
              valuemap:
                name: 'Wireless connection status'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.7.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
              trigger_prototypes:
                - uuid: 93f58a2d4d9a4de9a8f0fe9e143a711a
                  expression: '{$WC.STATE.CONTROL:"{#WC.NAME}"}=1 and last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}])=1 and (last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}])=2 or {$WC.STATE.CONTROL:"{#WC.NAME}"}=0'
                  name: 'FortiGate: WTP {#WC.NAME}: Connection is down'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the current connection status is `offLine`.
                    2. `{$WC.STATE.CONTROL}=1` - a user can redefine the context macro to "0", marking this notification as not important. No new trigger will be fired if this connection is down.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 2e4f389bf3024d3780c4e894b340e5bb
                  expression: '{$WC.UPDATE.CONTROL:"{#WC.NAME}"}=1 and last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}])=3 and (last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}])=2 or {$WC.UPDATE.CONTROL:"{#WC.NAME}"}=0'
                  name: 'FortiGate: WTP {#WC.NAME}: Receiving firmware update'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: INFO
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the current connection status is `downloadingImage`.
                    2. `{$WC.UPDATE.CONTROL}=1` - a user can redefine the context macro to "0", marking this notification as not important. No new trigger will be fired if the status is `downloadingImage`.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 01eca2e3a28b48db835ff7a5598b0ee7
                  expression: '{$WC.UPDATE.CONTROL:"{#WC.NAME}"}=1 and last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}])=4 and (last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}],#1)<>last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/FortiGate by SNMP/wc.conn.status[fgWcWtpSessionConnectionState.{#SNMPINDEX}])=2 or {$WC.UPDATE.CONTROL:"{#WC.NAME}"}=0'
                  name: 'FortiGate: WTP {#WC.NAME}: Sending firmware update'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: INFO
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the current connection status is `connectedImage`.
                    2. `{$WC.UPDATE.CONTROL}=1` - a user can redefine the context macro to "0", marking this notification as not important. No new trigger will be fired if the status is `connectedImage`.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 9fcf69f30ce7486c909c8fd7ff0247a5
              name: 'WTP {#WC.NAME}: CPU usage'
              type: DEPENDENT
              key: 'wc.cpu.usage[fgWcWtpSessionWtpCpuUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the current CPU usage of a WTP (percentage).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.20.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: cpu
                - tag: component
                  value: wireless
              trigger_prototypes:
                - uuid: 97f5c94047194223a4059cd56816af69
                  expression: 'min(/FortiGate by SNMP/wc.cpu.usage[fgWcWtpSessionWtpCpuUsage.{#SNMPINDEX}],5m)>{$WC.CPU.UTIL.CRIT:"{#WC.NAME}"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/FortiGate by SNMP/wc.cpu.usage[fgWcWtpSessionWtpCpuUsage.{#SNMPINDEX}],5m)<{$WC.CPU.UTIL.CRIT:"{#WC.NAME}"}'
                  name: 'FortiGate: WTP {#WC.NAME}: High CPU utilization'
                  event_name: 'FortiGate: WTP {#WC.NAME}: High CPU utilization (over {$WC.CPU.UTIL.CRIT:"{#WC.NAME}"}% for 5m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The CPU utilization is too high.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: 12c297ebcf9041af8ced1e42abb59e2b
              name: 'WTP {#WC.NAME}: Daemon uptime'
              type: DEPENDENT
              key: 'wc.daemon.uptime[fgWcWtpSessionWtpDaemonUpTime.{#SNMPINDEX}]'
              units: uptime
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the time since the WTP daemon has been started.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.9.{#SNMPINDEX}'
                    - '0'
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 329d6a6e61a4433c8a3689e7756d311b
              name: 'WTP {#WC.NAME}: Hardware version'
              type: DEPENDENT
              key: 'wc.hardware.version[fgWcWtpSessionWtpHwVersion.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the hardware version of a WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.13.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: bba22196f76d4b81a9479e5998268be9
              name: 'WTP {#WC.NAME}: IP Address'
              type: DEPENDENT
              key: 'wc.ip.addr[fgWcWtpSessionWtpIpAddress.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the IP address of a WTP that corresponds to the IP address in the IP packet header.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.3.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 5c19b48260d94242af38a6962dcd5e52
              name: 'WTP {#WC.NAME}: IP Address type'
              type: DEPENDENT
              key: 'wc.ip.type[fgWcWtpSessionWtpIpAddressType.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the IP address type of a WTP.
              valuemap:
                name: 'IP Address type'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.2.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: e0340ebc98884ab7a60bfdb4822a3fd5
              name: 'WTP {#WC.NAME}: Local IP Address'
              type: DEPENDENT
              key: 'wc.local_ip.addr[fgWcWtpSessionWtpLocalIpAddress.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the local IP address of a WTP and models the CAPWAP Local IPv4 Address or CAPWAP Local IPv6 Address fields [RFC5415].
                If a Network Address Translation (NAT) device is present between the WTP and access controller (AC), the value of `fgWcWtpWtpLocalIpAddress` will be different from the value of `fgWcWtpWtpIpAddress`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.5.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: df495d85f9f2487e927a2d9649072ed0
              name: 'WTP {#WC.NAME}: Local IP Address type'
              type: DEPENDENT
              key: 'wc.local_ip.type[fgWcWtpSessionWtpLocalIpAddressType.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the local IP address type of a WTP.
              valuemap:
                name: 'IP Address type'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.4.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 9a365c163aef4d93ac221ad90b66ea63
              name: 'WTP {#WC.NAME}: Location'
              type: DEPENDENT
              key: 'wc.location[fgWcWtpConfigWtpLocation.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the location of this WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.4.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: d2c18cf3f65243ee83b32944b68a08ac
              name: 'WTP {#WC.NAME}: Memory capacity'
              type: DEPENDENT
              key: 'wc.mem.size[fgWcWtpSessionWtpMemoryCapacity.{#SNMPINDEX}]'
              units: B
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the total physical memory (RAM) installed.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.22.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: memory
                - tag: component
                  value: wireless
            - uuid: 93287d10f57b4d4bbf295dfc626550ad
              name: 'WTP {#WC.NAME}: Memory usage'
              type: DEPENDENT
              key: 'wc.mem.usage[fgWcWtpSessionWtpMemoryUsage.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the current memory usage of a WTP (percentage).
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.21.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: memory
                - tag: component
                  value: wireless
              trigger_prototypes:
                - uuid: aa29737221724f668ffe2478de0715cf
                  expression: 'min(/FortiGate by SNMP/wc.mem.usage[fgWcWtpSessionWtpMemoryUsage.{#SNMPINDEX}],5m)>{$WC.MEMORY.UTIL.MAX:"{#WC.NAME}"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/FortiGate by SNMP/wc.mem.usage[fgWcWtpSessionWtpMemoryUsage.{#SNMPINDEX}],5m)<{$WC.MEMORY.UTIL.MAX:"{#WC.NAME}"}'
                  name: 'FortiGate: WTP {#WC.NAME}: High memory utilization'
                  event_name: 'FortiGate: WTP {#WC.NAME}: High memory utilization (>{$WC.MEMORY.UTIL.MAX:"{#WC.NAME}"}% for 5m)'
                  priority: WARNING
                  description: 'The WTP is running out of free memory.'
                  tags:
                    - tag: scope
                      value: capacity
                    - tag: scope
                      value: performance
            - uuid: b38e6914dca54948823be8f8acced34f
              name: 'WTP {#WC.NAME}: Model number'
              type: DEPENDENT
              key: 'wc.model[fgWcWtpSessionWtpModelNumber.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the model number of a WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.12.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 545fd4919b944557bc17f28de6cb6fd4
              name: 'WTP {#WC.NAME}: Profile name'
              type: DEPENDENT
              key: 'wc.profile[fgWcWtpConfigWtpProfile.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the profile configured for this WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.5.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: f9f608b2fa564d2aaae0a550c3e5b75f
              name: 'WTP {#WC.NAME}: Radio ATPC high limit'
              type: DEPENDENT
              key: 'wc.radio.atpc.high_limit[fgWcWtpConfigRadioAutoTxPowerHigh.{#SNMPINDEX}]'
              units: '!dBm'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the high limit of radio automatic TX power control configured for this WTP, in dBm.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.9.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 41d20dc6db4948699ccd3d125314ccd4
              name: 'WTP {#WC.NAME}: Radio ATPC low limit'
              type: DEPENDENT
              key: 'wc.radio.atpc.low_limit[fgWcWtpConfigRadioAutoTxPowerLow.{#SNMPINDEX}]'
              units: '!dBm'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the low limit of radio automatic TX power control configured for this WTP, in dBm.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.8.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: b36452a5068141598e5ec84ba56ecaf7
              name: 'WTP {#WC.NAME}: Radio ATPC status'
              type: DEPENDENT
              key: 'wc.radio.atpc.status[fgWcWtpConfigRadioAutoTxPowerControl.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Whether radio automatic TX power control is enabled on this WTP.
              valuemap:
                name: 'Option state'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.7.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 7987308b9347435aac31172c42c0d759
              name: 'WTP {#WC.NAME}: Radio band'
              type: DEPENDENT
              key: 'wc.radio.band[fgWcWtpConfigRadioBand.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the radio band configured for this WTP.
              valuemap:
                name: 'Wireless band type'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.11.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 1341c0982b50497183d2118e21f11284
              name: 'WTP {#WC.NAME}: Radio enabled'
              type: DEPENDENT
              key: 'wc.radio.enabled[fgWcWtpConfigRadioEnable.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Whether radio is enabled for this WTP.
              valuemap:
                name: 'Option state'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.6.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 8595a885371848c29f6d2b7b0da347fd
              name: 'WTP {#WC.NAME}: Radio TX power level'
              type: DEPENDENT
              key: 'wc.radio.power_level[fgWcWtpConfigRadioTxPowerLevel.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the radio TX power setting configured for this WTP, expressed in %.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.10.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 10m
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 3ad0c66eb8db4d61beb4c664455df7af
              name: 'WTP {#WC.NAME}: Bits received'
              type: DEPENDENT
              key: 'wc.rate.in[fgWcWtpSessionWtpByteRxCount.{#SNMPINDEX}]'
              value_type: FLOAT
              units: bps
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the number of bits received by this WTP per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.18.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: b3b14f29d1dd4629bd99286d5aa4ea98
              name: 'WTP {#WC.NAME}: Bits sent'
              type: DEPENDENT
              key: 'wc.rate.out[fgWcWtpSessionWtpByteTxCount.{#SNMPINDEX}]'
              value_type: FLOAT
              units: bps
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the number of bits transmitted by this WTP per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.19.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 6ddda93f378b4ad0b56a1567fb47dc0d
              name: 'WTP {#WC.NAME}: Region code'
              type: DEPENDENT
              key: 'wc.region_code[fgWcWtpSessionWtpRegionCode.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the region code programmed for this WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.16.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 184f5351a1f04a3db572fc9a8a650551
              name: 'WTP {#WC.NAME}: Session uptime'
              type: DEPENDENT
              key: 'wc.session.uptime[fgWcWtpSessionWtpSessionUpTime.{#SNMPINDEX}]'
              units: uptime
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the time since the WTP has been connected to the AC.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.10.{#SNMPINDEX}'
                    - '0'
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
              trigger_prototypes:
                - uuid: 753d2ca60faa4bc99cafbbdafb54309e
                  expression: 'last(/FortiGate by SNMP/wc.session.uptime[fgWcWtpSessionWtpSessionUpTime.{#SNMPINDEX}])<10m'
                  name: 'FortiGate: WTP {#WC.NAME}: Session has been restarted'
                  event_name: 'FortiGate: WTP {#WC.NAME}: Session has been restarted (uptime < 10m)'
                  priority: INFO
                  description: 'Uptime is less than 10 minutes.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 7b5b087cd8da4aba9b6fbbea99190058
              name: 'WTP {#WC.NAME}: Software version'
              type: DEPENDENT
              key: 'wc.software.version[fgWcWtpSessionWtpSwVersion.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the software version of a WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.14.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: c36ff98bbd3f432ab51fce10123dd31a
              name: 'WTP {#WC.NAME}: Uptime'
              type: DEPENDENT
              key: 'wc.uptime[fgWcWtpSessionWtpUpTime.{#SNMPINDEX}]'
              units: uptime
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents the time since the WTP has booted.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.4.1.8.{#SNMPINDEX}'
                    - '0'
                - type: MULTIPLIER
                  parameters:
                    - '0.01'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: c7307fc000a6428c9b819dfa5a192cfa
              name: 'WTP {#WC.NAME}: All VAPs selected'
              type: DEPENDENT
              key: 'wc.vaps.all[fgWcWtpConfigVapAll.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Whether all wireless virtual access points (VAP) are selected for this WTP.
              valuemap:
                name: 'Option state'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.13.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
            - uuid: 95960267c4aa45ceabd423a2ae542b53
              name: 'WTP {#WC.NAME}: VAPs list'
              type: DEPENDENT
              key: 'wc.vaps.list[fgWcWtpConfigVaps.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: FORTINET-FORTIGATE-MIB
                Represents a list of wireless virtual access points (VAP) configured for this WTP.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.4.1.12356.101.14.4.3.1.14.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: wireless.ap.walk
              tags:
                - tag: access-point
                  value: '{#WC.NAME}'
                - tag: component
                  value: wireless
          graph_prototypes:
            - uuid: cabd8db04db74f05b431378b4f0fb68f
              name: 'WTP {#WC.NAME}: Clients'
              ymin_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'wc.clients.num[fgWcWtpSessionWtpStationCount.{#SNMPINDEX}]'
            - uuid: 0b76d54781b94d78a9c5b19912bbb94e
              name: 'WTP {#WC.NAME}: Network traffic'
              ymin_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'wc.rate.in[fgWcWtpSessionWtpByteRxCount.{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'wc.rate.out[fgWcWtpSessionWtpByteTxCount.{#SNMPINDEX}]'
            - uuid: b6d8cd72b1e34b719b4deca047afeac9
              name: 'WTP {#WC.NAME}: Performance'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - color: 199C0D
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'wc.cpu.usage[fgWcWtpSessionWtpCpuUsage.{#SNMPINDEX}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'FortiGate by SNMP'
                    key: 'wc.mem.usage[fgWcWtpSessionWtpMemoryUsage.{#SNMPINDEX}]'
          master_item:
            key: wireless.ap.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#WC.ID}'
                - 1.3.6.1.4.1.12356.101.14.4.3.1.1
                - '0'
                - '{#WC.NAME}'
                - 1.3.6.1.4.1.12356.101.14.4.3.1.3
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: network
        - tag: subclass
          value: firewall
        - tag: subclass
          value: security
        - tag: target
          value: fortigate
        - tag: target
          value: fortinet
      macros:
        - macro: '{$CPU.UTIL.CRIT}'
          value: '90'
          description: 'Threshold of CPU utilization for Warning trigger in %.'
          config:
            type: TEXT
            priority: '1'
            section_name: Thresholds
            label: 'Threshold for CPU utilization (critical)'
            description: 'Threshold of CPU utilization for Warning trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.FREE.CRIT}'
          value: '10'
          description: 'Threshold of disk free space for Critical trigger in %.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Disk free space critical threshold (%)'
            description: 'Threshold of disk free space for Critical trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.FREE.WARN}'
          value: '20'
          description: 'Threshold of disk free space for Warning trigger in %.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Disk free space warning threshold (%)'
            description: 'Threshold of disk free space for Warning trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HA.MEMBER.SN.MATCHES}'
          value: '.*'
          description: 'Used in HA member discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'HA member discovery macro (include)'
            description: 'Used in HA member discovery. Can be overridden on the host or linked template level.'
        - macro: '{$HA.MEMBER.SN.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Used in HA member discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'HA member discovery macro (exclude)'
            description: 'Used in HA member discovery. Can be overridden on the host or linked template level.'
        - macro: '{$ICMP_LOSS_WARN}'
          value: '20'
          description: 'Threshold of ICMP packet loss for Warning trigger in %.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'Threshold of ICMP packet loss'
            description: 'Threshold of ICMP packet loss for Warning trigger 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: 'Threshold of average ICMP response time for Warning trigger in seconds.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Threshold of the average ICMP response'
            description: 'Threshold of average ICMP response time for Warning trigger in seconds.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IF.ERRORS.WARN}'
          value: '2'
          description: 'Threshold of error packet rate for Warning trigger. Can be used with interface name as context.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Threshold of error packet rate'
            description: 'Threshold of error packet rate for Warning trigger. Can be used with interface name as context.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IF.UTIL.MAX}'
          value: '95'
          description: 'Threshold of interface bandwidth utilization for Warning trigger in %. Can be used with interface name as context.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'The threshold in the interface utilization'
            description: 'Threshold of interface bandwidth utilization for Warning trigger in %. Can be used with interface name as context. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IFCONTROL}'
          value: '1'
          description: 'Macro for operational state of interface for "Link down" trigger. Can be used with interface name as context.'
          config:
            type: TEXT
            priority: '15'
            section_name: Other
            label: 'Interfaces control'
            description: 'Macro for operational state of interface for "Link down" trigger. Can be used with interface name as context.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MEMORY.UTIL.MAX}'
          value: '90'
          description: 'Threshold of memory utilization for trigger in %.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Threshold for memory utilization'
            description: 'Threshold of memory utilization for trigger in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NET.IF.IFADMINSTATUS.MATCHES}'
          value: '.*'
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '16'
            section_name: Filters
            label: 'Filter for network interface by adminstatus'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFADMINSTATUS.NOT_MATCHES}'
          value: ^2$
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '17'
            section_name: Filters
            label: 'Filter for network interface by adminstatus (exclude)'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFALIAS.MATCHES}'
          value: '.*'
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '26'
            section_name: Filters
            label: 'Filter for network interfaces by alias'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFALIAS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '27'
            section_name: Filters
            label: 'Filter for network interfaces by alias (exclude)'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFDESCR.MATCHES}'
          value: '.*'
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '18'
            section_name: Filters
            label: 'Filter for network interfaces by description'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFDESCR.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '19'
            section_name: Filters
            label: 'Filter for network interfaces by description (exclude)'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFNAME.MATCHES}'
          value: '.*'
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '20'
            section_name: Filters
            label: 'Filter for network interface by name'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFNAME.NOT_MATCHES}'
          value: '(^[Ll]o[0-9.]*$)'
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '21'
            section_name: Filters
            label: 'Filter for network interface by name (exclude)'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFOPERSTATUS.MATCHES}'
          value: '.*'
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '22'
            section_name: Filters
            label: 'Filter for network interface by status'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFOPERSTATUS.NOT_MATCHES}'
          value: ^6$
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '23'
            section_name: Filters
            label: 'Filter for network interface by status (exclude)'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFTYPE.MATCHES}'
          value: '.*'
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '24'
            section_name: Filters
            label: 'Filter for network interfaces by type'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$NET.IF.IFTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '25'
            section_name: Filters
            label: 'Filter for network interfaces by type (exclude)'
            description: 'Used in Network interface discovery. Can be overridden on the host or linked template level.'
        - macro: '{$SDWAN.HEALTH.IF.CONTROL}'
          value: '1'
          description: 'Used in "Health check state is dead" trigger. Can be used with health check name as context.'
          config:
            type: TEXT
            priority: '30'
            section_name: Other
            label: 'SD-WAN health interface control'
            description: 'Used in "Health check state is dead" trigger. Can be used with health check name as context.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SDWAN.HEALTH.IF.LOSS.WARN}'
          value: '20'
          description: 'Threshold of packet loss for Warning trigger in %. Can be used with health check name as context.'
          config:
            type: TEXT
            priority: '31'
            section_name: Thresholds
            label: 'SD-WAN health interface loss warning'
            description: 'Threshold of packet loss for Warning trigger in %. Can be used with health check name as context. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SDWAN.HEALTH.NAME.MATCHES}'
          value: '.*'
          description: 'Used in SD-WAN health-check discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '28'
            section_name: Filters
            label: 'SD-WAN health name filter (include)'
            description: 'Used in SD-WAN health-check discovery. Can be overridden on the host or linked template level.'
        - macro: '{$SDWAN.HEALTH.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Used in SD-WAN health-check discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '29'
            section_name: Filters
            label: 'SD-WAN health name filter (exclude)'
            description: 'Used in SD-WAN health-check discovery. Can be overridden on the host or linked template level.'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP availability trigger.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'Time interval'
            description: 'The time interval for SNMP availability trigger.'
        - macro: '{$VDOM.NAME.MATCHES}'
          value: '.*'
          description: 'Used in Virtual domain discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '38'
            section_name: Filters
            label: 'VDOM name filter (include)'
            description: 'Used in Virtual domain discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VDOM.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Used in Virtual domain discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '39'
            section_name: Filters
            label: 'VDOM name filter (exclude)'
            description: 'Used in Virtual domain discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VPN.NAME.MATCHES}'
          value: '.*'
          description: 'Used in VPN tunnel discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'VPN tunnel discovery filter (include)'
            description: 'Used in VPN tunnel discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VPN.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Used in VPN tunnel discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'VPN tunnel discovery filter (exclude)'
            description: 'Used in VPN tunnel discovery. Can be overridden on the host or linked template level.'
        - macro: '{$VPN.STATE.CONTROL}'
          value: '1'
          description: 'Used in "Tunnel down" trigger. Can be used with interface name as context.'
          config:
            type: TEXT
            priority: '10'
            section_name: Other
            label: 'Tunnel down trigger macro'
            description: 'Used in "Tunnel down" trigger. Can be used with interface name as context.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$WC.CPU.UTIL.CRIT}'
          value: '90'
          description: 'Threshold of WTP CPU utilization for Warning trigger in %. Can be used with interface name as context.'
          config:
            type: TEXT
            priority: '36'
            section_name: Thresholds
            label: 'Wireless controller CPU utilization (critical)'
            description: 'Threshold of WTP CPU utilization for Warning trigger in %. Can be used with interface name as context. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$WC.MEMORY.UTIL.MAX}'
          value: '90'
          description: 'Threshold of WTP memory utilization for trigger in %. Can be used with interface name as context.'
          config:
            type: TEXT
            priority: '37'
            section_name: Thresholds
            label: 'Wireless controller memory utilization (maximum)'
            description: 'Threshold of WTP memory utilization for trigger in %. Can be used with interface name as context. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$WC.NAME.MATCHES}'
          value: '.*'
          description: 'Used in Wireless discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '32'
            section_name: Filters
            label: 'Wireless controller name filter (include)'
            description: 'Used in Wireless discovery. Can be overridden on the host or linked template level.'
        - macro: '{$WC.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Used in Wireless discovery. Can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '33'
            section_name: Filters
            label: 'Wireless controller name filter (exclude)'
            description: 'Used in Wireless discovery. Can be overridden on the host or linked template level.'
        - macro: '{$WC.STATE.CONTROL}'
          value: '1'
          description: 'Used in "Connection down" trigger. Can be used with interface name as context.'
          config:
            type: TEXT
            priority: '34'
            section_name: Other
            label: 'Wireless controller state control'
            description: 'Used in "Connection down" trigger. Can be used with interface name as context.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$WC.UPDATE.CONTROL}'
          value: '1'
          description: 'Used in "Receiving firmware update" trigger. Can be used with interface name as context.'
          config:
            type: TEXT
            priority: '35'
            section_name: Other
            label: 'Wireless controller update control'
            description: 'Used in "Receiving firmware update" trigger. Can be used with interface name as context.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 16e0654e4e27472cb770e74f6ba29403
          name: 'FortiGate: General'
          pages:
            - name: Overview
              widgets:
                - type: item
                  name: 'SNMP state'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: FFCA28
                    - type: STRING
                      name: description
                      value: SNMP
                    - type: INTEGER
                      name: desc_bold
                      value: '1'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'zabbix[host,snmp,available]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: STRING
                      name: thresholds.0.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Number of CPUs'
                  'y': '2'
                  width: '12'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: system.cpu.num
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: STRING
                      name: value_color
                      value: 1E88E5
                    - type: INTEGER
                      name: value_size
                      value: '50'
                - type: gauge
                  name: 'CPU utilization'
                  'y': '4'
                  width: '24'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: '{ITEM.DESCRIPTION}'
                    - type: INTEGER
                      name: desc_size
                      value: '8'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'system.cpu.util[fgSysCpuUsage.0]'
                    - type: STRING
                      name: thresholds.0.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '80'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                    - type: INTEGER
                      name: units_size
                      value: '15'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: svggraph
                  name: 'Disk usage'
                  'y': '8'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 1976D2
                    - type: STRING
                      name: ds.0.items.0
                      value: vfs.fs.total
                    - type: INTEGER
                      name: ds.0.missingdatafunc
                      value: '1'
                    - type: INTEGER
                      name: ds.0.width
                      value: '6'
                    - type: STRING
                      name: ds.1.color
                      value: 4CAF50
                    - type: STRING
                      name: ds.1.items.0
                      value: vfs.fs.free
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: DEABC
                    - type: STRING
                      name: time_period.from
                      value: now-1d
                    - type: STRING
                      name: time_period.to
                      value: now
                    - type: INTEGER
                      name: working_time
                      value: '1'
                - type: item
                  name: 'SSL VPN state'
                  x: '12'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: FFCA28
                    - type: STRING
                      name: description
                      value: 'VPN SSL'
                    - type: INTEGER
                      name: desc_bold
                      value: '1'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'vpn.ssl.state[fgVpnSslState.0]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: STRING
                      name: thresholds.0.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Total memory'
                  x: '12'
                  'y': '2'
                  width: '12'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '40'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'vm.memory.total[fgSysMemCapacity.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: STRING
                      name: units
                      value: B
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: STRING
                      name: units_color
                      value: 1E88E5
                    - type: STRING
                      name: value_color
                      value: 1E88E5
                    - type: INTEGER
                      name: value_size
                      value: '50'
                - type: item
                  name: Uptime
                  x: '24'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 1E88E5
                    - type: STRING
                      name: description
                      value: Uptime
                    - type: INTEGER
                      name: desc_bold
                      value: '1'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'system.uptime[fgSysUpTime.0]'
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Total disk space'
                  x: '24'
                  'y': '2'
                  width: '12'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '40'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'vfs.fs.total[fgSysDiskCapacity.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: STRING
                      name: units
                      value: B
                    - type: INTEGER
                      name: units_bold
                      value: '0'
                    - type: STRING
                      name: units_color
                      value: 1E88E5
                    - type: STRING
                      name: value_color
                      value: 1E88E5
                    - type: INTEGER
                      name: value_size
                      value: '50'
                - type: gauge
                  name: 'Memory utilization'
                  x: '24'
                  'y': '4'
                  width: '24'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: '{ITEM.DESCRIPTION}'
                    - type: INTEGER
                      name: desc_size
                      value: '8'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'vm.memory.util[memoryUsedPercentage.0]'
                    - type: STRING
                      name: thresholds.0.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                    - type: INTEGER
                      name: units_size
                      value: '15'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  name: 'Serial Number'
                  x: '36'
                  width: '18'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: system.hw.serialnumber
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '40'
                - type: item
                  name: Name
                  x: '36'
                  'y': '2'
                  width: '18'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: system.name
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '40'
                - type: problems
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: acknowledgement_status
                      value: '1'
                    - type: STRING
                      name: reference
                      value: BAAAA
                    - type: INTEGER
                      name: show
                      value: '3'
                    - type: INTEGER
                      name: show_opdata
                      value: '2'
                    - type: INTEGER
                      name: show_tags
                      value: '1'
                    - type: STRING
                      name: tag_priority
                      value: scope
                - type: gauge
                  name: 'Free disk percentage'
                  x: '48'
                  'y': '4'
                  width: '24'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: '{ITEM.DESCRIPTION}'
                    - type: INTEGER
                      name: desc_size
                      value: '8'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: vfs.fs.pfree
                    - type: STRING
                      name: thresholds.0.color
                      value: 0EC9AC
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '40'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '20'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '0'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                    - type: INTEGER
                      name: units_size
                      value: '15'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  name: Firmware
                  x: '54'
                  width: '18'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: system.hw.firmware
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '40'
                - type: item
                  name: Model
                  x: '54'
                  'y': '2'
                  width: '18'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: system.hw.model
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '40'
        - uuid: a6bcd7942915453891b0e7855bbc4e67
          name: 'FortiGate: High availability'
          pages:
            - name: Overview
              widgets:
                - type: item
                  name: 'HA mode'
                  width: '18'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'ha.mode[fgHaSystemMode.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: item
                  name: 'HA cluster group'
                  x: '18'
                  width: '18'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'ha.cluster.group_name[fgHaGroupName.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: item
                  name: 'HA cluster priority'
                  x: '36'
                  width: '18'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'ha.cluster.priority[fgHaPriority.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: item
                  name: 'HA load-balancing schedule'
                  x: '54'
                  width: '18'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'FortiGate by SNMP'
                        key: 'ha.schedule[fgHaSchedule.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
            - name: 'HA members'
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'HA {#HA.ID}: CPU usage'
                    - type: STRING
                      name: reference
                      value: AAAAM
                - type: graphprototype
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'HA {#HA.ID}: Bytes processed'
                    - type: STRING
                      name: reference
                      value: AAAAO
                - type: graphprototype
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'HA {#HA.ID}: Network bandwidth usage'
                    - type: STRING
                      name: reference
                      value: AAAAQ
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'HA {#HA.ID}: Memory usage'
                    - type: STRING
                      name: reference
                      value: AAAAN
                - type: graphprototype
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'HA {#HA.ID}: Packets processed'
                    - type: STRING
                      name: reference
                      value: AAAAP
                - type: graphprototype
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'HA {#HA.ID}: HA events'
                    - type: STRING
                      name: reference
                      value: AAAAR
        - uuid: dc5c356dae574908a63f0e8252e62aa6
          name: 'FortiGate: Statistics'
          pages:
            - name: 'System performance'
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'FortiGate: CPU utilization'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'FortiGate: Memory utilization'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'FortiGate: Memory usage'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'FortiGate: Disk usage'
                    - type: STRING
                      name: reference
                      value: AAAAD
            - name: 'SoC3 NP6Lite statistics'
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'SoC3 {#CPU.ID}: Packets flow'
                    - type: STRING
                      name: reference
                      value: AAAAE
            - name: 'IPS statistics'
              widgets:
                - type: graph
                  width: '72'
                  height: '7'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'FortiGate: IPS statistics'
                    - type: STRING
                      name: reference
                      value: AAAAF
            - name: 'Network interfaces'
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '7'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'Interface {#IFNAME}({#IFALIAS}): Network traffic'
                    - type: STRING
                      name: reference
                      value: AAAAG
            - name: 'SD-WAN statistics'
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Packets statistics'
                    - type: STRING
                      name: reference
                      value: AAAAH
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'SD-WAN [{#HNAME}]:[{#IFNAME}]: Performance'
                    - type: STRING
                      name: reference
                      value: AAAAI
            - name: 'Wireless statistics'
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'WTP {#WC.NAME}: Clients'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                - type: graphprototype
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'WTP {#WC.NAME}: Network traffic'
                    - type: STRING
                      name: reference
                      value: AAAAL
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'FortiGate by SNMP'
                        name: 'WTP {#WC.NAME}: Performance'
                    - type: STRING
                      name: reference
                      value: AAAAK
      valuemaps:
        - uuid: a7e08ed8bf9d4372b60dd44157ed8dc3
          name: 'HA load-balancing schedule'
          mappings:
            - value: '1'
              newvalue: none
            - value: '2'
              newvalue: hub
            - value: '3'
              newvalue: leastConnections
            - value: '4'
              newvalue: roundRobin
            - value: '5'
              newvalue: weightedRoundRobin
            - value: '6'
              newvalue: random
            - value: '7'
              newvalue: ipBased
            - value: '8'
              newvalue: ipPortBased
        - uuid: e90736cde03046dd87f6532af522bd03
          name: 'HA option status'
          mappings:
            - value: '1'
              newvalue: disabled
            - value: '2'
              newvalue: enabled
        - uuid: 1ff2500e234e46fdb532de670a5f2aea
          name: 'HA sync status'
          mappings:
            - value: '0'
              newvalue: unsynchronized
            - value: '1'
              newvalue: synchronized
        - uuid: 65bdbcdc23994f2a8944f5c69a9b061a
          name: 'HA system mode'
          mappings:
            - value: '1'
              newvalue: standalone
            - value: '2'
              newvalue: activeActive
            - value: '3'
              newvalue: activePassive
        - uuid: 7099e2e064d34d32b4a6f96a10798124
          name: 'Health check state'
          mappings:
            - value: '0'
              newvalue: alive
            - value: '1'
              newvalue: dead
        - uuid: 01c410206d2c4754bcaa0dbcbeacade1
          name: 'Host availability status'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 3ba88094988045799337ddb456936f15
          name: 'Interface status'
          mappings:
            - value: '1'
              newvalue: up
            - value: '2'
              newvalue: down
            - value: '3'
              newvalue: testing
            - value: '4'
              newvalue: unknown
            - value: '5'
              newvalue: dormant
            - value: '6'
              newvalue: notPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: 61e451f29c9943cf81ed2647166d664f
          name: 'Interface type'
          mappings:
            - value: '1'
              newvalue: other
            - value: '2'
              newvalue: regular1822
            - value: '3'
              newvalue: hdh1822
            - value: '4'
              newvalue: ddnX25
            - value: '5'
              newvalue: rfc877x25
            - value: '6'
              newvalue: ethernetCsmacd
            - value: '7'
              newvalue: iso88023Csmacd
            - value: '8'
              newvalue: iso88024TokenBus
            - value: '9'
              newvalue: iso88025TokenRing
            - value: '10'
              newvalue: iso88026Man
            - value: '11'
              newvalue: starLan
            - value: '12'
              newvalue: proteon10Mbit
            - value: '13'
              newvalue: proteon80Mbit
            - value: '14'
              newvalue: hyperchannel
            - value: '15'
              newvalue: fddi
            - value: '16'
              newvalue: lapb
            - value: '17'
              newvalue: sdlc
            - value: '18'
              newvalue: ds1
            - value: '19'
              newvalue: e1
            - value: '20'
              newvalue: basicISDN
            - value: '21'
              newvalue: primaryISDN
            - value: '22'
              newvalue: propPointToPointSerial
            - value: '23'
              newvalue: ppp
            - value: '24'
              newvalue: softwareLoopback
            - value: '25'
              newvalue: eon
            - value: '26'
              newvalue: ethernet3Mbit
            - value: '27'
              newvalue: nsip
            - value: '28'
              newvalue: slip
            - value: '29'
              newvalue: ultra
            - value: '30'
              newvalue: ds3
            - value: '31'
              newvalue: sip
            - value: '32'
              newvalue: frameRelay
            - value: '33'
              newvalue: rs232
            - value: '34'
              newvalue: para
            - value: '35'
              newvalue: arcnet
            - value: '36'
              newvalue: arcnetPlus
            - value: '37'
              newvalue: atm
            - value: '38'
              newvalue: miox25
            - value: '39'
              newvalue: sonet
            - value: '40'
              newvalue: x25ple
            - value: '41'
              newvalue: iso88022llc
            - value: '42'
              newvalue: localTalk
            - value: '43'
              newvalue: smdsDxi
            - value: '44'
              newvalue: frameRelayService
            - value: '45'
              newvalue: v35
            - value: '46'
              newvalue: hssi
            - value: '47'
              newvalue: hippi
            - value: '48'
              newvalue: modem
            - value: '49'
              newvalue: aal5
            - value: '50'
              newvalue: sonetPath
            - value: '51'
              newvalue: sonetVT
            - value: '52'
              newvalue: smdsIcip
            - value: '53'
              newvalue: propVirtual
            - value: '54'
              newvalue: propMultiplexor
            - value: '55'
              newvalue: ieee80212
            - value: '56'
              newvalue: fibreChannel
            - value: '57'
              newvalue: hippiInterface
            - value: '58'
              newvalue: frameRelayInterconnect
            - value: '59'
              newvalue: aflane8023
            - value: '60'
              newvalue: aflane8025
            - value: '61'
              newvalue: cctEmul
            - value: '62'
              newvalue: fastEther
            - value: '63'
              newvalue: isdn
            - value: '64'
              newvalue: v11
            - value: '65'
              newvalue: v36
            - value: '66'
              newvalue: g703at64k
            - value: '67'
              newvalue: g703at2mb
            - value: '68'
              newvalue: qllc
            - value: '69'
              newvalue: fastEtherFX
            - value: '70'
              newvalue: channel
            - value: '71'
              newvalue: ieee80211
            - value: '72'
              newvalue: ibm370parChan
            - value: '73'
              newvalue: escon
            - value: '74'
              newvalue: dlsw
            - value: '75'
              newvalue: isdns
            - value: '76'
              newvalue: isdnu
            - value: '77'
              newvalue: lapd
            - value: '78'
              newvalue: ipSwitch
            - value: '79'
              newvalue: rsrb
            - value: '80'
              newvalue: atmLogical
            - value: '81'
              newvalue: ds0
            - value: '82'
              newvalue: ds0Bundle
            - value: '83'
              newvalue: bsc
            - value: '84'
              newvalue: async
            - value: '85'
              newvalue: cnr
            - value: '86'
              newvalue: iso88025Dtr
            - value: '87'
              newvalue: eplrs
            - value: '88'
              newvalue: arap
            - value: '89'
              newvalue: propCnls
            - value: '90'
              newvalue: hostPad
            - value: '91'
              newvalue: termPad
            - value: '92'
              newvalue: frameRelayMPI
            - value: '93'
              newvalue: x213
            - value: '94'
              newvalue: adsl
            - value: '95'
              newvalue: radsl
            - value: '96'
              newvalue: sdsl
            - value: '97'
              newvalue: vdsl
            - value: '98'
              newvalue: iso88025CRFPInt
            - value: '99'
              newvalue: myrinet
            - value: '100'
              newvalue: voiceEM
            - value: '101'
              newvalue: voiceFXO
            - value: '102'
              newvalue: voiceFXS
            - value: '103'
              newvalue: voiceEncap
            - value: '104'
              newvalue: voiceOverIp
            - value: '105'
              newvalue: atmDxi
            - value: '106'
              newvalue: atmFuni
            - value: '107'
              newvalue: atmIma
            - value: '108'
              newvalue: pppMultilinkBundle
            - value: '109'
              newvalue: ipOverCdlc
            - value: '110'
              newvalue: ipOverClaw
            - value: '111'
              newvalue: stackToStack
            - value: '112'
              newvalue: virtualIpAddress
            - value: '113'
              newvalue: mpc
            - value: '114'
              newvalue: ipOverAtm
            - value: '115'
              newvalue: iso88025Fiber
            - value: '116'
              newvalue: tdlc
            - value: '117'
              newvalue: gigabitEthernet
            - value: '118'
              newvalue: hdlc
            - value: '119'
              newvalue: lapf
            - value: '120'
              newvalue: v37
            - value: '121'
              newvalue: x25mlp
            - value: '122'
              newvalue: x25huntGroup
            - value: '123'
              newvalue: trasnpHdlc
            - value: '124'
              newvalue: interleave
            - value: '125'
              newvalue: fast
            - value: '126'
              newvalue: ip
            - value: '127'
              newvalue: docsCableMaclayer
            - value: '128'
              newvalue: docsCableDownstream
            - value: '129'
              newvalue: docsCableUpstream
            - value: '130'
              newvalue: a12MppSwitch
            - value: '131'
              newvalue: tunnel
            - value: '132'
              newvalue: coffee
            - value: '133'
              newvalue: ces
            - value: '134'
              newvalue: atmSubInterface
            - value: '135'
              newvalue: l2vlan
            - value: '136'
              newvalue: l3ipvlan
            - value: '137'
              newvalue: l3ipxvlan
            - value: '138'
              newvalue: digitalPowerline
            - value: '139'
              newvalue: mediaMailOverIp
            - value: '140'
              newvalue: dtm
            - value: '141'
              newvalue: dcn
            - value: '142'
              newvalue: ipForward
            - value: '143'
              newvalue: msdsl
            - value: '144'
              newvalue: ieee1394
            - value: '145'
              newvalue: if-gsn
            - value: '146'
              newvalue: dvbRccMacLayer
            - value: '147'
              newvalue: dvbRccDownstream
            - value: '148'
              newvalue: dvbRccUpstream
            - value: '149'
              newvalue: atmVirtual
            - value: '150'
              newvalue: mplsTunnel
            - value: '151'
              newvalue: srp
            - value: '152'
              newvalue: voiceOverAtm
            - value: '153'
              newvalue: voiceOverFrameRelay
            - value: '154'
              newvalue: idsl
            - value: '155'
              newvalue: compositeLink
            - value: '156'
              newvalue: ss7SigLink
            - value: '157'
              newvalue: propWirelessP2P
            - value: '158'
              newvalue: frForward
            - value: '159'
              newvalue: rfc1483
            - value: '160'
              newvalue: usb
            - value: '161'
              newvalue: ieee8023adLag
            - value: '162'
              newvalue: bgppolicyaccounting
            - value: '163'
              newvalue: frf16MfrBundle
            - value: '164'
              newvalue: h323Gatekeeper
            - value: '165'
              newvalue: h323Proxy
            - value: '166'
              newvalue: mpls
            - value: '167'
              newvalue: mfSigLink
            - value: '168'
              newvalue: hdsl2
            - value: '169'
              newvalue: shdsl
            - value: '170'
              newvalue: ds1FDL
            - value: '171'
              newvalue: pos
            - value: '172'
              newvalue: dvbAsiIn
            - value: '173'
              newvalue: dvbAsiOut
            - value: '174'
              newvalue: plc
            - value: '175'
              newvalue: nfas
            - value: '176'
              newvalue: tr008
            - value: '177'
              newvalue: gr303RDT
            - value: '178'
              newvalue: gr303IDT
            - value: '179'
              newvalue: isup
            - value: '180'
              newvalue: propDocsWirelessMaclayer
            - value: '181'
              newvalue: propDocsWirelessDownstream
            - value: '182'
              newvalue: propDocsWirelessUpstream
            - value: '183'
              newvalue: hiperlan2
            - value: '184'
              newvalue: propBWAp2Mp
            - value: '185'
              newvalue: sonetOverheadChannel
            - value: '186'
              newvalue: digitalWrapperOverheadChannel
            - value: '187'
              newvalue: aal2
            - value: '188'
              newvalue: radioMAC
            - value: '189'
              newvalue: atmRadio
            - value: '190'
              newvalue: imt
            - value: '191'
              newvalue: mvl
            - value: '192'
              newvalue: reachDSL
            - value: '193'
              newvalue: frDlciEndPt
            - value: '194'
              newvalue: atmVciEndPt
            - value: '195'
              newvalue: opticalChannel
            - value: '196'
              newvalue: opticalTransport
            - value: '197'
              newvalue: propAtm
            - value: '198'
              newvalue: voiceOverCable
            - value: '199'
              newvalue: infiniband
            - value: '200'
              newvalue: teLink
            - value: '201'
              newvalue: q2931
            - value: '202'
              newvalue: virtualTg
            - value: '203'
              newvalue: sipTg
            - value: '204'
              newvalue: sipSig
            - value: '205'
              newvalue: docsCableUpstreamChannel
            - value: '206'
              newvalue: econet
            - value: '207'
              newvalue: pon155
            - value: '208'
              newvalue: pon622
            - value: '209'
              newvalue: bridge
            - value: '210'
              newvalue: linegroup
            - value: '211'
              newvalue: voiceEMFGD
            - value: '212'
              newvalue: voiceFGDEANA
            - value: '213'
              newvalue: voiceDID
            - value: '214'
              newvalue: mpegTransport
            - value: '215'
              newvalue: sixToFour
            - value: '216'
              newvalue: gtp
            - value: '217'
              newvalue: pdnEtherLoop1
            - value: '218'
              newvalue: pdnEtherLoop2
            - value: '219'
              newvalue: opticalChannelGroup
            - value: '220'
              newvalue: homepna
            - value: '221'
              newvalue: gfp
            - value: '222'
              newvalue: ciscoISLvlan
            - value: '223'
              newvalue: actelisMetaLOOP
            - value: '224'
              newvalue: fcipLink
            - value: '225'
              newvalue: rpr
            - value: '226'
              newvalue: qam
            - value: '227'
              newvalue: lmp
            - value: '228'
              newvalue: cblVectaStar
            - value: '229'
              newvalue: docsCableMCmtsDownstream
            - value: '230'
              newvalue: adsl2
            - value: '231'
              newvalue: macSecControlledIF
            - value: '232'
              newvalue: macSecUncontrolledIF
            - value: '233'
              newvalue: aviciOpticalEther
            - value: '234'
              newvalue: atmbond
            - value: '235'
              newvalue: voiceFGDOS
            - value: '236'
              newvalue: mocaVersion1
            - value: '237'
              newvalue: ieee80216WMAN
            - value: '238'
              newvalue: adsl2plus
            - value: '239'
              newvalue: dvbRcsMacLayer
            - value: '240'
              newvalue: dvbTdm
            - value: '241'
              newvalue: dvbRcsTdma
            - value: '242'
              newvalue: x86Laps
            - value: '243'
              newvalue: wwanPP
            - value: '244'
              newvalue: wwanPP2
            - value: '245'
              newvalue: voiceEBS
            - value: '246'
              newvalue: ifPwType
            - value: '247'
              newvalue: ilan
            - value: '248'
              newvalue: pip
            - value: '249'
              newvalue: aluELP
            - value: '250'
              newvalue: gpon
            - value: '251'
              newvalue: vdsl2
            - value: '252'
              newvalue: capwapDot11Profile
            - value: '253'
              newvalue: capwapDot11Bss
            - value: '254'
              newvalue: capwapWtpVirtualRadio
            - value: '255'
              newvalue: bits
            - value: '256'
              newvalue: docsCableUpstreamRfPort
            - value: '257'
              newvalue: cableDownstreamRfPort
            - value: '258'
              newvalue: vmwareVirtualNic
            - value: '259'
              newvalue: ieee802154
            - value: '260'
              newvalue: otnOdu
            - value: '261'
              newvalue: otnOtu
            - value: '262'
              newvalue: ifVfiType
            - value: '263'
              newvalue: g9981
            - value: '264'
              newvalue: g9982
            - value: '265'
              newvalue: g9983
            - value: '266'
              newvalue: aluEpon
            - value: '267'
              newvalue: aluEponOnu
            - value: '268'
              newvalue: aluEponPhysicalUni
            - value: '269'
              newvalue: aluEponLogicalLink
            - value: '270'
              newvalue: aluGponOnu
            - value: '271'
              newvalue: aluGponPhysicalUni
            - value: '272'
              newvalue: vmwareNicTeam
            - value: '277'
              newvalue: docsOfdmDownstream
            - value: '278'
              newvalue: docsOfdmaUpstream
            - value: '279'
              newvalue: gfast
            - value: '280'
              newvalue: sdci
            - value: '281'
              newvalue: xboxWireless
            - value: '282'
              newvalue: fastdsl
            - value: '283'
              newvalue: docsCableScte55d1FwdOob
            - value: '284'
              newvalue: docsCableScte55d1RetOob
            - value: '285'
              newvalue: docsCableScte55d2DsOob
            - value: '286'
              newvalue: docsCableScte55d2UsOob
            - value: '287'
              newvalue: docsCableNdf
            - value: '288'
              newvalue: docsCableNdr
            - value: '289'
              newvalue: ptm
            - value: '290'
              newvalue: ghn
        - uuid: 8aa46ac9d6c44ffe8213c8f09a42eb50
          name: 'IP Address type'
          mappings:
            - value: '1'
              newvalue: ipv4
            - value: '2'
              newvalue: ipv6
        - uuid: ba3b57b54fb44466aca78692ba3dda97
          name: 'Option state'
          mappings:
            - value: '1'
              newvalue: disabled
            - value: '2'
              newvalue: enabled
        - uuid: c41154255ef34d65bc0636bef7fe0bfa
          name: 'Sensor alert status'
          mappings:
            - value: '0'
              newvalue: 'false'
            - value: '1'
              newvalue: 'true'
        - uuid: 398df996f3474f2abdd26d52d5c83dd5
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: down
            - value: '1'
              newvalue: up
        - uuid: a0ba5fd924d8458d9be8e70db252277d
          name: 'VDOM HA state'
          mappings:
            - value: '1'
              newvalue: primary
            - value: '2'
              newvalue: secondary
            - value: '3'
              newvalue: standalone
        - uuid: b0decb11dd494681b813bc4bd03a6b1a
          name: 'VDOM operation mode'
          mappings:
            - value: '1'
              newvalue: nat
            - value: '2'
              newvalue: transparent
        - uuid: 44e1f0b6062c414a8252fe34bad1987c
          name: 'VPN status'
          mappings:
            - value: '1'
              newvalue: down
            - value: '2'
              newvalue: up
        - uuid: 08690a78109441c78c8f5bafae3cd3a4
          name: 'Wireless admin status'
          mappings:
            - value: '0'
              newvalue: other
            - value: '1'
              newvalue: discovered
            - value: '2'
              newvalue: disable
            - value: '3'
              newvalue: enable
        - uuid: a5a52ea3f94242eba7220554244ce63a
          name: 'Wireless band type'
          mappings:
            - value: '0'
              newvalue: other
            - value: '1'
              newvalue: 2Ghz
            - value: '2'
              newvalue: 5Ghz
        - uuid: 40c5ac1ba5034b5490faa930ee7ed331
          name: 'Wireless connection status'
          mappings:
            - value: '0'
              newvalue: other
            - value: '1'
              newvalue: offLine
            - value: '2'
              newvalue: onLine
            - value: '3'
              newvalue: downloadingImage
            - value: '4'
              newvalue: connectedImage
    - uuid: 37e5eb5606bc4abba66c8b20381a1e8a
      template: 'ICMP Ping'
      name: 'ICMP Ping'
      description: |
        Template Net ICMP Ping
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        Set `Threshold of ICMP packet loss` and `Threshold of the average ICMP response`.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: db5a94f6cea14deba957202b2f014469
          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: b030876299434f3ba43e11c584104a81
              expression: 'max(/ICMP Ping/icmpping,#3)=0'
              name: 'ICMP Ping: Unavailable by ICMP ping'
              priority: HIGH
              description: 'Last three attempts returned timeout. Please check device connectivity.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 04b21adaf422473a88df2c52786474ed
          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: 42c4b0310aaf4b9c8cb502542b7dea90
              expression: 'min(/ICMP Ping/icmppingloss,5m)>{$ICMP_LOSS_WARN} and min(/ICMP Ping/icmppingloss,5m)<100'
              name: 'ICMP Ping: High ICMP ping loss'
              opdata: 'Loss: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'ICMP packets loss detected.'
              dependencies:
                - name: 'ICMP Ping: Unavailable by ICMP ping'
                  expression: 'max(/ICMP Ping/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: a79e33e5fd264725b934f603fa071555
          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: 32b4d8f3eba34bd380803410111d4b7f
              expression: 'avg(/ICMP Ping/icmppingsec,5m)>{$ICMP_RESPONSE_TIME_WARN}'
              name: 'ICMP Ping: High ICMP ping response time'
              opdata: 'Value: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Average ICMP response time is too high.'
              dependencies:
                - name: 'ICMP Ping: High ICMP ping loss'
                  expression: 'min(/ICMP Ping/icmppingloss,5m)>{$ICMP_LOSS_WARN} and min(/ICMP Ping/icmppingloss,5m)<100'
                - name: 'ICMP Ping: Unavailable by ICMP ping'
                  expression: 'max(/ICMP Ping/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
      tags:
        - tag: class
          value: network
        - tag: target
          value: icmp
      macros:
        - macro: '{$ICMP_LOSS_WARN}'
          value: '20'
          description: 'Warning threshold of ICMP packet loss in %.'
          config:
            type: TEXT
            priority: '1'
            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: '2'
            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]+)))$'
      valuemaps:
        - uuid: bdb5d65d925542eaa61c302dc40fbfe8
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 001a1677f6a949b6bddfdb2926023300
      template: 'MSSQL by ODBC'
      name: 'MSSQL by ODBC'
      description: |
        This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via ODBC and doesn't require any external scripts.
        
        Setup:
        
        1. Create an MSSQL user for monitoring.
        
          View Server State and View Any Definition permissions should be granted to the user.
          Grant this user read permissions to the sysjobschedules, sysjobhistory, and sysjobs tables.
        
          For more information, see MSSQL documentation:
          
          - Create a database user: https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-user?view=sql-server-ver16
          
          - GRANT Server Permissions: https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-server-permissions-transact-sql?view=sql-server-ver16
          
          - Configure a User to Create and Manage SQL Server Agent Jobs: https://docs.microsoft.com/en-us/sql/ssms/agent/configure-a-user-to-create-and-manage-sql-server-agent-jobs?view=sql-server-ver16
        
        2. Set the user name and password in the host macros ({$MSSQL.USER} and {$MSSQL.PASSWORD}).
        
        3. Do not forget to install Microsoft ODBC driver on Zabbix server or Zabbix proxy and specify data source name in macro {$MSSQL.DSN}.
          
          See Microsoft documentation for instructions: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16.
        
          Note! Credentials in the odbc.ini do not work for MSSQL.
        
        The "Service's TCP port state" item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
        
        If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
        
        Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        1. Create a monitoring user on MSSQL for Zabbix to connect to:
            - for MSSQL Server 2022
            ```sql
            CREATE LOGIN zabbix WITH PASSWORD = 'password'
            GRANT VIEW SERVER PERFORMANCE STATE TO zabbix
            GRANT VIEW ANY DEFINITION TO zabbix
            USE msdb
            CREATE USER zabbix FOR LOGIN zabbix
            GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
            GO
            ```
            - for MSSQL versions 2017 and 2019
            ```sql
            CREATE LOGIN zabbix WITH PASSWORD = 'password'
            GRANT VIEW SERVER STATE TO zabbix
            GRANT VIEW ANY DEFINITION TO zabbix
            USE msdb
            CREATE USER zabbix FOR LOGIN zabbix
            GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
            GO
            ```
        
            To allow Zabbix to query SQL Server Agent job information, a dedicated login must be created and granted the required permissions through T-SQL:
                - **VIEW SERVER STATE** is required for Microsoft SQL Server 2017 and 2019
                - **VIEW SERVER PERFORMANCE STATE** is required for Microsoft SQL Server 2022
                - **VIEW ANY DEFINITION** allows access to object definitions and metadata
                - **SELECT** allows the user to read data from the sysjobschedules, sysjobhistory, and sysjobs tables in the msdb database  
            
            
            For more information, see MSSQL documentation:
                - [Create a database user](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-user?view=sql-server-ver16)
                - [GRANT Server Permissions](https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-server-permissions-transact-sql?view=sql-server-ver16)
                - [Configure a User to Create and Manage SQL Server Agent Jobs](https://docs.microsoft.com/en-us/sql/ssms/agent/configure-a-user-to-create-and-manage-sql-server-agent-jobs?view=sql-server-ver16)
        
        2. Set the username and password in the `MSSQL user` and `MSSQL password` host wizard configuration fields.  
        3. Set the connection string for the MSSQL instance in the `MSSQL URI` host wizard configuration field as a URI, such as `<protocol://host:port>`, or specify the named session - `<sessionname>`.
        
            The `Service's TCP port state` item uses the `MSSQL address` and `MSSQL TCP port` host wizard configuration fields to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
            
            Additional notes:
            - You can use the `Monitoring of full backup`, `Monitoring of log backup`, and `Monitoring of differential backup` host wizard configuration fields to disable backup age triggers. If set to unselected state, the trigger expression for the backup age will not fire.
            - Since version 7.2.0, you can also connect to the MSSQL instance using its name. To do this, set the connection string in the `MSSQL URI` host wizard configuration field as `<protocol://host/instance_name>`.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Databases
      items:
        - uuid: f495898e37c94bfda4ce387f7129b996
          name: 'Get availability groups'
          type: ODBC
          key: 'db.odbc.get[get_availability_group,"{$MSSQL.DSN}"]'
          history: '0'
          value_type: TEXT
          params: |
            SELECT
              ag.name as group_name,
              ISNULL(ags.primary_recovery_health, 2) as primary_recovery_health,
              ISNULL(ags.primary_replica, 'Unknown') as primary_replica,
              ISNULL(
                ags.secondary_recovery_health, 2
              ) as secondary_recovery_health,
              ags.synchronization_health as synchronization_health
            FROM
              sys.dm_hadr_availability_group_states ags
            JOIN sys.availability_groups ag ON ag.group_id = ags.group_id
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'The item gets availability group states - name, primary and secondary health, synchronization health.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 9c902b33ed254e1892e44218a67876d3
          name: 'Get database'
          type: ODBC
          key: 'db.odbc.get[get_database,"{$MSSQL.DSN}"]'
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            SELECT name as dbname, recovery_model
            FROM sys.databases
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'Getting databases - database name and recovery model.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 9948ac27a2f84ba5a74ee0860d934f4e
          name: 'Get DB mirroring'
          type: ODBC
          key: 'db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"]'
          history: '0'
          value_type: TEXT
          params: |
            SELECT
              ISNULL(m.mirroring_role, 0) as mirroring_role,
              ISNULL(m.mirroring_role_sequence, 0) as mirroring_role_sequence,
              ISNULL(m.mirroring_state, 7) as mirroring_state,
              ISNULL(m.mirroring_witness_state, 3) as mirroring_witness_state,
              ISNULL(m.mirroring_safety_level, 3) as mirroring_safety_level,
              db_name(m.database_id) as dbname
            FROM
              sys.database_mirroring as m
            WHERE
              m.mirroring_state_desc IS NOT NULL
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'Getting DB mirroring.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: cae1f9b034b04357b038212b04cac794
          name: 'Get job status'
          type: ODBC
          key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
          delay: 10m
          history: '0'
          value_type: TEXT
          params: |
            SELECT sj.name AS job_name,
              sj.enabled AS enabled,
              sjs.last_run_outcome AS run_status,
              sjs.last_outcome_message AS last_run_status_message,
              sjs.last_run_duration/10000*3600 + sjs.last_run_duration/100%100*60 + sjs.last_run_duration%100 AS run_duration,
              CASE sjs.last_run_date
                WHEN 0 THEN NULL
                ELSE CONVERT(
                  VARCHAR(25),
                  TODATETIMEOFFSET(msdb.dbo.agent_datetime(sjs.last_run_date,sjs.last_run_time), DATEPART(TZoffset, SYSDATETIMEOFFSET())),
                  126)
              END AS last_run_date_time,
              sja.next_scheduled_run_date AS next_run_date_time
            FROM msdb..sysjobs AS sj
            LEFT JOIN msdb..sysjobservers AS sjs
              ON sj.job_id = sjs.job_id
            LEFT JOIN (
              SELECT job.job_id,
                max(act.session_id) AS s_id,
                CONVERT(
                  VARCHAR(25),
                  TODATETIMEOFFSET(max(act.next_scheduled_run_date), DATEPART(TZoffset, SYSDATETIMEOFFSET())),
                  126) AS next_scheduled_run_date
              FROM msdb..sysjobs AS job
              LEFT JOIN msdb..sysjobactivity AS act
                ON act.job_id = job.job_id
              GROUP BY  job.job_id ) AS sja
                ON sja.job_id = sj.job_id
            WHERE Enabled = 1
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'The item gets the SQL agent job status.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 9b106ca122fb4b75a761e80f4239f906
          name: 'Get last backup'
          type: ODBC
          key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
          delay: 10m
          history: '0'
          value_type: TEXT
          params: |
            SELECT bs.database_name as dbname,
              [type], 
              DATEDIFF(SECOND, bs.backup_finish_date, getdate()) as time_since_last_backup, 
              (DATEDIFF(SECOND, bs.backup_start_date, bs.backup_finish_date)) as duration,
              db.recovery_model as db_recovery_model
            FROM msdb.dbo.backupset as bs
            LEFT JOIN sys.databases as db ON bs.database_name = db.name
            WHERE bs.database_name not in (
              SELECT AGDatabases.database_name AS Databasename
              FROM sys.dm_hadr_availability_group_states States
              INNER JOIN master.sys.availability_groups Groups 
                ON States.group_id = Groups.group_id
              INNER JOIN sys.availability_databases_cluster AGDatabases 
                ON Groups.group_id = AGDatabases.group_id
              WHERE primary_replica != @@Servername OR primary_replica is NULL
            ) and db.name is not NULL
            GROUP BY bs.database_name, 
              backup_finish_date, 
              [type], 
              backup_start_date,
              db.recovery_model
            HAVING backup_finish_date = (
              SELECT MAX(backup_finish_date)
              FROM msdb.dbo.backupset 
              WHERE database_name = bs.database_name 
                AND bs.type = [type]
            )
            ORDER BY bs.database_name
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'The item gets information about backup processes.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 3960ea4dc0054ee099d5bca005535e6b
          name: 'Get local DB'
          type: ODBC
          key: 'db.odbc.get[get_local_db,"{$MSSQL.DSN}"]'
          history: '0'
          value_type: TEXT
          params: |
            SELECT ag.name AS group_name, 
              drs.database_state as database_state, 
              drs.is_suspended as is_suspended, 
              drs.synchronization_health as synchronization_health, 
              arcs.replica_server_name AS replica_name,
              db_name(drs.database_id) AS dbname, 
              drs.is_local
            FROM sys.dm_hadr_database_replica_states drs 
            JOIN sys.dm_hadr_availability_replica_cluster_states arcs
              ON arcs.replica_id = drs.replica_id
            JOIN sys.availability_groups ag 
              ON ag.group_id = arcs.group_id
            JOIN sys.dm_hadr_availability_replica_states ars 
              ON ars.replica_id = arcs.replica_id
            WHERE drs.is_local = 1
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'Getting the states of the local availability database.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: e4480bba876d472294920020734eadf5
          name: 'Get non-local DB'
          type: ODBC
          key: 'db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"]'
          history: '0'
          value_type: TEXT
          params: |
            SELECT ag.name AS group_name, 
              ISNULL(drs.log_send_queue_size, 0) as log_send_queue_size, 
              ISNULL(drs.redo_queue_size, 0) as redo_queue_size, 
              arcs.replica_server_name AS replica_name,
              db_name(drs.database_id) AS dbname, 
              drs.is_local
            FROM sys.dm_hadr_database_replica_states drs 
            JOIN sys.dm_hadr_availability_replica_cluster_states arcs
              ON arcs.replica_id = drs.replica_id
            JOIN sys.availability_groups ag 
              ON ag.group_id = arcs.group_id
            JOIN sys.dm_hadr_availability_replica_states ars 
              ON ars.replica_id = arcs.replica_id
            WHERE drs.is_local = 0
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'Getting the non-local availability database.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 3fcb3b84bdee42428bedc39fcc582c9e
          name: 'Get quorum'
          type: ODBC
          key: 'db.odbc.get[get_quorum,"{$MSSQL.DSN}"]'
          history: '0'
          value_type: TEXT
          params: |
            SELECT quorum_type, quorum_state, cluster_name
            FROM sys.dm_hadr_cluster
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'Getting quorum - cluster name, type, and state.'
          timeout: 10s
          tags:
            - tag: component
              value: raw
        - uuid: 69a31cdfbf9b4099bf89adb26e8b9f06
          name: 'Get quorum member'
          type: ODBC
          key: 'db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"]'
          history: '0'
          value_type: TEXT
          params: |
            SELECT a.member_name, a.member_type, a.member_state, a.number_of_quorum_votes, b.cluster_name
            FROM sys.dm_hadr_cluster_members a
            CROSS JOIN sys.dm_hadr_cluster b
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'Getting quorum members - member name, type, state, and number of quorum votes.'
          timeout: 10s
          tags:
            - tag: component
              value: raw
        - uuid: 7a82483c605d4e8eb67c2576069cf8a9
          name: 'Get replica'
          type: ODBC
          key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
          history: '0'
          value_type: TEXT
          params: |
            SELECT 
              ars.connected_state as connected_state, 
              ars.is_local as is_local, 
              arcs.join_state as join_state, 
              ISNULL(ars.operational_state, 6) as operational_state, 
              ISNULL(ars.recovery_health, 2) as recovery_health, 
              ars.role as role, 
              ars.synchronization_health as synchronization_health, 
              ag.name as group_name, 
              arcs.replica_server_name as replica_name 
            FROM 
              sys.dm_hadr_availability_replica_cluster_states as arcs 
            JOIN sys.availability_groups ag ON ag.group_id = arcs.group_id 
            JOIN sys.dm_hadr_availability_replica_states ars ON ars.replica_id = arcs.replica_id
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'Getting the database replica.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: ff07b83d161c4e0fbddf8c2e2c282258
          name: 'Get performance counters'
          type: ODBC
          key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          delay: 0;m0-59
          history: '0'
          value_type: TEXT
          params: |
            DECLARE @SQLNAME NVARCHAR(22)
            SET @SQLNAME = CASE WHEN @@SERVICENAME = 'MSSQLSERVER' THEN 'SQLServer' ELSE 'MSSQL$' + @@SERVICENAME END
            SELECT object_name,
              counter_name,
              instance_name,
              cntr_value
            FROM sys.dm_os_performance_counters
            UNION SELECT @SQLNAME AS object_name,
              'Version' AS counter_name,
              @@version AS instance_name,
              0 AS cntr_value
            UNION SELECT @SQLNAME AS object_name,
              'Uptime' AS counter_name,
              '' AS instance_name,
              DATEDIFF(second, sqlserver_start_time, GETDATE()) AS cntr_value
            FROM sys.dm_os_sys_info
            UNION SELECT @SQLNAME + ':Databases' AS object_name,
              'State' AS counter_name,
              name AS instance_name,
              state AS cntr_value
            FROM sys.databases
            UNION SELECT a.object_name,
              'BufferCacheHitRatio' AS counter_name,
              '' AS instance_name,
              cast(a.cntr_value * ISNULL((100.0 / NULLIF(b.cntr_value,0)),0) AS dec(3, 0)) AS cntr_value
            FROM sys.dm_os_performance_counters a
            JOIN (
              SELECT cntr_value,
                OBJECT_NAME
              FROM sys.dm_os_performance_counters
              WHERE counter_name = 'Buffer cache hit ratio base'
                AND OBJECT_NAME = @SQLNAME + ':Buffer Manager'
            ) b
              ON a.OBJECT_NAME = b.OBJECT_NAME
            WHERE a.counter_name = 'Buffer cache hit ratio'
              AND a.OBJECT_NAME = @SQLNAME + ':Buffer Manager'
            UNION SELECT a.object_name,
              'WorktablesFromCacheRatio' AS counter_name,
              '' AS instance_name,
              cast(a.cntr_value * ISNULL((100.0 / NULLIF(b.cntr_value,0)),0) AS dec(3, 0)) AS cntr_value
            FROM sys.dm_os_performance_counters a
            JOIN (
              SELECT cntr_value,
                OBJECT_NAME
              FROM sys.dm_os_performance_counters
              WHERE counter_name = 'Worktables From Cache Base'
                AND OBJECT_NAME = @SQLNAME + ':Access Methods'
            ) b
              ON a.OBJECT_NAME = b.OBJECT_NAME
            WHERE a.counter_name = 'Worktables From Cache Ratio'
              AND a.OBJECT_NAME = @SQLNAME + ':Access Methods'
            UNION SELECT a.object_name,
              'CacheHitRatio' AS counter_name,
              '_Total' AS instance_name,
              cast(a.cntr_value * ISNULL((100.0 / NULLIF(b.cntr_value,0)),0) AS dec(3, 0)) AS cntr_value
            FROM sys.dm_os_performance_counters a
            JOIN (
              SELECT cntr_value,
                OBJECT_NAME
              FROM sys.dm_os_performance_counters
              WHERE counter_name = 'Cache Hit Ratio base'
                AND OBJECT_NAME = @SQLNAME + ':Plan Cache'
                AND instance_name = '_Total'
            ) b
              ON a.OBJECT_NAME = b.OBJECT_NAME
            WHERE a.counter_name = 'Cache Hit Ratio'
              AND a.OBJECT_NAME = @SQLNAME + ':Plan Cache'
              AND instance_name = '_Total'
          username: '{$MSSQL.USER}'
          password: '{$MSSQL.PASSWORD}'
          description: 'The item gets server global status information.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: c0400032a74549078448a928f17d3128
          name: 'Get Access Methods counters'
          type: DEPENDENT
          key: mssql.access_methods.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about access methods.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Access Methods'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 9a83826b50ac4928b9a716cf94ed6b61
          name: 'Auto-param attempts per second'
          type: DEPENDENT
          key: mssql.autoparam_attempts_sec.rate
          value_type: FLOAT
          description: 'Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Auto-Param Attempts/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: 1d49af2907d541719e4482439de3ef40
          name: 'Average latch wait time'
          type: CALCULATED
          key: mssql.average_latch_wait_time
          delay: 0;m0-59s3
          value_type: FLOAT
          units: ms
          params: |
            (last(//mssql.average_latch_wait_time_raw) - last(//mssql.average_latch_wait_time_raw,#2)) /
            (last(//mssql.average_latch_wait_time_base) - last(//mssql.average_latch_wait_time_base,#2) +
            (last(//mssql.average_latch_wait_time_base) - last(//mssql.average_latch_wait_time_base,#2)=0))
          description: 'Average latch wait time (in milliseconds) for latch requests that had to wait.'
          tags:
            - tag: component
              value: wait-time
        - uuid: f9d78cd9c941471287a24ca94005e9ac
          name: 'Average latch wait time base'
          type: DEPENDENT
          key: mssql.average_latch_wait_time_base
          description: 'For internal use only.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Average Latch Wait Time Base'')].cntr_value.first()'
          master_item:
            key: mssql.latches_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: 7248e70669674ef5a7a85deb20b1fe8e
          name: 'Average latch wait time raw'
          type: DEPENDENT
          key: mssql.average_latch_wait_time_raw
          units: ms
          description: 'Average latch wait time (in milliseconds) for latch requests that had to wait.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Average Latch Wait Time (ms)'')].cntr_value.first()'
          master_item:
            key: mssql.latches_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: 2915866b5891480aafd73463aca88a21
          name: 'Total average wait time'
          type: CALCULATED
          key: mssql.average_wait_time
          delay: 0;m0-59s3
          value_type: FLOAT
          units: ms
          params: |
            (last(//mssql.average_wait_time_raw) - last(//mssql.average_wait_time_raw,#2)) /
            (last(//mssql.average_wait_time_base) - last(//mssql.average_wait_time_base,#2) +
            (last(//mssql.average_wait_time_base) - last(//mssql.average_wait_time_base,#2)=0))
          description: 'The average wait time, in milliseconds, for each lock request that had to wait.'
          tags:
            - tag: component
              value: wait-time
          triggers:
            - uuid: fad2c1e9d0ba45bcbb47ccbb327f0b98
              expression: 'min(/MSSQL by ODBC/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX}'
              name: 'MSSQL: Total average wait time for locks is high'
              event_name: 'MSSQL: Total average wait time for locks is high (over {$MSSQL.AVERAGE_WAIT_TIME.MAX}ms for 5m)'
              priority: WARNING
              description: 'An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 2a63096aa40a4374bdd7426b9fe0767e
          name: 'Total average wait time base'
          type: DEPENDENT
          key: mssql.average_wait_time_base
          description: 'For internal use only.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Average Wait Time Base'')].cntr_value.first()'
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: f0cd7858dabf4b7da93314dc9a8ddeaa
          name: 'Total average wait time raw'
          type: DEPENDENT
          key: mssql.average_wait_time_raw
          units: ms
          description: 'Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Average Wait Time (ms)'')].cntr_value.first()'
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: 00b6e46811fd43a396e2a38dd976d220
          name: 'Batch requests per second'
          type: DEPENDENT
          key: mssql.batch_requests_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Batch Requests/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: ed950d204a1f40a6925856828c7807aa
          name: 'Buffer cache hit ratio'
          type: DEPENDENT
          key: mssql.buffer_cache_hit_ratio
          value_type: FLOAT
          units: '%'
          description: 'Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''BufferCacheHitRatio'')].cntr_value.first()'
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: cache
          triggers:
            - uuid: f84fa297023a4aee903e4d32bbad9360
              expression: 'max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}'
              name: 'MSSQL: Percentage of the buffer cache efficiency is low'
              event_name: 'MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}% for 5m)'
              priority: HIGH
              description: 'Too low buffer cache hit ratio.'
              tags:
                - tag: scope
                  value: performance
            - uuid: 42e5bf05da06425282134d3cf806d023
              expression: 'max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}'
              name: 'MSSQL: Percentage of the buffer cache efficiency is low'
              event_name: 'MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}% for 5m)'
              priority: WARNING
              description: 'Low buffer cache hit ratio.'
              dependencies:
                - name: 'MSSQL: Percentage of the buffer cache efficiency is low'
                  expression: 'max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}'
              tags:
                - tag: scope
                  value: performance
        - uuid: eadb0b4b4eed412c9a29137a2f4232fd
          name: 'Get Buffer Manager counters'
          type: DEPENDENT
          key: mssql.buffer_manager.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about the buffer pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Buffer Manager'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 1900fc83a4d74c599f5f3438450b5d8b
          name: 'Cache hit ratio'
          type: DEPENDENT
          key: mssql.cache_hit_ratio
          value_type: FLOAT
          units: '%'
          description: 'Ratio between cache hits and lookups.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''CacheHitRatio'')].cntr_value.first()'
          master_item:
            key: mssql.cache_info.raw
          tags:
            - tag: component
              value: cache
        - uuid: b9bab8e37b9c46acbf9c64073bfcf0e6
          name: 'Get Cache counters'
          type: DEPENDENT
          key: mssql.cache_info.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about cache.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Plan Cache'' && @.instance_name==''_Total'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 064e1279ae0a4260ab02c08cd3c3f77d
          name: 'Cache objects in use'
          type: DEPENDENT
          key: mssql.cache_objects_in_use
          description: 'Number of cache objects in use.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Cache Objects in use'')].cntr_value.first()'
          master_item:
            key: mssql.cache_info.raw
          tags:
            - tag: component
              value: cache
        - uuid: de8c0d7f9c0b42438560dc28e47fdd19
          name: 'Cache object counts'
          type: DEPENDENT
          key: mssql.cache_object_counts
          description: 'Number of cache objects in the cache.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Cache Object Counts'')].cntr_value.first()'
          master_item:
            key: mssql.cache_info.raw
          tags:
            - tag: component
              value: cache
        - uuid: ae2d22cd04ed452dbdb04ae3f71b8586
          name: 'Cache pages'
          type: DEPENDENT
          key: mssql.cache_pages
          description: 'Number of 8-kilobyte (KB) pages used by cache objects.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Cache Pages'')].cntr_value.first()'
          master_item:
            key: mssql.cache_info.raw
          tags:
            - tag: component
              value: cache
            - tag: component
              value: page
        - uuid: d72b6aadab0c4d6d83bc72da0ce661c3
          name: 'Checkpoint pages per second'
          type: DEPENDENT
          key: mssql.checkpoint_pages_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Checkpoint pages/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
        - uuid: 9c1ca822375644669821fe1bea4c5f2a
          name: 'Database pages'
          type: DEPENDENT
          key: mssql.database_pages
          description: 'Indicates the number of pages in the buffer pool with database content.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Database pages'')].cntr_value.first()'
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
        - uuid: 871e3520aac84c18bcaf2f3a0d565b79
          name: 'Total data file size'
          type: DEPENDENT
          key: mssql.data_files_size
          units: B
          description: 'Total size of all data files.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Data File(s) Size (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: mssql.db_info.raw
          tags:
            - tag: component
              value: application
        - uuid: 9f7bc0b3ae25483cb7290ef6feaa5c84
          name: 'Get DB counters'
          type: DEPENDENT
          key: mssql.db_info.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets summary information about databases.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Databases'' && @.instance_name==''_Total'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 4cdecc74a6e44b57b17f44988d3ffa21
          name: 'Total errors per second'
          type: DEPENDENT
          key: mssql.errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''_Total'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: 5ed7f6931c42424f8ec3dbe2e6c46f03
          name: 'Failed auto-params per second'
          type: DEPENDENT
          key: mssql.failed_autoparams_sec.rate
          value_type: FLOAT
          description: 'Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Failed Auto-Params/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: cee8f4d47d41463299c50b5c7925a650
          name: 'Forwarded records per second'
          type: DEPENDENT
          key: mssql.forwarded_records_sec.rate
          value_type: FLOAT
          description: 'Number of records per second fetched through forwarded record pointers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Forwarded Records/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
        - uuid: 22d1a41352c4477ba3db5d1a9e038597
          name: 'Free list stalls per second'
          type: DEPENDENT
          key: mssql.free_list_stalls_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Indicates the number of requests per second that had to wait for a free page.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Free list stalls/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: f055a294ef3b43dd8958e77c303a5fee
              expression: 'min(/MSSQL by ODBC/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX}'
              name: 'MSSQL: Number of rps waiting for a free page is high'
              event_name: 'MSSQL: Number of rps waiting for a free page is high (over {$MSSQL.FREE_LIST_STALLS.MAX} for 5m)'
              priority: WARNING
              description: 'Some requests have to wait for a free page.'
              tags:
                - tag: scope
                  value: performance
        - uuid: ace67686bb93456c80b40be1f33c173f
          name: 'Full scans per second'
          type: DEPENDENT
          key: mssql.full_scans_sec.rate
          value_type: FLOAT
          description: 'Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Full Scans/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
        - uuid: 6c17a38a9e9246ecbad3a6b2cb83c6cc
          name: 'Get General Statistics counters'
          type: DEPENDENT
          key: mssql.general_statistics.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets general statistics information.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*General Statistics'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: f2539791f65a40569bcf6b1c89647904
          name: 'Granted Workspace Memory'
          type: DEPENDENT
          key: mssql.granted_workspace_memory
          units: B
          description: 'Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Granted Workspace Memory (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: 585f1a22108143d8b39337900da8860c
          name: 'Index searches per second'
          type: DEPENDENT
          key: mssql.index_searches_sec.rate
          value_type: FLOAT
          description: 'Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Index Searches/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
        - uuid: eafdabca35bd40a58432dd36a210a4e4
          name: 'Errors per second (Info errors)'
          type: DEPENDENT
          key: mssql.info_errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''Info Errors'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: b68d1f8108d7494b9d4d891911708c72
          name: 'Errors per second (Kill connection errors)'
          type: DEPENDENT
          key: mssql.kill_connection_errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''Kill Connection Errors'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: 04714203d50645fdb4c69e333facd60e
          name: 'Get Latches counters'
          type: DEPENDENT
          key: mssql.latches_info.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about latches.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Latches'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: c1242c5530654057bca59cb9ad12c319
          name: 'Latch waits per second'
          type: DEPENDENT
          key: mssql.latch_waits_sec.rate
          value_type: FLOAT
          units: rps
          description: 'The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Latch Waits/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.latches_info.raw
          tags:
            - tag: component
              value: performance
            - tag: component
              value: wait-time
        - uuid: 66cc84326bd146ac89f91ddeaa61f63a
          name: 'Lazy writes per second'
          type: DEPENDENT
          key: mssql.lazy_writes_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of buffers written per second by the buffer manager''s lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lazy writes/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: 8aa547cda82f4dfcaef5ca0467590f64
              expression: 'min(/MSSQL by ODBC/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX}'
              name: 'MSSQL: Number of buffers written per second by the lazy writer is high'
              event_name: 'MSSQL: Number of buffers written per second by the lazy writer is high (over {$MSSQL.LAZY_WRITES.MAX} for 5m)'
              priority: WARNING
              description: 'The number of buffers written per second by the buffer manager''s lazy writer exceeds the threshold.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 1b39ade916d243299f6350faaee167c8
          name: 'Get Locks counters'
          type: DEPENDENT
          key: mssql.locks_info.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about locks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Locks'' && @.instance_name==''_Total'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 1b4c71c016504eb08b1a49146095c231
          name: 'Total lock requests per second'
          type: DEPENDENT
          key: mssql.lock_requests_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of new locks and lock conversions per second requested from the lock manager.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lock Requests/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: lock
            - tag: component
              value: performance
          triggers:
            - uuid: be4e0b1aec8d494b984be248424d69cf
              expression: 'min(/MSSQL by ODBC/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX}'
              name: 'MSSQL: Total number of locks per second is high'
              event_name: 'MSSQL: Total number of locks per second is high (over {$MSSQL.LOCK_REQUESTS.MAX} for 5m)'
              priority: WARNING
              description: 'Number of new locks and lock conversions per second requested from the lock manager is high.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 0ac1aab7013249c6a0beb89217bf52c6
          name: 'Total lock requests per second that timed out'
          type: DEPENDENT
          key: mssql.lock_timeouts_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of timed out lock requests per second, including requests for NOWAIT locks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lock Timeouts/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: lock
            - tag: component
              value: performance
          triggers:
            - uuid: 9b62d84b8d9c4209b894151f59c42b27
              expression: 'min(/MSSQL by ODBC/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX}'
              name: 'MSSQL: Total lock requests per second that timed out is high'
              event_name: 'MSSQL: Total lock requests per second that timed out is high (over {$MSSQL.LOCK_TIMEOUTS.MAX} for 5m)'
              priority: WARNING
              description: 'The total number of timed out lock requests per second, including requests for NOWAIT locks, is high.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 77be28b4732d4665a4e880f2ea309245
          name: 'Total lock requests per second that required waiting'
          type: DEPENDENT
          key: mssql.lock_waits_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of lock requests per second that required the caller to wait.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lock Waits/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: lock
            - tag: component
              value: performance
          triggers:
            - uuid: 879748a03c89495398b41fc1dbeba9ed
              expression: 'min(/MSSQL by ODBC/mssql.lock_waits_sec.rate,5m)>0'
              name: 'MSSQL: Some blocking is occurring for 5m'
              priority: AVERAGE
              description: 'Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem.'
              tags:
                - tag: scope
                  value: performance
        - uuid: bf4ef99559f94147b9b64144f6b795c0
          name: 'Lock wait time'
          type: DEPENDENT
          key: mssql.lock_wait_time
          value_type: FLOAT
          units: ms
          description: 'Average of total wait time (in milliseconds) for locks in the last second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lock Wait Time (ms)'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: lock
        - uuid: c7856bdb5285421cb79cec0782fa1188
          name: 'Logins per second'
          type: DEPENDENT
          key: mssql.logins_sec.rate
          value_type: FLOAT
          description: 'Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Logins/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.general_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: cf4af2cbeaff42b2a71c91544286998f
          name: 'Logouts per second'
          type: DEPENDENT
          key: mssql.logouts_sec.rate
          value_type: FLOAT
          description: 'Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Logouts/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.general_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: e0620ce52e6d4269b9d12e82c749a146
          name: 'Total log file size'
          type: DEPENDENT
          key: mssql.log_files_size
          units: B
          description: 'Total size of all the transaction log files.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Log File(s) Size (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: mssql.db_info.raw
          tags:
            - tag: component
              value: log
        - uuid: 636e7c85a79947a39f7b176e8e3c5b82
          name: 'Total log file used size'
          type: DEPENDENT
          key: mssql.log_files_used_size
          units: B
          description: 'The cumulative size of all the log files in the database.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Log File(s) Used Size (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.db_info.raw
          tags:
            - tag: component
              value: log
        - uuid: 28c1045fb77249aea23f55f48dd89c69
          name: 'Maximum workspace memory'
          type: DEPENDENT
          key: mssql.maximum_workspace_memory
          units: B
          description: 'Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Maximum Workspace Memory (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: d39c5f2b89de4bc88c7724a8e2b270d7
          name: 'Memory grants outstanding'
          type: DEPENDENT
          key: mssql.memory_grants_outstanding
          description: 'Specifies the total number of processes that have successfully acquired a workspace memory grant.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Memory Grants Outstanding'')].cntr_value.first()'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: cb468e25c20f43f08fcefd45354ff882
          name: 'Memory grants pending'
          type: DEPENDENT
          key: mssql.memory_grants_pending
          description: 'Specifies the total number of processes waiting for a workspace memory grant.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Memory Grants Pending'')].cntr_value.first()'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: 982b21186af84be2a34f76e5bccb7a27
          name: 'Get Memory counters'
          type: DEPENDENT
          key: mssql.mem_manager.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets memory information.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Memory Manager'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 18c0d77ded2b4533a559643006a93406
          name: 'Total lock requests per second that have deadlocks'
          type: DEPENDENT
          key: mssql.number_deadlocks_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of lock requests per second that resulted in a deadlock.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Number of Deadlocks/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: deadlock
            - tag: component
              value: performance
          triggers:
            - uuid: a8f77c32a7194af9b2674f0931c25212
              expression: 'min(/MSSQL by ODBC/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX}'
              name: 'MSSQL: Number of deadlocks is high'
              event_name: 'MSSQL: Number of deadlocks is high (over {$MSSQL.DEADLOCKS.MAX} for 5m)'
              priority: AVERAGE
              description: 'Too many deadlocks are occurring currently.'
              tags:
                - tag: scope
                  value: performance
        - uuid: bbb7fcac41b2403ab0b0c76f3437e81f
          name: 'Errors per second (DB offline errors)'
          type: DEPENDENT
          key: mssql.offline_errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''DB Offline Errors'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: 94a869db684046d9b65db9ee022a9c9e
          name: 'Page life expectancy'
          type: DEPENDENT
          key: mssql.page_life_expectancy
          value_type: FLOAT
          units: s
          description: 'Indicates the number of seconds a page will stay in the buffer pool without references.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page life expectancy'')].cntr_value.first()'
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
          triggers:
            - uuid: 4eb155a86f8b4441a6707e8a3816a068
              expression: 'max(/MSSQL by ODBC/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}'
              name: 'MSSQL: Page life expectancy is low'
              event_name: 'MSSQL: Page life expectancy is low (less {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}min for 15m)'
              priority: HIGH
              description: 'The page stays in the buffer pool without references for less time than the threshold value.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 628f787578e04b83882aca052a7f976a
          name: 'Page lookups per second'
          type: DEPENDENT
          key: mssql.page_lookups_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Indicates the number of requests per second to find a page in the buffer pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page lookups/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: performance
        - uuid: 433257a5dfe4488c8073db03bfb05315
          name: 'Page reads per second'
          type: DEPENDENT
          key: mssql.page_reads_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page reads/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
          triggers:
            - uuid: c0b765b22b264d7c9086edc5cda35592
              expression: 'min(/MSSQL by ODBC/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX}'
              name: 'MSSQL: Number of physical database page reads per second is high'
              event_name: 'MSSQL: Number of physical database page reads per second is high (over {$MSSQL.PAGE_READS.MAX} for 5m)'
              priority: WARNING
              description: 'The physical database page reads are issued too frequently.'
              tags:
                - tag: scope
                  value: performance
        - uuid: fc3dd6a1bf1242769e2b58f25421a19d
          name: 'Page splits per second'
          type: DEPENDENT
          key: mssql.page_splits_sec.rate
          value_type: FLOAT
          description: 'Number of page splits per second that occur as a result of overflowing index pages.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page Splits/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
        - uuid: a8b3639fe7b44d88a75e724c083518b5
          name: 'Page writes per second'
          type: DEPENDENT
          key: mssql.page_writes_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of physical database page writes that are issued per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page writes/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
          triggers:
            - uuid: 548941f4a7cc4cadba64d8efd46655da
              expression: 'min(/MSSQL by ODBC/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX}'
              name: 'MSSQL: Number of physical database page writes per second is high'
              event_name: 'MSSQL: Number of physical database page writes per second is high (over {$MSSQL.PAGE_WRITES.MAX} for 5m)'
              priority: WARNING
              description: 'The physical database page writes are issued too frequently.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 76918163a16e4ad786bed2040acc8061
          name: 'Percent of ad hoc queries running'
          type: CALCULATED
          key: mssql.percent_of_adhoc_queries
          delay: 0;m0-59s3
          value_type: FLOAT
          units: '%'
          params: |
            last(//mssql.sql_compilations_sec.rate) * 100 /
            (last(//mssql.batch_requests_sec.rate) + (last(//mssql.batch_requests_sec.rate)=0))
          description: 'The ratio of SQL compilations per second to batch requests per second, in percent.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: c5c1840220cd44fcaa7b47e0d52309bb
              expression: 'min(/MSSQL by ODBC/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX}'
              name: 'MSSQL: Percent of ad hoc queries running is high'
              event_name: 'MSSQL: Percent of ad hoc queries running is over {$MSSQL.PERCENT_COMPILATIONS.MAX}% for 15m'
              priority: WARNING
              description: 'The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using `sp_executeSQL`. When rewriting isn''t possible, consider using a plan guide or setting the database to parameterization forced mode.'
              tags:
                - tag: scope
                  value: performance
        - uuid: ceab0472883f47b0a18b04fc6f7438ab
          name: 'Percent of Recompiled Transact-SQL Objects'
          type: CALCULATED
          key: mssql.percent_recompilations_to_compilations
          delay: 0;m0-59s3
          value_type: FLOAT
          units: '%'
          params: |
            last(//mssql.sql_recompilations_sec.rate) * 100 /
            (last(//mssql.sql_compilations_sec.rate) + (last(//mssql.sql_compilations_sec.rate)=0))
          description: 'The ratio of SQL re-compilations per second to SQL compilations per second, in percent.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: d5bad8ead8704e00bf332032e22ebfdd
              expression: 'min(/MSSQL by ODBC/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX}'
              name: 'MSSQL: Percent of times statement recompiles is high'
              event_name: 'MSSQL: Percent of times statement recompiles is over {$MSSQL.PERCENT_RECOMPILATIONS.MAX}% for 15m'
              priority: WARNING
              description: 'This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter''s value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec".'
              tags:
                - tag: scope
                  value: performance
        - uuid: 5c0bee24f9494bb49860171ff875caf7
          name: 'Number of blocked processes'
          type: DEPENDENT
          key: mssql.processes_blocked
          description: 'Number of currently blocked processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Processes blocked'')].cntr_value.first()'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: mssql.general_statistics.raw
          tags:
            - tag: component
              value: application
        - uuid: fc14b0c814234b12a3943eb0435cd28c
          name: 'Read-ahead pages per second'
          type: DEPENDENT
          key: mssql.readahead_pages_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of pages read per second in anticipation of use.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Readahead pages/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
        - uuid: be47be0cbb924982aaf9573c5a233144
          name: 'Safe auto-params per second'
          type: DEPENDENT
          key: mssql.safe_autoparams_sec.rate
          value_type: FLOAT
          description: 'Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Safe Auto-Params/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: 9ce27df57ebc4ecca1a4741e66c9fba0
          name: 'Full scans to Index searches ratio'
          type: CALCULATED
          key: mssql.scan_to_search
          delay: 0;m0-59s3
          value_type: FLOAT
          params: 'last(//mssql.full_scans_sec.rate) / (last(//mssql.index_searches_sec.rate) + (last(//mssql.index_searches_sec.rate)=0))'
          description: 'The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 3c22a74a94d641389b57a6013ddd10cb
              expression: 'min(/MSSQL by ODBC/mssql.scan_to_search,15m) > 0.001'
              name: 'MSSQL: Number of index and table scans exceeds index searches in the last 15m'
              priority: WARNING
              description: 'Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations.'
              tags:
                - tag: scope
                  value: performance
        - uuid: e9ea451a38424f6b9da59b8bbb068b51
          name: 'SQL compilations per second'
          type: DEPENDENT
          key: mssql.sql_compilations_sec.rate
          value_type: FLOAT
          description: 'Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''SQL Compilations/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: c7e0a26bf403482daec65a4b3cd0fd18
          name: 'Get SQL Errors counters'
          type: DEPENDENT
          key: mssql.sql_errors.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets SQL error information.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*SQL Errors'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: a72415acabda46309c4dbc692e026cc2
          name: 'SQL re-compilations per second'
          type: DEPENDENT
          key: mssql.sql_recompilations_sec.rate
          value_type: FLOAT
          description: 'Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''SQL Re-Compilations/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: ca60d01d14d04566bf1a5e6b3b819538
          name: 'Get SQL Statistics counters'
          type: DEPENDENT
          key: mssql.sql_statistics.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets SQL statistics information.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*SQL Statistics'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 595aa3989b4e41cc8649827525adc0a0
          name: 'Table lock escalations per second'
          type: DEPENDENT
          key: mssql.table_lock_escalations.rate
          value_type: FLOAT
          description: 'Number of times locks on a table were escalated to the TABLE or HoBT granularity.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Table Lock Escalations/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: lock
            - tag: component
              value: performance
        - uuid: 37269b33e05349a1bfd05e4e493da6d4
          name: 'Target pages'
          type: DEPENDENT
          key: mssql.target_pages
          description: 'The optimal number of pages in the buffer pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Target pages'')].cntr_value.first()'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
        - uuid: 2679f7e843e549ce9468f6cab05a71d5
          name: 'Target server memory'
          type: DEPENDENT
          key: mssql.target_server_memory
          units: B
          description: 'Indicates the ideal amount of memory the server can consume.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Target Server Memory (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: 8c7d63f3689f464394a6035a3cad4009
          name: 'Total latch wait time'
          type: DEPENDENT
          key: mssql.total_latch_wait_time
          value_type: FLOAT
          units: ms
          description: 'Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Total Latch Wait Time (ms)'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.latches_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: 9112ed9b9d3741018d40f2dc892fa0f6
          name: 'Total server memory'
          type: DEPENDENT
          key: mssql.total_server_memory
          units: B
          description: 'Specifies the amount of memory the server has committed using the memory manager.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Total Server Memory (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: 273b373d8b41411fafcfd1e93bb8ce2c
          name: 'Total transactions number'
          type: DEPENDENT
          key: mssql.transactions
          description: 'The number of currently active transactions of all types.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Transactions'' && @.counter_name==''Transactions'')].cntr_value.first()'
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: transaction
        - uuid: 127e1f73ce414eeb87d2cbfef46ccdef
          name: 'Total transactions per second'
          type: DEPENDENT
          key: mssql.transactions_sec.rate
          value_type: FLOAT
          description: 'Total number of transactions started for all databases per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Transactions/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.db_info.raw
          tags:
            - tag: component
              value: performance
            - tag: component
              value: transaction
        - uuid: ef6450dfcb9a476ca1bf97524e05d43d
          name: 'Unsafe auto-params per second'
          type: DEPENDENT
          key: mssql.unsafe_autoparams_sec.rate
          value_type: FLOAT
          description: 'Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Unsafe Auto-Params/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: 27449e795c0a4e4e90c9ee6b6bf3df90
          name: Uptime
          type: DEPENDENT
          key: mssql.uptime
          trends: '0'
          units: uptime
          description: 'MSSQL Server uptime in the format "N days, hh:mm:ss".'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Uptime'')].cntr_value.first()'
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 0321c9f671394cb180fdce53b4033cf4
              expression: 'nodata(/MSSQL by ODBC/mssql.uptime,30m)=1'
              name: 'MSSQL: Failed to fetch info data'
              event_name: 'MSSQL: 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.'
              dependencies:
                - name: 'MSSQL: Service is unavailable'
                  expression: 'last(/MSSQL by ODBC/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: aa10f863608a494281f41e12f0d2b1a5
              expression: 'last(/MSSQL by ODBC/mssql.uptime)<10m'
              name: 'MSSQL: Service has been restarted'
              event_name: 'MSSQL: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 4e13bfc5927a421fb2996eec7e013448
          name: 'Number of users connected'
          type: DEPENDENT
          key: mssql.user_connections
          description: 'Number of users connected to MSSQL Server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''User Connections'')].cntr_value.first()'
          master_item:
            key: mssql.general_statistics.raw
          tags:
            - tag: component
              value: application
        - uuid: 5942cad838e8430a9ff71293dec52af8
          name: 'Errors per second (User errors)'
          type: DEPENDENT
          key: mssql.user_errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''User Errors'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: 7013504d4a6c4b40a0aab11dab15d107
          name: Version
          type: DEPENDENT
          key: mssql.version
          value_type: CHAR
          description: 'MSSQL Server version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Version'')].instance_name.first()'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 4ece2c9172714c68b8345834cc37d927
              expression: 'last(/MSSQL by ODBC/mssql.version,#1)<>last(/MSSQL by ODBC/mssql.version,#2) and length(last(/MSSQL by ODBC/mssql.version))>0'
              name: 'MSSQL: Version has changed'
              event_name: 'MSSQL: Version has changed (new version value received: {ITEM.VALUE})'
              priority: INFO
              description: 'MSSQL version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: ea84affd97864dfaad7edf31e16e1300
          name: 'Work files created per second'
          type: DEPENDENT
          key: mssql.workfiles_created_sec.rate
          value_type: FLOAT
          description: 'Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Workfiles Created/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: 2f7e2dd4a94e4e92b468f4e2e2364f71
              expression: 'min(/MSSQL by ODBC/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX}'
              name: 'MSSQL: Number of work files created per second is high'
              event_name: 'MSSQL: Number of work files created per second is high (over {$MSSQL.WORK_FILES.MAX} for 5m)'
              priority: AVERAGE
              description: 'Too many work files created per second to store temporary results for hash joins and hash aggregates.'
              tags:
                - tag: scope
                  value: performance
        - uuid: a38e7fdf994842558227dfad03e9943b
          name: 'Work tables created per second'
          type: DEPENDENT
          key: mssql.worktables_created_sec.rate
          value_type: FLOAT
          description: 'Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Worktables Created/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: 0214004de3084ce6b35d5bba53a66947
              expression: 'min(/MSSQL by ODBC/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX}'
              name: 'MSSQL: Number of work tables created per second is high'
              event_name: 'MSSQL: Number of work tables created per second is high (over {$MSSQL.WORK_TABLES.MAX} for 5m)'
              priority: AVERAGE
              description: 'Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors.'
              tags:
                - tag: scope
                  value: performance
        - uuid: d93779b26c1a4784be31d32130eebf92
          name: 'Worktables from cache ratio'
          type: DEPENDENT
          key: mssql.worktables_from_cache_ratio
          value_type: FLOAT
          units: '%'
          description: 'Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''WorktablesFromCacheRatio'')].cntr_value.first()'
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: cache
          triggers:
            - uuid: 98dee2bc42484988b208e100cc25ae05
              expression: 'max(/MSSQL by ODBC/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}'
              name: 'MSSQL: Percentage of work tables available from the work table cache is low'
              event_name: 'MSSQL: Percentage of work tables available from the work table cache is low (below {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}% for 5m)'
              priority: HIGH
              description: 'A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system.'
              tags:
                - tag: scope
                  value: performance
        - uuid: c0302965c2574b43955a1d37a8fce9eb
          name: 'Service''s TCP port state'
          type: SIMPLE
          key: 'net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}]'
          delay: 30s
          description: 'Test the availability of MSSQL Server on a TCP port.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 152af5cc3ce04d4aa8ab255c37aed6c6
              expression: 'last(/MSSQL by ODBC/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0'
              name: 'MSSQL: Service is unavailable'
              priority: DISASTER
              description: 'The TCP port of the MSSQL Server service is currently unavailable.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 6261715081794a49938d848c677da657
          name: 'Availability group discovery'
          type: DEPENDENT
          key: mssql.availability.group.discovery
          description: 'Discovery of the existing availability groups.'
          item_prototypes:
            - uuid: 381c88cf5b0c47319b036e79265b0a20
              name: 'MSSQL AG ''{#GROUP_NAME}'': Primary replica recovery health'
              type: DEPENDENT
              key: 'mssql.primary_recovery_health["{#GROUP_NAME}"]'
              description: |
                Indicates the recovery health of the primary replica:
                0 = In progress
                1 = Online
                2 = Unavailable
              valuemap:
                name: 'MSSQL AG Recovery health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.group_name==''{#GROUP_NAME}'')].primary_recovery_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_availability_group,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: availability-group
              trigger_prototypes:
                - uuid: c472a4f8400e451db529d5e12b863216
                  expression: 'last(/MSSQL by ODBC/mssql.primary_recovery_health["{#GROUP_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'': Primary replica recovery health in progress'
                  priority: WARNING
                  description: 'The primary replica is in the synchronization process.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: scope
                      value: notice
            - uuid: df51dcd0ef864705bc542e1233c1135b
              name: 'MSSQL AG ''{#GROUP_NAME}'': Primary replica name'
              type: DEPENDENT
              key: 'mssql.primary_replica["{#GROUP_NAME}"]'
              value_type: CHAR
              description: 'Name of the server instance that is hosting the current primary replica.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.group_name==''{#GROUP_NAME}'')].primary_replica.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: 'db.odbc.get[get_availability_group,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: availability-group
            - uuid: d2e76a734bd84484b6bd59b33c921f34
              name: 'MSSQL AG ''{#GROUP_NAME}'': Secondary replica recovery health'
              type: DEPENDENT
              key: 'mssql.secondary_recovery_health["{#GROUP_NAME}"]'
              description: |
                Indicates the recovery health of a secondary replica:
                0 = In progress
                1 = Online
                2 = Unavailable
              valuemap:
                name: 'MSSQL AG Recovery health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.group_name==''{#GROUP_NAME}'')].secondary_recovery_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_availability_group,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: availability-group
              trigger_prototypes:
                - uuid: 1fbf51eb9f8b432c8e0d9ec3af1cab44
                  expression: 'last(/MSSQL by ODBC/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'': Secondary replica recovery health in progress'
                  priority: WARNING
                  description: 'The secondary replica is in the synchronization process.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: scope
                      value: notice
            - uuid: fe59d23d0ba44777b0abf1a35b2c014e
              name: 'MSSQL AG ''{#GROUP_NAME}'': Synchronization health'
              type: DEPENDENT
              key: 'mssql.synchronization_health["{#GROUP_NAME}"]'
              description: |
                Reflects a rollup of the `synchronization_health` of all availability replicas in the availability group:
                0 = Not healthy. None of the availability replicas have a healthy synchronization.
                1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy.
                2 = Healthy. The synchronization of every availability replica is healthy.
              valuemap:
                name: 'MSSQL AG Synchronization health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.group_name==''{#GROUP_NAME}'')].synchronization_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_availability_group,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: availability-group
              trigger_prototypes:
                - uuid: 2ee92e5ea41744ac9e27ffaa4313bdec
                  expression: 'last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'': All replicas unhealthy'
                  priority: DISASTER
                  description: 'None of the availability replicas have a healthy synchronization.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: scope
                      value: availability
                - uuid: fd24c78f1db24186932d17d1145b6e92
                  expression: 'last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=1'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'': Some replicas unhealthy'
                  priority: HIGH
                  description: 'The synchronization health of some, but not all, availability replicas is healthy.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: scope
                      value: availability
          master_item:
            key: 'db.odbc.get[get_availability_group,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#GROUP_NAME}'
              path: $.group_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: 2e38ea24c9bf4a5480df0816b7c659b3
          name: 'Database discovery'
          type: DEPENDENT
          key: mssql.database.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DBNAME}'
                value: '{$MSSQL.DBNAME.MATCHES}'
              - macro: '{#DBNAME}'
                value: '{$MSSQL.DBNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Scanning databases in DBMS.'
          item_prototypes:
            - uuid: 9c9dab20d8fa46f888c6aa7c7c9bf1b9
              name: 'MSSQL DB ''{#DBNAME}'': Last diff backup duration'
              type: DEPENDENT
              key: 'mssql.backup.diff.duration["{#DBNAME}"]'
              units: s
              description: 'Duration of the last differential backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''I'')].duration.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: bd663e1e9b40469cb4ca430186b049db
              name: 'MSSQL DB ''{#DBNAME}'': Last diff backup (time ago)'
              type: DEPENDENT
              key: 'mssql.backup.diff["{#DBNAME}"]'
              units: s
              description: 'The amount of time since the last differential backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''I'')].time_since_last_backup.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 036892c6b9de41c698a4e9acd5457e6a
                  expression: 'last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1'
                  name: 'MSSQL: DB ''{#DBNAME}'': Diff backup is old'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"}'
                  opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'The differential backup has not been executed for a long time.'
                  manual_close: 'YES'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: 9a294163ee034fc6a58f5534a7d79aac
                  expression: 'last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1'
                  name: 'MSSQL: DB ''{#DBNAME}'': Diff backup is old'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Diff backup older than {$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"}'
                  opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The differential backup has not been executed for a long time.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'MSSQL: DB ''{#DBNAME}'': Diff backup is old'
                      expression: 'last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
            - uuid: 52929d988ad34aac945ff2ce9e448261
              name: 'MSSQL DB ''{#DBNAME}'': Last full backup duration'
              type: DEPENDENT
              key: 'mssql.backup.full.duration["{#DBNAME}"]'
              units: s
              description: 'Duration of the last full backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''D'')].duration.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 06d0ac1eeca843a289defa1cf1d728a3
              name: 'MSSQL DB ''{#DBNAME}'': Last full backup (time ago)'
              type: DEPENDENT
              key: 'mssql.backup.full["{#DBNAME}"]'
              units: s
              description: 'The amount of time since the last full backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''D'')].time_since_last_backup.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 09c8e059ffa44d0eb1be626b5d820dc9
                  expression: 'last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1'
                  name: 'MSSQL: DB ''{#DBNAME}'': Full backup is old'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"}'
                  opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'The full backup has not been executed for a long time.'
                  manual_close: 'YES'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: b380d76b1055482ca8cd69c90611f1a5
                  expression: 'last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1'
                  name: 'MSSQL: DB ''{#DBNAME}'': Full backup is old'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Full backup older than {$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"}'
                  opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The full backup has not been executed for a long time.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'MSSQL: DB ''{#DBNAME}'': Full backup is old'
                      expression: 'last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 218241c7c5a648a59021999f97516349
              name: 'MSSQL DB ''{#DBNAME}'': Last log backup duration'
              type: DEPENDENT
              key: 'mssql.backup.log.duration["{#DBNAME}"]'
              units: s
              description: 'Duration of the last log backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''L'')].duration.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: c5e796bc904848efb2557c8a9a07b828
              name: 'MSSQL DB ''{#DBNAME}'': Last log backup (time ago)'
              type: DEPENDENT
              key: 'mssql.backup.log["{#DBNAME}"]'
              units: s
              description: 'The amount of time since the last log backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''L'')].time_since_last_backup.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: a6a276b5a8ce4b00b277e507ea7b15ee
              name: 'MSSQL DB ''{#DBNAME}'': Get last backup'
              type: DEPENDENT
              key: 'mssql.backup.raw["{#DBNAME}"]'
              history: '0'
              value_type: TEXT
              description: 'The item gets information about backup processes for {#DBNAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: raw
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 52a2d8012fea467582b09505e9c880be
              name: 'MSSQL DB ''{#DBNAME}'': Recovery model'
              type: DEPENDENT
              key: 'mssql.backup.recovery_model["{#DBNAME}"]'
              description: |
                Recovery model selected:
                1 = Full
                2 = Bulk_logged
                3 = Simple
              valuemap:
                name: 'MSSQL Recovery model'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[0].db_recovery_model'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '1'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: f4f218f22d6d48419260003880b38abd
              name: 'MSSQL DB ''{#DBNAME}'': Active transactions'
              type: DEPENDENT
              key: 'mssql.db.active_transactions["{#DBNAME}"]'
              description: 'Number of active transactions for the database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Active Transactions'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: ff3916f807784639a1821229d4d722d8
              name: 'MSSQL DB ''{#DBNAME}'': Data file size'
              type: DEPENDENT
              key: 'mssql.db.data_files_size["{#DBNAME}"]'
              units: B
              description: 'Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of `tempdb`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Data File(s) Size (KB)'')].cntr_value.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 0d7bdf4c18fa49e79926e6f6d078d50f
              name: 'MSSQL DB ''{#DBNAME}'': Log bytes flushed per second'
              type: DEPENDENT
              key: 'mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"]'
              value_type: FLOAT
              units: Bps
              description: 'Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Bytes Flushed/sec'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 85536311e68047a6a8bf13c51c8d0647
              name: 'MSSQL DB ''{#DBNAME}'': Log file size'
              type: DEPENDENT
              key: 'mssql.db.log_files_size["{#DBNAME}"]'
              units: B
              description: 'Cumulative size of all the transaction log files in the database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log File(s) Size (KB)'')].cntr_value.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 75fd2f42e274471c97cb23dc740863b8
              name: 'MSSQL DB ''{#DBNAME}'': Log file used size'
              type: DEPENDENT
              key: 'mssql.db.log_files_used_size["{#DBNAME}"]'
              units: B
              description: 'Cumulative size of all the log files in the database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log File(s) Used Size (KB)'')].cntr_value.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: c10b6f364aa547d8b4abe431ae27d70b
              name: 'MSSQL DB ''{#DBNAME}'': Log flushes per second'
              type: DEPENDENT
              key: 'mssql.db.log_flushes_sec.rate["{#DBNAME}"]'
              value_type: FLOAT
              description: 'Number of log flushes per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Flushes/sec'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 5404c8682b294a06a3027dc10d0b43fc
              name: 'MSSQL DB ''{#DBNAME}'': Log flush waits per second'
              type: DEPENDENT
              key: 'mssql.db.log_flush_waits_sec.rate["{#DBNAME}"]'
              value_type: FLOAT
              description: 'Number of commits per second waiting for the log flush.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Flush Waits/sec'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: b351fc1128c24faf88d36717d0a0d1a5
                  expression: 'min(/MSSQL by ODBC/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"}'
                  name: 'MSSQL: DB ''{#DBNAME}'': Number of commits waiting for the log flush is high'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Number of commits waiting for the log flush is high (over {$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"}/sec for 5m)'
                  priority: WARNING
                  description: 'Too many commits are waiting for the log flush.'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: performance
            - uuid: f1abdb0800534f6bbf9f1403e7dea9e4
              name: 'MSSQL DB ''{#DBNAME}'': Log flush wait time'
              type: DEPENDENT
              key: 'mssql.db.log_flush_wait_time["{#DBNAME}"]'
              value_type: FLOAT
              units: ms
              description: 'Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Flush Wait Time'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 80351c56215148b8ab75d95dc81ff0d0
                  expression: 'min(/MSSQL by ODBC/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"}'
                  name: 'MSSQL: DB ''{#DBNAME}'': Total wait time to flush the log is high'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Total wait time to flush the log is high (over {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"}ms for 5m)'
                  priority: WARNING
                  description: 'The wait time to flush the log is too long.'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: performance
            - uuid: fdb24058e54243e8b5a888ec40d506e9
              name: 'MSSQL DB ''{#DBNAME}'': Log growths'
              type: DEPENDENT
              key: 'mssql.db.log_growths["{#DBNAME}"]'
              description: 'Total number of times the transaction log for the database has been expanded.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Growths'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: a1a96d8bfef740ec9c8eadd9704ab605
              name: 'MSSQL DB ''{#DBNAME}'': Log shrinks'
              type: DEPENDENT
              key: 'mssql.db.log_shrinks["{#DBNAME}"]'
              description: 'Total number of times the transaction log for the database has been shrunk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Shrinks'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 26d1515df1be450e861e4f7a9f76b03d
              name: 'MSSQL DB ''{#DBNAME}'': Log truncations'
              type: DEPENDENT
              key: 'mssql.db.log_truncations["{#DBNAME}"]'
              description: 'Number of times the transaction log has been shrunk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Truncations'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 9f9cda56992841408ab8307b7019b76f
              name: 'MSSQL DB ''{#DBNAME}'': Percent log used'
              type: DEPENDENT
              key: 'mssql.db.percent_log_used["{#DBNAME}"]'
              value_type: FLOAT
              units: '%'
              description: 'Percentage of log space in use.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Percent Log Used'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: f02958e3ee174c6dbe900e3dd92cacdc
                  expression: 'min(/MSSQL by ODBC/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"}'
                  name: 'MSSQL: DB ''{#DBNAME}'': Percent of log usage is high'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Percent of log usage is high (over {$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"}% for 5m)'
                  priority: WARNING
                  description: 'There''s not enough space left in the log.'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: performance
            - uuid: 74b107e240274c69ae1e8f0632b67e14
              name: 'MSSQL DB ''{#DBNAME}'': Get performance counters'
              type: DEPENDENT
              key: 'mssql.db.perf_raw["{#DBNAME}"]'
              history: '0'
              value_type: TEXT
              description: 'The item gets server status information for {#DBNAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.object_name=~''.*Databases'' && @.instance_name==''{#DBNAME}'')]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: raw
                - tag: database
                  value: '{#DBNAME}'
            - uuid: fe7d7c3e0aab43d79c00eaceb39c8c6c
              name: 'MSSQL DB ''{#DBNAME}'': State'
              type: DEPENDENT
              key: 'mssql.db.state["{#DBNAME}"]'
              description: |
                0 = Online
                1 = Restoring
                2 = Recovering | SQL Server 2008 and later
                3 = Recovery_pending | SQL Server 2008 and later
                4 = Suspect
                5 = Emergency | SQL Server 2008 and later
                6 = Offline | SQL Server 2008 and later
                7 = Copying | Azure SQL Database Active Geo-Replication
                10 = Offline_secondary | Azure SQL Database Active Geo-Replication
              valuemap:
                name: 'MSSQL DB state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''State'')].cntr_value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 6b8c8cf8e0d24b7f8d9aa7469a0facd4
                  expression: 'last(/MSSQL by ODBC/mssql.db.state["{#DBNAME}"])>1'
                  name: 'MSSQL: DB ''{#DBNAME}'': State is {ITEM.VALUE}'
                  priority: HIGH
                  description: 'The DB has a non-working state.'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
            - uuid: 267b1d54c40641f5aeb4e3e7adfa4680
              name: 'MSSQL DB ''{#DBNAME}'': Transactions per second'
              type: DEPENDENT
              key: 'mssql.db.transactions_sec.rate["{#DBNAME}"]'
              value_type: FLOAT
              description: 'Number of transactions started for the database per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Transactions/sec'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
          trigger_prototypes:
            - uuid: 4a6e76dc9a5148649d07e35e962b5893
              expression: 'last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3'
              name: 'MSSQL: DB ''{#DBNAME}'': Log backup is old'
              event_name: 'MSSQL: DB ''{#DBNAME}'': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"}'
              opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'The log backup has not been executed for a long time.'
              manual_close: 'YES'
              tags:
                - tag: database
                  value: '{#DBNAME}'
                - tag: scope
                  value: availability
            - uuid: 6000420450cf453bae3652c7f7d05e2b
              expression: 'last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3'
              name: 'MSSQL: DB ''{#DBNAME}'': Log backup is old'
              event_name: 'MSSQL: DB ''{#DBNAME}'': Log backup older than {$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"}'
              opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The log backup has not been executed for a long time.'
              manual_close: 'YES'
              dependencies:
                - name: 'MSSQL: DB ''{#DBNAME}'': Log backup is old'
                  expression: 'last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3'
              tags:
                - tag: database
                  value: '{#DBNAME}'
                - tag: scope
                  value: availability
          graph_prototypes:
            - uuid: ac52c952ba954065bbbb5c722630cd0b
              name: 'DB ''{#DBNAME}'': Log size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MSSQL by ODBC'
                    key: 'mssql.db.log_files_size["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MSSQL by ODBC'
                    key: 'mssql.db.log_files_used_size["{#DBNAME}"]'
            - uuid: 49d3be5c3ce34cfc9c13456a2ae301f6
              name: 'DB ''{#DBNAME}'': Number of Log changes'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MSSQL by ODBC'
                    key: 'mssql.db.log_growths["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MSSQL by ODBC'
                    key: 'mssql.db.log_shrinks["{#DBNAME}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'MSSQL by ODBC'
                    key: 'mssql.db.log_truncations["{#DBNAME}"]'
            - uuid: 9553b9169f5e441abecfde1c07ca1a4e
              name: 'DB ''{#DBNAME}'': Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MSSQL by ODBC'
                    key: 'mssql.db.data_files_size["{#DBNAME}"]'
          master_item:
            key: 'db.odbc.get[get_database,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#DBNAME}'
              path: $.dbname
            - lld_macro: '{#RECOVERY_MODEL}'
              path: $.recovery_model
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          overrides:
            - name: 'Log backup'
              step: '1'
              filter:
                conditions:
                  - macro: '{#RECOVERY_MODEL}'
                    value: '3'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: 'Log backup is old'
                  discover: NO_DISCOVER
        - uuid: 6d972c575a944d49badfc2e6a614f686
          name: 'Job discovery'
          type: DEPENDENT
          key: mssql.job.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JOBNAME}'
                value: '{$MSSQL.JOB.MATCHES}'
              - macro: '{#JOBNAME}'
                value: '{$MSSQL.JOB.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Scanning jobs in DBMS.'
          item_prototypes:
            - uuid: 4e1e21603b01420f9b25e85f5987e7ec
              name: 'MSSQL Job ''{#JOBNAME}'': Enabled'
              type: DEPENDENT
              key: 'mssql.job.enabled["{#JOBNAME}"]'
              description: |
                The possible values of the job status:
                0 = Disabled
                1 = Enabled
              valuemap:
                name: 'MSSQL - Yes / No'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.enabled
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
            - uuid: 3ceba63a77e24628a2ee9439d574bac5
              name: 'MSSQL Job ''{#JOBNAME}'': Last run date-time'
              type: DEPENDENT
              key: 'mssql.job.lastrundatetime["{#JOBNAME}"]'
              units: unixtime
              description: 'The last date-time of the job run.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.last_run_date_time
                - type: JAVASCRIPT
                  parameters:
                    - 'return value == ''null'' ? 0 : Math.floor(new Date(value) / 1000);'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
            - uuid: b9984c1238554a559b444853e9f66653
              name: 'MSSQL Job ''{#JOBNAME}'': Last run status message'
              type: DEPENDENT
              key: 'mssql.job.lastrunstatusmessage["{#JOBNAME}"]'
              value_type: TEXT
              description: 'An informational message about the last run of the job.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.last_run_status_message
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
            - uuid: 1c725adad98f44158b43127d4c5fb0f3
              name: 'MSSQL Job ''{#JOBNAME}'': Next run date-time'
              type: DEPENDENT
              key: 'mssql.job.nextrundatetime["{#JOBNAME}"]'
              units: unixtime
              description: 'The next date-time of the job run.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.next_run_date_time
                - type: JAVASCRIPT
                  parameters:
                    - 'return value == ''null'' ? 0 : Math.floor(new Date(value) / 1000);'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
            - uuid: eaa43a261e114979af236698ea7ae32c
              name: 'MSSQL Job ''{#JOBNAME}'': Run status'
              type: DEPENDENT
              key: 'mssql.job.runstatus["{#JOBNAME}"]'
              description: |
                The possible values of the job status:
                0 ⇒ Failed
                1 ⇒ Succeeded
                2 ⇒ Retry
                3 ⇒ Canceled
                4 ⇒ Running
              valuemap:
                name: 'MSSQL Job Run Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.run_status
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
              trigger_prototypes:
                - uuid: 304f468605164fd2baa1905cedf2c897
                  expression: 'last(/MSSQL by ODBC/mssql.job.runstatus["{#JOBNAME}"])=0'
                  name: 'MSSQL: Job ''{#JOBNAME}'': Failed to run'
                  priority: WARNING
                  description: 'The last run of the job has failed.'
                  manual_close: 'YES'
                  tags:
                    - tag: mssql-job
                      value: '{#JOBNAME}'
                    - tag: scope
                      value: performance
            - uuid: 69da58fe4c7e42028fa96388df526103
              name: 'MSSQL Job ''{#JOBNAME}'': Run duration'
              type: DEPENDENT
              key: 'mssql.job.run_duration["{#JOBNAME}"]'
              units: s
              description: 'Duration of the last-run job.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.run_duration
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
              trigger_prototypes:
                - uuid: 7e45cb8f41114388ac8772006d929da2
                  expression: 'last(/MSSQL by ODBC/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.JOB_DURATION.WARN:"{#JOBNAME}"}'
                  name: 'MSSQL: Job ''{#JOBNAME}'': Job duration is high'
                  event_name: 'MSSQL: Job ''{#JOBNAME}'': Job duration is greater than {$MSSQL.JOB_DURATION.WARN:"{#JOBNAME}"}'
                  opdata: 'Job duration: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The job is taking too long.'
                  manual_close: 'YES'
                  tags:
                    - tag: mssql-job
                      value: '{#JOBNAME}'
                    - tag: scope
                      value: performance
            - uuid: 3660503b46be4c92a7b1d5040bc8cd0d
              name: 'MSSQL Job ''{#JOBNAME}'': Get job status'
              type: DEPENDENT
              key: 'mssql.job.status_raw["{#JOBNAME}"]'
              history: '0'
              value_type: TEXT
              description: 'The item gets the status of SQL agent job {#JOBNAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.job_name==''{#JOBNAME}'')].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: raw
                - tag: mssql-job
                  value: '{#JOBNAME}'
          master_item:
            key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#JOBNAME}'
              path: $.job_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: af25f87b29c24c05a57a82f7b1347ad4
          name: 'Local database discovery'
          type: DEPENDENT
          key: mssql.local.db.discovery
          description: 'Discovery of the local availability databases.'
          item_prototypes:
            - uuid: 7e4baf2802394b93bf5770f4f72d7f05
              name: 'MSSQL AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': Suspended'
              type: DEPENDENT
              key: 'mssql.local_db.is_suspended["{#DBNAME}"]'
              description: |
                Database state:
                0 = Resumed
                1 = Suspended
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'')].is_suspended.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_local_db,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: local-db
                - tag: local-db
                  value: '{#DBNAME}'
            - uuid: f8111429599e49bd947a12b9771d1a3d
              name: 'MSSQL AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': State'
              type: DEPENDENT
              key: 'mssql.local_db.state["{#DBNAME}"]'
              description: |
                0 = Online
                1 = Restoring
                2 = Recovering
                3 = Recovery pending
                4 = Suspect
                5 = Emergency
                6 = Offline
              valuemap:
                name: 'MSSQL DB state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'')].database_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_local_db,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: local-db
                - tag: local-db
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 78923c9c52e74c80a77d418afe9e438d
                  expression: 'last(/MSSQL by ODBC/mssql.local_db.state["{#DBNAME}"])>0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': "{#DBNAME}" is {ITEM.VALUE}'
                  priority: WARNING
                  description: 'The local availability database has a non-working state.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
            - uuid: e7d7fbac95e94c45b6515c8e1b7baf1a
              name: 'MSSQL AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': Synchronization health'
              type: DEPENDENT
              key: 'mssql.local_db.synchronization_health["{#DBNAME}"]'
              description: |
                Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode):
                0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing").
                1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing").
                2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing").
              valuemap:
                name: 'MSSQL AG Synchronization health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'')].synchronization_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_local_db,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: local-db
                - tag: local-db
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: e51c10f9d86d458da9fdb7e21b4e0102
                  expression: 'last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': "{#DBNAME}" is Not healthy'
                  priority: HIGH
                  description: 'The synchronization state of the local availability database is "Not synchronizing".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: dc636f10f12c4f1ead597eca778561ec
                  expression: 'last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=1'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': "{#DBNAME}" is Partially healthy'
                  priority: AVERAGE
                  description: 'A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
          master_item:
            key: 'db.odbc.get[get_local_db,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#DBNAME}'
              path: $.dbname
            - lld_macro: '{#GROUP_NAME}'
              path: $.group_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: d247eb5485f145ff9487424371a802b7
          name: 'Mirroring discovery'
          type: DEPENDENT
          key: mssql.mirroring.discovery
          description: 'To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role.'
          item_prototypes:
            - uuid: faccb61c8215482ab375c03444a0e8fd
              name: 'MSSQL Mirroring ''{#DBNAME}'': Role'
              type: DEPENDENT
              key: 'mssql.mirroring.role["{#DBNAME}"]'
              description: |
                Current role of the local database plays in the database mirroring session.
                1 = Principal
                2 = Mirror
              valuemap:
                name: 'MSSQL Mirroring Role'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_role.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
            - uuid: 19cdd945ced447d28b7480c07c1f61bc
              name: 'MSSQL Mirroring ''{#DBNAME}'': Role sequence'
              type: DEPENDENT
              key: 'mssql.mirroring.role_sequence["{#DBNAME}"]'
              description: 'The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_role_sequence.first()'
                - type: SIMPLE_CHANGE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
            - uuid: bedb23d788074424afdb2751c8a7e2b7
              name: 'MSSQL Mirroring ''{#DBNAME}'': Safety level'
              type: DEPENDENT
              key: 'mssql.mirroring.safety_level["{#DBNAME}"]'
              description: |
                Safety setting for updates on the mirror database:
                0 = Unknown state
                1 = Off [asynchronous]
                2 = Full [synchronous]
              valuemap:
                name: 'MSSQL Safety level'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_safety_level.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
            - uuid: 5df06f00a6194242af45ff5cccf43988
              name: 'MSSQL Mirroring ''{#DBNAME}'': State'
              type: DEPENDENT
              key: 'mssql.mirroring.state["{#DBNAME}"]'
              description: |
                State of the mirror database and of the database mirroring session.
                0 = Suspended
                1 = Disconnected from the other partner
                2 = Synchronizing
                3 = Pending failover
                4 = Synchronized
                5 = The partners are not synchronized. Failover is not possible now.
                6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16.
              valuemap:
                name: 'MSSQL Mirroring State'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 323543b0df0e474abf9190a9630242b1
                  expression: 'last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=3'
                  name: 'MSSQL: Mirroring ''{#DBNAME}'': "{#DBNAME}" is {ITEM.VALUE}'
                  priority: WARNING
                  description: 'The state of the mirror database and of the database mirroring session is "Pending failover".'
                  tags:
                    - tag: mssql-mirroring
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: 9a2bcdfb32654a55b8a75c8bf4331950
                  expression: 'last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=5'
                  name: 'MSSQL: Mirroring ''{#DBNAME}'': "{#DBNAME}" is {ITEM.VALUE}'
                  priority: HIGH
                  description: 'The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now.'
                  tags:
                    - tag: mssql-mirroring
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: c673a7c4820840528a4aa1771a5a56d4
                  expression: 'last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])<=2'
                  name: 'MSSQL: Mirroring ''{#DBNAME}'': "{#DBNAME}" is {ITEM.VALUE}'
                  priority: INFO
                  description: 'The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing".'
                  tags:
                    - tag: mssql-mirroring
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
            - uuid: 7e4763d493a745e99082ca71a54c23c2
              name: 'MSSQL Mirroring ''{#DBNAME}'': Witness state'
              type: DEPENDENT
              key: 'mssql.mirroring.witness_state["{#DBNAME}"]'
              description: |
                State of the witness in the database mirroring session of the database:
                0 = Unknown
                1 = Connected
                2 = Disconnected
              valuemap:
                name: 'MSSQL Witness state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_witness_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: ec374424b79346c99f1d815e0815c799
                  expression: 'last(/MSSQL by ODBC/mssql.mirroring.witness_state["{#DBNAME}"])=2'
                  name: 'MSSQL: Mirroring ''{#DBNAME}'': "{#DBNAME}" Witness is disconnected'
                  priority: WARNING
                  description: 'The state of the witness in the database mirroring session of the database is "Disconnected".'
                  tags:
                    - tag: mssql-mirroring
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: 9bf9203bd4b449b39e288fbb79f9d627
              name: 'Mirroring ''{#DBNAME}'': States'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MSSQL by ODBC'
                    key: 'mssql.mirroring.state["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MSSQL by ODBC'
                    key: 'mssql.mirroring.witness_state["{#DBNAME}"]'
          master_item:
            key: 'db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#DBNAME}'
              path: $.dbname
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: dcf4eae19c7043fc85f7ec414502ef84
          name: 'Non-local database discovery'
          type: DEPENDENT
          key: mssql.non.local.db.discovery
          description: 'Discovery of the non-local (not local to SQL Server instance) availability databases.'
          item_prototypes:
            - uuid: 32d3797d6b22413e98aa206d3092947f
              name: 'MSSQL AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Log queue size'
              type: DEPENDENT
              key: 'mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"]'
              units: B
              description: 'Amount of the log records of the primary database that has not been sent to the secondary databases.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'' && @.replica_name==''{#REPLICA_NAME}'')].log_send_queue_size.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: non-local-db
                - tag: non-local-db
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: def3b1d47dac4d039bffcc78f955b433
                  expression: 'last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3)'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Log queue size is growing'
                  priority: HIGH
                  description: 'The log records of the primary database are not sent to the secondary databases.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: non-local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: capacity
            - uuid: 66d9735553754192bb9acf7b27c1501f
              name: 'MSSQL AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Redo log queue size'
              type: DEPENDENT
              key: 'mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"]'
              units: B
              description: 'Amount of log records in the log files of the secondary replica that has not yet been redone.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'' && @.replica_name==''{#REPLICA_NAME}'')].redo_queue_size.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: non-local-db
                - tag: non-local-db
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 2102f244f58b4fe981d569fe0fe599a9
                  expression: 'last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3)'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Redo log queue size is growing'
                  priority: HIGH
                  description: 'The log records in the log files of the secondary replica have not yet been redone.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: non-local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: capacity
          master_item:
            key: 'db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#DBNAME}'
              path: $.dbname
            - lld_macro: '{#GROUP_NAME}'
              path: $.group_name
            - lld_macro: '{#REPLICA_NAME}'
              path: $.replica_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: baed17bf5a4846439e720388c9ae7c17
          name: 'Quorum discovery'
          type: DEPENDENT
          key: mssql.quorum.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CLUSTER_NAME}'
                value: ^.+$
          description: 'Discovery of the quorum of the WSFC cluster.'
          item_prototypes:
            - uuid: 6c30ce79872d4bb2b27965acd277e1e9
              name: 'MSSQL Cluster ''{#CLUSTER_NAME}'': Quorum state'
              type: DEPENDENT
              key: 'mssql.quorum.state.[{#CLUSTER_NAME}]'
              description: |
                State of the WSFC quorum, one of:
                0 = Unknown quorum state
                1 = Normal quorum
                2 = Forced quorum
              valuemap:
                name: 'MSSQL Quorum state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.cluster_name==''{#CLUSTER_NAME}'')].quorum_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_quorum,"{$MSSQL.DSN}"]'
              tags:
                - tag: cluster-name
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: quorum
            - uuid: 4d7f29272d1c4889bae0aa50bcd31e9c
              name: 'MSSQL Cluster ''{#CLUSTER_NAME}'': Quorum type'
              type: DEPENDENT
              key: 'mssql.quorum.type.[{#CLUSTER_NAME}]'
              description: |
                Type of quorum used by this WSFC cluster, one of:
                0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one.
                1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up).
                2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness.
                3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one.
                4 = Unknown Quorum. Unknown quorum for the cluster.
                5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up).
              valuemap:
                name: 'MSSQL Quorum type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.cluster_name==''{#CLUSTER_NAME}'')].quorum_type.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'db.odbc.get[get_quorum,"{$MSSQL.DSN}"]'
              tags:
                - tag: cluster-name
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: quorum
          master_item:
            key: 'db.odbc.get[get_quorum,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#CLUSTER_NAME}'
              path: $.cluster_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: 1ea73914e10e407abe3b4e715f6759b4
          name: 'Quorum members discovery'
          type: DEPENDENT
          key: mssql.quorum.member.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CLUSTER_NAME}'
                value: ^.+$
              - macro: '{#MEMBER_NAME}'
                value: '{$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES}'
              - macro: '{#MEMBER_NAME}'
                value: '{$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of the quorum members of the WSFC cluster.'
          item_prototypes:
            - uuid: 0dc6b43da4854b1cbb41ad0d5c5079a9
              name: 'MSSQL Cluster member ''{#MEMBER_NAME}'': Member state'
              type: DEPENDENT
              key: 'mssql.quorum_members.member_state.[{#MEMBER_NAME}]'
              description: |
                The member state, one of:
                0 = Offline
                1 = Online
              valuemap:
                name: 'MSSQL Quorum members state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.member_name==''{#MEMBER_NAME}'')].member_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: 'quorum members'
                - tag: quorum-members-name
                  value: '{#MEMBER_NAME}'
            - uuid: 337cd4bfedc846048fc366bb7cf1bebd
              name: 'MSSQL Cluster member ''{#MEMBER_NAME}'': Member type'
              type: DEPENDENT
              key: 'mssql.quorum_members.member_type.[{#MEMBER_NAME}]'
              description: |
                The type of member, one of:
                0 = WSFC node
                1 = Disk witness
                2 = File share witness
                3 = Cloud Witness
              valuemap:
                name: 'MSSQL Quorum members type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.member_name==''{#MEMBER_NAME}'')].member_type.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: 'quorum members'
                - tag: quorum-members-name
                  value: '{#MEMBER_NAME}'
            - uuid: d8fff68f86494892bbe1cb2c6b281075
              name: 'MSSQL Cluster member ''{#MEMBER_NAME}'': Number of quorum votes'
              type: DEPENDENT
              key: 'mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}]'
              description: 'Number of quorum votes possessed by this quorum member.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.member_name==''{#MEMBER_NAME}'')].number_of_quorum_votes.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"]'
              tags:
                - tag: component
                  value: 'quorum members'
                - tag: quorum-members-name
                  value: '{#MEMBER_NAME}'
          master_item:
            key: 'db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#CLUSTER_NAME}'
              path: $.cluster_name
            - lld_macro: '{#MEMBER_NAME}'
              path: $.member_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: 024656ffe254416781cb4ad52ae456ea
          name: 'Replication discovery'
          type: DEPENDENT
          key: mssql.replica.discovery
          description: 'Discovery of the database replicas.'
          item_prototypes:
            - uuid: 7403de703b024d428edfc59f3aa9181b
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Connected state'
              type: DEPENDENT
              key: 'mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Whether a secondary replica is currently connected to the primary replica:
                0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role:
                On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect;
                On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica.
                1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica.
              valuemap:
                name: 'MSSQL AG Connected state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].connected_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
            - uuid: 51cb8f4fe5954c0ea21eff6102034862
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Is local'
              type: DEPENDENT
              key: 'mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Whether the replica is local:
                0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location.
                1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs.
              valuemap:
                name: 'MSSQL - Yes / No'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].is_local.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
            - uuid: ec1b71f75c4247c28d5830bd8004f0ac
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Join state'
              type: DEPENDENT
              key: 'mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                0 = Not joined
                1 = Joined, standalone instance
                2 = Joined, failover cluster instance
              valuemap:
                name: 'MSSQL AG Join state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].join_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
            - uuid: ad3e6d5bf510496eb050b9a05f8341e1
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Operational state'
              type: DEPENDENT
              key: 'mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Current operational state of the replica:
                0 = Pending failover
                1 = Pending
                2 = Online
                3 = Offline
                4 = Failed
                5 = Failed, no quorum
                6 = Not local
              valuemap:
                name: 'MSSQL AG Operational state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].operational_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
              trigger_prototypes:
                - uuid: 0192e9d5795a4d46acb8de29f710edcd
                  expression: 'last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is {ITEM.VALUE}'
                  priority: WARNING
                  description: 'The operational state of the replica in a given availability group is "Pending" or "Offline".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
                - uuid: 3f2006b9ae114e01b442b34fec9373d3
                  expression: 'last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is {ITEM.VALUE}'
                  priority: AVERAGE
                  description: 'The operational state of the replica in a given availability group is "Failed".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
                - uuid: 94ea79848a5048d8ae417df709b8d612
                  expression: 'last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is {ITEM.VALUE}'
                  priority: HIGH
                  description: 'The operational state of the replica in a given availability group is "Failed, no quorum".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
            - uuid: 2a58cab2197348d997bdb69bb128414d
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Recovery health'
              type: DEPENDENT
              key: 'mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Rollup of the "database_state" column of the `sys.dm_hadr_database_replica_states` dynamic management view:
                0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0").
                1 = Online. All the joined databases have a database state of "Online" (database_state is "0").
              valuemap:
                name: 'MSSQL AG Recovery health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].recovery_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
              trigger_prototypes:
                - uuid: 58f508b855364d769e2be977793a03c8
                  expression: 'last(/MSSQL by ODBC/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} Recovery in progress'
                  priority: INFO
                  description: 'At least one joined database has a database state other than "Online".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: notice
            - uuid: 5139a4cef5ac46d2ab34cd8bda1c84ac
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Role'
              type: DEPENDENT
              key: 'mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Current Always On availability group role of a local replica or a connected remote replica:
                0 = Resolving
                1 = Primary
                2 = Secondary
              valuemap:
                name: 'MSSQL AG Role'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].role.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
            - uuid: 5655f95df0e043acba246f65e4905b0d
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Sync health'
              type: DEPENDENT
              key: 'mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica:
                0 = Not healthy. At least one joined database is in the "Not synchronizing" state.
                1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing.
                2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing.
              valuemap:
                name: 'MSSQL AG Synchronization health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].synchronization_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
              trigger_prototypes:
                - uuid: f2f4d198ad2242088d867abe6fac4ecd
                  expression: 'last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is Not healthy'
                  priority: AVERAGE
                  description: 'At least one joined database is in the "Not synchronizing" state.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
                - uuid: 070af612aa7248588fc058d8f9fb9929
                  expression: 'last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is Partially healthy'
                  priority: WARNING
                  description: 'Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
          trigger_prototypes:
            - uuid: 7c6afc5596e94af0979bd20d5ef542ea
              expression: 'last(/MSSQL by ODBC/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by ODBC/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2'
              name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is disconnected'
              priority: WARNING
              description: |
                The response of an availability replica to the "Disconnected" state depends on its role:
                On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect;
                On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica.
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: replica
                  value: '{#REPLICA_NAME}'
                - tag: scope
                  value: availability
          master_item:
            key: 'db.odbc.get[get_replica,"{$MSSQL.DSN}"]'
          lld_macro_paths:
            - lld_macro: '{#GROUP_NAME}'
              path: $.group_name
            - lld_macro: '{#REPLICA_NAME}'
              path: $.replica_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
      tags:
        - tag: class
          value: database
        - tag: subclass
          value: sql
        - tag: target
          value: mssql
      macros:
        - macro: '{$MSSQL.AVERAGE_WAIT_TIME.MAX}'
          value: '500'
          description: 'The maximum average wait time, in milliseconds - for the trigger expression.'
          config:
            type: TEXT
            priority: '16'
            section_name: Thresholds
            label: 'Average wait time threshold'
            description: 'Threshold of the maximum average wait time in milliseconds. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.BACKUP_DIFF.CRIT}'
          value: 6d
          description: 'The maximum of days without a differential backup - for the High trigger expression.'
          config:
            type: TEXT
            priority: '27'
            section_name: Thresholds
            label: 'Critical differential backup threshold'
            description: 'Critical threshold of the maximum days without a differential backup.'
        - macro: '{$MSSQL.BACKUP_DIFF.USED}'
          value: '1'
          description: 'The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name.'
          config:
            type: CHECKBOX
            priority: '35'
            section_name: Other
            label: 'Monitoring of differential backup'
            description: 'Whether it is necessary to monitor of differential backup.'
            options:
              - checked: '1'
                unchecked: '0'
        - macro: '{$MSSQL.BACKUP_DIFF.WARN}'
          value: 3d
          description: 'The maximum of days without a differential backup - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '26'
            section_name: Thresholds
            label: 'Warning differential backup threshold'
            description: 'Warning threshold of the maximum days without a differential backup.'
        - macro: '{$MSSQL.BACKUP_FULL.CRIT}'
          value: 10d
          description: 'The maximum of days without a full backup - for the High trigger expression.'
          config:
            type: TEXT
            priority: '29'
            section_name: Thresholds
            label: 'Critical full backup threshold'
            description: 'Critical threshold of the maximum days without a full backup.'
        - macro: '{$MSSQL.BACKUP_FULL.USED}'
          value: '1'
          description: 'The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name.'
          config:
            type: CHECKBOX
            priority: '33'
            section_name: Other
            label: 'Monitoring of full backup'
            description: 'Whether it is necessary to monitor of full backup.'
            options:
              - checked: '1'
                unchecked: '0'
        - macro: '{$MSSQL.BACKUP_FULL.WARN}'
          value: 9d
          description: 'The maximum of days without a full backup - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '28'
            section_name: Thresholds
            label: 'Warning full backup threshold'
            description: 'Warning threshold of the maximum days without a full backup.'
        - macro: '{$MSSQL.BACKUP_LOG.CRIT}'
          value: 8h
          description: 'The maximum of days without a log backup - for the High trigger expression.'
          config:
            type: TEXT
            priority: '31'
            section_name: Thresholds
            label: 'Critical log backup threshold'
            description: 'Critical threshold of the maximum days without a log backup.'
        - macro: '{$MSSQL.BACKUP_LOG.USED}'
          value: '1'
          description: 'The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name.'
          config:
            type: CHECKBOX
            priority: '34'
            section_name: Other
            label: 'Monitoring of log backup'
            description: 'Whether it is necessary to monitor of log backup.'
            options:
              - checked: '1'
                unchecked: '0'
        - macro: '{$MSSQL.BACKUP_LOG.WARN}'
          value: 4h
          description: 'The maximum of days without a log backup - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '30'
            section_name: Thresholds
            label: 'Warning log backup threshold'
            description: 'Warning threshold of the maximum days without a log backup.'
        - macro: '{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}'
          value: '30'
          description: 'The minimum buffer cache hit ratio, in percent - for the High trigger expression.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Critical buffer cache hit ratio threshold'
            description: 'Critical threshold for the minimum percentage of buffer cache hit ratio. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}'
          value: '50'
          description: 'The minimum buffer cache hit ratio, in percent - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Warning buffer cache hit ratio threshold'
            description: 'Warning threshold for the minimum percentage of buffer cache hit ratio. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.DBNAME.MATCHES}'
          value: '.*'
          description: 'This macro is used in database discovery. It can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '36'
            section_name: Filters
            label: 'Include database filter'
            description: 'Regex string to include discovered database by its name.'
        - macro: '{$MSSQL.DBNAME.NOT_MATCHES}'
          value: master|tempdb|model|msdb
          description: 'This macro is used in database discovery. It can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '37'
            section_name: Filters
            label: 'Exclude database filter'
            description: 'Regex string to exclude discovered database by its name.'
        - macro: '{$MSSQL.DEADLOCKS.MAX}'
          value: '1'
          description: 'The maximum deadlocks per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '19'
            section_name: Thresholds
            label: 'Deadlocks per second threshold'
            description: 'Threshold of the maximum number of deadlocks per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.DSN}'
          description: 'System data source name.'
          config:
            type: TEXT
            priority: '1'
            label: 'MSSQL DSN'
            description: 'Data source name of the MSSQL instance.'
            required: 'YES'
        - macro: '{$MSSQL.FREE_LIST_STALLS.MAX}'
          value: '2'
          description: 'The maximum free list stalls per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Free list stalls per second threshold'
            description: 'Threshold of the maximum number of free list stalls per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.HOST}'
          value: localhost
          description: 'The hostname or IP address of the MSSQL instance.'
          config:
            type: TEXT
            priority: '4'
            label: 'MSSQL address'
            description: 'Hostname or IP address of the MSSQL instance.'
        - macro: '{$MSSQL.JOB.MATCHES}'
          value: '.*'
          description: 'This macro is used in job discovery. It can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '38'
            section_name: Filters
            label: 'Include job filter'
            description: 'Regex string to include discovered job by its name.'
        - macro: '{$MSSQL.JOB.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in job discovery. It can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '39'
            section_name: Filters
            label: 'Exclude job filter'
            description: 'Regex string to exclude discovered job by its name.'
        - macro: '{$MSSQL.JOB_DURATION.WARN}'
          value: 1h
          description: 'The maximum job duration - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '32'
            section_name: Thresholds
            label: 'Job duration threshold'
            description: 'Threshold of the maximum job duration.'
        - macro: '{$MSSQL.LAZY_WRITES.MAX}'
          value: '20'
          description: 'The maximum lazy writes per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'Lazy writes per second threshold'
            description: 'Threshold of the maximum number of lazy writes per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.LOCK_REQUESTS.MAX}'
          value: '1000'
          description: 'The maximum lock requests per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '17'
            section_name: Thresholds
            label: 'Lock requests per second threshold'
            description: 'Threshold of the maximum number of lock requests per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.LOCK_TIMEOUTS.MAX}'
          value: '1'
          description: 'The maximum lock timeouts per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '18'
            section_name: Thresholds
            label: 'Lock timeouts per second threshold'
            description: 'Threshold of the maximum number of lock timeouts per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.LOG_FLUSH_WAITS.MAX}'
          value: '1'
          description: 'The maximum log flush waits per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '20'
            section_name: Thresholds
            label: 'Log flush waits per second threshold'
            description: 'Threshold for the maximum number of log flush waits per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX}'
          value: '1'
          description: 'The maximum log flush wait time, in milliseconds - for the trigger expression.'
          config:
            type: TEXT
            priority: '21'
            section_name: Thresholds
            label: 'Log flush wait time threshold'
            description: 'Threshold of the maximum log flush wait time in milliseconds. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}'
          value: '300'
          description: 'The minimum page life expectancy - for the trigger expression.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Page life expectancy threshold'
            description: 'Threshold of the minimum page life expectancy. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PAGE_READS.MAX}'
          value: '90'
          description: 'The maximum page reads per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'Page reads per second threshold'
            description: 'Threshold of the maximum number of page reads per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PAGE_WRITES.MAX}'
          value: '90'
          description: 'The maximum page writes per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'Page writes per second threshold'
            description: 'Threshold of the maximum number of page writes per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PASSWORD}'
          description: 'MSSQL database password.'
          config:
            type: TEXT
            priority: '3'
            label: 'MSSQL password'
            description: 'MSSQL database password.'
            required: 'YES'
        - macro: '{$MSSQL.PERCENT_COMPILATIONS.MAX}'
          value: '10'
          description: 'The maximum percentage of Transact-SQL compilations - for the trigger expression.'
          config:
            type: TEXT
            priority: '23'
            section_name: Thresholds
            label: 'Transact-SQL compilations threshold'
            description: 'Threshold for the maximum percentage of Transact-SQL compilations. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PERCENT_LOG_USED.MAX}'
          value: '80'
          description: 'The maximum percentage of log used - for the trigger expression.'
          config:
            type: TEXT
            priority: '22'
            section_name: Thresholds
            label: 'Log used threshold'
            description: 'Threshold for the maximum percentage of log used. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PERCENT_READAHEAD.MAX}'
          value: '20'
          description: 'The maximum percentage of pages read per second in anticipation of use - for the trigger expression.'
          config:
            type: TEXT
            priority: '25'
            section_name: Thresholds
            label: 'Threshold of pages read per second in anticipation of use'
            description: 'Threshold of the maximum percentage of pages read per second in anticipation of use. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PERCENT_RECOMPILATIONS.MAX}'
          value: '10'
          description: 'The maximum percentage of Transact-SQL recompilations - for the trigger expression.'
          config:
            type: TEXT
            priority: '24'
            section_name: Thresholds
            label: 'Transact-SQL recompilations threshold'
            description: 'Threshold for the maximum percentage of Transact-SQL recompilations. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PORT}'
          value: '1433'
          description: 'MSSQL TCP port.'
          config:
            type: TEXT
            priority: '5'
            label: 'MSSQL TCP port'
            description: 'Port of the MSSQL instance. In the range from 1 to 65535 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Filter to include discovered quorum member by name.'
          config:
            type: TEXT
            priority: '40'
            section_name: Filters
            label: 'Include quorum member filter'
            description: 'Regex string to include discovered quorum member by name.'
        - macro: '{$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered quorum member by name.'
          config:
            type: TEXT
            priority: '41'
            section_name: Filters
            label: 'Exclude quorum member filter'
            description: 'Regex string to exclude discovered quorum member by name.'
        - macro: '{$MSSQL.USER}'
          description: 'MSSQL database username.'
          config:
            type: TEXT
            priority: '2'
            label: 'MSSQL user'
            description: 'MSSQL database username.'
            required: 'YES'
        - macro: '{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}'
          value: '90'
          description: 'The minimum percentage of work tables from the cache ratio - for the High trigger expression.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Percentage of work tables from the cache ratio threshold'
            description: 'Threshold for the minimum percentage of work tables from the cache ratio. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.WORK_FILES.MAX}'
          value: '20'
          description: 'The maximum number of work files created per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Work files created per second threshold'
            description: 'Threshold of the maximum number of work files created per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.WORK_TABLES.MAX}'
          value: '20'
          description: 'The maximum number of work tables created per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Work files tables per second threshold'
            description: 'Threshold of the maximum number of work tables created per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 168d5d7b54374d8a951818ba619e0319
          name: 'MSSQL: Overview'
          pages:
            - name: Main
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Errors'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Server memory'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Waits per second'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  'y': '15'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Database pages'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graph
                  'y': '20'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Transactions'
                    - type: STRING
                      name: reference
                      value: AAAAI
                - type: graph
                  'y': '25'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Pages'
                    - type: STRING
                      name: reference
                      value: AAAAK
                - type: graph
                  'y': '30'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Memory grants outstanding and pending'
                    - type: STRING
                      name: reference
                      value: AAAAM
                - type: graph
                  'y': '35'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Access methods'
                    - type: STRING
                      name: reference
                      value: AAAAO
                - type: graph
                  'y': '40'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Logins per second and Logouts per second'
                    - type: STRING
                      name: reference
                      value: AAAAQ
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Locks'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Memory/cache load'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Wait times'
                    - type: STRING
                      name: reference
                      value: AAAAF
                - type: graph
                  x: '36'
                  'y': '15'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Cache objects'
                    - type: STRING
                      name: reference
                      value: AAAAH
                - type: graph
                  x: '36'
                  'y': '20'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Compilations'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                - type: graph
                  x: '36'
                  'y': '25'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Page life expectancy'
                    - type: STRING
                      name: reference
                      value: AAAAL
                - type: graph
                  x: '36'
                  'y': '30'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Processes blocked'
                    - type: STRING
                      name: reference
                      value: AAAAN
                - type: graph
                  x: '36'
                  'y': '35'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'MSSQL: Auto-params'
                    - type: STRING
                      name: reference
                      value: AAAAP
            - name: Databases
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '15'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MSSQL by ODBC'
                        name: 'DB ''{#DBNAME}'': Size'
                    - type: STRING
                      name: reference
                      value: AAAAR
                    - 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: 'MSSQL by ODBC'
                        name: 'DB ''{#DBNAME}'': Log size'
                    - type: STRING
                      name: reference
                      value: AAAAS
                    - type: INTEGER
                      name: rows
                      value: '3'
      valuemaps:
        - uuid: c66ee50a8b3f4b6788b732bb8a6b514e
          name: 'MSSQL - Yes / No'
          mappings:
            - value: '0'
              newvalue: 'No'
            - value: '1'
              newvalue: 'Yes'
        - uuid: bfbb00eb85d747dabeda2954a5d659b7
          name: 'MSSQL AG Connected state'
          mappings:
            - value: '0'
              newvalue: Disconnected
            - value: '1'
              newvalue: Connected
        - uuid: 47413c135c094cdc8b59f18a9b195a78
          name: 'MSSQL AG Join state'
          mappings:
            - value: '0'
              newvalue: 'Not joined'
            - value: '1'
              newvalue: 'Joined, standalone instance'
            - value: '2'
              newvalue: 'Joined, failover cluster instance'
        - uuid: a570f341d9a8470797aecfebd376b2b8
          name: 'MSSQL AG Operational state'
          mappings:
            - value: '0'
              newvalue: 'Pending failover'
            - value: '1'
              newvalue: Pending
            - value: '2'
              newvalue: Online
            - value: '3'
              newvalue: Offline
            - value: '4'
              newvalue: Failed
            - value: '5'
              newvalue: 'Failed, no quorum'
            - value: '6'
              newvalue: 'Replica is not local'
        - uuid: 4ec6a96ff6c64756b2f27e47972fd9f6
          name: 'MSSQL AG Recovery health'
          mappings:
            - value: '0'
              newvalue: 'In progress'
            - value: '1'
              newvalue: Online
            - value: '2'
              newvalue: 'Replica is not local'
        - uuid: 596556fba6064efb8155233371eb2950
          name: 'MSSQL AG Role'
          mappings:
            - value: '0'
              newvalue: Resolving
            - value: '1'
              newvalue: Primary
            - value: '2'
              newvalue: Secondary
        - uuid: 2ab0923b3ce14ffc9dd454114f6b15be
          name: 'MSSQL AG Synchronization health'
          mappings:
            - value: '0'
              newvalue: 'Not healthy'
            - value: '1'
              newvalue: 'Partially healthy'
            - value: '2'
              newvalue: Healthy
        - uuid: bac1a10dad134d50add5bc9550e2ebf3
          name: 'MSSQL DB state'
          mappings:
            - value: '0'
              newvalue: ONLINE
            - value: '1'
              newvalue: RESTORING
            - value: '2'
              newvalue: RECOVERING
            - value: '3'
              newvalue: RECOVERY_PENDING
            - value: '4'
              newvalue: SUSPECT
            - value: '5'
              newvalue: EMERGENCY
            - value: '6'
              newvalue: OFFLINE
            - value: '7'
              newvalue: COPYING
            - value: '10'
              newvalue: OFFLINE_SECONDARY
        - uuid: eefa6e0e6f8b4facbc12004437b7ee8f
          name: 'MSSQL Job Run Status'
          mappings:
            - value: '0'
              newvalue: Failed
            - value: '1'
              newvalue: Succeeded
            - value: '2'
              newvalue: Retry
            - value: '3'
              newvalue: Canceled
            - value: '4'
              newvalue: Running
            - value: '5'
              newvalue: Unknown
        - uuid: 09aaa82ccd6a444b80d5d3bb182fbafd
          name: 'MSSQL Mirroring Role'
          mappings:
            - value: '0'
              newvalue: 'Database is inaccessible or is not mirrored'
            - value: '1'
              newvalue: Principal
            - value: '2'
              newvalue: Mirror
        - uuid: f1c105c262c5476798a93eaa4c46fbda
          name: 'MSSQL Mirroring State'
          mappings:
            - value: '0'
              newvalue: Suspended
            - value: '1'
              newvalue: 'Disconnected from the other partner'
            - value: '2'
              newvalue: Synchronizing
            - value: '3'
              newvalue: 'Pending failover'
            - value: '4'
              newvalue: Synchronized
            - value: '5'
              newvalue: 'The partners are not synchronized. Failover is not possible now.'
            - value: '6'
              newvalue: 'The partners are synchronized. Failover is potentially possible.'
            - value: '7'
              newvalue: 'Database is inaccessible or is not mirrored'
        - uuid: 1454643e9cad46f8953f4c054509151c
          name: 'MSSQL Quorum members state'
          mappings:
            - value: '0'
              newvalue: Offline
            - value: '1'
              newvalue: Online
        - uuid: caa789916da048c691f8eef5a71a856e
          name: 'MSSQL Quorum members type'
          mappings:
            - value: '0'
              newvalue: 'WSFC node'
            - value: '1'
              newvalue: 'Disk witness'
            - value: '2'
              newvalue: 'File share witness'
            - value: '3'
              newvalue: 'Cloud Witness'
        - uuid: 23c9fede4c9a4a21854b3fc83de459a7
          name: 'MSSQL Quorum state'
          mappings:
            - value: '0'
              newvalue: 'Unknown quorum state'
            - value: '1'
              newvalue: 'Normal quorum'
            - value: '2'
              newvalue: 'Forced quorum'
        - uuid: fbf296f404ad45d5b02e3c20104b9b9e
          name: 'MSSQL Quorum type'
          mappings:
            - value: '0'
              newvalue: 'Node Majority'
            - value: '1'
              newvalue: 'Node and Disk Majority'
            - value: '2'
              newvalue: 'Node and File Share Majority'
            - value: '3'
              newvalue: 'No Majority: Disk Only'
            - value: '4'
              newvalue: 'Unknown Quorum'
            - value: '5'
              newvalue: 'Cloud Witness'
        - uuid: f59af5b534994dccaebb4afc3266520b
          name: 'MSSQL Recovery model'
          mappings:
            - value: '1'
              newvalue: FULL
            - value: '2'
              newvalue: BULK_LOGGED
            - value: '3'
              newvalue: SIMPLE
        - uuid: e70421b2c3db4ce1937791bdb432040e
          name: 'MSSQL Safety level'
          mappings:
            - value: '0'
              newvalue: 'Unknown state'
            - value: '1'
              newvalue: 'Off [asynchronous]'
            - value: '2'
              newvalue: 'Full [synchronous]'
            - value: '3'
              newvalue: 'Database is inaccessible or is not mirrored'
        - uuid: aa9de6e21d08486db04f29e10d11a94c
          name: 'MSSQL Witness state'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Connected
            - value: '2'
              newvalue: Disconnected
            - value: '3'
              newvalue: 'No witness exists'
        - uuid: 03cde96b90a641598db572a662dc2064
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 75fc96367e8d4588ba8314145fc12d35
      template: 'MSSQL by Zabbix agent 2'
      name: 'MSSQL by Zabbix agent 2'
      description: |
        This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via Zabbix agent 2 and uses a loadable plugin to run SQL queries.
        
        Setup:
        
        1. Deploy Zabbix agent 2 with the MSSQL plugin.
        
          For more information, see MSSQL plugin documentation: https://git.zabbix.com/projects/AP/repos/mssql/browse
        
          The MSSQL plugin must be updated to a version equal to or above 8.0.0
        
          Loadable plugin requires installation of one of the following:
        
          - Separate package
          
          - Binary file
          
          - Compilation from sources: https://www.zabbix.com/documentation/8.0/manual/extensions/plugins/build
        
        2. Create an MSSQL user for monitoring.
        
          View Server State and View Any Definition permissions should be granted to the user.
          Grant this user read permissions to the sysjobschedules, sysjobhistory, and sysjobs tables.
        
          For more information, see MSSQL documentation:
          
          - Create a database user: https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-user?view=sql-server-ver16
          
          - GRANT Server Permissions: https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-server-permissions-transact-sql?view=sql-server-ver16
          
          - Configure a User to Create and Manage SQL Server Agent Jobs: https://docs.microsoft.com/en-us/sql/ssms/agent/configure-a-user-to-create-and-manage-sql-server-agent-jobs?view=sql-server-ver16
        
        3. Set the user name and password in the host macros ({$MSSQL.USER} and {$MSSQL.PASSWORD}).
        
        4. Set the connection string for the MSSQL instance in the {$MSSQL.URI} macro as a URI, such as <protocol://host:port>, or specify the named session - <sessionname>.
        
        The "Service's TCP port state" item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
        
        Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
        
        Note: Since version 7.2.0, you can also connect to the MSSQL instance using its name. To do this, set the connection string in the {$MSSQL.URI} macro as <protocol://host/instance_name>.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        1. Create a monitoring user on MSSQL for Zabbix to connect to:
            - for MSSQL Server 2022
            ```sql
            CREATE LOGIN zabbix WITH PASSWORD = 'password'
            GRANT VIEW SERVER PERFORMANCE STATE TO zabbix
            GRANT VIEW ANY DEFINITION TO zabbix
            USE msdb
            CREATE USER zabbix FOR LOGIN zabbix
            GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
            GO
            ```
            - for MSSQL versions 2017 and 2019
            ```sql
            CREATE LOGIN zabbix WITH PASSWORD = 'password'
            GRANT VIEW SERVER STATE TO zabbix
            GRANT VIEW ANY DEFINITION TO zabbix
            USE msdb
            CREATE USER zabbix FOR LOGIN zabbix
            GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
            GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
            GO
            ```
        
            To allow Zabbix to query SQL Server Agent job information, a dedicated login must be created and granted the required permissions through T-SQL:
                - **VIEW SERVER STATE** is required for Microsoft SQL Server 2017 and 2019
                - **VIEW SERVER PERFORMANCE STATE** is required for Microsoft SQL Server 2022
                - **VIEW ANY DEFINITION** allows access to object definitions and metadata
                - **SELECT** allows the user to read data from the sysjobschedules, sysjobhistory, and sysjobs tables in the msdb database  
            
            
            For more information, see MSSQL documentation:
                - [Create a database user](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-user?view=sql-server-ver16)
                - [GRANT Server Permissions](https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-server-permissions-transact-sql?view=sql-server-ver16)
                - [Configure a User to Create and Manage SQL Server Agent Jobs](https://docs.microsoft.com/en-us/sql/ssms/agent/configure-a-user-to-create-and-manage-sql-server-agent-jobs?view=sql-server-ver16)
        
        2. Set the username and password in the `MSSQL user` and `MSSQL password` host wizard configuration fields.  
        3. Set the connection string for the MSSQL instance in the `MSSQL URI` host wizard configuration field as a URI, such as `<protocol://host:port>`, or specify the named session - `<sessionname>`.
        
            The `Service's TCP port state` item uses the `MSSQL address` and `MSSQL TCP port` host wizard configuration fields to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
            
            Additional notes:
            - You can use the `Monitoring of full backup`, `Monitoring of log backup`, and `Monitoring of differential backup` host wizard configuration fields to disable backup age triggers. If set to unselected state, the trigger expression for the backup age will not fire.
            - Since version 7.2.0, you can also connect to the MSSQL instance using its name. To do this, set the connection string in the `MSSQL URI` host wizard configuration field as `<protocol://host/instance_name>`.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Databases
      items:
        - uuid: 668f0a143b164fd5b62b1311ac798ca3
          name: 'Get Access Methods counters'
          type: DEPENDENT
          key: mssql.access_methods.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about access methods.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Access Methods'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: e48534a4fd3042ee9c2f0155230298a2
          name: 'Auto-param attempts per second'
          type: DEPENDENT
          key: mssql.autoparam_attempts_sec.rate
          value_type: FLOAT
          description: 'Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Auto-Param Attempts/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: 71ade3c11bcd4f4691c5fa1c3fa6ded1
          name: 'Get availability groups'
          key: 'mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'The item gets availability group states - name, primary and secondary health, synchronization health.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 8c5e2250dcc4405d95cc33167be33bb2
          name: 'Average latch wait time'
          type: CALCULATED
          key: mssql.average_latch_wait_time
          delay: 0;m0-59s3
          value_type: FLOAT
          units: ms
          params: |
            (last(//mssql.average_latch_wait_time_raw) - last(//mssql.average_latch_wait_time_raw,#2)) /
            (last(//mssql.average_latch_wait_time_base) - last(//mssql.average_latch_wait_time_base,#2) +
            (last(//mssql.average_latch_wait_time_base) - last(//mssql.average_latch_wait_time_base,#2)=0))
          description: 'Average latch wait time (in milliseconds) for latch requests that had to wait.'
          tags:
            - tag: component
              value: wait-time
        - uuid: 394d622b256945289ed9ca88999e024d
          name: 'Average latch wait time base'
          type: DEPENDENT
          key: mssql.average_latch_wait_time_base
          description: 'For internal use only.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Average Latch Wait Time Base'')].cntr_value.first()'
          master_item:
            key: mssql.latches_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: fe80511b840544da86ef3dd1b34bfce2
          name: 'Average latch wait time raw'
          type: DEPENDENT
          key: mssql.average_latch_wait_time_raw
          units: ms
          description: 'Average latch wait time (in milliseconds) for latch requests that had to wait.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Average Latch Wait Time (ms)'')].cntr_value.first()'
          master_item:
            key: mssql.latches_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: 3ba031d33d9147f786ee6fb6fddafaed
          name: 'Total average wait time'
          type: CALCULATED
          key: mssql.average_wait_time
          delay: 0;m0-59s3
          value_type: FLOAT
          units: ms
          params: |
            (last(//mssql.average_wait_time_raw) - last(//mssql.average_wait_time_raw,#2)) /
            (last(//mssql.average_wait_time_base) - last(//mssql.average_wait_time_base,#2) +
            (last(//mssql.average_wait_time_base) - last(//mssql.average_wait_time_base,#2)=0))
          description: 'The average wait time, in milliseconds, for each lock request that had to wait.'
          tags:
            - tag: component
              value: wait-time
          triggers:
            - uuid: 7d284dc23d4649c79bf67e13f1edc83b
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX}'
              name: 'MSSQL: Total average wait time for locks is high'
              event_name: 'MSSQL: Total average wait time for locks is high (over {$MSSQL.AVERAGE_WAIT_TIME.MAX}ms for 5m)'
              priority: WARNING
              description: 'An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly.'
              tags:
                - tag: scope
                  value: performance
        - uuid: fc14601c16314459bc8277ebd244997d
          name: 'Total average wait time base'
          type: DEPENDENT
          key: mssql.average_wait_time_base
          description: 'For internal use only.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Average Wait Time Base'')].cntr_value.first()'
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: 5fa855e501dc42e68d8a06e435c08024
          name: 'Total average wait time raw'
          type: DEPENDENT
          key: mssql.average_wait_time_raw
          units: ms
          description: 'Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Average Wait Time (ms)'')].cntr_value.first()'
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: b6c19fe6e67f4686a23455211fb2c076
          name: 'Batch requests per second'
          type: DEPENDENT
          key: mssql.batch_requests_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Batch Requests/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: e2581ae0fd6d4cc18728b7301cb22730
          name: 'Buffer cache hit ratio'
          type: DEPENDENT
          key: mssql.buffer_cache_hit_ratio
          value_type: FLOAT
          units: '%'
          description: 'Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''BufferCacheHitRatio'')].cntr_value.first()'
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: cache
          triggers:
            - uuid: 9ee2397e2560447eb01d4d50cde5fa9d
              expression: 'max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}'
              name: 'MSSQL: Percentage of the buffer cache efficiency is low'
              event_name: 'MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}% for 5m)'
              priority: HIGH
              description: 'Too low buffer cache hit ratio.'
              tags:
                - tag: scope
                  value: performance
            - uuid: c22ac1cbc5224eb98fde9f87c52a3724
              expression: 'max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}'
              name: 'MSSQL: Percentage of the buffer cache efficiency is low'
              event_name: 'MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}% for 5m)'
              priority: WARNING
              description: 'Low buffer cache hit ratio.'
              dependencies:
                - name: 'MSSQL: Percentage of the buffer cache efficiency is low'
                  expression: 'max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}'
              tags:
                - tag: scope
                  value: performance
        - uuid: 2e0810566767476db6cd0ca4eccb9e99
          name: 'Get Buffer Manager counters'
          type: DEPENDENT
          key: mssql.buffer_manager.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about the buffer pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Buffer Manager'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: ca959c973e8a4a549c0c33c85dce3598
          name: 'Cache hit ratio'
          type: DEPENDENT
          key: mssql.cache_hit_ratio
          value_type: FLOAT
          units: '%'
          description: 'Ratio between cache hits and lookups.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''CacheHitRatio'')].cntr_value.first()'
          master_item:
            key: mssql.cache_info.raw
          tags:
            - tag: component
              value: cache
        - uuid: 9925ceb7e021480598aab2bfba74370d
          name: 'Get Cache counters'
          type: DEPENDENT
          key: mssql.cache_info.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about cache.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Plan Cache'' && @.instance_name==''_Total'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 913fa728180d4a73a093a2ee05454081
          name: 'Cache objects in use'
          type: DEPENDENT
          key: mssql.cache_objects_in_use
          description: 'Number of cache objects in use.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Cache Objects in use'')].cntr_value.first()'
          master_item:
            key: mssql.cache_info.raw
          tags:
            - tag: component
              value: cache
        - uuid: 4dbb2d972bcc42f19aaa537a0d0431e9
          name: 'Cache object counts'
          type: DEPENDENT
          key: mssql.cache_object_counts
          description: 'Number of cache objects in the cache.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Cache Object Counts'')].cntr_value.first()'
          master_item:
            key: mssql.cache_info.raw
          tags:
            - tag: component
              value: cache
        - uuid: 952940ebb15942b3ac7d4b96c816a7c3
          name: 'Cache pages'
          type: DEPENDENT
          key: mssql.cache_pages
          description: 'Number of 8-kilobyte (KB) pages used by cache objects.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Cache Pages'')].cntr_value.first()'
          master_item:
            key: mssql.cache_info.raw
          tags:
            - tag: component
              value: cache
            - tag: component
              value: page
        - uuid: 14bba7081bd84521994b2a28d1af422d
          name: 'Checkpoint pages per second'
          type: DEPENDENT
          key: mssql.checkpoint_pages_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Checkpoint pages/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
        - uuid: f74a2bc9da424fc0ad288ddce6a4f6fa
          name: 'Database pages'
          type: DEPENDENT
          key: mssql.database_pages
          description: 'Indicates the number of pages in the buffer pool with database content.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Database pages'')].cntr_value.first()'
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
        - uuid: d124c9d4a3724e32a37895ad1cbc036b
          name: 'Total data file size'
          type: DEPENDENT
          key: mssql.data_files_size
          units: B
          description: 'Total size of all data files.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Data File(s) Size (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: mssql.db_info.raw
          tags:
            - tag: component
              value: application
        - uuid: 6c942840048b463e9439f327adceb767
          name: 'Get database'
          key: 'mssql.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          delay: 1h
          history: '0'
          value_type: TEXT
          description: 'Getting databases - database name and recovery model.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 7ee97938f31d4983b3c216684089c23f
          name: 'Get DB counters'
          type: DEPENDENT
          key: mssql.db_info.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets summary information about databases.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Databases'' && @.instance_name==''_Total'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: b82b979548824464a204d49a9c760c99
          name: 'Total errors per second'
          type: DEPENDENT
          key: mssql.errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''_Total'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: 152cf9cbf35f475bb242ddcb58e23c35
          name: 'Failed auto-params per second'
          type: DEPENDENT
          key: mssql.failed_autoparams_sec.rate
          value_type: FLOAT
          description: 'Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Failed Auto-Params/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: e7c66d2857034bfcbef7af94673ea66f
          name: 'Forwarded records per second'
          type: DEPENDENT
          key: mssql.forwarded_records_sec.rate
          value_type: FLOAT
          description: 'Number of records per second fetched through forwarded record pointers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Forwarded Records/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
        - uuid: 7d688d051647440595e42bd798ce78dc
          name: 'Free list stalls per second'
          type: DEPENDENT
          key: mssql.free_list_stalls_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Indicates the number of requests per second that had to wait for a free page.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Free list stalls/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: 5cf3182a47694569b9d75822404b77f7
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX}'
              name: 'MSSQL: Number of rps waiting for a free page is high'
              event_name: 'MSSQL: Number of rps waiting for a free page is high (over {$MSSQL.FREE_LIST_STALLS.MAX} for 5m)'
              priority: WARNING
              description: 'Some requests have to wait for a free page.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 5e8ccbe07c254c2086a58aafe1aa2fdf
          name: 'Full scans per second'
          type: DEPENDENT
          key: mssql.full_scans_sec.rate
          value_type: FLOAT
          description: 'Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Full Scans/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
        - uuid: 055399281d2b4e7a90ae1fb4b181a0b2
          name: 'Get General Statistics counters'
          type: DEPENDENT
          key: mssql.general_statistics.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets general statistics information.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*General Statistics'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 5aa885322d4d4f2d9b55d8f2d65f55b0
          name: 'Granted Workspace Memory'
          type: DEPENDENT
          key: mssql.granted_workspace_memory
          units: B
          description: 'Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Granted Workspace Memory (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: 65a2e35bc66e45a08690faf08733c5fb
          name: 'Index searches per second'
          type: DEPENDENT
          key: mssql.index_searches_sec.rate
          value_type: FLOAT
          description: 'Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Index Searches/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
        - uuid: 5439b52bd72e4204876d0c3716eb0a23
          name: 'Errors per second (Info errors)'
          type: DEPENDENT
          key: mssql.info_errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''Info Errors'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: e36f8695b4f74178a19bb88afad586b8
          name: 'Get job status'
          key: 'mssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          delay: 10m
          history: '0'
          value_type: TEXT
          description: 'The item gets the SQL agent job status.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: c43a0e1c2adf45cf8809e9a361ec190e
          name: 'Errors per second (Kill connection errors)'
          type: DEPENDENT
          key: mssql.kill_connection_errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''Kill Connection Errors'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: a394835aeddd46a18327f25747e3564d
          name: 'Get last backup'
          key: 'mssql.last.backup.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          delay: 10m
          history: '0'
          value_type: TEXT
          description: 'The item gets information about backup processes.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 2bd7c7ec217b4f62b7d94a42e9324f51
          name: 'Get Latches counters'
          type: DEPENDENT
          key: mssql.latches_info.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about latches.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Latches'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 2daa0932d2a9491f9b262c06def40ccc
          name: 'Latch waits per second'
          type: DEPENDENT
          key: mssql.latch_waits_sec.rate
          value_type: FLOAT
          units: rps
          description: 'The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Latch Waits/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.latches_info.raw
          tags:
            - tag: component
              value: performance
            - tag: component
              value: wait-time
        - uuid: d5710a51fb474d14b7d7716781b76c58
          name: 'Lazy writes per second'
          type: DEPENDENT
          key: mssql.lazy_writes_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of buffers written per second by the buffer manager''s lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lazy writes/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: 96698537fee846199197a25beecaafca
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX}'
              name: 'MSSQL: Number of buffers written per second by the lazy writer is high'
              event_name: 'MSSQL: Number of buffers written per second by the lazy writer is high (over {$MSSQL.LAZY_WRITES.MAX} for 5m)'
              priority: WARNING
              description: 'The number of buffers written per second by the buffer manager''s lazy writer exceeds the threshold.'
              tags:
                - tag: scope
                  value: performance
        - uuid: f049c16678ad4daa83e55ab6c3a99fbc
          name: 'Get local DB'
          key: 'mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Getting the states of the local availability database.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 46040926001f46c685c160820194a969
          name: 'Get Locks counters'
          type: DEPENDENT
          key: mssql.locks_info.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets server information about locks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Locks'' && @.instance_name==''_Total'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: d8adec0bd76a4e1881b8b7e0ba44c7a1
          name: 'Total lock requests per second'
          type: DEPENDENT
          key: mssql.lock_requests_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of new locks and lock conversions per second requested from the lock manager.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lock Requests/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: lock
            - tag: component
              value: performance
          triggers:
            - uuid: 19137e1b06fe4f1eaf5e76c5ae47d29d
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX}'
              name: 'MSSQL: Total number of locks per second is high'
              event_name: 'MSSQL: Total number of locks per second is high (over {$MSSQL.LOCK_REQUESTS.MAX} for 5m)'
              priority: WARNING
              description: 'Number of new locks and lock conversions per second requested from the lock manager is high.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 3077e748f89844e0b666a82c26051399
          name: 'Total lock requests per second that timed out'
          type: DEPENDENT
          key: mssql.lock_timeouts_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of timed out lock requests per second, including requests for NOWAIT locks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lock Timeouts/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: lock
            - tag: component
              value: performance
          triggers:
            - uuid: a7313fad35804feeaddf544acb2a0d26
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX}'
              name: 'MSSQL: Total lock requests per second that timed out is high'
              event_name: 'MSSQL: Total lock requests per second that timed out is high (over {$MSSQL.LOCK_TIMEOUTS.MAX} for 5m)'
              priority: WARNING
              description: 'The total number of timed out lock requests per second, including requests for NOWAIT locks, is high.'
              tags:
                - tag: scope
                  value: performance
        - uuid: bcb606f27714414a92347a45e6bc8d31
          name: 'Total lock requests per second that required waiting'
          type: DEPENDENT
          key: mssql.lock_waits_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of lock requests per second that required the caller to wait.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lock Waits/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: lock
            - tag: component
              value: performance
          triggers:
            - uuid: c4fb968a66784746a11feee64a8f98e8
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.lock_waits_sec.rate,5m)>0'
              name: 'MSSQL: Some blocking is occurring for 5m'
              priority: AVERAGE
              description: 'Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 706b5931a7d24e2190d071c1088ba469
          name: 'Lock wait time'
          type: DEPENDENT
          key: mssql.lock_wait_time
          value_type: FLOAT
          units: ms
          description: 'Average of total wait time (in milliseconds) for locks in the last second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Lock Wait Time (ms)'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: lock
        - uuid: 343c44bfdd154e99879fbecb4e703dab
          name: 'Logins per second'
          type: DEPENDENT
          key: mssql.logins_sec.rate
          value_type: FLOAT
          description: 'Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Logins/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.general_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: da069a96cc3c410db1c053d3de2a6508
          name: 'Logouts per second'
          type: DEPENDENT
          key: mssql.logouts_sec.rate
          value_type: FLOAT
          description: 'Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Logouts/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.general_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: e00f3549800a477ba77a8635a27d849b
          name: 'Total log file size'
          type: DEPENDENT
          key: mssql.log_files_size
          units: B
          description: 'Total size of all the transaction log files.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Log File(s) Size (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: mssql.db_info.raw
          tags:
            - tag: component
              value: log
        - uuid: fb2125c36295434a8821462b5c86fbee
          name: 'Total log file used size'
          type: DEPENDENT
          key: mssql.log_files_used_size
          units: B
          description: 'The cumulative size of all the log files in the database.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Log File(s) Used Size (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.db_info.raw
          tags:
            - tag: component
              value: log
        - uuid: 462eecc28a3f44ef831fc76d3a0a278b
          name: 'Maximum workspace memory'
          type: DEPENDENT
          key: mssql.maximum_workspace_memory
          units: B
          description: 'Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Maximum Workspace Memory (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: 08919bb644c746c7a51fcc43d3581309
          name: 'Memory grants outstanding'
          type: DEPENDENT
          key: mssql.memory_grants_outstanding
          description: 'Specifies the total number of processes that have successfully acquired a workspace memory grant.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Memory Grants Outstanding'')].cntr_value.first()'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: f790245e08654eddb5cceff6405e68e2
          name: 'Memory grants pending'
          type: DEPENDENT
          key: mssql.memory_grants_pending
          description: 'Specifies the total number of processes waiting for a workspace memory grant.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Memory Grants Pending'')].cntr_value.first()'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: 4114e184cecd4040a26d9156ac11b6d2
          name: 'Get Memory counters'
          type: DEPENDENT
          key: mssql.mem_manager.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets memory information.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Memory Manager'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: fb51801472fc4ca7beed49c2586ba1cb
          name: 'Get DB mirroring'
          key: 'mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Getting DB mirroring.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 8730198507594f4aa38d45bf00e65a38
          name: 'Get non-local DB'
          key: 'mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Getting the non-local availability database.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 0e8935dc71584982b20ff2dbe42b31a4
          name: 'Total lock requests per second that have deadlocks'
          type: DEPENDENT
          key: mssql.number_deadlocks_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Number of lock requests per second that resulted in a deadlock.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Number of Deadlocks/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.locks_info.raw
          tags:
            - tag: component
              value: deadlock
            - tag: component
              value: performance
          triggers:
            - uuid: f0b039f08b694db1bbafe6b3d8d4e9ab
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX}'
              name: 'MSSQL: Number of deadlocks is high'
              event_name: 'MSSQL: Number of deadlocks is high (over {$MSSQL.DEADLOCKS.MAX} for 5m)'
              priority: AVERAGE
              description: 'Too many deadlocks are occurring currently.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 6e8968403b9e4abfbc5ec0a4c990636c
          name: 'Errors per second (DB offline errors)'
          type: DEPENDENT
          key: mssql.offline_errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''DB Offline Errors'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: 0b53d7e1a0174db2b6ebc1c47ac92d9e
          name: 'Page life expectancy'
          type: DEPENDENT
          key: mssql.page_life_expectancy
          value_type: FLOAT
          units: s
          description: 'Indicates the number of seconds a page will stay in the buffer pool without references.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page life expectancy'')].cntr_value.first()'
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
          triggers:
            - uuid: e47d0eeac246490cbeedb8ba1cf77e94
              expression: 'max(/MSSQL by Zabbix agent 2/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}'
              name: 'MSSQL: Page life expectancy is low'
              event_name: 'MSSQL: Page life expectancy is low (less {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}min for 15m)'
              priority: HIGH
              description: 'The page stays in the buffer pool without references for less time than the threshold value.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 97fb6c5dd7de48879f378ac464c37f48
          name: 'Page lookups per second'
          type: DEPENDENT
          key: mssql.page_lookups_sec.rate
          value_type: FLOAT
          units: rps
          description: 'Indicates the number of requests per second to find a page in the buffer pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page lookups/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: performance
        - uuid: 936ded2166da48a8acc3c94262b0bbac
          name: 'Page reads per second'
          type: DEPENDENT
          key: mssql.page_reads_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page reads/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
          triggers:
            - uuid: 5050b7c4e5a4445d9c4aae031b01115b
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX}'
              name: 'MSSQL: Number of physical database page reads per second is high'
              event_name: 'MSSQL: Number of physical database page reads per second is high (over {$MSSQL.PAGE_READS.MAX} for 5m)'
              priority: WARNING
              description: 'The physical database page reads are issued too frequently.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 7e39012b0bc640689d3b295fc8f2abc6
          name: 'Page splits per second'
          type: DEPENDENT
          key: mssql.page_splits_sec.rate
          value_type: FLOAT
          description: 'Number of page splits per second that occur as a result of overflowing index pages.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page Splits/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
        - uuid: 2be68cb7cfe441339af164b3b4ce9c90
          name: 'Page writes per second'
          type: DEPENDENT
          key: mssql.page_writes_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of physical database page writes that are issued per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Page writes/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
          triggers:
            - uuid: 48e32bec13d34ad88db7c9cc98d86a3b
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX}'
              name: 'MSSQL: Number of physical database page writes per second is high'
              event_name: 'MSSQL: Number of physical database page writes per second is high (over {$MSSQL.PAGE_WRITES.MAX} for 5m)'
              priority: WARNING
              description: 'The physical database page writes are issued too frequently.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 2064cd9f8e7646fa8fb329ca287fedd2
          name: 'Percent of ad hoc queries running'
          type: CALCULATED
          key: mssql.percent_of_adhoc_queries
          delay: 0;m0-59s3
          value_type: FLOAT
          units: '%'
          params: |
            last(//mssql.sql_compilations_sec.rate) * 100 /
            (last(//mssql.batch_requests_sec.rate) + (last(//mssql.batch_requests_sec.rate)=0))
          description: 'The ratio of SQL compilations per second to batch requests per second, in percent.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: cf0649863fe5421aa1dc279d1ca7e360
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX}'
              name: 'MSSQL: Percent of ad hoc queries running is high'
              event_name: 'MSSQL: Percent of ad hoc queries running is over {$MSSQL.PERCENT_COMPILATIONS.MAX}% for 15m'
              priority: WARNING
              description: 'The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using `sp_executeSQL`. When rewriting isn''t possible, consider using a plan guide or setting the database to parameterization forced mode.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 98b0754f231c4160bcd2daafeef64fe0
          name: 'Percent of Recompiled Transact-SQL Objects'
          type: CALCULATED
          key: mssql.percent_recompilations_to_compilations
          delay: 0;m0-59s3
          value_type: FLOAT
          units: '%'
          params: |
            last(//mssql.sql_recompilations_sec.rate) * 100 /
            (last(//mssql.sql_compilations_sec.rate) + (last(//mssql.sql_compilations_sec.rate)=0))
          description: 'The ratio of SQL re-compilations per second to SQL compilations per second, in percent.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 1218fe12f4d542d99d997ede6cc30813
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX}'
              name: 'MSSQL: Percent of times statement recompiles is high'
              event_name: 'MSSQL: Percent of times statement recompiles is over {$MSSQL.PERCENT_RECOMPILATIONS.MAX}% for 15m'
              priority: WARNING
              description: 'This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter''s value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec".'
              tags:
                - tag: scope
                  value: performance
        - uuid: 2128f1e7d0fa46e2bdb8b06f5c07c436
          name: 'Get performance counters'
          key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          delay: 0;m0-59
          history: '0'
          value_type: TEXT
          description: 'The item gets server global status information.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 9b769f48534c4e6cb9bb2cd4079bd808
          name: 'Number of blocked processes'
          type: DEPENDENT
          key: mssql.processes_blocked
          description: 'Number of currently blocked processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Processes blocked'')].cntr_value.first()'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: mssql.general_statistics.raw
          tags:
            - tag: component
              value: application
        - uuid: 432178b4071e46758c421f6d9b75f4cd
          name: 'Get quorum'
          key: 'mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Getting quorum - cluster name, type, and state.'
          timeout: 10s
          tags:
            - tag: component
              value: raw
        - uuid: 7343a6e34956475db3e79f7cfa905baa
          name: 'Get quorum member'
          key: 'mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Getting quorum members - member name, type, state, and number of quorum votes.'
          timeout: 10s
          tags:
            - tag: component
              value: raw
        - uuid: 18b09445472c46be81281c0cb55297ea
          name: 'Read-ahead pages per second'
          type: DEPENDENT
          key: mssql.readahead_pages_sec.rate
          value_type: FLOAT
          description: 'Indicates the number of pages read per second in anticipation of use.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Readahead pages/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
            - tag: component
              value: performance
        - uuid: 77deceae02df4e2280f42ae7b7b16f76
          name: 'Get replica'
          key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Getting the database replica.'
          timeout: 30s
          tags:
            - tag: component
              value: raw
        - uuid: 7c5778b466fe488a9c7571a0b0b35597
          name: 'Safe auto-params per second'
          type: DEPENDENT
          key: mssql.safe_autoparams_sec.rate
          value_type: FLOAT
          description: 'Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Safe Auto-Params/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: 5dda9c1a17fa43ada4a6857e62148f1a
          name: 'Full scans to Index searches ratio'
          type: CALCULATED
          key: mssql.scan_to_search
          delay: 0;m0-59s3
          value_type: FLOAT
          params: 'last(//mssql.full_scans_sec.rate) / (last(//mssql.index_searches_sec.rate) + (last(//mssql.index_searches_sec.rate)=0))'
          description: 'The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads.'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 378cdaf994ea4167b7727996357d7564
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.scan_to_search,15m) > 0.001'
              name: 'MSSQL: Number of index and table scans exceeds index searches in the last 15m'
              priority: WARNING
              description: 'Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations.'
              tags:
                - tag: scope
                  value: performance
        - uuid: f02b411d44784721a4fb4e032f094867
          name: 'SQL compilations per second'
          type: DEPENDENT
          key: mssql.sql_compilations_sec.rate
          value_type: FLOAT
          description: 'Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''SQL Compilations/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: 60c2c827c40a4d09b0b41cd7004cb0b0
          name: 'Get SQL Errors counters'
          type: DEPENDENT
          key: mssql.sql_errors.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets SQL error information.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*SQL Errors'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 515fe1b64f82415fbdfd118358bdcc2d
          name: 'SQL re-compilations per second'
          type: DEPENDENT
          key: mssql.sql_recompilations_sec.rate
          value_type: FLOAT
          description: 'Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''SQL Re-Compilations/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: 8c18cf97c2dc4e94a9b889c72d76cdde
          name: 'Get SQL Statistics counters'
          type: DEPENDENT
          key: mssql.sql_statistics.raw
          history: '0'
          value_type: TEXT
          description: 'The item gets SQL statistics information.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*SQL Statistics'')]'
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: raw
        - uuid: 78b85902a71b47b1845bb55a797e8800
          name: 'Table lock escalations per second'
          type: DEPENDENT
          key: mssql.table_lock_escalations.rate
          value_type: FLOAT
          description: 'Number of times locks on a table were escalated to the TABLE or HoBT granularity.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Table Lock Escalations/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: lock
            - tag: component
              value: performance
        - uuid: 29b91e97aa5f4efcafa38d59568c16ec
          name: 'Target pages'
          type: DEPENDENT
          key: mssql.target_pages
          description: 'The optimal number of pages in the buffer pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Target pages'')].cntr_value.first()'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: mssql.buffer_manager.raw
          tags:
            - tag: component
              value: page
        - uuid: 06de7547c13c4e25af22c14fc7af84bd
          name: 'Target server memory'
          type: DEPENDENT
          key: mssql.target_server_memory
          units: B
          description: 'Indicates the ideal amount of memory the server can consume.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Target Server Memory (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: 304dd414b91c450db0594bd7135e340b
          name: 'Total latch wait time'
          type: DEPENDENT
          key: mssql.total_latch_wait_time
          value_type: FLOAT
          units: ms
          description: 'Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Total Latch Wait Time (ms)'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.latches_info.raw
          tags:
            - tag: component
              value: wait-time
        - uuid: a1dd82b237304bf39d9e34d6ff7d76a2
          name: 'Total server memory'
          type: DEPENDENT
          key: mssql.total_server_memory
          units: B
          description: 'Specifies the amount of memory the server has committed using the memory manager.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Total Server Memory (KB)'')].cntr_value.first()'
            - type: MULTIPLIER
              parameters:
                - '1024'
          master_item:
            key: mssql.mem_manager.raw
          tags:
            - tag: component
              value: memory
        - uuid: f7c8f1bbf68c4f43b0e263d45022346e
          name: 'Total transactions number'
          type: DEPENDENT
          key: mssql.transactions
          description: 'The number of currently active transactions of all types.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.object_name=~''.*Transactions'' && @.counter_name==''Transactions'')].cntr_value.first()'
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: transaction
        - uuid: c23c93f8492946ba9932bf8c8a7a306e
          name: 'Total transactions per second'
          type: DEPENDENT
          key: mssql.transactions_sec.rate
          value_type: FLOAT
          description: 'Total number of transactions started for all databases per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Transactions/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.db_info.raw
          tags:
            - tag: component
              value: performance
            - tag: component
              value: transaction
        - uuid: b2805c08cc28424ca8fca0ab51ace519
          name: 'Unsafe auto-params per second'
          type: DEPENDENT
          key: mssql.unsafe_autoparams_sec.rate
          value_type: FLOAT
          description: 'Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Unsafe Auto-Params/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_statistics.raw
          tags:
            - tag: component
              value: performance
        - uuid: f4b8d9b10b4c40f6a38c03729025f618
          name: Uptime
          type: DEPENDENT
          key: mssql.uptime
          trends: '0'
          units: uptime
          description: 'MSSQL Server uptime in the format "N days, hh:mm:ss".'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Uptime'')].cntr_value.first()'
          master_item:
            key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: b64d08b9212645cd8bab9e35a8e29942
              expression: 'nodata(/MSSQL by Zabbix agent 2/mssql.uptime,30m)=1'
              name: 'MSSQL: Failed to fetch info data'
              event_name: 'MSSQL: 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.'
              dependencies:
                - name: 'MSSQL: Service is unavailable'
                  expression: 'last(/MSSQL by Zabbix agent 2/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: 4ab35137c34845c495bc3837ac1f6f9f
              expression: 'last(/MSSQL by Zabbix agent 2/mssql.uptime)<10m'
              name: 'MSSQL: Service has been restarted'
              event_name: 'MSSQL: Service has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 821f3a9f694349c2afb983d4c26ff090
          name: 'Number of users connected'
          type: DEPENDENT
          key: mssql.user_connections
          description: 'Number of users connected to MSSQL Server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''User Connections'')].cntr_value.first()'
          master_item:
            key: mssql.general_statistics.raw
          tags:
            - tag: component
              value: application
        - uuid: 27e1d9f9005f475784f930c8cbaefa91
          name: 'Errors per second (User errors)'
          type: DEPENDENT
          key: mssql.user_errors_sec.rate
          value_type: FLOAT
          description: 'Number of errors per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Errors/sec'' && @.instance_name==''User Errors'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.sql_errors.raw
          tags:
            - tag: component
              value: error
            - tag: component
              value: performance
        - uuid: 624ea81f4a7c43659f291a2fc7913778
          name: Version
          key: 'mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          value_type: CHAR
          description: 'MSSQL Server version.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 12643eb3af884023ab61802559cde946
              expression: 'last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#1)<>last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#2) and length(last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]))>0'
              name: 'MSSQL: Version has changed'
              event_name: 'MSSQL: Version has changed (new version value received: {ITEM.VALUE})'
              priority: INFO
              description: 'MSSQL version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 081cc2db8e9b481f8ca39e5f02f8f48d
          name: 'Work files created per second'
          type: DEPENDENT
          key: mssql.workfiles_created_sec.rate
          value_type: FLOAT
          description: 'Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Workfiles Created/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: 6d25ee02edc14d7497b339627cc0c680
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX}'
              name: 'MSSQL: Number of work files created per second is high'
              event_name: 'MSSQL: Number of work files created per second is high (over {$MSSQL.WORK_FILES.MAX} for 5m)'
              priority: AVERAGE
              description: 'Too many work files created per second to store temporary results for hash joins and hash aggregates.'
              tags:
                - tag: scope
                  value: performance
        - uuid: a2127497537a46b6be10fac14be04259
          name: 'Work tables created per second'
          type: DEPENDENT
          key: mssql.worktables_created_sec.rate
          value_type: FLOAT
          description: 'Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''Worktables Created/sec'')].cntr_value.first()'
            - type: CHANGE_PER_SECOND
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: performance
          triggers:
            - uuid: 4cd0c8e7089144aeaeb10c4866e89b06
              expression: 'min(/MSSQL by Zabbix agent 2/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX}'
              name: 'MSSQL: Number of work tables created per second is high'
              event_name: 'MSSQL: Number of work tables created per second is high (over {$MSSQL.WORK_TABLES.MAX} for 5m)'
              priority: AVERAGE
              description: 'Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors.'
              tags:
                - tag: scope
                  value: performance
        - uuid: dbcf930a346c40db9d8fafa89eafe79a
          name: 'Worktables from cache ratio'
          type: DEPENDENT
          key: mssql.worktables_from_cache_ratio
          value_type: FLOAT
          units: '%'
          description: 'Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.counter_name==''WorktablesFromCacheRatio'')].cntr_value.first()'
          master_item:
            key: mssql.access_methods.raw
          tags:
            - tag: component
              value: cache
          triggers:
            - uuid: cb3dd51615d447379a3abda929faf881
              expression: 'max(/MSSQL by Zabbix agent 2/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}'
              name: 'MSSQL: Percentage of work tables available from the work table cache is low'
              event_name: 'MSSQL: Percentage of work tables available from the work table cache is low (below {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}% for 5m)'
              priority: HIGH
              description: 'A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 7fc4f1f9c3df45269972e617ce81f4b2
          name: 'Service''s TCP port state'
          type: SIMPLE
          key: 'net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}]'
          delay: 30s
          description: 'Test the availability of MSSQL Server on a TCP port.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 2ea9eaf463144defbd85340a824f7986
              expression: 'last(/MSSQL by Zabbix agent 2/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0'
              name: 'MSSQL: Service is unavailable'
              priority: DISASTER
              description: 'The TCP port of the MSSQL Server service is currently unavailable.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 7f7d64674f2b41a69f9330fc050fc582
          name: 'Availability group discovery'
          type: DEPENDENT
          key: mssql.availability.group.discovery
          description: 'Discovery of the existing availability groups.'
          item_prototypes:
            - uuid: a4db74ea2c2c4919ae57d474548c13f1
              name: 'MSSQL AG ''{#GROUP_NAME}'': Primary replica recovery health'
              type: DEPENDENT
              key: 'mssql.primary_recovery_health["{#GROUP_NAME}"]'
              description: |
                Indicates the recovery health of the primary replica:
                0 = In progress
                1 = Online
                2 = Unavailable
              valuemap:
                name: 'MSSQL AG Recovery health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.group_name==''{#GROUP_NAME}'')].primary_recovery_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: availability-group
              trigger_prototypes:
                - uuid: 7f0c69068dd6415abd193555684ba39d
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.primary_recovery_health["{#GROUP_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'': Primary replica recovery health in progress'
                  priority: WARNING
                  description: 'The primary replica is in the synchronization process.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: scope
                      value: notice
            - uuid: ede1746a6614499781c6dec46671cdfa
              name: 'MSSQL AG ''{#GROUP_NAME}'': Primary replica name'
              type: DEPENDENT
              key: 'mssql.primary_replica["{#GROUP_NAME}"]'
              value_type: CHAR
              description: 'Name of the server instance that is hosting the current primary replica.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.group_name==''{#GROUP_NAME}'')].primary_replica.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: 'mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: availability-group
            - uuid: 49612aea8b164a79b994d2155c70b491
              name: 'MSSQL AG ''{#GROUP_NAME}'': Secondary replica recovery health'
              type: DEPENDENT
              key: 'mssql.secondary_recovery_health["{#GROUP_NAME}"]'
              description: |
                Indicates the recovery health of a secondary replica:
                0 = In progress
                1 = Online
                2 = Unavailable
              valuemap:
                name: 'MSSQL AG Recovery health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.group_name==''{#GROUP_NAME}'')].secondary_recovery_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: availability-group
              trigger_prototypes:
                - uuid: 4fc114d3f43741b38bdf7b8b73a6fe3e
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'': Secondary replica recovery health in progress'
                  priority: WARNING
                  description: 'The secondary replica is in the synchronization process.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: scope
                      value: notice
            - uuid: f6a776b81e9d445e9b401ecdc781fe26
              name: 'MSSQL AG ''{#GROUP_NAME}'': Synchronization health'
              type: DEPENDENT
              key: 'mssql.synchronization_health["{#GROUP_NAME}"]'
              description: |
                Reflects a rollup of the `synchronization_health` of all availability replicas in the availability group:
                0 = Not healthy. None of the availability replicas have a healthy synchronization.
                1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy.
                2 = Healthy. The synchronization of every availability replica is healthy.
              valuemap:
                name: 'MSSQL AG Synchronization health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.group_name==''{#GROUP_NAME}'')].synchronization_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: availability-group
              trigger_prototypes:
                - uuid: 1aa3dd01e7654dea903010b47f166596
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'': All replicas unhealthy'
                  priority: DISASTER
                  description: 'None of the availability replicas have a healthy synchronization.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: scope
                      value: availability
                - uuid: 02766fa029c14e85914e20b81f14be2c
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=1'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'': Some replicas unhealthy'
                  priority: HIGH
                  description: 'The synchronization health of some, but not all, availability replicas is healthy.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: scope
                      value: availability
          master_item:
            key: 'mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#GROUP_NAME}'
              path: $.group_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: 13116bb9e52040718b40f0a6e734342a
          name: 'Database discovery'
          type: DEPENDENT
          key: mssql.database.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DBNAME}'
                value: '{$MSSQL.DBNAME.MATCHES}'
              - macro: '{#DBNAME}'
                value: '{$MSSQL.DBNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Scanning databases in DBMS.'
          item_prototypes:
            - uuid: 39264e40f3304b3fb5d85fbac83008f8
              name: 'MSSQL DB ''{#DBNAME}'': Last diff backup duration'
              type: DEPENDENT
              key: 'mssql.backup.diff.duration["{#DBNAME}"]'
              units: s
              description: 'Duration of the last differential backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''I'')].duration.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 45613ebe8c77431fbfa3ab00d39e68e5
              name: 'MSSQL DB ''{#DBNAME}'': Last diff backup (time ago)'
              type: DEPENDENT
              key: 'mssql.backup.diff["{#DBNAME}"]'
              units: s
              description: 'The amount of time since the last differential backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''I'')].time_since_last_backup.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 4ff9a2f1c06347a291e99eb4269d87a5
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1'
                  name: 'MSSQL: DB ''{#DBNAME}'': Diff backup is old'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"}'
                  opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'The differential backup has not been executed for a long time.'
                  manual_close: 'YES'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: 49260837210a4086a6f2a4183cefbf8c
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1'
                  name: 'MSSQL: DB ''{#DBNAME}'': Diff backup is old'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Diff backup older than {$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"}'
                  opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The differential backup has not been executed for a long time.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'MSSQL: DB ''{#DBNAME}'': Diff backup is old'
                      expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
            - uuid: 5da7fa72e56740d3938e8bb5bb32839e
              name: 'MSSQL DB ''{#DBNAME}'': Last full backup duration'
              type: DEPENDENT
              key: 'mssql.backup.full.duration["{#DBNAME}"]'
              units: s
              description: 'Duration of the last full backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''D'')].duration.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 32c38b20af8f42698fb96bf0bbb05dec
              name: 'MSSQL DB ''{#DBNAME}'': Last full backup (time ago)'
              type: DEPENDENT
              key: 'mssql.backup.full["{#DBNAME}"]'
              units: s
              description: 'The amount of time since the last full backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''D'')].time_since_last_backup.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: ba1b19c9513f4adeba3e6f300c08748d
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1'
                  name: 'MSSQL: DB ''{#DBNAME}'': Full backup is old'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"}'
                  opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'The full backup has not been executed for a long time.'
                  manual_close: 'YES'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: a8e099c8276f435cb4d55623be443db5
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1'
                  name: 'MSSQL: DB ''{#DBNAME}'': Full backup is old'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Full backup older than {$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"}'
                  opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The full backup has not been executed for a long time.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'MSSQL: DB ''{#DBNAME}'': Full backup is old'
                      expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: a7aaa846c6694ddf9daf5d18db5a3037
              name: 'MSSQL DB ''{#DBNAME}'': Last log backup duration'
              type: DEPENDENT
              key: 'mssql.backup.log.duration["{#DBNAME}"]'
              units: s
              description: 'Duration of the last log backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''L'')].duration.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 453a48800bce43b58a372b7466b944bd
              name: 'MSSQL DB ''{#DBNAME}'': Last log backup (time ago)'
              type: DEPENDENT
              key: 'mssql.backup.log["{#DBNAME}"]'
              units: s
              description: 'The amount of time since the last log backup.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.type==''L'')].time_since_last_backup.first()'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 6800612ef91f4f149e24c4cf9a9f915c
              name: 'MSSQL DB ''{#DBNAME}'': Get last backup'
              type: DEPENDENT
              key: 'mssql.backup.raw["{#DBNAME}"]'
              history: '0'
              value_type: TEXT
              description: 'The item gets information about backup processes for {#DBNAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mssql.last.backup.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: raw
                - tag: database
                  value: '{#DBNAME}'
            - uuid: f8bc0815cbc1471eb949429a95503287
              name: 'MSSQL DB ''{#DBNAME}'': Recovery model'
              type: DEPENDENT
              key: 'mssql.backup.recovery_model["{#DBNAME}"]'
              description: |
                Recovery model selected:
                1 = Full
                2 = Bulk_logged
                3 = Simple
              valuemap:
                name: 'MSSQL Recovery model'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[0].db_recovery_model'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '1'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'mssql.backup.raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: ccd715be77234994b8931ca89abb015a
              name: 'MSSQL DB ''{#DBNAME}'': Active transactions'
              type: DEPENDENT
              key: 'mssql.db.active_transactions["{#DBNAME}"]'
              description: 'Number of active transactions for the database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Active Transactions'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: cba4bf9b39fc4cd69152f15cfd0edb56
              name: 'MSSQL DB ''{#DBNAME}'': Data file size'
              type: DEPENDENT
              key: 'mssql.db.data_files_size["{#DBNAME}"]'
              units: B
              description: 'Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of `tempdb`.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Data File(s) Size (KB)'')].cntr_value.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 9cd2a1a539604c68b4540d424a608d4c
              name: 'MSSQL DB ''{#DBNAME}'': Log bytes flushed per second'
              type: DEPENDENT
              key: 'mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"]'
              value_type: FLOAT
              units: Bps
              description: 'Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Bytes Flushed/sec'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: ff2f2fd39e11418ea93b79ba27b73e3d
              name: 'MSSQL DB ''{#DBNAME}'': Log file size'
              type: DEPENDENT
              key: 'mssql.db.log_files_size["{#DBNAME}"]'
              units: B
              description: 'Cumulative size of all the transaction log files in the database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log File(s) Size (KB)'')].cntr_value.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 7466329cc603401095def32026d8182d
              name: 'MSSQL DB ''{#DBNAME}'': Log file used size'
              type: DEPENDENT
              key: 'mssql.db.log_files_used_size["{#DBNAME}"]'
              units: B
              description: 'Cumulative size of all the log files in the database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log File(s) Used Size (KB)'')].cntr_value.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 6c874bd1dd7746b4894d5b25e3de0f7c
              name: 'MSSQL DB ''{#DBNAME}'': Log flushes per second'
              type: DEPENDENT
              key: 'mssql.db.log_flushes_sec.rate["{#DBNAME}"]'
              value_type: FLOAT
              description: 'Number of log flushes per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Flushes/sec'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 64dc4faefc0f4709b5e740c036e9a272
              name: 'MSSQL DB ''{#DBNAME}'': Log flush waits per second'
              type: DEPENDENT
              key: 'mssql.db.log_flush_waits_sec.rate["{#DBNAME}"]'
              value_type: FLOAT
              description: 'Number of commits per second waiting for the log flush.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Flush Waits/sec'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 4bdf258b6902407cbcc7b27cc906ee48
                  expression: 'min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"}'
                  name: 'MSSQL: DB ''{#DBNAME}'': Number of commits waiting for the log flush is high'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Number of commits waiting for the log flush is high (over {$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"}/sec for 5m)'
                  priority: WARNING
                  description: 'Too many commits are waiting for the log flush.'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: performance
            - uuid: 1e4289626cd540dbbc9e54be9d6a0836
              name: 'MSSQL DB ''{#DBNAME}'': Log flush wait time'
              type: DEPENDENT
              key: 'mssql.db.log_flush_wait_time["{#DBNAME}"]'
              value_type: FLOAT
              units: ms
              description: 'Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Flush Wait Time'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 1baacf9d55d746599a28c407087ea5fb
                  expression: 'min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"}'
                  name: 'MSSQL: DB ''{#DBNAME}'': Total wait time to flush the log is high'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Total wait time to flush the log is high (over {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"}ms for 5m)'
                  priority: WARNING
                  description: 'The wait time to flush the log is too long.'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: performance
            - uuid: e0ebbdccf06e4bd580944eca894fd765
              name: 'MSSQL DB ''{#DBNAME}'': Log growths'
              type: DEPENDENT
              key: 'mssql.db.log_growths["{#DBNAME}"]'
              description: 'Total number of times the transaction log for the database has been expanded.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Growths'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: f4705df239ff4b52a7594adc8bff1786
              name: 'MSSQL DB ''{#DBNAME}'': Log shrinks'
              type: DEPENDENT
              key: 'mssql.db.log_shrinks["{#DBNAME}"]'
              description: 'Total number of times the transaction log for the database has been shrunk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Shrinks'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 23f7b754af114e779bfb12b954041a3a
              name: 'MSSQL DB ''{#DBNAME}'': Log truncations'
              type: DEPENDENT
              key: 'mssql.db.log_truncations["{#DBNAME}"]'
              description: 'Number of times the transaction log has been shrunk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Log Truncations'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 622cd26e368144c7b4b4a760be6e9d80
              name: 'MSSQL DB ''{#DBNAME}'': Percent log used'
              type: DEPENDENT
              key: 'mssql.db.percent_log_used["{#DBNAME}"]'
              value_type: FLOAT
              units: '%'
              description: 'Percentage of log space in use.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Percent Log Used'')].cntr_value.first()'
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: f2a80dfd54ca4e2391adbc7006118987
                  expression: 'min(/MSSQL by Zabbix agent 2/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"}'
                  name: 'MSSQL: DB ''{#DBNAME}'': Percent of log usage is high'
                  event_name: 'MSSQL: DB ''{#DBNAME}'': Percent of log usage is high (over {$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"}% for 5m)'
                  priority: WARNING
                  description: 'There''s not enough space left in the log.'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: performance
            - uuid: 84e28628c11d4c35a7ee7b1a714c7b59
              name: 'MSSQL DB ''{#DBNAME}'': Get performance counters'
              type: DEPENDENT
              key: 'mssql.db.perf_raw["{#DBNAME}"]'
              history: '0'
              value_type: TEXT
              description: 'The item gets server status information for {#DBNAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.object_name=~''.*Databases'' && @.instance_name==''{#DBNAME}'')]'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: raw
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 2032b8a3889a4a9f941529c4b62aa860
              name: 'MSSQL DB ''{#DBNAME}'': State'
              type: DEPENDENT
              key: 'mssql.db.state["{#DBNAME}"]'
              description: |
                0 = Online
                1 = Restoring
                2 = Recovering | SQL Server 2008 and later
                3 = Recovery_pending | SQL Server 2008 and later
                4 = Suspect
                5 = Emergency | SQL Server 2008 and later
                6 = Offline | SQL Server 2008 and later
                7 = Copying | Azure SQL Database Active Geo-Replication
                10 = Offline_secondary | Azure SQL Database Active Geo-Replication
              valuemap:
                name: 'MSSQL DB state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''State'')].cntr_value.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 0963794ed0b0483bbaa9dc0858c9f445
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.db.state["{#DBNAME}"])>1'
                  name: 'MSSQL: DB ''{#DBNAME}'': State is {ITEM.VALUE}'
                  priority: HIGH
                  description: 'The DB has a non-working state.'
                  tags:
                    - tag: database
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
            - uuid: e2f693fb31d84532a67d6f7e2f479acc
              name: 'MSSQL DB ''{#DBNAME}'': Transactions per second'
              type: DEPENDENT
              key: 'mssql.db.transactions_sec.rate["{#DBNAME}"]'
              value_type: FLOAT
              description: 'Number of transactions started for the database per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.counter_name==''Transactions/sec'')].cntr_value.first()'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mssql.db.perf_raw["{#DBNAME}"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
          trigger_prototypes:
            - uuid: 7b708b7c408f4b2fb5d1bc6d017d6c68
              expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3'
              name: 'MSSQL: DB ''{#DBNAME}'': Log backup is old'
              event_name: 'MSSQL: DB ''{#DBNAME}'': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"}'
              opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'The log backup has not been executed for a long time.'
              manual_close: 'YES'
              tags:
                - tag: database
                  value: '{#DBNAME}'
                - tag: scope
                  value: availability
            - uuid: dc580ac10b3f451686b8163bdf21b759
              expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3'
              name: 'MSSQL: DB ''{#DBNAME}'': Log backup is old'
              event_name: 'MSSQL: DB ''{#DBNAME}'': Log backup older than {$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"}'
              opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The log backup has not been executed for a long time.'
              manual_close: 'YES'
              dependencies:
                - name: 'MSSQL: DB ''{#DBNAME}'': Log backup is old'
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3'
              tags:
                - tag: database
                  value: '{#DBNAME}'
                - tag: scope
                  value: availability
          graph_prototypes:
            - uuid: 8175463b48da43b596b0fd733dfa1b2e
              name: 'DB ''{#DBNAME}'': Log size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MSSQL by Zabbix agent 2'
                    key: 'mssql.db.log_files_size["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MSSQL by Zabbix agent 2'
                    key: 'mssql.db.log_files_used_size["{#DBNAME}"]'
            - uuid: 768ec0884405473fb269f8b465b214e6
              name: 'DB ''{#DBNAME}'': Number of Log changes'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MSSQL by Zabbix agent 2'
                    key: 'mssql.db.log_growths["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MSSQL by Zabbix agent 2'
                    key: 'mssql.db.log_shrinks["{#DBNAME}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'MSSQL by Zabbix agent 2'
                    key: 'mssql.db.log_truncations["{#DBNAME}"]'
            - uuid: d60af32a941e41ed9d0a65f996df89e4
              name: 'DB ''{#DBNAME}'': Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MSSQL by Zabbix agent 2'
                    key: 'mssql.db.data_files_size["{#DBNAME}"]'
          master_item:
            key: 'mssql.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#DBNAME}'
              path: $.dbname
            - lld_macro: '{#RECOVERY_MODEL}'
              path: $.recovery_model
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          overrides:
            - name: 'Log backup'
              step: '1'
              filter:
                conditions:
                  - macro: '{#RECOVERY_MODEL}'
                    value: '3'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: 'Log backup is old'
                  discover: NO_DISCOVER
        - uuid: 749fe36645994fc2aa45d7916862b893
          name: 'Job discovery'
          type: DEPENDENT
          key: mssql.job.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JOBNAME}'
                value: '{$MSSQL.JOB.MATCHES}'
              - macro: '{#JOBNAME}'
                value: '{$MSSQL.JOB.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Scanning jobs in DBMS.'
          item_prototypes:
            - uuid: 7503acf68ad44180ace4113d654752d1
              name: 'MSSQL Job ''{#JOBNAME}'': Enabled'
              type: DEPENDENT
              key: 'mssql.job.enabled["{#JOBNAME}"]'
              description: |
                The possible values of the job status:
                0 = Disabled
                1 = Enabled
              valuemap:
                name: 'MSSQL - Yes / No'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.enabled
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
            - uuid: a42c8a24b329498581b8a81c13d16076
              name: 'MSSQL Job ''{#JOBNAME}'': Last run date-time'
              type: DEPENDENT
              key: 'mssql.job.lastrundatetime["{#JOBNAME}"]'
              units: unixtime
              description: 'The last date-time of the job run.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.last_run_date_time
                - type: JAVASCRIPT
                  parameters:
                    - 'return value == ''null'' ? 0 : Math.floor(new Date(value) / 1000);'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
            - uuid: b86b627c1a234d409950345b9d7a1f73
              name: 'MSSQL Job ''{#JOBNAME}'': Last run status message'
              type: DEPENDENT
              key: 'mssql.job.lastrunstatusmessage["{#JOBNAME}"]'
              value_type: TEXT
              description: 'An informational message about the last run of the job.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.last_run_status_message
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
            - uuid: fcc4d2cfa5674d33b8831e03b23f40c5
              name: 'MSSQL Job ''{#JOBNAME}'': Next run date-time'
              type: DEPENDENT
              key: 'mssql.job.nextrundatetime["{#JOBNAME}"]'
              units: unixtime
              description: 'The next date-time of the job run.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.next_run_date_time
                - type: JAVASCRIPT
                  parameters:
                    - 'return value == ''null'' ? 0 : Math.floor(new Date(value) / 1000);'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
            - uuid: 7bb5fb0220ef4649955049ee1b6d6c73
              name: 'MSSQL Job ''{#JOBNAME}'': Run status'
              type: DEPENDENT
              key: 'mssql.job.runstatus["{#JOBNAME}"]'
              description: |
                The possible values of the job status:
                0 ⇒ Failed
                1 ⇒ Succeeded
                2 ⇒ Retry
                3 ⇒ Canceled
                4 ⇒ Running
              valuemap:
                name: 'MSSQL Job Run Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.run_status
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
              trigger_prototypes:
                - uuid: f404c4f644ee450ebbd269eb7c8897d9
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.job.runstatus["{#JOBNAME}"])=0'
                  name: 'MSSQL: Job ''{#JOBNAME}'': Failed to run'
                  priority: WARNING
                  description: 'The last run of the job has failed.'
                  manual_close: 'YES'
                  tags:
                    - tag: mssql-job
                      value: '{#JOBNAME}'
                    - tag: scope
                      value: performance
            - uuid: 6ae51f0fd7c04e01aa9e1af302d461d0
              name: 'MSSQL Job ''{#JOBNAME}'': Run duration'
              type: DEPENDENT
              key: 'mssql.job.run_duration["{#JOBNAME}"]'
              units: s
              description: 'Duration of the last-run job.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.run_duration
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'mssql.job.status_raw["{#JOBNAME}"]'
              tags:
                - tag: component
                  value: mssql-job
                - tag: mssql-job
                  value: '{#JOBNAME}'
              trigger_prototypes:
                - uuid: b8bf7358712242609e64ce60303eb80f
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.JOB_DURATION.WARN:"{#JOBNAME}"}'
                  name: 'MSSQL: Job ''{#JOBNAME}'': Job duration is high'
                  event_name: 'MSSQL: Job ''{#JOBNAME}'': Job duration is greater than {$MSSQL.JOB_DURATION.WARN:"{#JOBNAME}"}'
                  opdata: 'Job duration: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The job is taking too long.'
                  manual_close: 'YES'
                  tags:
                    - tag: mssql-job
                      value: '{#JOBNAME}'
                    - tag: scope
                      value: performance
            - uuid: 1bd249b766384ec28f9dfa0212ac3472
              name: 'MSSQL Job ''{#JOBNAME}'': Get job status'
              type: DEPENDENT
              key: 'mssql.job.status_raw["{#JOBNAME}"]'
              history: '0'
              value_type: TEXT
              description: 'The item gets the status of SQL agent job {#JOBNAME}.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.job_name==''{#JOBNAME}'')].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: raw
                - tag: mssql-job
                  value: '{#JOBNAME}'
          master_item:
            key: 'mssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#JOBNAME}'
              path: $.job_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: f47cad40c2dd42d4a80fb5628b8cc790
          name: 'Local database discovery'
          type: DEPENDENT
          key: mssql.local.db.discovery
          description: 'Discovery of the local availability databases.'
          item_prototypes:
            - uuid: af88b98cb0274de89dbf3b65a1b5c107
              name: 'MSSQL AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': Suspended'
              type: DEPENDENT
              key: 'mssql.local_db.is_suspended["{#DBNAME}"]'
              description: |
                Database state:
                0 = Resumed
                1 = Suspended
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'')].is_suspended.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: local-db
                - tag: local-db
                  value: '{#DBNAME}'
            - uuid: b0f834ec67b743a994acc4d2681c594f
              name: 'MSSQL AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': State'
              type: DEPENDENT
              key: 'mssql.local_db.state["{#DBNAME}"]'
              description: |
                0 = Online
                1 = Restoring
                2 = Recovering
                3 = Recovery pending
                4 = Suspect
                5 = Emergency
                6 = Offline
              valuemap:
                name: 'MSSQL DB state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'')].database_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: local-db
                - tag: local-db
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 7eb2d73718b0451790c5d81d63517c1b
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.local_db.state["{#DBNAME}"])>0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': "{#DBNAME}" is {ITEM.VALUE}'
                  priority: WARNING
                  description: 'The local availability database has a non-working state.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
            - uuid: bdbe4f929d0247baa8522b0bae2e3b3e
              name: 'MSSQL AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': Synchronization health'
              type: DEPENDENT
              key: 'mssql.local_db.synchronization_health["{#DBNAME}"]'
              description: |
                Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode):
                0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing").
                1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing").
                2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing").
              valuemap:
                name: 'MSSQL AG Synchronization health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'')].synchronization_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: local-db
                - tag: local-db
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 47ba6c51cf34498a991b68b341210eca
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': "{#DBNAME}" is Not healthy'
                  priority: HIGH
                  description: 'The synchronization state of the local availability database is "Not synchronizing".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: 112b6ba5294946c7973d278392266439
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=1'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': "{#DBNAME}" is Partially healthy'
                  priority: AVERAGE
                  description: 'A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
          master_item:
            key: 'mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#DBNAME}'
              path: $.dbname
            - lld_macro: '{#GROUP_NAME}'
              path: $.group_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: 7c12efa1fd27435a968d910abcb1c095
          name: 'Mirroring discovery'
          type: DEPENDENT
          key: mssql.mirroring.discovery
          description: 'To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role.'
          item_prototypes:
            - uuid: ad3744d9c53f44008f6557a25333268d
              name: 'MSSQL Mirroring ''{#DBNAME}'': Role'
              type: DEPENDENT
              key: 'mssql.mirroring.role["{#DBNAME}"]'
              description: |
                Current role of the local database plays in the database mirroring session.
                1 = Principal
                2 = Mirror
              valuemap:
                name: 'MSSQL Mirroring Role'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_role.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
            - uuid: da278bc7d59b4590a5a869d800b57835
              name: 'MSSQL Mirroring ''{#DBNAME}'': Role sequence'
              type: DEPENDENT
              key: 'mssql.mirroring.role_sequence["{#DBNAME}"]'
              description: 'The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_role_sequence.first()'
                - type: SIMPLE_CHANGE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
            - uuid: ff0f198e003d4804a4ef471336b7b64b
              name: 'MSSQL Mirroring ''{#DBNAME}'': Safety level'
              type: DEPENDENT
              key: 'mssql.mirroring.safety_level["{#DBNAME}"]'
              description: |
                Safety setting for updates on the mirror database:
                0 = Unknown state
                1 = Off [asynchronous]
                2 = Full [synchronous]
              valuemap:
                name: 'MSSQL Safety level'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_safety_level.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
            - uuid: c0578a39b0a349d3bc4418bd25efbfd9
              name: 'MSSQL Mirroring ''{#DBNAME}'': State'
              type: DEPENDENT
              key: 'mssql.mirroring.state["{#DBNAME}"]'
              description: |
                State of the mirror database and of the database mirroring session.
                0 = Suspended
                1 = Disconnected from the other partner
                2 = Synchronizing
                3 = Pending failover
                4 = Synchronized
                5 = The partners are not synchronized. Failover is not possible now.
                6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16.
              valuemap:
                name: 'MSSQL Mirroring State'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 33ef90679bcb47f09cc0c5372ea54fdc
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=3'
                  name: 'MSSQL: Mirroring ''{#DBNAME}'': "{#DBNAME}" is {ITEM.VALUE}'
                  priority: WARNING
                  description: 'The state of the mirror database and of the database mirroring session is "Pending failover".'
                  tags:
                    - tag: mssql-mirroring
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: 4e7813c78c8f47808cfb5c970de2ad99
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=5'
                  name: 'MSSQL: Mirroring ''{#DBNAME}'': "{#DBNAME}" is {ITEM.VALUE}'
                  priority: HIGH
                  description: 'The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now.'
                  tags:
                    - tag: mssql-mirroring
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
                - uuid: 5554197e2079495ab49491ca0855ccee
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])<=2'
                  name: 'MSSQL: Mirroring ''{#DBNAME}'': "{#DBNAME}" is {ITEM.VALUE}'
                  priority: INFO
                  description: 'The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing".'
                  tags:
                    - tag: mssql-mirroring
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
            - uuid: 84be4a93d1774b5096831c082b9154de
              name: 'MSSQL Mirroring ''{#DBNAME}'': Witness state'
              type: DEPENDENT
              key: 'mssql.mirroring.witness_state["{#DBNAME}"]'
              description: |
                State of the witness in the database mirroring session of the database:
                0 = Unknown
                1 = Connected
                2 = Disconnected
              valuemap:
                name: 'MSSQL Witness state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'')].mirroring_witness_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: mssql-mirroring
                - tag: mssql-mirroring
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 3a3903f3008b4360a93e45d94f344a42
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.mirroring.witness_state["{#DBNAME}"])=2'
                  name: 'MSSQL: Mirroring ''{#DBNAME}'': "{#DBNAME}" Witness is disconnected'
                  priority: WARNING
                  description: 'The state of the witness in the database mirroring session of the database is "Disconnected".'
                  tags:
                    - tag: mssql-mirroring
                      value: '{#DBNAME}'
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: 37c8f69765e3456bbfdfbe096c78e910
              name: 'Mirroring ''{#DBNAME}'': States'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MSSQL by Zabbix agent 2'
                    key: 'mssql.mirroring.state["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MSSQL by Zabbix agent 2'
                    key: 'mssql.mirroring.witness_state["{#DBNAME}"]'
          master_item:
            key: 'mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#DBNAME}'
              path: $.dbname
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: faaa289d832d4dcda5de868d832a7d31
          name: 'Non-local database discovery'
          type: DEPENDENT
          key: mssql.non.local.db.discovery
          description: 'Discovery of the non-local (not local to SQL Server instance) availability databases.'
          item_prototypes:
            - uuid: ab9c87918819445f8c4eaf3fd3226a5a
              name: 'MSSQL AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Log queue size'
              type: DEPENDENT
              key: 'mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"]'
              units: B
              description: 'Amount of the log records of the primary database that has not been sent to the secondary databases.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'' && @.replica_name==''{#REPLICA_NAME}'')].log_send_queue_size.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: non-local-db
                - tag: non-local-db
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: 16b1fc9ee0e340ac8f1742d04ffc6393
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3)'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Log queue size is growing'
                  priority: HIGH
                  description: 'The log records of the primary database are not sent to the secondary databases.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: non-local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: capacity
            - uuid: dd2a6b660ed148e7b1c729ffb2a4ad76
              name: 'MSSQL AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Redo log queue size'
              type: DEPENDENT
              key: 'mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"]'
              units: B
              description: 'Amount of log records in the log files of the secondary replica that has not yet been redone.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.dbname==''{#DBNAME}'' && @.group_name==''{#GROUP_NAME}'' && @.replica_name==''{#REPLICA_NAME}'')].redo_queue_size.first()'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: non-local-db
                - tag: non-local-db
                  value: '{#DBNAME}'
              trigger_prototypes:
                - uuid: b4748575543a451c85fa013e4867e38f
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3)'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Redo log queue size is growing'
                  priority: HIGH
                  description: 'The log records in the log files of the secondary replica have not yet been redone.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: non-local-db
                      value: '{#DBNAME}'
                    - tag: scope
                      value: capacity
          master_item:
            key: 'mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#DBNAME}'
              path: $.dbname
            - lld_macro: '{#GROUP_NAME}'
              path: $.group_name
            - lld_macro: '{#REPLICA_NAME}'
              path: $.replica_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: ee0ccf3f0e6e4bfbb500942811874ece
          name: 'Quorum discovery'
          type: DEPENDENT
          key: mssql.quorum.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CLUSTER_NAME}'
                value: ^.+$
          description: 'Discovery of the quorum of the WSFC cluster.'
          item_prototypes:
            - uuid: 3ddd6e3780de4b7a8cb2e37d515d5a8f
              name: 'MSSQL Cluster ''{#CLUSTER_NAME}'': Quorum state'
              type: DEPENDENT
              key: 'mssql.quorum.state.[{#CLUSTER_NAME}]'
              description: |
                State of the WSFC quorum, one of:
                0 = Unknown quorum state
                1 = Normal quorum
                2 = Forced quorum
              valuemap:
                name: 'MSSQL Quorum state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.cluster_name==''{#CLUSTER_NAME}'')].quorum_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: cluster-name
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: quorum
            - uuid: 1a00d48af79340478b359a958cb78e3f
              name: 'MSSQL Cluster ''{#CLUSTER_NAME}'': Quorum type'
              type: DEPENDENT
              key: 'mssql.quorum.type.[{#CLUSTER_NAME}]'
              description: |
                Type of quorum used by this WSFC cluster, one of:
                0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one.
                1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up).
                2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness.
                3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one.
                4 = Unknown Quorum. Unknown quorum for the cluster.
                5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up).
              valuemap:
                name: 'MSSQL Quorum type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.cluster_name==''{#CLUSTER_NAME}'')].quorum_type.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: cluster-name
                  value: '{#CLUSTER_NAME}'
                - tag: component
                  value: quorum
          master_item:
            key: 'mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#CLUSTER_NAME}'
              path: $.cluster_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: 57e6fe3d425d4d74a360f26bb5ff5e57
          name: 'Quorum members discovery'
          type: DEPENDENT
          key: mssql.quorum.member.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CLUSTER_NAME}'
                value: ^.+$
              - macro: '{#MEMBER_NAME}'
                value: '{$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES}'
              - macro: '{#MEMBER_NAME}'
                value: '{$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of the quorum members of the WSFC cluster.'
          item_prototypes:
            - uuid: 6fec1fe9856c4b7eb1f7446e01a75ce5
              name: 'MSSQL Cluster member ''{#MEMBER_NAME}'': Member state'
              type: DEPENDENT
              key: 'mssql.quorum_members.member_state.[{#MEMBER_NAME}]'
              description: |
                The member state, one of:
                0 = Offline
                1 = Online
              valuemap:
                name: 'MSSQL Quorum members state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.member_name==''{#MEMBER_NAME}'')].member_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: 'quorum members'
                - tag: quorum-members-name
                  value: '{#MEMBER_NAME}'
            - uuid: d8dd85b6fc764ba4abc4d5cff0cefced
              name: 'MSSQL Cluster member ''{#MEMBER_NAME}'': Member type'
              type: DEPENDENT
              key: 'mssql.quorum_members.member_type.[{#MEMBER_NAME}]'
              description: |
                The type of member, one of:
                0 = WSFC node
                1 = Disk witness
                2 = File share witness
                3 = Cloud Witness
              valuemap:
                name: 'MSSQL Quorum members type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.member_name==''{#MEMBER_NAME}'')].member_type.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: 'quorum members'
                - tag: quorum-members-name
                  value: '{#MEMBER_NAME}'
            - uuid: 87154fcf731b461b94e816ce58ef44ac
              name: 'MSSQL Cluster member ''{#MEMBER_NAME}'': Number of quorum votes'
              type: DEPENDENT
              key: 'mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}]'
              description: 'Number of quorum votes possessed by this quorum member.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.member_name==''{#MEMBER_NAME}'')].number_of_quorum_votes.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: component
                  value: 'quorum members'
                - tag: quorum-members-name
                  value: '{#MEMBER_NAME}'
          master_item:
            key: 'mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#CLUSTER_NAME}'
              path: $.cluster_name
            - lld_macro: '{#MEMBER_NAME}'
              path: $.member_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: f72e7102f3314225b298a44332361aea
          name: 'Replication discovery'
          type: DEPENDENT
          key: mssql.replica.discovery
          description: 'Discovery of the database replicas.'
          item_prototypes:
            - uuid: a685cc983de040a6a6456d0568b74492
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Connected state'
              type: DEPENDENT
              key: 'mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Whether a secondary replica is currently connected to the primary replica:
                0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role:
                On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect;
                On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica.
                1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica.
              valuemap:
                name: 'MSSQL AG Connected state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].connected_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
            - uuid: 8dd557f2254a43adb8d56864d8910c11
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Is local'
              type: DEPENDENT
              key: 'mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Whether the replica is local:
                0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location.
                1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs.
              valuemap:
                name: 'MSSQL - Yes / No'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].is_local.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
            - uuid: 1f6c0f9e0757405eb172fa97f8dfe990
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Join state'
              type: DEPENDENT
              key: 'mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                0 = Not joined
                1 = Joined, standalone instance
                2 = Joined, failover cluster instance
              valuemap:
                name: 'MSSQL AG Join state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].join_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
            - uuid: bc71481dd6b047679946f8488dd844f7
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Operational state'
              type: DEPENDENT
              key: 'mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Current operational state of the replica:
                0 = Pending failover
                1 = Pending
                2 = Online
                3 = Offline
                4 = Failed
                5 = Failed, no quorum
                6 = Not local
              valuemap:
                name: 'MSSQL AG Operational state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].operational_state.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
              trigger_prototypes:
                - uuid: 7a05f5f0393f442d8e5d78669e9dd8cb
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is {ITEM.VALUE}'
                  priority: WARNING
                  description: 'The operational state of the replica in a given availability group is "Pending" or "Offline".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
                - uuid: 5f67fcecd9864c5a97c0bb7c8281cd81
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is {ITEM.VALUE}'
                  priority: AVERAGE
                  description: 'The operational state of the replica in a given availability group is "Failed".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
                - uuid: 7e387d698f214c458a6e45d64191185e
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is {ITEM.VALUE}'
                  priority: HIGH
                  description: 'The operational state of the replica in a given availability group is "Failed, no quorum".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
            - uuid: a1ae4502e4a445f7801ba8283124e480
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Recovery health'
              type: DEPENDENT
              key: 'mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Rollup of the "database_state" column of the `sys.dm_hadr_database_replica_states` dynamic management view:
                0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0").
                1 = Online. All the joined databases have a database state of "Online" (database_state is "0").
              valuemap:
                name: 'MSSQL AG Recovery health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].recovery_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
              trigger_prototypes:
                - uuid: 9c5f393288114e1081055f18c136dd07
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} Recovery in progress'
                  priority: INFO
                  description: 'At least one joined database has a database state other than "Online".'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: notice
            - uuid: 50afa669369d4a5e936748aee07e76f0
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Role'
              type: DEPENDENT
              key: 'mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Current Always On availability group role of a local replica or a connected remote replica:
                0 = Resolving
                1 = Primary
                2 = Secondary
              valuemap:
                name: 'MSSQL AG Role'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].role.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
            - uuid: 6a1abecd7c0044dd82442b30df3b4eae
              name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Sync health'
              type: DEPENDENT
              key: 'mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"]'
              description: |
                Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica:
                0 = Not healthy. At least one joined database is in the "Not synchronizing" state.
                1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing.
                2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing.
              valuemap:
                name: 'MSSQL AG Synchronization health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$[?(@.replica_name==''{#REPLICA_NAME}'' && @.group_name==''{#GROUP_NAME}'')].synchronization_health.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: component
                  value: replica
                - tag: replica
                  value: '{#REPLICA_NAME}'
              trigger_prototypes:
                - uuid: 57aef51f42cd4e40a1041bb6862fde27
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is Not healthy'
                  priority: AVERAGE
                  description: 'At least one joined database is in the "Not synchronizing" state.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
                - uuid: e2ce3d5eb0174f1789ed01f3516f25dd
                  expression: 'last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1'
                  name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is Partially healthy'
                  priority: WARNING
                  description: 'Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing.'
                  tags:
                    - tag: availability-group
                      value: '{#GROUP_NAME}'
                    - tag: replica
                      value: '{#REPLICA_NAME}'
                    - tag: scope
                      value: availability
          trigger_prototypes:
            - uuid: b6e37290b6b44d2888bdbfe53a949b63
              expression: 'last(/MSSQL by Zabbix agent 2/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by Zabbix agent 2/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2'
              name: 'MSSQL: AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': {#REPLICA_NAME} is disconnected'
              priority: WARNING
              description: |
                The response of an availability replica to the "Disconnected" state depends on its role:
                On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect;
                On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica.
              tags:
                - tag: availability-group
                  value: '{#GROUP_NAME}'
                - tag: replica
                  value: '{#REPLICA_NAME}'
                - tag: scope
                  value: availability
          master_item:
            key: 'mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]'
          lld_macro_paths:
            - lld_macro: '{#GROUP_NAME}'
              path: $.group_name
            - lld_macro: '{#REPLICA_NAME}'
              path: $.replica_name
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
      tags:
        - tag: class
          value: database
        - tag: subclass
          value: sql
        - tag: target
          value: mssql
      macros:
        - macro: '{$MSSQL.AVERAGE_WAIT_TIME.MAX}'
          value: '500'
          description: 'The maximum average wait time, in milliseconds - for the trigger expression.'
          config:
            type: TEXT
            priority: '16'
            section_name: Thresholds
            label: 'Average wait time threshold'
            description: 'Threshold of the maximum average wait time in milliseconds. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.BACKUP_DIFF.CRIT}'
          value: 6d
          description: 'The maximum of days without a differential backup - for the High trigger expression.'
          config:
            type: TEXT
            priority: '27'
            section_name: Thresholds
            label: 'Critical differential backup threshold'
            description: 'Critical threshold of the maximum days without a differential backup.'
        - macro: '{$MSSQL.BACKUP_DIFF.USED}'
          value: '1'
          description: 'The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name.'
          config:
            type: CHECKBOX
            priority: '35'
            section_name: Other
            label: 'Monitoring of differential backup'
            description: 'Whether it is necessary to monitor of differential backup.'
            options:
              - checked: '1'
                unchecked: '0'
        - macro: '{$MSSQL.BACKUP_DIFF.WARN}'
          value: 3d
          description: 'The maximum of days without a differential backup - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '26'
            section_name: Thresholds
            label: 'Warning differential backup threshold'
            description: 'Warning threshold of the maximum days without a differential backup.'
        - macro: '{$MSSQL.BACKUP_FULL.CRIT}'
          value: 10d
          description: 'The maximum of days without a full backup - for the High trigger expression.'
          config:
            type: TEXT
            priority: '29'
            section_name: Thresholds
            label: 'Critical full backup threshold'
            description: 'Critical threshold of the maximum days without a full backup.'
        - macro: '{$MSSQL.BACKUP_FULL.USED}'
          value: '1'
          description: 'The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name.'
          config:
            type: CHECKBOX
            priority: '33'
            section_name: Other
            label: 'Monitoring of full backup'
            description: 'Whether it is necessary to monitor of full backup.'
            options:
              - checked: '1'
                unchecked: '0'
        - macro: '{$MSSQL.BACKUP_FULL.WARN}'
          value: 9d
          description: 'The maximum of days without a full backup - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '28'
            section_name: Thresholds
            label: 'Warning full backup threshold'
            description: 'Warning threshold of the maximum days without a full backup.'
        - macro: '{$MSSQL.BACKUP_LOG.CRIT}'
          value: 8h
          description: 'The maximum of days without a log backup - for the High trigger expression.'
          config:
            type: TEXT
            priority: '31'
            section_name: Thresholds
            label: 'Critical log backup threshold'
            description: 'Critical threshold of the maximum days without a log backup.'
        - macro: '{$MSSQL.BACKUP_LOG.USED}'
          value: '1'
          description: 'The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name.'
          config:
            type: CHECKBOX
            priority: '34'
            section_name: Other
            label: 'Monitoring of log backup'
            description: 'Whether it is necessary to monitor of log backup.'
            options:
              - checked: '1'
                unchecked: '0'
        - macro: '{$MSSQL.BACKUP_LOG.WARN}'
          value: 4h
          description: 'The maximum of days without a log backup - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '30'
            section_name: Thresholds
            label: 'Warning log backup threshold'
            description: 'Warning threshold of the maximum days without a log backup.'
        - macro: '{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}'
          value: '30'
          description: 'The minimum buffer cache hit ratio, in percent - for the High trigger expression.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Critical buffer cache hit ratio threshold'
            description: 'Critical threshold for the minimum percentage of buffer cache hit ratio. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}'
          value: '50'
          description: 'The minimum buffer cache hit ratio, in percent - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Warning buffer cache hit ratio threshold'
            description: 'Warning threshold for the minimum percentage of buffer cache hit ratio. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.DBNAME.MATCHES}'
          value: '.*'
          description: 'This macro is used in database discovery. It can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '36'
            section_name: Filters
            label: 'Include database filter'
            description: 'Regex string to include discovered database by its name.'
        - macro: '{$MSSQL.DBNAME.NOT_MATCHES}'
          value: master|tempdb|model|msdb
          description: 'This macro is used in database discovery. It can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '37'
            section_name: Filters
            label: 'Exclude database filter'
            description: 'Regex string to exclude discovered database by its name.'
        - macro: '{$MSSQL.DEADLOCKS.MAX}'
          value: '1'
          description: 'The maximum deadlocks per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '19'
            section_name: Thresholds
            label: 'Deadlocks per second threshold'
            description: 'Threshold of the maximum number of deadlocks per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.FREE_LIST_STALLS.MAX}'
          value: '2'
          description: 'The maximum free list stalls per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Free list stalls per second threshold'
            description: 'Threshold of the maximum number of free list stalls per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.HOST}'
          value: localhost
          description: 'The hostname or IP address of the MSSQL instance.'
          config:
            type: TEXT
            priority: '4'
            label: 'MSSQL address'
            description: 'Hostname or IP address of the MSSQL instance.'
        - macro: '{$MSSQL.JOB.MATCHES}'
          value: '.*'
          description: 'This macro is used in job discovery. It can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '38'
            section_name: Filters
            label: 'Include job filter'
            description: 'Regex string to include discovered job by its name.'
        - macro: '{$MSSQL.JOB.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in job discovery. It can be overridden on the host or linked template level.'
          config:
            type: TEXT
            priority: '39'
            section_name: Filters
            label: 'Exclude job filter'
            description: 'Regex string to exclude discovered job by its name.'
        - macro: '{$MSSQL.JOB_DURATION.WARN}'
          value: 1h
          description: 'The maximum job duration - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '32'
            section_name: Thresholds
            label: 'Job duration threshold'
            description: 'Threshold of the maximum job duration.'
        - macro: '{$MSSQL.LAZY_WRITES.MAX}'
          value: '20'
          description: 'The maximum lazy writes per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'Lazy writes per second threshold'
            description: 'Threshold of the maximum number of lazy writes per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.LOCK_REQUESTS.MAX}'
          value: '1000'
          description: 'The maximum lock requests per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '17'
            section_name: Thresholds
            label: 'Lock requests per second threshold'
            description: 'Threshold of the maximum number of lock requests per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.LOCK_TIMEOUTS.MAX}'
          value: '1'
          description: 'The maximum lock timeouts per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '18'
            section_name: Thresholds
            label: 'Lock timeouts per second threshold'
            description: 'Threshold of the maximum number of lock timeouts per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.LOG_FLUSH_WAITS.MAX}'
          value: '1'
          description: 'The maximum log flush waits per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '20'
            section_name: Thresholds
            label: 'Log flush waits per second threshold'
            description: 'Threshold for the maximum number of log flush waits per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX}'
          value: '1'
          description: 'The maximum log flush wait time, in milliseconds - for the trigger expression.'
          config:
            type: TEXT
            priority: '21'
            section_name: Thresholds
            label: 'Log flush wait time threshold'
            description: 'Threshold of the maximum log flush wait time in milliseconds. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}'
          value: '300'
          description: 'The minimum page life expectancy - for the trigger expression.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Page life expectancy threshold'
            description: 'Threshold of the minimum page life expectancy. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PAGE_READS.MAX}'
          value: '90'
          description: 'The maximum page reads per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'Page reads per second threshold'
            description: 'Threshold of the maximum number of page reads per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PAGE_WRITES.MAX}'
          value: '90'
          description: 'The maximum page writes per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'Page writes per second threshold'
            description: 'Threshold of the maximum number of page writes per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PASSWORD}'
          description: 'MSSQL database password.'
          config:
            type: TEXT
            priority: '3'
            label: 'MSSQL password'
            description: 'MSSQL database password.'
            required: 'YES'
        - macro: '{$MSSQL.PERCENT_COMPILATIONS.MAX}'
          value: '10'
          description: 'The maximum percentage of Transact-SQL compilations - for the trigger expression.'
          config:
            type: TEXT
            priority: '23'
            section_name: Thresholds
            label: 'Transact-SQL compilations threshold'
            description: 'Threshold for the maximum percentage of Transact-SQL compilations. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PERCENT_LOG_USED.MAX}'
          value: '80'
          description: 'The maximum percentage of log used - for the trigger expression.'
          config:
            type: TEXT
            priority: '22'
            section_name: Thresholds
            label: 'Log used threshold'
            description: 'Threshold for the maximum percentage of log used. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PERCENT_READAHEAD.MAX}'
          value: '20'
          description: 'The maximum percentage of pages read per second in anticipation of use - for the trigger expression.'
          config:
            type: TEXT
            priority: '25'
            section_name: Thresholds
            label: 'Threshold of pages read per second in anticipation of use'
            description: 'Threshold of the maximum percentage of pages read per second in anticipation of use. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PERCENT_RECOMPILATIONS.MAX}'
          value: '10'
          description: 'The maximum percentage of Transact-SQL recompilations - for the trigger expression.'
          config:
            type: TEXT
            priority: '24'
            section_name: Thresholds
            label: 'Transact-SQL recompilations threshold'
            description: 'Threshold for the maximum percentage of Transact-SQL recompilations. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.PORT}'
          value: '1433'
          description: 'MSSQL TCP port.'
          config:
            type: TEXT
            priority: '5'
            label: 'MSSQL TCP port'
            description: 'Port of the MSSQL instance. In the range from 1 to 65535 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Filter to include discovered quorum member by name.'
          config:
            type: TEXT
            priority: '40'
            section_name: Filters
            label: 'Include quorum member filter'
            description: 'Regex string to include discovered quorum member by name.'
        - macro: '{$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered quorum member by name.'
          config:
            type: TEXT
            priority: '41'
            section_name: Filters
            label: 'Exclude quorum member filter'
            description: 'Regex string to exclude discovered quorum member by name.'
        - macro: '{$MSSQL.URI}'
          description: 'Connection string.'
          config:
            type: TEXT
            priority: '1'
            label: 'MSSQL URI'
            description: 'Connection string for the MSSQL instance.'
            required: 'YES'
        - macro: '{$MSSQL.USER}'
          description: 'MSSQL database username.'
          config:
            type: TEXT
            priority: '2'
            label: 'MSSQL user'
            description: 'MSSQL database username.'
            required: 'YES'
        - macro: '{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}'
          value: '90'
          description: 'The minimum percentage of work tables from the cache ratio - for the High trigger expression.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Percentage of work tables from the cache ratio threshold'
            description: 'Threshold for the minimum percentage of work tables from the cache ratio. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.WORK_FILES.MAX}'
          value: '20'
          description: 'The maximum number of work files created per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Work files created per second threshold'
            description: 'Threshold of the maximum number of work files created per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MSSQL.WORK_TABLES.MAX}'
          value: '20'
          description: 'The maximum number of work tables created per second - for the trigger expression.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Work files tables per second threshold'
            description: 'Threshold of the maximum number of work tables created per second. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 699c7aa81a4b476abb938f3db0debf73
          name: 'MSSQL: Overview'
          pages:
            - name: Main
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Errors'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Server memory'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Waits per second'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  'y': '15'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Database pages'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graph
                  'y': '20'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Transactions'
                    - type: STRING
                      name: reference
                      value: AAAAI
                - type: graph
                  'y': '25'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Pages'
                    - type: STRING
                      name: reference
                      value: AAAAK
                - type: graph
                  'y': '30'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Memory grants outstanding and pending'
                    - type: STRING
                      name: reference
                      value: AAAAM
                - type: graph
                  'y': '35'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Access methods'
                    - type: STRING
                      name: reference
                      value: AAAAO
                - type: graph
                  'y': '40'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Logins per second and Logouts per second'
                    - type: STRING
                      name: reference
                      value: AAAAQ
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Locks'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Memory/cache load'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Wait times'
                    - type: STRING
                      name: reference
                      value: AAAAF
                - type: graph
                  x: '36'
                  'y': '15'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Cache objects'
                    - type: STRING
                      name: reference
                      value: AAAAH
                - type: graph
                  x: '36'
                  'y': '20'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Compilations'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                - type: graph
                  x: '36'
                  'y': '25'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Page life expectancy'
                    - type: STRING
                      name: reference
                      value: AAAAL
                - type: graph
                  x: '36'
                  'y': '30'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Processes blocked'
                    - type: STRING
                      name: reference
                      value: AAAAN
                - type: graph
                  x: '36'
                  'y': '35'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'MSSQL: Auto-params'
                    - type: STRING
                      name: reference
                      value: AAAAP
            - name: Databases
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '15'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MSSQL by Zabbix agent 2'
                        name: 'DB ''{#DBNAME}'': Size'
                    - type: STRING
                      name: reference
                      value: AAAAR
                    - 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: 'MSSQL by Zabbix agent 2'
                        name: 'DB ''{#DBNAME}'': Log size'
                    - type: STRING
                      name: reference
                      value: AAAAS
                    - type: INTEGER
                      name: rows
                      value: '3'
      valuemaps:
        - uuid: 0d7dbd62613540cc8dd70d2f0ec76db6
          name: 'MSSQL - Yes / No'
          mappings:
            - value: '0'
              newvalue: 'No'
            - value: '1'
              newvalue: 'Yes'
        - uuid: 1f962ea838d640d5905ae14d66826239
          name: 'MSSQL AG Connected state'
          mappings:
            - value: '0'
              newvalue: Disconnected
            - value: '1'
              newvalue: Connected
        - uuid: 034a175b7fba4e4d8e85806c8f801f18
          name: 'MSSQL AG Join state'
          mappings:
            - value: '0'
              newvalue: 'Not joined'
            - value: '1'
              newvalue: 'Joined, standalone instance'
            - value: '2'
              newvalue: 'Joined, failover cluster instance'
        - uuid: fbbaea2f75f94b7ba0bb2ed2756e2593
          name: 'MSSQL AG Operational state'
          mappings:
            - value: '0'
              newvalue: 'Pending failover'
            - value: '1'
              newvalue: Pending
            - value: '2'
              newvalue: Online
            - value: '3'
              newvalue: Offline
            - value: '4'
              newvalue: Failed
            - value: '5'
              newvalue: 'Failed, no quorum'
            - value: '6'
              newvalue: 'Replica is not local'
        - uuid: c90a7f77957a40c8bb6c9370ff1f63d1
          name: 'MSSQL AG Recovery health'
          mappings:
            - value: '0'
              newvalue: 'In progress'
            - value: '1'
              newvalue: Online
            - value: '2'
              newvalue: 'Replica is not local'
        - uuid: b07e0cd2c7fd4411b16305141058c9d7
          name: 'MSSQL AG Role'
          mappings:
            - value: '0'
              newvalue: Resolving
            - value: '1'
              newvalue: Primary
            - value: '2'
              newvalue: Secondary
        - uuid: dd1d46bfb14946769dc929ae1947a328
          name: 'MSSQL AG Synchronization health'
          mappings:
            - value: '0'
              newvalue: 'Not healthy'
            - value: '1'
              newvalue: 'Partially healthy'
            - value: '2'
              newvalue: Healthy
        - uuid: eeca1ed2c3cb4624b045b9ba0007f1a6
          name: 'MSSQL DB state'
          mappings:
            - value: '0'
              newvalue: ONLINE
            - value: '1'
              newvalue: RESTORING
            - value: '2'
              newvalue: RECOVERING
            - value: '3'
              newvalue: RECOVERY_PENDING
            - value: '4'
              newvalue: SUSPECT
            - value: '5'
              newvalue: EMERGENCY
            - value: '6'
              newvalue: OFFLINE
            - value: '7'
              newvalue: COPYING
            - value: '10'
              newvalue: OFFLINE_SECONDARY
        - uuid: bc4b734c0c3e4f508323a8880a9b27db
          name: 'MSSQL Job Run Status'
          mappings:
            - value: '0'
              newvalue: Failed
            - value: '1'
              newvalue: Succeeded
            - value: '2'
              newvalue: Retry
            - value: '3'
              newvalue: Canceled
            - value: '4'
              newvalue: Running
            - value: '5'
              newvalue: Unknown
        - uuid: 09480e835f474f22ba463b7c6b486de1
          name: 'MSSQL Mirroring Role'
          mappings:
            - value: '0'
              newvalue: 'Database is inaccessible or is not mirrored'
            - value: '1'
              newvalue: Principal
            - value: '2'
              newvalue: Mirror
        - uuid: 6fd710f80063456483f47dab9fdab3c3
          name: 'MSSQL Mirroring State'
          mappings:
            - value: '0'
              newvalue: Suspended
            - value: '1'
              newvalue: 'Disconnected from the other partner'
            - value: '2'
              newvalue: Synchronizing
            - value: '3'
              newvalue: 'Pending failover'
            - value: '4'
              newvalue: Synchronized
            - value: '5'
              newvalue: 'The partners are not synchronized. Failover is not possible now.'
            - value: '6'
              newvalue: 'The partners are synchronized. Failover is potentially possible.'
            - value: '7'
              newvalue: 'Database is inaccessible or is not mirrored'
        - uuid: 300744b8bf494bc09cae58f1366e8043
          name: 'MSSQL Quorum members state'
          mappings:
            - value: '0'
              newvalue: Offline
            - value: '1'
              newvalue: Online
        - uuid: 38b1c1c9183f450cb3256fefaa8ae24a
          name: 'MSSQL Quorum members type'
          mappings:
            - value: '0'
              newvalue: 'WSFC node'
            - value: '1'
              newvalue: 'Disk witness'
            - value: '2'
              newvalue: 'File share witness'
            - value: '3'
              newvalue: 'Cloud Witness'
        - uuid: 047cb848051f4e85a1f45664fd51255b
          name: 'MSSQL Quorum state'
          mappings:
            - value: '0'
              newvalue: 'Unknown quorum state'
            - value: '1'
              newvalue: 'Normal quorum'
            - value: '2'
              newvalue: 'Forced quorum'
        - uuid: 2697dc5e3d5e462aac7951844a9fa76c
          name: 'MSSQL Quorum type'
          mappings:
            - value: '0'
              newvalue: 'Node Majority'
            - value: '1'
              newvalue: 'Node and Disk Majority'
            - value: '2'
              newvalue: 'Node and File Share Majority'
            - value: '3'
              newvalue: 'No Majority: Disk Only'
            - value: '4'
              newvalue: 'Unknown Quorum'
            - value: '5'
              newvalue: 'Cloud Witness'
        - uuid: 1002338ba75c49f89ce5c27872818ff3
          name: 'MSSQL Recovery model'
          mappings:
            - value: '1'
              newvalue: FULL
            - value: '2'
              newvalue: BULK_LOGGED
            - value: '3'
              newvalue: SIMPLE
        - uuid: 8800c652dc154231b40e996b39c7c2dd
          name: 'MSSQL Safety level'
          mappings:
            - value: '0'
              newvalue: 'Unknown state'
            - value: '1'
              newvalue: 'Off [asynchronous]'
            - value: '2'
              newvalue: 'Full [synchronous]'
            - value: '3'
              newvalue: 'Database is inaccessible or is not mirrored'
        - uuid: 0be116423b4949959053d581cafa096c
          name: 'MSSQL Witness state'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Connected
            - value: '2'
              newvalue: Disconnected
            - value: '3'
              newvalue: 'No witness exists'
        - uuid: faafc4168c5a4eb09d20ab4168fbbc9e
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 6095f32a1e6f432a8a053e6245891632
      template: 'Ribbon SBC Edge by HTTP'
      name: 'Ribbon SBC Edge by HTTP'
      description: |
        The Ribbon Session Border Controller Edge (SBC Edge) is a security and interoperability solution for medium-sized businesses and large branch offices.
        
        This template is designed for the effortless deployment of Ribbon SBC Edge monitoring and doesn't require any external scripts.
        
        More details can be found in the official Ribbon documentation:
        - REST API Reference: https://publicdoc.rbbn.com/spaces/UXAPIDOC/pages/17400598/Configuration+Resources
        - REST API User's Guide: https://publicdoc.rbbn.com/spaces/UXAPIDOC/pages/387008766/REST+API+User+s+Guide
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        The Ribbon Session Border Controller Edge (SBC Edge) is a security and interoperability solution for medium-sized businesses and large branch offices.
        
        This template is designed for the effortless deployment of Ribbon SBC Edge monitoring and doesn't require any external scripts.
        
        More details can be found in the official Ribbon documentation:
            - [REST API Reference](https://publicdoc.rbbn.com/spaces/UXAPIDOC/pages/17400598/Configuration+Resources)
            - [REST API User's Guide](https://publicdoc.rbbn.com/spaces/UXAPIDOC/pages/387008766/REST+API+User+s+Guide)
        
        ## Setup
        
        1. Create a new user according to [REST API requirements](https://publicdoc.rbbn.com/spaces/UXAPIDOC/pages/387008769/REST+API+-+Requirements).
        2. Create a new host.
        3. Link the template to the host created earlier.
        4. Set the host wizard configuration field `Ribbon SBC URL` required for getting data.
        5. Set the host wizard configuration fields `Ribbon SBC user` and `Ribbon SBC password` with the login and password of the user created earlier.
      vendor:
        name: Zabbix
        version: 8.0-0
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 1c2a712b43194ee2b3dc923647a69086
          name: 'Get active alarms'
          type: SCRIPT
          key: ribbon.alarm.get
          delay: '{$RIBBON.INTERVAL:"get_alarm"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var activealarm_list = Ribbon.getField(Ribbon.getRequest("/rest/activealarm"), 'root.activealarm_list'),
            		count = Ribbon.getField(activealarm_list, '@count');
            
            	if (count !== '0') {
            		var activealarm = Ribbon.getField(activealarm_list, 'activealarm_pk');
            
            		if (!Array.isArray(activealarm)) {
            			activealarm = [activealarm];
            		}
            
            		for (var alarm in activealarm) {
            			var id = Ribbon.getField(activealarm[alarm], '@id');
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/activealarm/" + id), 'root.activealarm');
            		}
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] Alarms ERROR: ' + error);
            	error_msg = 'Failed to get active alarm from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets the active alarms.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 28eed9b2ddb7440b9bb5b1183a9d6ff3
          name: 'Get certificate info'
          type: SCRIPT
          key: ribbon.cert.get
          delay: '{$RIBBON.INTERVAL:"get_certificate"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var certificate_list = Ribbon.getField(Ribbon.getRequest("/rest/certificate"), 'root.certificate_list'),
            		count = Ribbon.getField(certificate_list, '@count');
            
            	if (count !== '0') {
            		var certificate = Ribbon.getField(certificate_list, 'certificate_pk');
            
            		if (!Array.isArray(certificate)) {
            			certificate = [certificate];
            		}
            
            		for (var cert in certificate) {
            			var id = Ribbon.getField(certificate[cert], '@id');
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/certificate/" + id), 'root.certificate');
            		}
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] Certificate ERROR: ' + error);
            	error_msg = 'Failed to get certificate data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets certificate information.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: c1f97c4fd20142b2918303dc0839cfee
          name: 'ASM Operating System License Type'
          type: DEPENDENT
          key: ribbon.chassis.asm.license.type
          description: |
            The ASM Operating System version that is licensed by the factory.
            Possible values:
            - Unknown
            - Win2008R2
            - Win2012R2
            - Win2019
          valuemap:
            name: 'Ribbon: ASM Operating System License Type'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.chassis.AsmOsLicenseType
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: system
        - uuid: 432c7e601ca3411ca301f69523c9e497
          name: 'Chassis board bottom temperature'
          type: DEPENDENT
          key: ribbon.chassis.board.bottom.temp
          units: '!°C'
          description: 'Indicates the temperature on the bottom of the main board in degrees Celsius.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.chassis.rt_Chassis_BoardBottom_Temp1
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: sensor
          triggers:
            - uuid: 35998716d90f4b3382042312bdef9ced
              expression: 'avg(/Ribbon SBC Edge by HTTP/ribbon.chassis.board.bottom.temp,5m)>{$RIBBON.TEMP.BOTTOM.MAIN.BOARD.CRIT}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'max(/Ribbon SBC Edge by HTTP/ribbon.chassis.board.bottom.temp,5m)<{$RIBBON.TEMP.BOTTOM.MAIN.BOARD.CRIT}-3'
              name: 'Ribbon: Temperature on the bottom of the main board is above critical threshold'
              event_name: 'Ribbon: Temperature on the bottom of the main board is above critical threshold: >{$RIBBON.TEMP.BOTTOM.MAIN.BOARD.CRIT}'
              opdata: 'Current temperature: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'This trigger uses temperature the bottom of the main board value.'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: e5d80421a325463bbe3e6b45263d6f29
          name: 'Chassis board top temperature'
          type: DEPENDENT
          key: ribbon.chassis.board.top.temp
          units: '!°C'
          description: 'Indicates the temperature on the top of the main board in degrees Celsius.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.chassis.rt_Chassis_BoardTop_Temp2
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: sensor
          triggers:
            - uuid: f80c73ecab184a9aa4428839e34e8f79
              expression: 'avg(/Ribbon SBC Edge by HTTP/ribbon.chassis.board.top.temp,5m)>{$RIBBON.TEMP.TOP.MAIN.BOARD.CRIT}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'max(/Ribbon SBC Edge by HTTP/ribbon.chassis.board.top.temp,5m)<{$RIBBON.TEMP.TOP.MAIN.BOARD.CRIT}-3'
              name: 'Ribbon: Temperature on the top of the main board is above critical threshold'
              event_name: 'Ribbon: Temperature on the top of the main board is above critical threshold: >{$RIBBON.TEMP.TOP.MAIN.BOARD.CRIT}'
              opdata: 'Current temperature: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'This trigger uses temperature of on the top of the main board value.'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: 8030911f70f54e90af72087fbfad8195
          name: 'Chassis core switch temperature'
          type: DEPENDENT
          key: ribbon.chassis.core.switch.temp
          units: '!°C'
          description: 'Indicates the core switch temperature in degrees Celsius.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.chassis.rt_Chassis_CoreSwitch_Temp
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: sensor
          triggers:
            - uuid: 89c191a345064655b861f500d8ced4c3
              expression: 'avg(/Ribbon SBC Edge by HTTP/ribbon.chassis.core.switch.temp,5m)>{$RIBBON.TEMP.CORE.CRIT}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'max(/Ribbon SBC Edge by HTTP/ribbon.chassis.core.switch.temp,5m)<{$RIBBON.TEMP.CORE.CRIT}-3'
              name: 'Ribbon: Temperature on chassis core switch is above critical threshold'
              event_name: 'Ribbon: Temperature on chassis core switch is above critical threshold: >{$RIBBON.TEMP.CORE.CRIT}'
              opdata: 'Current temperature: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'This trigger uses temperature of chassis core switch value.'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: 838b633a55734788973aa9cf96a8db87
          name: 'Chassis Status'
          type: DEPENDENT
          key: ribbon.chassis.status
          description: |
            Indicates the hardware initialization state for this card.
            Possible values:
              - None
              - Card Idle
              - Card Detected
              - Card Activating
              - Card Activated
              - Card Remove Requested
              - Card Removing
              - Card Removed
              - Card Downloading
              - Card Failed
              - Card Disabled Long Loop
              - MAX
          valuemap:
            name: 'Ribbon: System status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.chassis.rt_Status
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: a778de02ee3147709551bfd4fd363db1
              expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.chassis.status)=9'
              name: 'Ribbon: Chassis status - Card Failed'
              priority: AVERAGE
              description: 'The current chassis status - Card Failed.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 22a66eac1fe24e3fa389035229dffd66
          name: 'Chassis type'
          type: DEPENDENT
          key: ribbon.chassis.type
          value_type: CHAR
          description: |
            Indicates the hardware or software platform type of the SBC system.
            For hardware appliances, identifies whether the device is an SBC1000 or SBC2000.
            For software-based deployments (SWe), indicates the virtual or software chassis type.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.chassis.rt_Chassis_Type
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: system
        - uuid: f04175a8aea44c60a372be27b266ffc0
          name: 'CPU Load average 1m'
          type: DEPENDENT
          key: ribbon.cpu.load.avg1
          value_type: FLOAT
          description: 'Average number of processes over the last minute waiting to run because the CPU is busy.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.historicalstatistics.rt_CPULoadAverage1m
            - type: MULTIPLIER
              parameters:
                - '0.01'
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: cpu
        - uuid: 3643fd54c5d0406792bfd0183585f2de
          name: 'CPU Load average 5m'
          type: DEPENDENT
          key: ribbon.cpu.load.avg5
          value_type: FLOAT
          description: 'Average number of processes over the last five minutes waiting to run because the CPU is busy.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.historicalstatistics.rt_CPULoadAverage5m
            - type: MULTIPLIER
              parameters:
                - '0.01'
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: cpu
        - uuid: 44669fba4717429688730da02f80b8fd
          name: 'CPU Load average 15m'
          type: DEPENDENT
          key: ribbon.cpu.load.avg15
          value_type: FLOAT
          description: 'Average number of processes over the last fifteen minutes waiting to run because the CPU is busy.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.historicalstatistics.rt_CPULoadAverage15m
            - type: MULTIPLIER
              parameters:
                - '0.01'
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: cpu
        - uuid: 9d29d99112ef4b89bd3d53bf2820072c
          name: 'CPU usage'
          type: DEPENDENT
          key: ribbon.cpu.usage
          units: '%'
          description: 'Average CPU usage in percent.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.historicalstatistics.rt_CPUUsage
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 07f6e1ede4df44b88834391d527206ac
              expression: 'min(/Ribbon SBC Edge by HTTP/ribbon.cpu.usage,5m)>{$RIBBON.CPU.UTIL.CRIT}'
              name: 'Ribbon: High CPU utilization'
              event_name: 'Ribbon: High CPU utilization (over {$RIBBON.CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: availability
        - uuid: e488322bded4491eb43e5f1a4e55240c
          name: 'Get disk partition'
          type: SCRIPT
          key: ribbon.disk.get
          delay: '{$RIBBON.INTERVAL:"get_disk"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var diskpartition_list = Ribbon.getField(Ribbon.getRequest("/rest/diskpartition"), 'root.diskpartition_list'),
            		count = Ribbon.getField(diskpartition_list, '@count');
            
            	if (count !== '0') {
            		var diskpartition = Ribbon.getField(diskpartition_list, 'diskpartition_pk');
            
            		if (!Array.isArray(diskpartition)) {
            			diskpartition = [diskpartition];
            		}
            
            		for (var disk in diskpartition) {
            			var id = Ribbon.getField(diskpartition[disk], '@id');
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/diskpartition/" + id), 'root.diskpartition');
            		}
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] Disk ERROR: ' + error);
            	error_msg = 'Failed to get disk data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets the system disk partition.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 4523833235224d2cbfafbc9612c61241
          name: 'Get DSP cards'
          type: SCRIPT
          key: ribbon.dsp.card.get
          delay: '{$RIBBON.INTERVAL:"get_dsp_card"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var dspcard_list = Ribbon.getField(Ribbon.getRequest("/rest/dspcard"), 'root.dspcard_list'),
            		count = Ribbon.getField(dspcard_list, '@count');
            
            	if (count !== '0') {
            		var dspcard = Ribbon.getField(dspcard_list, 'dspcard_pk');
            
            		if (!Array.isArray(dspcard)) {
            			dspcard = [dspcard];
            		}
            
            		for (var card in dspcard) {
            			var id = Ribbon.getField(dspcard[card], '@id');
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/dspcard/" + id), 'root.dspcard');
            		}
            
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] DSP Card ERROR: ' + error);
            	error_msg = 'Failed to get DSP card data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets DSP card data.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: c16a04d4ac1041509c563c46b05d4d65
          name: 'Get fan'
          type: SCRIPT
          key: ribbon.fan.get
          delay: '{$RIBBON.INTERVAL:"get_fan"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var fan_list = Ribbon.getField(Ribbon.getRequest("/rest/fan"), 'root.fan_list'),
            		count = Ribbon.getField(fan_list, '@count');
            
            	if (count !== '0') {
            		var fans = Ribbon.getField(fan_list, 'fan_pk');
            
            		if (!Array.isArray(fans)) {
            			fans = [fans];
            		}
            
            		for (var fan in fans) {
            			var id = Ribbon.getField(fans[fan], '@id');
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/fan/" + id), 'root.fan');
            		}
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] Fan ERROR: ' + error);
            	error_msg = 'Failed to get fans data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets fan data.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 0b35ef10ea54481690fce00029a9742b
          name: 'File descriptor usage'
          type: DEPENDENT
          key: ribbon.fd.usage
          description: 'Number of file descriptors used by the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.historicalstatistics.rt_FDUsage
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: storage
        - uuid: b3c2f1999f174d879852ac08971fb7ec
          name: 'License class'
          type: DEPENDENT
          key: ribbon.license.class
          description: |
            Indicates the version of license format.
              0 - This is a v1 or legacy SBC 1000/2000 license.
              1 - This is a v2 or legacy SWe Edge license.
              2 - This is a v3 or new SWe Edge license.
          valuemap:
            name: 'Ribbon: License class'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.license.LicenseClass
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: license
        - uuid: 576d439b408049abad82432453dc6572
          name: 'License expiration date'
          type: DEPENDENT
          key: ribbon.license.expiration.date
          value_type: CHAR
          description: 'Shows when the license is due to expire. This attribute is only applicable to the SBC 1000 and 2000.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.license.ExpirationDate
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: license
        - uuid: 5f3e2f3e1b1c4f2fa6f3e8b1c9e4d5a6
          name: 'SIP Channels licensed'
          type: DEPENDENT
          key: ribbon.license.sip.channels
          description: 'Displays the total number of SIP channel licenses purchased for the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.license.SIPChannels
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: license
        - uuid: a7370c87a0ce4c30b6f3606fd2cae3cf
          name: 'Available SIP Channels licensed'
          type: DEPENDENT
          key: ribbon.license.sip.channels.available
          description: 'Displays the total number of SIP Channel licenses currently available for use on the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.license.AvailableSIPCh
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: license
        - uuid: d4e5f6a7b8c94d1e9f0a1b2c3d4e5f6a
          name: 'SIP Registrations licensed'
          type: DEPENDENT
          key: ribbon.license.sip.registrations
          description: 'Displays the total number of SIP registration licenses purchased for the system. Deprecated on SWe Edge since SIP registration feature is now free.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.license.SIPRegistrations
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: license
        - uuid: f3a781257fe04f1ebc72c7c21ff75dd5
          name: 'SIP Registrations available'
          type: DEPENDENT
          key: ribbon.license.sip.registrations.available
          description: 'Displays the total number of SIP registration licenses currently available for use on the system. Deprecated on SWe Edge since SIP registration feature is now free.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.license.AvailableSIPReg
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: license
        - uuid: 29fea51d87d94d268eeb37de47c3ac0e
          name: 'License type'
          type: DEPENDENT
          key: ribbon.license.type
          description: |
            Shows the type of license.
              0 - No license installed.
              1 - Node license is installed.
              2 - Base license is installed.
          valuemap:
            name: 'Ribbon: License type'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.license.LicenseType
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: license
        - uuid: caa51fc4d639432b96b6b20304be74a2
          name: 'Memory usage'
          type: DEPENDENT
          key: ribbon.memory.usage
          units: '%'
          description: 'Average usage of system memory in percent.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.historicalstatistics.rt_MemoryUsage
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: cd378b8df60c43d98e866f72c240b08e
              expression: 'min(/Ribbon SBC Edge by HTTP/ribbon.memory.usage,5m)>{$RIBBON.MEMORY.UTIL.CRIT}'
              name: 'Ribbon: High memory utilization'
              event_name: 'Ribbon: High memory utilization (over {$RIBBON.MEMORY.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'Memory utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 14f5043b667145018111d537c3e3fea6
          name: 'Get interface'
          type: SCRIPT
          key: ribbon.net.if.get
          delay: '{$RIBBON.INTERVAL:"get_interface"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var ethernetport_list = Ribbon.getField(Ribbon.getRequest("/rest/ethernetport"), 'root.ethernetport_list'),
            		count = Ribbon.getField(ethernetport_list, '@count');
            
            	if (count !== '0') {
            		var ethernetport = Ribbon.getField(ethernetport_list, 'ethernetport_pk');
            
            		if (!Array.isArray(ethernetport)) {
            			ethernetport = [ethernetport];
            		}
            
            		for (var eth in ethernetport) {
            			var id = Ribbon.getField(ethernetport[eth], '@id');
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/ethernetport/" + id), 'root.ethernetport');
            		}
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] Interface ERROR: ' + error);
            	error_msg = 'Failed to get interface data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets the system ethernet port statistics.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 4f060e13a75c44a1b468ab5546bf58e2
          name: 'Number of call attempts'
          type: DEPENDENT
          key: ribbon.number.call.attempts
          description: 'Total number of call attempts system-wide since the system came up.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.systemcallstats.rt_NumCallAttempts
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: application
        - uuid: a865d9559e7947efb3a6055fb6433d85
          name: 'Number of call currently up'
          type: DEPENDENT
          key: ribbon.number.call.currently
          description: 'Number of currently connected calls system-wide.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.systemcallstats.rt_NumCallCurrentlyUp
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: application
        - uuid: 86db48bf6e4f44428910f46a4c67c029
          name: 'Number of call failed'
          type: DEPENDENT
          key: ribbon.number.call.failed
          description: 'Total number of failed calls system-wide since the system came up.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.systemcallstats.rt_NumCallFailed
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: application
        - uuid: 5e70a41d4f5a4f1a8ac4c753220554a8
          name: 'Number of call succeeded'
          type: DEPENDENT
          key: ribbon.number.call.succeeded
          description: 'Total number of successful calls system-wide since the system came up.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.systemcallstats.rt_NumCallSucceeded
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: application
        - uuid: 23900dbafdfc4c5ca70cfaef5432a5e6
          name: 'Get power supply'
          type: SCRIPT
          key: ribbon.psu.get
          delay: '{$RIBBON.INTERVAL:"get_psu"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var powersupply_list = Ribbon.getField(Ribbon.getRequest("/rest/powersupply"), 'root.powersupply_list'),
            		count = Ribbon.getField(powersupply_list, '@count');
            
            	if (count !== '0') {
            		var powersupply = Ribbon.getField(powersupply_list, 'powersupply_pk');
            
            		if (!Array.isArray(powersupply)) {
            			powersupply = [powersupply];
            		}
            
            		for (var psu in powersupply) {
            			var id = Ribbon.getField(powersupply[psu], '@id');
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/powersupply/" + id), 'root.powersupply');
            		}
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] PSU ERROR: ' + error);
            	error_msg = 'Failed to get powersupply data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets PSU data.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: eca3e34854254afc8b886f0e26b5d084
          name: 'Get SIP servers'
          type: SCRIPT
          key: ribbon.sip.server.get
          delay: '{$RIBBON.INTERVAL:"get_sip_server"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var metrics,
            		result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var sipservertable_list = Ribbon.getField(Ribbon.getRequest("/rest/sipservertable"), 'root.sipservertable_list'),
            		count = Ribbon.getField(sipservertable_list, '@count');
            
            	if (count !== '0') {
            		var sipservertable = Ribbon.getField(sipservertable_list, 'sipservertable_pk');
            
            		if (!Array.isArray(sipservertable)) {
            			sipservertable = [sipservertable];
            		}
            
            		for (var sipserver in sipservertable) {
            			var id = Ribbon.getField(sipservertable[sipserver], '@id');
            
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/sipservertable/" + id), 'root.sipservertable');
            
            			if (typeof result[id].Sequence !== 'null' && result[id].Sequence === '1') {
            				result[id].metrics = Ribbon.getField(Ribbon.getRequest("/rest/sipservertable/" + id + "/sipserver/1"), 'root.sipserver');
            			}
            		}
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] SIP ERROR: ' + error);
            	error_msg = 'Failed to get SIP server data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets SIP server data.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: ff3c9af32b8b4201b621760455828b91
          name: 'Get SIP Signaling Group'
          type: SCRIPT
          key: ribbon.sip.signal.group.get
          delay: '{$RIBBON.INTERVAL:"get_sip_sg"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	var sipsg_list = Ribbon.getField(Ribbon.getRequest("/rest/sipsg"), 'root.sipsg_list'),
            		count = Ribbon.getField(sipsg_list, '@count');
            
            	if (count !== '0') {
            		var sipsg = Ribbon.getField(sipsg_list, 'sipsg_pk');
            
            		if (!Array.isArray(sipsg)) {
            			sipsg = [sipsg];
            		}
            
            		for (var group in sipsg) {
            			var id = Ribbon.getField(sipsg[group], '@id');
            
            			result[id] = Ribbon.getField(Ribbon.getRequest("/rest/sipsg/" + id), 'root.sipsg');
            		}
            	}
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] SIPsg ERROR: ' + error);
            	error_msg = 'Failed to get data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets SIP Signaling Group data.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 7a2c9c562b6641bcbe45cb50386368b2
          name: 'DNS server 1'
          type: DEPENDENT
          key: ribbon.system.dns.server1
          value_type: CHAR
          description: 'Primary DNS server currently in use on the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.system.rt_DNSServer1IP
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 729be287a380479c9d916610432038c0
              expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.system.dns.server1,#1)<>last(/Ribbon SBC Edge by HTTP/ribbon.system.dns.server1,#2) and length(last(/Ribbon SBC Edge by HTTP/ribbon.system.dns.server1))>0'
              name: 'Ribbon: DNS server 1 has been changed'
              event_name: 'Ribbon: DNS server 1 has been changed on ({ITEM.LASTVALUE1})'
              priority: WARNING
              description: 'The DNS server 1 has been changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 963ffed43764435cb0cedaa46bde6665
          name: 'DNS server 2'
          type: DEPENDENT
          key: ribbon.system.dns.server2
          value_type: CHAR
          description: 'Secondary DNS server currently in use on the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.system.rt_DNSServer2IP
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 0fab918917b7407b983b4e0da3cab4a5
              expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.system.dns.server2,#1)<>last(/Ribbon SBC Edge by HTTP/ribbon.system.dns.server2,#2) and length(last(/Ribbon SBC Edge by HTTP/ribbon.system.dns.server2))>0'
              name: 'Ribbon: DNS server 2 has been changed'
              event_name: 'Ribbon: DNS server 2 has been changed on ({ITEM.LASTVALUE1})'
              priority: WARNING
              description: 'The DNS server 2 has been changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 84eaf3b4cac446e19f22e05610fcf6ad
          name: 'Node name'
          type: DEPENDENT
          key: ribbon.system.node.name
          value_type: CHAR
          description: 'Sets the DNS host name for the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.system.NodeName
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: system
        - uuid: 3266a81e84e64d91b4f08eeab1b53287
          name: 'Serial number'
          type: DEPENDENT
          key: ribbon.system.serial.number
          value_type: CHAR
          description: 'Sets the serial number of the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.system.SerialNumber
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: system
        - uuid: 652980a128b546b983c3f044efe89068
          name: 'Software base build number'
          type: DEPENDENT
          key: ribbon.system.software.base.build
          value_type: CHAR
          description: 'The exact build: machine, time, and date. It should be reported whenever reporting any bug or crash related to the current software.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.system.rt_Software_Base_BuildNumber
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: system
        - uuid: 039e1092659940e7bc6470f45c661162
          name: 'Software base version'
          type: DEPENDENT
          key: ribbon.system.software.base.version
          value_type: CHAR
          description: 'Base software version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.system.rt_Software_Base_Version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: system
        - uuid: 764f62d23312409ba5f924ff4e2f1338
          name: 'Get system stats'
          type: SCRIPT
          key: ribbon.system.stats.get
          delay: '{$RIBBON.INTERVAL:"get_system_stats"}'
          history: '0'
          value_type: TEXT
          params: |
            var Ribbon = {
            	params: {},
            	request: new HttpRequest(),
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response;
            
            		if (typeof Ribbon.params.proxy !== 'undefined' && Ribbon.params.proxy !== '') {
            			Ribbon.request.setProxy(Ribbon.params.proxy);
            		}
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Sending request: ' + Ribbon.params.url  + url);
            
            		response = Ribbon.request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC Edge ] Received response with status code ' + Ribbon.request.getStatus() + ': ' + response);
            
            		if (Ribbon.request.getStatus() < 200 || Ribbon.request.getStatus() >= 300) {
            			throw 'Cannot connect to Ribbon SBC. Check debug log for more information.';
            		}
            
            		try {
            			response = JSON.parse(XML.toJson(response));
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Ribbon SBC API. Check debug log for more information.';
            		}
            
            		return response;
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	login: function () {
            		var response = "",
            			cookies = "",
            			payload = 'Username=' + encodeURIComponent(Ribbon.params.username) + '&Password=' + encodeURIComponent(Ribbon.params.password);
            
            		Ribbon.request.addHeader('Content-Type', 'application/x-www-form-urlencoded');
            		response = Ribbon.request.post(Ribbon.params.url + '/rest/login', payload);
            
            		var headers = Ribbon.request.getHeaders();
            		for (var key in headers) {
            			if (key.toLowerCase() == 'set-cookie') {
            				cookies = headers[key];
            			}
            		}
            
            		Ribbon.request.addHeader('Cookie', cookies);
            	},
            
            	logout: function () {
            		var response = Ribbon.request.post(Ribbon.params.url + '/rest/logout');
            
            		return JSON.parse(XML.toJson(response));
            	}
            };
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            	Ribbon.login();
            
            	result.system = Ribbon.getField(Ribbon.getRequest("/rest/system"), 'root.system');
            	result.systemcallstats = Ribbon.getField(Ribbon.getRequest("/rest/systemcallstats"), 'root.systemcallstats');
            	result.historicalstatistics = Ribbon.getField(Ribbon.getRequest("/rest/system/historicalstatistics/1"), 'root.historicalstatistics');
            	result.chassis = Ribbon.getField(Ribbon.getRequest("/rest/chassis"), 'root.chassis');
            	result.license = Ribbon.getField(Ribbon.getRequest("/rest/license"), 'root.license');
            
            	Ribbon.logout();
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC Edge ] System data ERROR: ' + error);
            	error_msg = 'Failed to get system data from API:' + error;
            
            	return JSON.stringify({ 'error':  error_msg });
            }
          description: 'Gets the system statistics.'
          timeout: '{$RIBBON.TIMEOUT}'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: b64aa9a227264033ad34a9f928dcf7de
          name: Status
          type: DEPENDENT
          key: ribbon.system.status
          trends: '0'
          description: |
            Indicates the hardware initialization state for this card.
            Possible values:
            - None
            - Card Idle
            - Card Detected
            - Card Activating
            - Card Activated
            - Card Remove Requested
            - Card Removing
            - Card Removed
            - Card Downloading
            - Card Failed
            - Card Disabled Long Loop
            - MAX
          valuemap:
            name: 'Ribbon: System status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.system.Status
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 01f76a527a4743618027c9dc972ce132
              expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.system.status)=9'
              name: 'Ribbon: System status - Card Failed'
              priority: AVERAGE
              description: 'The current system status - Card Failed.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 48de69c997174406a13920203a70acab
          name: 'Memory total'
          type: DEPENDENT
          key: ribbon.system.total.memory
          units: B
          description: 'Indicates the amount of RAM available in the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.system.TotalSystemMemory
            - type: MULTIPLIER
              parameters:
                - '1048576'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: memory
        - uuid: 1f7989838b6242979e24046ece70b2e7
          name: 'Temporary partition usage'
          type: DEPENDENT
          key: ribbon.tmp.part.usage
          value_type: FLOAT
          units: '%'
          description: 'Percentage of the temporary partition used.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.historicalstatistics.rt_TmpPartUsage
          master_item:
            key: ribbon.system.stats.get
          tags:
            - tag: component
              value: memory
      discovery_rules:
        - uuid: f4b48b81b6f4449596ea9f2380888483
          name: 'Alarm discovery'
          type: DEPENDENT
          key: ribbon.alarm.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#ALARM.EVENT.ID}'
                value: '{$RIBBON.ALARM.DISCOVERY.EVENT.ID.MATCHES}'
              - macro: '{#ALARM.EVENT.ID}'
                value: '{$RIBBON.ALARM.DISCOVERY.EVENT.ID.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#ALARM.STATE}'
                value: '{$RIBBON.ALARM.DISCOVERY.STATE.MATCHES}'
              - macro: '{#ALARM.STATE}'
                value: '{$RIBBON.ALARM.DISCOVERY.STATE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering active alarms.'
          item_prototypes:
            - uuid: 0a69e67c013040f5b760d606498c00d9
              name: 'Alarm [{#ALARM.EVENT.ID}.{#ALARM.EVENT.SUB.ID}]: Source: [{#ALARM.SOURCE}]: Severity'
              type: DEPENDENT
              key: 'ribbon.alarm.severity[{#ALARM.ID}]'
              description: 'Severity of `{#ALARM.CONDITION}` event.'
              valuemap:
                name: 'Ribbon: Alarm Severity'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#ALARM.ID}.aSeverity'
              master_item:
                key: ribbon.alarm.get
              tags:
                - tag: alarm
                  value: '{#ALARM.EVENT.ID}.{#ALARM.EVENT.SUB.ID}'
                - tag: component
                  value: alarm
              trigger_prototypes:
                - uuid: 1adce8721d334165a94ace0c2bd6efaa
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.alarm.severity[{#ALARM.ID}])=4'
                  name: 'Ribbon: Alarm [{#ALARM.EVENT.ID}.{#ALARM.EVENT.SUB.ID}]: Source: [{#ALARM.SOURCE}]: Severity is critical'
                  opdata: 'Current severity: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'The alarm `{#ALARM.CONDITION}` severity is critical.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 9581ed26f3e44956b6fc1c9b6899f92f
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.alarm.severity[{#ALARM.ID}])=3'
                  name: 'Ribbon: Alarm [{#ALARM.EVENT.ID}.{#ALARM.EVENT.SUB.ID}]: Source: [{#ALARM.SOURCE}]: Severity is major'
                  opdata: 'Current severity: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'The alarm `{#ALARM.CONDITION}` severity is major.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 596ac083d1714cc1ae6d6649c60c614a
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.alarm.severity[{#ALARM.ID}])=2'
                  name: 'Ribbon: Alarm [{#ALARM.EVENT.ID}.{#ALARM.EVENT.SUB.ID}]: Source: [{#ALARM.SOURCE}]: Severity is minor'
                  opdata: 'Current severity: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The alarm `{#ALARM.CONDITION}` severity is minor.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: ribbon.alarm.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#ALARM.ID}": json_data[entity]["@id"],
                  		"{#ALARM.EVENT.ID}": json_data[entity]["EventID"],
                  		"{#ALARM.EVENT.SUB.ID}": json_data[entity]["EventSubID"],
                  		"{#ALARM.CONDITION}": json_data[entity]["Condition"],
                  		"{#ALARM.SOURCE}": json_data[entity]["InstanceOID"],
                  		"{#ALARM.STATE}": json_data[entity]["aState"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 97cc15da89f441b8b7a830124e0e8ab7
          name: 'Certificate discovery'
          type: DEPENDENT
          key: ribbon.cert.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CERT.NAME}'
                value: '{$RIBBON.CERTIFICATE.DISCOVERY.NAME.MATCHES}'
              - macro: '{#CERT.NAME}'
                value: '{$RIBBON.CERTIFICATE.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering certificates.'
          item_prototypes:
            - uuid: 1234567890ab4cdebcdef1234567890a
              name: 'Certificate [{#CERT.NAME}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.cert.status.raw.data[{#CERT.ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for "{#CERT.NAME}" certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#CERT.ID}'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: ribbon.cert.get
              tags:
                - tag: certificate
                  value: '{#CERT.NAME}'
                - tag: component
                  value: certificate
                - tag: component
                  value: raw
            - uuid: 98b1be079a8c485cbe468d332f2709d6
              name: 'Certificate [{#CERT.NAME}]: Valid until'
              type: DEPENDENT
              key: 'ribbon.cert.status.valid.until[{#CERT.ID}]'
              units: unixtime
              description: 'Indicates the expiration date of this certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.CertEndDateEpoch
              master_item:
                key: 'ribbon.cert.status.raw.data[{#CERT.ID}]'
              tags:
                - tag: certificate
                  value: '{#CERT.NAME}'
                - tag: component
                  value: certificate
            - uuid: 606295f441714240a9cb20276cc21664
              name: 'Certificate [{#CERT.NAME}]: Status'
              type: DEPENDENT
              key: 'ribbon.cert.status[{#CERT.ID}]'
              value_type: CHAR
              description: 'Displays the status of the certificate validation and verification against the trusted CA.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.CertVerifyStatus
              master_item:
                key: 'ribbon.cert.status.raw.data[{#CERT.ID}]'
              tags:
                - tag: certificate
                  value: '{#CERT.NAME}'
                - tag: component
                  value: certificate
              trigger_prototypes:
                - uuid: ca28f7431d134a6cadbbf039e342e843
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.cert.status[{#CERT.ID}])<>"OK"'
                  name: 'Ribbon: Certificate [{#CERT.NAME}]: Status in not OK'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'The certificate status is not OK.'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: ribbon.cert.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#CERT.ID}": json_data[entity]["@id"],
                  		"{#CERT.NAME}": json_data[entity]["CertCommonName"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: f7409cc2f49945c79e659caa7e86f53f
          name: 'Disk partition discovery'
          type: DEPENDENT
          key: ribbon.disk.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DISK.NAME}'
                value: '{$RIBBON.DISK.DISCOVERY.NAME.MATCHES}'
              - macro: '{#DISK.NAME}'
                value: '{$RIBBON.DISK.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#DISK.TYPE}'
                value: '{$RIBBON.DISK.DISCOVERY.TYPE.MATCHES}'
              - macro: '{#DISK.TYPE}'
                value: '{$RIBBON.DISK.DISCOVERY.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering system disk partition.'
          item_prototypes:
            - uuid: a2c476e67fbb48da914834cbe2146975
              name: 'Disk [{#DISK.NAME}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.disk.raw.data[{#DISK.ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data of the disk partition.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#DISK.ID}'
              master_item:
                key: ribbon.disk.get
              tags:
                - tag: component
                  value: capacity
                - tag: component
                  value: raw
                - tag: disk
                  value: '{#DISK.NAME}'
            - uuid: f8236f0b24304091b72aad4a44ec86ef
              name: 'Disk [{#DISK.NAME}]: Available'
              type: DEPENDENT
              key: 'ribbon.disk.size.available[{#DISK.ID}]'
              units: B
              description: 'Amount of memory in bytes, available for use in the file system.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_MemoryAvailable
              master_item:
                key: 'ribbon.disk.raw.data[{#DISK.ID}]'
              tags:
                - tag: component
                  value: capacity
                - tag: disk
                  value: '{#DISK.NAME}'
            - uuid: b7e0cc62963f4b9cab987b1bbd91e521
              name: 'Disk [{#DISK.NAME}]: Size'
              type: DEPENDENT
              key: 'ribbon.disk.size.max[{#DISK.ID}]'
              units: B
              description: 'Specifies the maximum amount of memory, in bytes available in this partition.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_MaximumSize
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'ribbon.disk.raw.data[{#DISK.ID}]'
              tags:
                - tag: component
                  value: capacity
                - tag: disk
                  value: '{#DISK.NAME}'
            - uuid: e866506e32c44931ac3a3eb280b2a372
              name: 'Disk [{#DISK.NAME}]: Used'
              type: DEPENDENT
              key: 'ribbon.disk.size.used[{#DISK.ID}]'
              units: B
              description: 'Amount of memory in bytes, used by the existing files in the file system.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_MemoryUsed
              master_item:
                key: 'ribbon.disk.raw.data[{#DISK.ID}]'
              tags:
                - tag: component
                  value: capacity
                - tag: disk
                  value: '{#DISK.NAME}'
            - uuid: 0b75d8331cc5411f830d8f2303be8eda
              name: 'Disk [{#DISK.NAME}]: Type'
              type: DEPENDENT
              key: 'ribbon.disk.type[{#DISK.ID}]'
              description: |
                Identifies the user-friendly physical device holding the partition.
                Possible values:
                - Configuration
                - Logs
                - Temp
                - Core File
                - ASM Module
                - Software Update
                - Internal Logs
                - System
                - Others
                - Packet Capture Logs
              valuemap:
                name: 'Ribbon: Disk type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_PartitionType
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'ribbon.disk.raw.data[{#DISK.ID}]'
              tags:
                - tag: component
                  value: capacity
                - tag: disk
                  value: '{#DISK.NAME}'
            - uuid: ba402d0de10d49ba9cf9dbd3c5e42497
              name: 'Disk [{#DISK.NAME}]: Utilization'
              type: DEPENDENT
              key: 'ribbon.disk.usage.percent[{#DISK.ID}]'
              units: '!%'
              description: 'Amount of memory used by this partition, expressed as a percentage.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_CurrentUsage
              master_item:
                key: 'ribbon.disk.raw.data[{#DISK.ID}]'
              tags:
                - tag: component
                  value: capacity
                - tag: disk
                  value: '{#DISK.NAME}'
              trigger_prototypes:
                - uuid: 1ef41f56bb1e42bf83fc14a98c60bdc3
                  expression: 'min(/Ribbon SBC Edge by HTTP/ribbon.disk.usage.percent[{#DISK.ID}],5m)>{$RIBBON.DISK.USED.MAX:"{#DISK.NAME}"}'
                  name: 'Ribbon: Disk [{#DISK.NAME}]: Disk space usage is high'
                  event_name: 'Ribbon: Disk [{#DISK.NAME}]: Disk space usage is high (more {$RIBBON.DISK.USED.MAX:"{#DISK.NAME}"}% for 5m)'
                  opdata: 'Current usage: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'Disk space usage is larger than the threshold.'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: ribbon.disk.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#DISK.ID}": json_data[entity]["@id"],
                  		"{#DISK.NAME}": json_data[entity].rt_PartitionName,
                  		"{#DISK.TYPE}": json_data[entity].rt_PartitionType
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 3c631d9182514870baa83f42d0eebe3d
          name: 'DSP card discovery'
          type: DEPENDENT
          key: ribbon.dsp.card.discovery
          description: 'Used for discovering DSP cards.'
          item_prototypes:
            - uuid: 398b159419f84b0f8a0ec54db3d24bb5
              name: 'DSP Card [{#DSP.CARD.ID}]: Available'
              type: DEPENDENT
              key: 'ribbon.dsp.card.available[{#DSP.CARD.ID}]'
              description: |
                Identifies whether a DSP Module is installed in this slot.
                Possible values:
                  - False
                  - True
              valuemap:
                name: 'Ribbon: Bool'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_Available
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dsp.card.raw.data[{#DSP.CARD.ID}]'
              tags:
                - tag: component
                  value: dsp
                - tag: dsp_card
                  value: '{#DSP.CARD.ID}'
            - uuid: 95f176c173374542902d170864f1e2ca
              name: 'DSP Card [{#DSP.CARD.ID}]: Channels in use'
              type: DEPENDENT
              key: 'ribbon.dsp.card.channels.in.use[{#DSP.CARD.ID}]'
              description: 'Indicates the number of channels currently in use on the DSP Module.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_ChannelsInUse
              master_item:
                key: 'ribbon.dsp.card.raw.data[{#DSP.CARD.ID}]'
              tags:
                - tag: component
                  value: dsp
                - tag: dsp_card
                  value: '{#DSP.CARD.ID}'
            - uuid: 668923672d8a43b58a38e66c0a80f6fb
              name: 'DSP Card [{#DSP.CARD.ID}]: CPU usage'
              type: DEPENDENT
              key: 'ribbon.dsp.card.cpu.usage.percent[{#DSP.CARD.ID}]'
              value_type: FLOAT
              units: '%'
              description: 'Indicates the current CPU level for this DSP. Only applicable if the DSP is available.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_CPUUsage
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'ribbon.dsp.card.raw.data[{#DSP.CARD.ID}]'
              tags:
                - tag: component
                  value: cpu
                - tag: component
                  value: dsp
                - tag: dsp_card
                  value: '{#DSP.CARD.ID}'
              trigger_prototypes:
                - uuid: c3b9a4aabfc644c598226cdbad79b267
                  expression: 'avg(/Ribbon SBC Edge by HTTP/ribbon.dsp.card.cpu.usage.percent[{#DSP.CARD.ID}],15m)>{$RIBBON.DSP.CARD.CPU.USAGE.CRIT:"{#DSP.CARD.ID}"}'
                  name: 'Ribbon: DSP Card [{#DSP.CARD.ID}]: CPU usage is high'
                  event_name: 'Ribbon: DSP Card [{#DSP.CARD.ID}]: CPU usage is high (more than {$RIBBON.DSP.CARD.CPU.USAGE.CRIT:"{#DSP.CARD.ID}"}% for 15m)'
                  opdata: 'Current usage: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'The DSP card CPU usage is higher than the threshold.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 27fe538ff91e4004a85da110d11837dc
              name: 'DSP Card [{#DSP.CARD.ID}]: Location'
              type: DEPENDENT
              key: 'ribbon.dsp.card.location[{#DSP.CARD.ID}]'
              description: |
                The hardware module's location within the SBC.
                Possible values:
                  - Unknown
                  - LineCard1
                  - LineCard2
                  - DSPCard1
                  - DSPCard2
                  - DSPCard3
                  - DSPCard4
                  - DSPCard5
                  - DSPCard6
                  - BITS_WAN
                  - SFP
                  - COMExpress
                  - Mainboard
                  - PSU1
                  - PSU2
                  - UX1000_Telco_1
                  - UX1000_Telco_2
                  - UX1000_Telco_3
                  - UX1000_Telco_4
                  - UX1000_Telco_5
                  - UX1000_Telco_6
                  - UX1000_DS1_Telco
                  - UX1000_DS1_WAN
                  - MAX
              valuemap:
                name: 'Ribbon: Card Location'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_Location
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'ribbon.dsp.card.raw.data[{#DSP.CARD.ID}]'
              tags:
                - tag: component
                  value: dsp
                - tag: dsp_card
                  value: '{#DSP.CARD.ID}'
            - uuid: 6e27897765784155a72d8a82befd4b45
              name: 'DSP Card [{#DSP.CARD.ID}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.dsp.card.raw.data[{#DSP.CARD.ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for `{#DSP.CARD.ID}` DSP card.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#DSP.CARD.ID}'
              master_item:
                key: ribbon.dsp.card.get
              tags:
                - tag: component
                  value: dsp
                - tag: component
                  value: raw
                - tag: dsp_card
                  value: '{#DSP.CARD.ID}'
            - uuid: aaf0b56a5e3545ec86dd680990ebeb15
              name: 'DSP Card [{#DSP.CARD.ID}]: Service status'
              type: DEPENDENT
              key: 'ribbon.dsp.card.service.status[{#DSP.CARD.ID}]'
              description: |
                Indicates the status of the DSP Module
                `Detected` - The module is detected by the SBC software but is not initialized or available for signal processing tasks.
                `Available` - The module is ready for signal processing tasks.
              valuemap:
                name: 'Ribbon: Service status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_ServiceStatus
              master_item:
                key: 'ribbon.dsp.card.raw.data[{#DSP.CARD.ID}]'
              tags:
                - tag: component
                  value: dsp
                - tag: dsp_card
                  value: '{#DSP.CARD.ID}'
              trigger_prototypes:
                - uuid: 92385745ac444bcbb513e7783c7d4042
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.dsp.card.service.status[{#DSP.CARD.ID}])=0'
                  name: 'Ribbon: DSP Card [{#DSP.CARD.ID}]: Service status is Detected'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The DSP card service status is Detected.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 5e2f3f3e1f1e4f2fa6f3e8b1c4d5e6f7
              name: 'DSP Card [{#DSP.CARD.ID}]: Status'
              type: DEPENDENT
              key: 'ribbon.dsp.card.status[{#DSP.CARD.ID}]'
              description: |
                Indicates the hardware initialization state for this DSP card.
                Possible values:
                  - None
                  - Card Idle
                  - Card Detected
                  - Card Activating
                  - Card Activated
                  - Card Remove Requested
                  - Card Removing
                  - Card Removed
                  - Card Downloading
                  - Card Failed
                  - Card Disabled Long Loop
                  - MAX
              valuemap:
                name: 'Ribbon: System status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_Status
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dsp.card.raw.data[{#DSP.CARD.ID}]'
              tags:
                - tag: component
                  value: dsp
                - tag: component
                  value: system
                - tag: dsp_card
                  value: '{#DSP.CARD.ID}'
              trigger_prototypes:
                - uuid: 9998a0a93f314d69a7a36ac6bfe5a258
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.dsp.card.status[{#DSP.CARD.ID}])=9'
                  name: 'Ribbon: DSP Card [{#DSP.CARD.ID}]: Status is FAILED'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'The DSP card status is failed.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 22e8b25b626449b7856a3f61a16e11a7
              name: 'DSP Card [{#DSP.CARD.ID}]: Updated time'
              type: DEPENDENT
              key: 'ribbon.dsp.card.updated.time[{#DSP.CARD.ID}]'
              units: uptime
              description: 'Indicates the time, when this DSP reported it''s CPU usage.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_UpdatedTime
              master_item:
                key: 'ribbon.dsp.card.raw.data[{#DSP.CARD.ID}]'
              tags:
                - tag: component
                  value: dsp
                - tag: dsp_card
                  value: '{#DSP.CARD.ID}'
          master_item:
            key: ribbon.dsp.card.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#DSP.CARD.ID}": json_data[entity]["@id"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 18f07f6f15be4778977006db87fad929
          name: 'Fan discovery'
          type: DEPENDENT
          key: ribbon.fan.discovery
          description: 'Used for discovering fans.'
          item_prototypes:
            - uuid: 85033b1d2e6449a494580d60a7a34d80
              name: 'Fan [{#FAN.ID}]: Speed'
              type: DEPENDENT
              key: 'ribbon.fan.speed[{#FAN.ID}]'
              units: '!RPM'
              description: 'Indicates the speed of the fan in RPM.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#FAN.ID}.Fan_Speed'
              master_item:
                key: ribbon.fan.get
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
          master_item:
            key: ribbon.fan.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#FAN.ID}": json_data[entity]["@id"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 3647c72235f7420a9937749a04eb1ed4
          name: 'Network interface discovery'
          type: DEPENDENT
          key: ribbon.net.if.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INTERFACE.NAME}'
                value: '{$RIBBON.INTERFACE.DISCOVERY.NAME.MATCHES}'
              - macro: '{#INTERFACE.NAME}'
                value: '{$RIBBON.INTERFACE.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#INTERFACE.TYPE}'
                value: '{$RIBBON.INTERFACE.DISCOVERY.TYPE.MATCHES}'
              - macro: '{#INTERFACE.TYPE}'
                value: '{$RIBBON.INTERFACE.DISCOVERY.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering system interfaces.'
          item_prototypes:
            - uuid: 2c3fd61a0881477d9cf1f12bcff5e499
              name: 'Interface [{#INTERFACE.NAME}]: Config interface state'
              type: DEPENDENT
              key: 'ribbon.net.if.config.state[{#INTERFACE.ID}]'
              description: |
                Specifies the Administrative State of the resource.
                Possible values:
                - Disabled
                - Enabled
              valuemap:
                name: 'Ribbon: Config interface state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ConfigIEState
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.net.if.raw.data[{#INTERFACE.ID}]'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#INTERFACE.NAME}'
            - uuid: 7d6db1ff5b2144cda406798bfaa5a4f6
              name: 'Interface [{#INTERFACE.NAME}]: Bits received'
              type: DEPENDENT
              key: 'ribbon.net.if.in.octets[{#INTERFACE.ID}]'
              units: bps
              description: 'Displays the number of received bits on this port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_ifInOctets
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: 'ribbon.net.if.raw.data[{#INTERFACE.ID}]'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#INTERFACE.NAME}'
            - uuid: c47ba8091f6e47758d5c67b3e7af9687
              name: 'Interface [{#INTERFACE.NAME}]: Networking mode'
              type: DEPENDENT
              key: 'ribbon.net.if.networking.mode[{#INTERFACE.ID}]'
              description: |
                Specifies if the port is in switched mode or routed mode.
                Possible values:
                - Switch
                - Route
              valuemap:
                name: 'Ribbon: Networking mode'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ifNetworkingMode
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'ribbon.net.if.raw.data[{#INTERFACE.ID}]'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#INTERFACE.NAME}'
            - uuid: e9d6248bc3e84fc4973c35ce89dc775c
              name: 'Interface [{#INTERFACE.NAME}]: Operational status'
              type: DEPENDENT
              key: 'ribbon.net.if.operator.state[{#INTERFACE.ID}]'
              description: |
                The operational status of the interface.
                Possible values:
                - Up
                - Down
              valuemap:
                name: 'Ribbon: Operational status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_ifOperatorStatus
              master_item:
                key: 'ribbon.net.if.raw.data[{#INTERFACE.ID}]'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#INTERFACE.NAME}'
            - uuid: ed237fe950c049859f62be677e38c645
              name: 'Interface [{#INTERFACE.NAME}]: Bits sent'
              type: DEPENDENT
              key: 'ribbon.net.if.out.octets[{#INTERFACE.ID}]'
              units: bps
              description: 'Displays the number of transmitted bits on this port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_ifOutOctets
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: 'ribbon.net.if.raw.data[{#INTERFACE.ID}]'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#INTERFACE.NAME}'
            - uuid: 408a4289df4b4203b705bbc896b3b489
              name: 'Interface [{#INTERFACE.NAME}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.net.if.raw.data[{#INTERFACE.ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data of the interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#INTERFACE.ID}'
              master_item:
                key: ribbon.net.if.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: raw
                - tag: interface
                  value: '{#INTERFACE.NAME}'
            - uuid: 537994b412f646298847c9f1556ccfcc
              name: 'Interface [{#INTERFACE.NAME}]: Speed'
              type: DEPENDENT
              key: 'ribbon.net.if.speed[{#INTERFACE.ID}]'
              description: |
                An estimate of the interface's current bandwidth in bits per second.
                Possible values:
                - 10 Mbps
                - 100 Mbps
                - 1000 Mbps
                - Auto
              valuemap:
                name: 'Ribbon: Interface speed'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_ifSpeed
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'ribbon.net.if.raw.data[{#INTERFACE.ID}]'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#INTERFACE.NAME}'
            - uuid: 6f16fc284492411a945786a25ea88a8f
              name: 'Interface [{#INTERFACE.NAME}]: Interface type'
              type: DEPENDENT
              key: 'ribbon.net.if.type[{#INTERFACE.ID}]'
              description: |
                Specifies the interface type.
                Possible values:
                - Ethernet
                - VLAN
                - QINQ
                - BONDED
                - BRIDGE
              valuemap:
                name: 'Ribbon: Interface Type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ifType
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'ribbon.net.if.raw.data[{#INTERFACE.ID}]'
              tags:
                - tag: component
                  value: network
                - tag: interface
                  value: '{#INTERFACE.NAME}'
          trigger_prototypes:
            - uuid: 131026a699674931b135604f1dea4b66
              expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.net.if.operator.state[{#INTERFACE.ID}])=1 and last(/Ribbon SBC Edge by HTTP/ribbon.net.if.config.state[{#INTERFACE.ID}])=1'
              name: 'Ribbon: Interface [{#INTERFACE.NAME}]: Operational status is DOWN'
              opdata: 'Current status: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'The operational status of the interface is down.'
              tags:
                - tag: scope
                  value: availability
          master_item:
            key: ribbon.net.if.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#INTERFACE.ID}": json_data[entity]["@id"],
                  		"{#INTERFACE.NAME}": json_data[entity].ifName,
                  		"{#INTERFACE.TYPE}": json_data[entity].ifType
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 3e140fc4939e4d69b1eddbc34f67d33c
          name: 'Power supply discovery'
          type: DEPENDENT
          key: ribbon.psu.discovery
          description: 'Used for discovering the power supply.'
          item_prototypes:
            - uuid: 9deb137ec4884586afea405ed144b00a
              name: 'PSU [{#PSU.ID}]: AC input good'
              type: DEPENDENT
              key: 'ribbon.psu.ac.input.good[{#PSU.ID}]'
              description: |
                Indicates whether the AC power input for this power supply is in a good state.
                Possible values:
                - False
                - True
              valuemap:
                name: 'Ribbon: Bool'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ACInputGood
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
              trigger_prototypes:
                - uuid: 6f70c36a7c144c5ebf3fe6911d4c8d07
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.psu.ac.input.good[{#PSU.ID}]) = 0'
                  name: 'Ribbon: PSU [{#PSU.ID}]: AC input is not OK'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The AC power input of the power supply reports a bad state.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 88ca7c8494824e24871f9b63d5ab663c
              name: 'PSU [{#PSU.ID}]: Current in'
              type: DEPENDENT
              key: 'ribbon.psu.current.in[{#PSU.ID}]'
              value_type: FLOAT
              units: A
              description: 'Input current of this power supply in amperes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.CurrentIn
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
            - uuid: 763bfd2a314543e8b33962f3e6fa4d54
              name: 'PSU [{#PSU.ID}]: Current out'
              type: DEPENDENT
              key: 'ribbon.psu.current.out[{#PSU.ID}]'
              value_type: FLOAT
              units: A
              description: 'Output current of this power supply in amperes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.CurrentOut
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
            - uuid: 0269a8584a8a470ca10cdce57be13f0d
              name: 'PSU [{#PSU.ID}]: Fan1 speed'
              type: DEPENDENT
              key: 'ribbon.psu.fan1.speed[{#PSU.ID}]'
              units: '!RPM'
              description: 'The speed of the first fan on this power supply in RPM.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Fan1_Speed
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
            - uuid: 3b496cc4557743908d6da52171c4c5b6
              name: 'PSU [{#PSU.ID}]: Fan2 speed'
              type: DEPENDENT
              key: 'ribbon.psu.fan2.speed[{#PSU.ID}]'
              units: '!RPM'
              description: 'The speed of the second fan on this power supply in RPM.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Fan2_Speed
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
            - uuid: abb2d6a045674ddcbfe8befb489ea8cc
              name: 'PSU [{#PSU.ID}]: Power in'
              type: DEPENDENT
              key: 'ribbon.psu.power.in[{#PSU.ID}]'
              units: W
              description: 'Input power of this power supply in watts.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.PowerIn
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
            - uuid: 7a0631c2afc44200bc466b07dd2e2861
              name: 'PSU [{#PSU.ID}]: Power out'
              type: DEPENDENT
              key: 'ribbon.psu.power.out[{#PSU.ID}]'
              units: W
              description: 'Output power of this power supply in watts.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.PowerOut
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
            - uuid: 6363fec4ace74dbeb1ca7cc8d2874ba5
              name: 'PSU [{#PSU.ID}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for this power supply.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#PSU.ID}'
              master_item:
                key: ribbon.psu.get
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: raw
                - tag: psu
                  value: '{#PSU.ID}'
            - uuid: 2dcb0fac8c294186ad3f1003c6b4f552
              name: 'PSU [{#PSU.ID}]: Temperature'
              type: DEPENDENT
              key: 'ribbon.psu.temp[{#PSU.ID}]'
              value_type: FLOAT
              units: °C
              description: 'Temperature of this power supply in degrees Celsius.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Temp
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
              trigger_prototypes:
                - uuid: 0084aa4adf6949b888fc30e5643dd96b
                  expression: 'avg(/Ribbon SBC Edge by HTTP/ribbon.psu.temp[{#PSU.ID}],5m)>{$RIBBON.TEMP.PSU.CRIT}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Ribbon SBC Edge by HTTP/ribbon.psu.temp[{#PSU.ID}],5m)<{$RIBBON.TEMP.PSU.CRIT}-3'
                  name: 'Ribbon: PSU [{#PSU.ID}]: Temperature on power supply is above critical threshold'
                  event_name: 'Ribbon: PSU [{#PSU.ID}]: Temperature is above critical threshold: >{$RIBBON.TEMP.PSU.CRIT}'
                  opdata: 'Current temperature: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature of power supply value.'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
            - uuid: d91ff2d143b9418b91933ab52c6361eb
              name: 'PSU [{#PSU.ID}]: Voltage in'
              type: DEPENDENT
              key: 'ribbon.psu.voltage.in[{#PSU.ID}]'
              units: V
              description: 'Input voltage of this power supply.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.VoltageIn
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
            - uuid: f6591d2a5a7f445d9ea20d52355640fd
              name: 'PSU [{#PSU.ID}]: Voltage out'
              type: DEPENDENT
              key: 'ribbon.psu.voltage.out[{#PSU.ID}]'
              value_type: FLOAT
              units: V
              description: 'Output voltage of this power supply.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.VoltageOut
              master_item:
                key: 'ribbon.psu.raw.data[{#PSU.ID}]'
              tags:
                - tag: component
                  value: psu
                - tag: psu
                  value: '{#PSU.ID}'
          master_item:
            key: ribbon.psu.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#PSU.ID}": json_data[entity]["@id"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: b2237143db0c42b1bf8f470909df889e
          name: 'SIP server discovery'
          type: DEPENDENT
          key: ribbon.sip.server.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#SIP.SEQUENCE}'
                value: '1'
              - macro: '{#SIP.SERVER.NAME}'
                value: '{$RIBBON.SIP.SERVER.DISCOVERY.NAME.MATCHES}'
              - macro: '{#SIP.SERVER.NAME}'
                value: '{$RIBBON.SIP.SERVER.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering SIP servers.'
          item_prototypes:
            - uuid: aac31d5ee67c4f33b7d602e83acbd288
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Downtime'
              type: DEPENDENT
              key: 'ribbon.sip.server.downtime[{#SIP.SERVER.NAME}]'
              description: 'Displays the time for which server was down due to not responding to options request or dns failures.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_DownTime
              master_item:
                key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              tags:
                - tag: component
                  value: sip-server
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
            - uuid: e5e2790fba5f4cfe8c610b326a1b1040
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Host'
              type: DEPENDENT
              key: 'ribbon.sip.server.host[{#SIP.SERVER.NAME}]'
              value_type: CHAR
              description: 'Specifies the IP address or FQDN where this Signaling Group sends SIP messages. If an FQDN is configured all the associated servers are included and used according to the server selection configuration element.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Host
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              tags:
                - tag: component
                  value: sip-server
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
            - uuid: 3860ea61774d4e3b80cf2c43c477af93
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Port'
              type: DEPENDENT
              key: 'ribbon.sip.server.port[{#SIP.SERVER.NAME}]'
              description: 'Specifies the port number to send SIP messages.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.Port
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              tags:
                - tag: component
                  value: sip-server
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
            - uuid: 0418fc972e4b499daa407e571d4bc0fe
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for this SIP server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#SIP.SERVER.ID}.metrics'
              master_item:
                key: ribbon.sip.server.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: sip
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
            - uuid: 7f0c7b0461104e838dbe9e5e88635198
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Status'
              type: DEPENDENT
              key: 'ribbon.sip.server.status[{#SIP.SERVER.NAME}]'
              description: 'Indicates the status of the SIP server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_ServerStatus
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              tags:
                - tag: component
                  value: sip-server
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
            - uuid: a556865ccad74d6aa3a36ef2411ba673
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Transactions failed'
              type: DEPENDENT
              key: 'ribbon.sip.server.transactions.failed[{#SIP.SERVER.NAME}]'
              description: 'Displays the number of failed SBC client transactions with the server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_TransactionFalures
              master_item:
                key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              tags:
                - tag: component
                  value: sip-server
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
              trigger_prototypes:
                - uuid: 2034204162de44b097c5bfd08c3b170e
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.sip.server.transactions.failed[{#SIP.SERVER.NAME}])>{$RIBBON.SIP.SERVER.TRANSACTIONS.FAILED.MAX:"{#SIP.SERVER.NAME}"}'
                  name: 'Ribbon: SIP Server [{#SIP.SERVER.NAME}]: Failed transactions are high'
                  event_name: 'Ribbon: SIP Server [{#SIP.SERVER.NAME}]: Failed transactions are high (more than {$RIBBON.SIP.SERVER.TRANSACTIONS.FAILED.MAX:"{#SIP.SERVER.NAME}"})'
                  opdata: 'Current failed transactions: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'The number of failed transactions is higher than the threshold.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 6f80f25094a14f82bf0102fd1acae965
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Transactions'
              type: DEPENDENT
              key: 'ribbon.sip.server.transactions[{#SIP.SERVER.NAME}]'
              description: 'Displays the number of SBC client transactions with the server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_Transactions
              master_item:
                key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              tags:
                - tag: component
                  value: sip-server
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
            - uuid: 2f4a25ae814446f59e8a7b0cf6494369
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Type'
              type: DEPENDENT
              key: 'ribbon.sip.server.type[{#SIP.SERVER.NAME}]'
              description: |
                Specifies the method to use to lookup SIP servers
                `eConventionalSrvr` - A configured server entry defined by IP or FQDN.
                `eSrvRecordTemplateSrvr` - This is not an actual server but a template which will populate the server(s) once the SRV Query gets a response from DNS.
                `eSrvRecordSrvr`- The actual server created after SRV Query."
              valuemap:
                name: 'Ribbon: SIP Server Type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ServerType
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              tags:
                - tag: component
                  value: sip-server
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
            - uuid: fabeaa0f64364fd5b70e71b41924309e
              name: 'SIP Server [{#SIP.SERVER.NAME}]:[{#SIP.SERVER.DESCR}]: Uptime'
              type: DEPENDENT
              key: 'ribbon.sip.server.uptime[{#SIP.SERVER.NAME}]'
              description: 'Displays the time for which the server was functioning and responding to SIP Options.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_UpTime
              master_item:
                key: 'ribbon.sip.server.raw.data[{#SIP.SERVER.NAME}]'
              tags:
                - tag: component
                  value: sip-server
                - tag: sip_server
                  value: '{#SIP.SERVER.NAME}'
          master_item:
            key: ribbon.sip.server.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#SIP.SERVER.ID}": json_data[entity]["@id"],
                  		"{#SIP.SERVER.DESCR}": json_data[entity]["Description"],
                  		"{#SIP.SERVER.NAME}": json_data[entity]["StringName"],
                  		"{#SIP.SEQUENCE}": json_data[entity]["Sequence"] ? json_data[entity]["Sequence"] : 0
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 5f3e2d6e2c1b4f2fa9e8b7c6d5a4b3c2
          name: 'SIP signal group discovery'
          type: DEPENDENT
          key: ribbon.sip.signal.group.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#SIP.SIGNAL.GROUP.DESCR}'
                value: '{$RIBBON.SIP.SIGNAL.GROUP.DISCOVERY.DESCR.MATCHES}'
              - macro: '{#SIP.SIGNAL.GROUP.DESCR}'
                value: '{$RIBBON.SIP.SIGNAL.GROUP.DISCOVERY.DESCR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for discovering SIP signal groups.'
          item_prototypes:
            - uuid: cfbe8c0b00894c5486ce3f04e911d3d1
              name: 'SIP Signal Group [{#SIP.SIGNAL.GROUP.DESCR}]: Number of channels'
              type: DEPENDENT
              key: 'ribbon.sip.signal.group.number.of.channels[{#SIP.SIGNAL.GROUP.ID}]'
              description: 'Provides the number of channels currently provisioned on this signaling group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_NumberOfChannels
              master_item:
                key: 'ribbon.sip.signal.group.raw.data[{#SIP.SIGNAL.GROUP.ID}]'
              tags:
                - tag: component
                  value: sip-signal-group
                - tag: sip_signal_group
                  value: '{#SIP.SIGNAL.GROUP.DESCR}'
            - uuid: d4f5e6a7b8c94d3e9f0a1b2c3d4e5f60
              name: 'SIP Signal Group [{#SIP.SIGNAL.GROUP.DESCR}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.sip.signal.group.raw.data[{#SIP.SIGNAL.GROUP.ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for this SIP signal group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.{#SIP.SIGNAL.GROUP.ID}'
              master_item:
                key: ribbon.sip.signal.group.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: sip-signal-group
                - tag: sip_signal_group
                  value: '{#SIP.SIGNAL.GROUP.DESCR}'
            - uuid: 87f113bfa57641718b9d06f1713cf1db
              name: 'SIP Signal Group [{#SIP.SIGNAL.GROUP.DESCR}]: Status'
              type: DEPENDENT
              key: 'ribbon.sip.signal.group.status[{#SIP.SIGNAL.GROUP.ID}]'
              description: |
                Provides the runtime operational status of the signaling group.
                Possible values:
                - sgsUP
                - sgsDOWN
                - sgsUpDraining
                - sgsUpDrained
                - sgsUpPeersDown
                - sgsNONE_EXISTS
              valuemap:
                name: 'Ribbon: SIP Signaling status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_Status
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.sip.signal.group.raw.data[{#SIP.SIGNAL.GROUP.ID}]'
              tags:
                - tag: component
                  value: sip-signal-group
                - tag: sip_signal_group
                  value: '{#SIP.SIGNAL.GROUP.DESCR}'
              trigger_prototypes:
                - uuid: b53a522d91eb48c386cc525f67bd3d39
                  expression: 'last(/Ribbon SBC Edge by HTTP/ribbon.sip.signal.group.status[{#SIP.SIGNAL.GROUP.ID}])=1'
                  name: 'Ribbon: SIP Signal Group [{#SIP.SIGNAL.GROUP.DESCR}]: Status is DOWN'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'The SIP signaling group status is down.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 0772710a64294b43b71f0d7bf6687644
              name: 'SIP Signal Group [{#SIP.SIGNAL.GROUP.DESCR}]: Type'
              type: DEPENDENT
              key: 'ribbon.sip.signal.group.type[{#SIP.SIGNAL.GROUP.ID}]'
              description: |
                Provides the signaling type of the signaling group.
                Possible values:
                - sgISDN
                - sgSIP
                - sgCAS
              valuemap:
                name: 'Ribbon: SIP Signaling Type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.rt_Type
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.sip.signal.group.raw.data[{#SIP.SIGNAL.GROUP.ID}]'
              tags:
                - tag: component
                  value: sip-signal-group
                - tag: sip_signal_group
                  value: '{#SIP.SIGNAL.GROUP.DESCR}'
          master_item:
            key: ribbon.sip.signal.group.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  if (value === '' || value === '{}') {
                  	return '[]';
                  };
                  
                  const json_data = JSON.parse(value);
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#SIP.SIGNAL.GROUP.ID}": json_data[entity]["@id"],
                  		"{#SIP.SIGNAL.GROUP.DESCR}": json_data[entity]["Description"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: communication
        - tag: target
          value: ribbon
        - tag: target
          value: ribbon-sbc-edge
      macros:
        - macro: '{$RIBBON.ALARM.DISCOVERY.EVENT.ID.MATCHES}'
          value: '.*'
          description: 'Sets of the alarm event ID to be allowed in discovery. See the https://publicdoc.rbbn.com/spaces/UXDOC70/pages/122292177/Alarms+and+Events+Reference for possible values.'
          config:
            type: TEXT
            priority: '39'
            section_name: Filters
            label: 'Include alarm event ID filter'
            description: 'Regex string to include alarm event by ID.'
        - macro: '{$RIBBON.ALARM.DISCOVERY.EVENT.ID.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets of the alarm event ID to be ignored in discovery.'
          config:
            type: TEXT
            priority: '40'
            section_name: Filters
            label: 'Exclude alarm event ID filter'
            description: 'Regex string to exclude alarm event by ID.'
        - macro: '{$RIBBON.ALARM.DISCOVERY.STATE.MATCHES}'
          value: '.*'
          description: 'Sets of the alarm state to be allowed in discovery.'
          config:
            type: TEXT
            priority: '37'
            section_name: Filters
            label: 'Include alarm state filter'
            description: 'Regex string to include alarm by state.'
        - macro: '{$RIBBON.ALARM.DISCOVERY.STATE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets of the alarm state to be ignored in discovery.'
          config:
            type: TEXT
            priority: '38'
            section_name: Filters
            label: 'Exclude alarm state filter'
            description: 'Regex string to exclude alarm by state.'
        - macro: '{$RIBBON.CERTIFICATE.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of the certificate name to be allowed in discovery.'
          config:
            type: TEXT
            priority: '35'
            section_name: Filters
            label: 'Include certificate name filter'
            description: 'Regex string to include certificate by name.'
        - macro: '{$RIBBON.CERTIFICATE.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of the certificate name to be ignored in discovery.'
          config:
            type: TEXT
            priority: '36'
            section_name: Filters
            label: 'Exclude certificate name filter'
            description: 'Regex string to exclude certificate by name.'
        - macro: '{$RIBBON.CPU.UTIL.CRIT}'
          value: '90'
          description: 'The threshold of CPU usage in percent.'
          config:
            type: TEXT
            priority: '16'
            section_name: Thresholds
            label: 'Warning CPU usage threshold'
            description: 'CPU usage threshold. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.DISK.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of the disk name to be allowed in discovery.'
          config:
            type: TEXT
            priority: '29'
            section_name: Filters
            label: 'Include disk name filter'
            description: 'Regex string to include disk by name.'
        - macro: '{$RIBBON.DISK.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of the disk name to be ignored in discovery.'
          config:
            type: TEXT
            priority: '30'
            section_name: Filters
            label: 'Exclude disk name filter'
            description: 'Regex string to exclude disk by name.'
        - macro: '{$RIBBON.DISK.DISCOVERY.TYPE.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of the disk type to be allowed in discovery.'
          config:
            type: TEXT
            priority: '27'
            section_name: Filters
            label: 'Include disk type filter'
            description: 'Regex string to include disk by type.'
        - macro: '{$RIBBON.DISK.DISCOVERY.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of the disk type to be ignored in discovery.'
          config:
            type: TEXT
            priority: '28'
            section_name: Filters
            label: 'Exclude disk type filter'
            description: 'Regex string to exclude disk by type.'
        - macro: '{$RIBBON.DISK.USED.MAX}'
          value: '90'
          description: 'The threshold of the disk usage in percent.'
          config:
            type: TEXT
            priority: '41'
            section_name: Thresholds
            label: 'Warning disk usage threshold'
            description: 'Threshold of disk usage in percent. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.DSP.CARD.CPU.USAGE.CRIT}'
          value: '90'
          description: 'The threshold of DSP card CPU usage in percent.'
          config:
            type: TEXT
            priority: '18'
            section_name: Thresholds
            label: 'Warning DSP card CPU usage threshold'
            description: 'DSP card CPU usage threshold. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.INTERFACE.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of the interface name to be allowed in discovery.'
          config:
            type: TEXT
            priority: '25'
            section_name: Filters
            label: 'Include interface name filter'
            description: 'Regex string to include interface by name.'
        - macro: '{$RIBBON.INTERFACE.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of the interface name to be ignored in discovery.'
          config:
            type: TEXT
            priority: '26'
            section_name: Filters
            label: 'Exclude interface name filter'
            description: 'Regex string to exclude interface by name.'
        - macro: '{$RIBBON.INTERFACE.DISCOVERY.TYPE.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of the interface type to be allowed in discovery.'
          config:
            type: TEXT
            priority: '23'
            section_name: Filters
            label: 'Include interface type filter'
            description: 'Regex string to include interface by type.'
        - macro: '{$RIBBON.INTERFACE.DISCOVERY.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of the interface type to be ignored in discovery.'
          config:
            type: TEXT
            priority: '24'
            section_name: Filters
            label: 'Exclude interface type filter'
            description: 'Regex string to exclude interface by type.'
        - macro: '{$RIBBON.INTERVAL}'
          value: 1m
          description: 'The update interval for the script items that retrieve data from the API. Can be used with context if needed (check the context values in relevant items).'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'Update interval'
            description: 'The interval for retrieving request metrics.'
        - macro: '{$RIBBON.INTERVAL:"get_alarm"}'
          value: 5m
          description: 'The update interval for the script item that retrieve the active alarms.'
          config:
            type: TEXT
            priority: '14'
            section_name: Other
            label: 'Update interval for get active alarms'
            description: 'The interval for retrieving the active alarms.'
        - macro: '{$RIBBON.INTERVAL:"get_certificate"}'
          value: 5m
          description: 'The update interval for the script item that retrieve the certificate info.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Update interval for get certificate info'
            description: 'The interval for retrieving the system stats metrics.'
        - macro: '{$RIBBON.INTERVAL:"get_disk"}'
          value: 5m
          description: 'The update interval for the script item that retrieve the disk partition data.'
          config:
            type: TEXT
            priority: '9'
            section_name: Other
            label: 'Update interval for get disk partition data'
            description: 'The interval for retrieving the disk partition metrics.'
        - macro: '{$RIBBON.INTERVAL:"get_dsp_card"}'
          value: 5m
          description: 'The update interval for the script item that retrieve the DSP card data.'
          config:
            type: TEXT
            priority: '11'
            section_name: Other
            label: 'Update interval for get DSP card metrics'
            description: 'The interval for retrieving the DSP card metrics.'
        - macro: '{$RIBBON.INTERVAL:"get_fan"}'
          value: 15m
          description: 'The update interval for the script item that retrieve the fan data.'
          config:
            type: TEXT
            priority: '8'
            section_name: Other
            label: 'Update interval for get fan data'
            description: 'The interval for retrieving the fan metrics.'
        - macro: '{$RIBBON.INTERVAL:"get_interface"}'
          value: 1m
          description: 'The update interval for the script item that retrieve the interface data.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Update interval for get interface data'
            description: 'The interval for retrieving the interface metrics.'
        - macro: '{$RIBBON.INTERVAL:"get_psu"}'
          value: 5m
          description: 'The update interval for the script item that retrieve the power supply data.'
          config:
            type: TEXT
            priority: '10'
            section_name: Other
            label: 'Update interval for get power supply data'
            description: 'The interval for retrieving the power supply metrics.'
        - macro: '{$RIBBON.INTERVAL:"get_sip_server"}'
          value: 5m
          description: 'The update interval for the script item that retrieve the SIP server data.'
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Update interval for get SIP server metrics'
            description: 'The interval for retrieving the SIP server metrics.'
        - macro: '{$RIBBON.INTERVAL:"get_system_stats"}'
          value: 1m
          description: 'The update interval for the script item that retrieve the system stats.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Update interval'
            description: 'The interval for retrieving the system stats metrics.'
        - macro: '{$RIBBON.MEMORY.UTIL.CRIT}'
          value: '90'
          description: 'The threshold of memory usage in percent.'
          config:
            type: TEXT
            priority: '17'
            section_name: Thresholds
            label: 'Warning memory usage threshold'
            description: 'Memory usage threshold In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.PASSWORD}'
          type: SECRET_TEXT
          description: 'Ribbon SBC user password.'
          config:
            type: TEXT
            priority: '2'
            label: 'Ribbon SBC password'
            description: 'Set the Ribbon SBC password here.'
        - macro: '{$RIBBON.PROXY}'
          description: 'Sets the HTTP proxy value. If this macro is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '4'
            label: 'Proxy address'
            description: 'Set the proxy IP here.'
        - macro: '{$RIBBON.SIP.SERVER.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of the SIP server name to be allowed in discovery.'
          config:
            type: TEXT
            priority: '31'
            section_name: Filters
            label: 'Include SIP server name filter'
            description: 'Regex string to include SIP server by name.'
        - macro: '{$RIBBON.SIP.SERVER.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of the SIP server name to be ignored in discovery.'
          config:
            type: TEXT
            priority: '32'
            section_name: Filters
            label: 'Exclude SIP server name filter'
            description: 'Regex string to exclude SIP server by name.'
        - macro: '{$RIBBON.SIP.SERVER.TRANSACTIONS.FAILED.MAX}'
          value: '100'
          description: 'The threshold of the SIP server failed transactions.'
          config:
            type: TEXT
            priority: '42'
            section_name: Thresholds
            label: 'Warning SIP server failed transactions threshold'
            description: 'Threshold of SIP server failed transactions. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.SIP.SIGNAL.GROUP.DISCOVERY.DESCR.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of the SIP signal group description to be allowed in discovery.'
          config:
            type: TEXT
            priority: '33'
            section_name: Filters
            label: 'Include SIP signal group description filter'
            description: 'Regex string to include SIP signal group by description.'
        - macro: '{$RIBBON.SIP.SIGNAL.GROUP.DISCOVERY.DESCR.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of the SIP signal group description to be ignored in discovery.'
          config:
            type: TEXT
            priority: '34'
            section_name: Filters
            label: 'Exclude SIP signal group description filter'
            description: 'Regex string to exclude SIP signal group by description.'
        - macro: '{$RIBBON.TEMP.BOTTOM.MAIN.BOARD.CRIT}'
          value: '80'
          description: 'The threshold of temperature on the bottom of the main board in degrees Celsius.'
          config:
            type: TEXT
            priority: '19'
            section_name: Thresholds
            label: 'Warning temperature on the bottom of the main board in degrees celsius threshold'
            description: 'Temperature on the bottom of the main board in degrees celsius threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.TEMP.CORE.CRIT}'
          value: '80'
          description: 'The threshold of core switch temperature in degrees Celsius.'
          config:
            type: TEXT
            priority: '21'
            section_name: Thresholds
            label: 'Warning core switch temperature in degrees celsius threshold'
            description: 'Core switch temperature in degrees celsius threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.TEMP.PSU.CRIT}'
          value: '80'
          description: 'The threshold of power supply temperature in degrees Celsius.'
          config:
            type: TEXT
            priority: '22'
            section_name: Thresholds
            label: 'Warning power supply temperature in degrees celsius threshold'
            description: 'Power supply temperature in degrees celsius threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.TEMP.TOP.MAIN.BOARD.CRIT}'
          value: '80'
          description: 'The threshold of temperature on the top of the main board in degrees Celsius.'
          config:
            type: TEXT
            priority: '20'
            section_name: Thresholds
            label: 'Warning temperature on the top of the main board in degrees celsius threshold'
            description: 'Temperature on the top of the main board in degrees celsius threshold.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.TIMEOUT}'
          value: 60s
          description: 'The timeout threshold for the script items that retrieve data from the API.'
          config:
            type: TEXT
            priority: '15'
            label: 'API response timeout'
            description: 'Timeout for API responses in seconds.'
        - macro: '{$RIBBON.URL}'
          description: 'Ribbon SBC API IP.'
          config:
            type: TEXT
            priority: '3'
            label: 'Ribbon SBC URL'
            description: 'Set the Ribbon SBC URL here.'
        - macro: '{$RIBBON.USERNAME}'
          description: 'Ribbon SBC username.'
          config:
            type: TEXT
            priority: '1'
            label: 'Ribbon SBC user'
            description: 'Set the Ribbon SBC user here.'
      dashboards:
        - uuid: 2d0d73cf6b2e4779a20cbcceede080ad
          name: 'Ribbon: Overview'
          pages:
            - name: 'Ribbon: Overview'
              widgets:
                - type: gauge
                  name: 'CPU utilization'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'CPU utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.cpu.usage
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: E45959
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: svggraph
                  name: 'Resource usage'
                  'y': '4'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 0D47A1
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.data_set_label
                      value: 'CPU usage'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.cpu.usage
                    - type: INTEGER
                      name: ds.1.axisy
                      value: '1'
                    - type: STRING
                      name: ds.1.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '5'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.memory.usage
                    - type: STRING
                      name: lefty_max
                      value: '100'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: INTEGER
                      name: righty
                      value: '1'
                    - type: STRING
                      name: righty_max
                      value: '100'
                    - type: STRING
                      name: righty_min
                      value: '0'
                - type: item
                  name: 'Chassis Status'
                  'y': '10'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_size
                      value: '20'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.chassis.status
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: gauge
                  name: 'Memory utilization'
                  x: '18'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Memory utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.memory.usage
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: E45959
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: item
                  name: 'Chassis type'
                  x: '18'
                  'y': '10'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_size
                      value: '20'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.chassis.type
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Node name'
                  x: '36'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_size
                      value: '20'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.system.node.name
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Software base build number'
                  x: '36'
                  'y': '2'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_size
                      value: '20'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.system.software.base.build
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: svggraph
                  name: Calls
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FDD835
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.data_set_label
                      value: 'Number of call attempts'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.number.call.attempts
                    - type: STRING
                      name: ds.1.color.0
                      value: 03A9F4
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.1.data_set_label
                      value: 'Number of call currently up'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '5'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.number.call.currently
                    - type: STRING
                      name: ds.2.color.0
                      value: F4511E
                    - type: INTEGER
                      name: ds.2.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.2.data_set_label
                      value: 'Number of call failed'
                    - type: INTEGER
                      name: ds.2.fill
                      value: '5'
                    - type: ITEM
                      name: ds.2.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.number.call.failed
                    - type: STRING
                      name: ds.3.color.0
                      value: 66BB6A
                    - type: INTEGER
                      name: ds.3.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.3.data_set_label
                      value: 'Number of call succeeded'
                    - type: INTEGER
                      name: ds.3.fill
                      value: '5'
                    - type: ITEM
                      name: ds.3.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.number.call.succeeded
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '4'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: item
                  name: 'ASM Operating System License Type'
                  x: '36'
                  'y': '10'
                  width: '36'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: INTEGER
                      name: desc_size
                      value: '20'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.chassis.asm.license.type
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Serial number'
                  x: '54'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_size
                      value: '20'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.system.serial.number
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: item
                  name: 'Software base version'
                  x: '54'
                  'y': '2'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_size
                      value: '20'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.system.software.base.version
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
            - name: 'Ribbon: Resources'
              widgets:
                - type: svggraph
                  name: 'Chassis temperature'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.data_set_label
                      value: 'Chassis board bottom'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.chassis.board.bottom.temp
                    - type: STRING
                      name: ds.1.color.0
                      value: 1976D2
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.1.data_set_label
                      value: 'Chassis board top'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '5'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.chassis.board.top.temp
                    - type: STRING
                      name: ds.2.color.0
                      value: E45959
                    - type: INTEGER
                      name: ds.2.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.2.data_set_label
                      value: 'Chassis core switch'
                    - type: INTEGER
                      name: ds.2.fill
                      value: '5'
                    - type: ITEM
                      name: ds.2.itemids.0
                      value:
                        host: 'Ribbon SBC Edge by HTTP'
                        key: ribbon.chassis.core.switch.temp
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: svggraph
                  name: 'Interface bits received'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Interface*Bits received'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: svggraph
                  name: 'Interface bits sent'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Interface*Bits sent'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAI
                - type: honeycomb
                  name: 'Disk usage percent'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Disk*Utilization'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("Disk\s\[(.*)\]","\1")}'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: E45959
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                - type: honeycomb
                  name: 'Fan speed'
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Fan*Speed'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("Fan\s\[(.*)\]","Fan: \1")}'
                    - type: STRING
                      name: reference
                      value: AAAAH
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                - type: honeycomb
                  name: 'Interface Operational status'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Operational status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("Interface\s\[(.*)\]","If: \1")}'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E65660
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: 3BC97D
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '0'
            - name: 'Ribbon: DSP Card'
              widgets:
                - type: itemnavigator
                  width: '12'
                  height: '5'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'DSP Card [*]: CPU usage'
                    - type: STRING
                      name: reference
                      value: DAHTV
                - type: gauge
                  name: 'CPU utilization'
                  x: '12'
                  width: '16'
                  height: '5'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'CPU utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: itemid._reference
                      value: DAHTV._itemid
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: E45959
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: honeycomb
                  name: 'Service status'
                  x: '28'
                  width: '22'
                  height: '5'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'DSP Card [*]: Service status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("DSP Card\s\[(.*)\]","Card: \1")}'
                    - type: STRING
                      name: reference
                      value: HPEXB
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                - type: honeycomb
                  name: Available
                  x: '50'
                  width: '22'
                  height: '5'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'DSP Card [*]: Available'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("DSP Card\s\[(.*)\]","Card: \1")}'
                    - type: STRING
                      name: reference
                      value: DVNSR
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
            - name: 'Ribbon: PSU'
              widgets:
                - type: svggraph
                  name: 'PSU power in'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: E45959
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'PSU*Power in'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAK
                - type: svggraph
                  name: 'PSU Voltage in'
                  'y': '4'
                  width: '24'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: E45959
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'PSU*Voltage in'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAM
                - type: svggraph
                  name: 'PSU Current in'
                  'y': '8'
                  width: '24'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: E45959
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'PSU*Current in'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAP
                - type: svggraph
                  name: 'PSU Voltage out'
                  x: '24'
                  'y': '4'
                  width: '24'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 00C48C
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'PSU*Voltage out'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAN
                - type: svggraph
                  name: 'PSU Current out'
                  x: '24'
                  'y': '8'
                  width: '24'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 00C48C
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'PSU*Current out'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAQ
                - type: svggraph
                  name: 'PSU power out'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 00C48C
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'PSU*Power out'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAL
                - type: honeycomb
                  name: 'PSU Fan speed'
                  x: '48'
                  'y': '4'
                  width: '24'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'PSU*Fan*speed'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("PSU\s\[(.*)\].*Fan(\d)","PSU: \1 Fan: \2")}'
                    - type: STRING
                      name: reference
                      value: AAAAO
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                - type: svggraph
                  name: 'PSU Temperature'
                  x: '48'
                  'y': '8'
                  width: '24'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 3d6edf
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'PSU*Temperature'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAR
            - name: Alarms
              widgets:
                - type: honeycomb
                  width: '72'
                  height: '8'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Alarm [*]: Source: [*]: Severity'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: STRING
                      name: reference
                      value: PLLDM
                    - type: STRING
                      name: thresholds.0.color
                      value: 29B6F6
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFEE58
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF8000
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                    - type: STRING
                      name: thresholds.3.color
                      value: FF0000
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '4'
      valuemaps:
        - uuid: 9cd4e329a1154ebe8ca53cee6dc6c94f
          name: 'Ribbon: Alarm Severity'
          mappings:
            - value: '0'
              newvalue: INDETERMINATE
            - value: '1'
              newvalue: WARNING
            - value: '2'
              newvalue: MINOR
            - value: '3'
              newvalue: MAJOR
            - value: '4'
              newvalue: CRITICAL
        - uuid: 3d340848400b4dc59da9d48bd3609bae
          name: 'Ribbon: ASM Operating System License Type'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Win2008R2
            - value: '2'
              newvalue: Win2012R2
            - value: '3'
              newvalue: Win2019
        - uuid: b8451f08019b4b04b176acfb836de8ce
          name: 'Ribbon: Bool'
          mappings:
            - value: '0'
              newvalue: 'False'
            - value: '1'
              newvalue: 'True'
        - uuid: 0d4b6e2459f446f7bc51a43d484c0a88
          name: 'Ribbon: Card Location'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: LineCard1
            - value: '2'
              newvalue: LineCard2
            - value: '3'
              newvalue: DSPCard1
            - value: '4'
              newvalue: DSPCard2
            - value: '5'
              newvalue: DSPCard3
            - value: '6'
              newvalue: DSPCard4
            - value: '7'
              newvalue: DSPCard5
            - value: '8'
              newvalue: DSPCard6
            - value: '9'
              newvalue: BITS_WAN
            - value: '10'
              newvalue: SFP
            - value: '11'
              newvalue: COMExpress
            - value: '12'
              newvalue: Mainboard
            - value: '13'
              newvalue: PSU1
            - value: '14'
              newvalue: PSU2
            - value: '15'
              newvalue: UX1000_Telco_1
            - value: '16'
              newvalue: UX1000_Telco_2
            - value: '17'
              newvalue: UX1000_Telco_3
            - value: '18'
              newvalue: UX1000_Telco_4
            - value: '19'
              newvalue: UX1000_Telco_5
            - value: '20'
              newvalue: UX1000_Telco_6
            - value: '21'
              newvalue: UX1000_DS1_Telco
            - value: '22'
              newvalue: UX1000_DS1_WAN
            - value: '23'
              newvalue: MAX
        - uuid: 38b59bdd6f4b4390ae853247ed21897d
          name: 'Ribbon: Config interface state'
          mappings:
            - value: '0'
              newvalue: Disabled
            - value: '1'
              newvalue: Enabled
        - uuid: 1030653f7dad40efb62e6af9d8c75b41
          name: 'Ribbon: Disk type'
          mappings:
            - value: '0'
              newvalue: Configuration
            - value: '1'
              newvalue: Logs
            - value: '2'
              newvalue: Temp
            - value: '3'
              newvalue: 'Core File'
            - value: '4'
              newvalue: 'ASM Module'
            - value: '5'
              newvalue: 'Software Update'
            - value: '6'
              newvalue: 'Internal Logs'
            - value: '7'
              newvalue: System
            - value: '8'
              newvalue: Others
            - value: '9'
              newvalue: 'Packet Capture Logs'
        - uuid: f783799e74a9482db3868b8e4713101a
          name: 'Ribbon: Interface speed'
          mappings:
            - value: '0'
              newvalue: '10 Mbps'
            - value: '1'
              newvalue: '100 Mbps'
            - value: '2'
              newvalue: '1000 Mbps'
            - value: '3'
              newvalue: Auto
        - uuid: c713bf35021b4acc87c18bf7555d4016
          name: 'Ribbon: Interface Type'
          mappings:
            - value: '0'
              newvalue: Ethernet
            - value: '1'
              newvalue: VLAN
            - value: '2'
              newvalue: QINQ
            - value: '3'
              newvalue: BONDED
            - value: '4'
              newvalue: BRIDGE
        - uuid: 23e45cd16d4c43eea1c3a085904d6d1d
          name: 'Ribbon: License class'
          mappings:
            - value: '0'
              newvalue: lt1k2kLegacy
            - value: '1'
              newvalue: ltLegacy
            - value: '2'
              newvalue: ltRibbon
        - uuid: 5f1e2b3e1c5e4b2fa6f3e8b1c4d5e6f9
          name: 'Ribbon: License type'
          mappings:
            - value: '0'
              newvalue: ltNone
            - value: '1'
              newvalue: ltLicense
            - value: '2'
              newvalue: ltBaseLiecnse
        - uuid: 2e08efb9e354424499526bbff51a61e3
          name: 'Ribbon: Networking mode'
          mappings:
            - value: '0'
              newvalue: Switch
            - value: '1'
              newvalue: Route
        - uuid: f16e30cc4010463ebd7daeadca0962ce
          name: 'Ribbon: Operational status'
          mappings:
            - value: '0'
              newvalue: Up
            - value: '1'
              newvalue: Down
        - uuid: d11c36edb8984267b85dd1d44e338790
          name: 'Ribbon: Service status'
          mappings:
            - value: '0'
              newvalue: Detected
            - value: '1'
              newvalue: Available
        - uuid: 4f3e2b3e1c5e4b2fa6f3e8b1c4d5e6f8
          name: 'Ribbon: SIP Server Type'
          mappings:
            - value: '0'
              newvalue: eConventionalSrvr
            - value: '1'
              newvalue: eSrvRecordTemplateSrvr
            - value: '2'
              newvalue: eSrvRecordSrvr
        - uuid: 27fe7c8b631943bc940d51bdd2ae3d85
          name: 'Ribbon: SIP Signaling status'
          mappings:
            - value: '0'
              newvalue: sgsUP
            - value: '1'
              newvalue: sgsDOWN
            - value: '2'
              newvalue: sgsUpDraining
            - value: '3'
              newvalue: sgsUpDrained
            - value: '4'
              newvalue: sgsUpPeersDown
            - value: '5'
              newvalue: sgsNONE_EXISTS
        - uuid: 83e2c8a2821a4c5da37d2675c64d1596
          name: 'Ribbon: SIP Signaling Type'
          mappings:
            - value: '0'
              newvalue: sgISDN
            - value: '1'
              newvalue: sgSIP
            - value: '2'
              newvalue: sgCAS
        - uuid: bd7bb2d61072409ca8fa5273dc7caa7f
          name: 'Ribbon: System status'
          mappings:
            - value: '0'
              newvalue: None
            - value: '1'
              newvalue: 'Card Idle'
            - value: '2'
              newvalue: 'Card Detected'
            - value: '3'
              newvalue: 'Card Activating'
            - value: '4'
              newvalue: 'Card Activated'
            - value: '5'
              newvalue: 'Card Remove Requested'
            - value: '6'
              newvalue: 'Card Removing'
            - value: '7'
              newvalue: 'Card Removed'
            - value: '8'
              newvalue: 'Card Downloading'
            - value: '9'
              newvalue: 'Card Failed'
            - value: '10'
              newvalue: 'Card Disabled Long Loop'
            - value: '11'
              newvalue: MAX
    - uuid: 33c77d08d94242b88703eea0fb6c2d91
      template: 'Vyatta Virtual Router by SNMP'
      name: 'Vyatta Virtual Router by SNMP'
      description: |
        Template for Vyatta Virtual Router 1908e
        
        MIBs used:
          * SNMPv2-MIB
          * HOST-RESOURCES-MIB
          * UCD-SNMP-MIB
          * IF-MIB
          * DISMAN-EVENT-MIB
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Template for Vyatta Virtual Router 1908e.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 31b95860d1e34a89add4d17fa5be63a0
          name: 'SNMP walk BGP peers'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.2.1.15.3.1.2, 1.3.6.1.2.1.15.3.1.7, 1.3.6.1.2.1.15.3.1.9, 1.3.6.1.2.1.15.3.1.15, 1.3.6.1.2.1.15.3.1.18]'
          key: bgp.peers.walk
          history: '0'
          value_type: TEXT
          description: |
            MIB: BGP4-MIB
            Scanning `BGP4-MIB::bgpPeerTable`.
          tags:
            - tag: component
              value: raw
        - uuid: e61652a7ede744b886289e3b30c50078
          name: 'SNMP walk host devices'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.2.1.25.3.2.1.2, 1.3.6.1.2.1.25.3.2.1.3, 1.3.6.1.2.1.25.3.2.1.5, 1.3.6.1.2.1.25.3.3.1.2]'
          key: devices.walk
          history: '0'
          value_type: TEXT
          description: |
            MIB: HOST-RESOURCES-MIB
            Scanning `HOST-RESOURCES-MIB::hrDeviceTable`.
          tags:
            - tag: component
              value: raw
        - uuid: 9cd55fc0774c4f2fbf6e7c68736b3758
          name: 'ICMP ping'
          type: SIMPLE
          key: icmpping
          valuemap:
            name: 'Service state'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 295be4e3e67a4c428ddde66aefc8d8c3
              expression: 'max(/Vyatta Virtual Router by SNMP/icmpping,#3)=0'
              name: 'Vyatta: Unavailable by ICMP ping'
              priority: HIGH
              description: 'Last three attempts returned timeout. Please check device connectivity.'
              tags:
                - tag: scope
                  value: availability
        - uuid: c23f857d5a784a2eb38bfd4c3b74886e
          name: 'ICMP loss'
          type: SIMPLE
          key: icmppingloss
          value_type: FLOAT
          units: '%'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: f88294d91bd3444ebe8b417c5199c356
              expression: 'min(/Vyatta Virtual Router by SNMP/icmppingloss,5m)>{$VYATTA.ICMP.LOSS.WARN} and min(/Vyatta Virtual Router by SNMP/icmppingloss,5m)<100'
              name: 'Vyatta: High ICMP ping loss'
              event_name: 'Vyatta: High ICMP ping loss (over {$VYATTA.ICMP.LOSS.WARN}% for 5m)'
              opdata: 'Loss: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'ICMP packet loss detected.'
              dependencies:
                - name: 'Vyatta: Unavailable by ICMP ping'
                  expression: 'max(/Vyatta Virtual Router by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: 3c7668cbcf6f41ffab596e9598a511ad
          name: 'ICMP response time'
          type: SIMPLE
          key: icmppingsec
          value_type: FLOAT
          units: s
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 3a4aa6a5e1d942b0bb55c7fc05dde684
              expression: 'avg(/Vyatta Virtual Router by SNMP/icmppingsec,5m)>{$VYATTA.ICMP.RESPONSE.TIME.WARN}'
              name: 'Vyatta: High ICMP ping response time'
              event_name: 'Vyatta: High ICMP ping response time (over {$VYATTA.ICMP.RESPONSE.TIME.WARN}s for 5m)'
              opdata: 'Value: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Average ICMP response time is too high.'
              dependencies:
                - name: 'Vyatta: High ICMP ping loss'
                  expression: 'min(/Vyatta Virtual Router by SNMP/icmppingloss,5m)>{$VYATTA.ICMP.LOSS.WARN} and min(/Vyatta Virtual Router by SNMP/icmppingloss,5m)<100'
                - name: 'Vyatta: Unavailable by ICMP ping'
                  expression: 'max(/Vyatta Virtual Router by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
        - uuid: 180899a053a14a40897ad12d588fb9cf
          name: 'SNMP walk network interfaces'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.2.1.2.2.1.2, 1.3.6.1.2.1.2.2.1.3, 1.3.6.1.2.1.2.2.1.7, 1.3.6.1.2.1.2.2.1.8, 1.3.6.1.2.1.2.2.1.13, 1.3.6.1.2.1.2.2.1.14, 1.3.6.1.2.1.2.2.1.19, 1.3.6.1.2.1.2.2.1.20, 1.3.6.1.2.1.31.1.1.1.1, 1.3.6.1.2.1.31.1.1.1.6, 1.3.6.1.2.1.31.1.1.1.10, 1.3.6.1.2.1.31.1.1.1.15, 1.3.6.1.2.1.31.1.1.1.18]'
          key: net.if.walk
          history: '0'
          value_type: TEXT
          description: |
            MIB: IF-MIB
            Scanning `IF-MIB::ifTable` and `IF-MIB::ifXTable`.
          tags:
            - tag: component
              value: raw
        - uuid: c140911664a54b09b7bb46770128a613
          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: 13a09af7f2b74335a3bf94c05a5ae0d7
          name: 'SNMP walk storage'
          type: SNMP_AGENT
          snmp_oid: 'walk[1.3.6.1.2.1.25.2.3.1.2, 1.3.6.1.2.1.25.2.3.1.3, 1.3.6.1.2.1.25.2.3.1.5, 1.3.6.1.2.1.25.2.3.1.6]'
          key: storage.walk
          history: '0'
          value_type: TEXT
          description: |
            MIB: HOST-RESOURCES-MIB
            Scanning `HOST-RESOURCES-MIB::hrStorageTable`.
          tags:
            - tag: component
              value: raw
        - uuid: c4b99f49ebff4f5aaf035e5c6566a45f
          name: 'System contact'
          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
            System contact details.
          tags:
            - tag: component
              value: system
        - uuid: 87479da85c584c57a464366db246beaf
          name: 'CPU idle time'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.11.11.0]'
          key: system.cpu.idle
          value_type: FLOAT
          units: '%'
          description: |
            MIB: UCD-SNMP-MIB
            Average time the CPU has spent doing nothing.
          tags:
            - tag: component
              value: cpu
        - uuid: 5c1a7561151a4de09f5f469d44e5764f
          name: 'Load average (1m avg)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.10.1.3.1]'
          key: system.cpu.load.avg1
          value_type: FLOAT
          description: |
            MIB: UCD-SNMP-MIB
            Average number of processes being executed or waiting over the last minute.
          tags:
            - tag: component
              value: cpu
        - uuid: 28bd53e15fd94d6a99b3bd542e4c1552
          name: 'Load average (5m avg)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.10.1.3.2]'
          key: system.cpu.load.avg5
          value_type: FLOAT
          description: |
            MIB: UCD-SNMP-MIB
            Average number of processes being executed or waiting over the last 5 minutes.
          tags:
            - tag: component
              value: cpu
        - uuid: b5faf8fa767f4b588563e8dff9e67587
          name: 'Load average (15m avg)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.10.1.3.3]'
          key: system.cpu.load.avg15
          value_type: FLOAT
          description: |
            MIB: UCD-SNMP-MIB
            Average number of processes being executed or waiting over the last 15 minutes.
          tags:
            - tag: component
              value: cpu
        - uuid: 6b834e333ee8433697af044589a00ed9
          name: 'Number of CPUs'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.11.67.0]'
          key: system.cpu.num
          description: |
            MIB: UCD-SNMP-MIB
            Number of processors.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          tags:
            - tag: component
              value: cpu
        - uuid: ddb528dc3a4140ce8177c6643159cdee
          name: 'CPU system time'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.11.10.0]'
          key: system.cpu.system
          value_type: FLOAT
          units: '%'
          description: |
            MIB: UCD-SNMP-MIB
            Average time the CPU has spent running the kernel and its processes.
          tags:
            - tag: component
              value: cpu
        - uuid: 4eb677f3f20c4335894be734e9f8e3ee
          name: 'CPU user time'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.11.9.0]'
          key: system.cpu.user
          value_type: FLOAT
          units: '%'
          description: |
            MIB: UCD-SNMP-MIB
            Average time the CPU has spent running user processes that are not niced.
          tags:
            - tag: component
              value: cpu
        - uuid: 5fd7949bead24697bdfb88fdb3953be8
          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
            System description.
          tags:
            - tag: component
              value: system
        - uuid: b54bd244a7d64bc98343ad93d515f3de
          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
            System contact details.
          tags:
            - tag: component
              value: system
        - uuid: 1f5d87c99d0245f7a98e4c855f0d6052
          name: 'Memory (buffers)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.4.14.0]'
          key: 'system.memory.buffers[memBuffer.0]'
          units: B
          description: |
            MIB: UCD-SNMP-MIB
            The total amount of real or virtual memory currently allocated for use as memory buffers.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1000'
          tags:
            - tag: component
              value: memory
        - uuid: d9f5d6d581254c2998a087e7ec8e5829
          name: 'Memory (cached)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.4.15.0]'
          key: 'system.memory.cached[memCached.0]'
          units: B
          description: |
            MIB: UCD-SNMP-MIB
            The total amount of real or virtual memory currently allocated for use as cached memory.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1000'
          tags:
            - tag: component
              value: memory
        - uuid: 9f7482d89ecd40a4904db6c11624ced3
          name: 'Free memory'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.4.6.0]'
          key: 'system.memory.free[memAvailReal.0]'
          units: B
          description: |
            MIB: UCD-SNMP-MIB
            The amount of real/physical memory currently unused or available.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1000'
          tags:
            - tag: component
              value: memory
        - uuid: aac219c55e614915baac6e382945b231
          name: 'Total memory'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.2021.4.5.0]'
          key: 'system.memory.total[memTotalReal.0]'
          units: B
          description: |
            MIB: UCD-SNMP-MIB
            The total amount of real/physical memory installed on this host.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '1000'
          tags:
            - tag: component
              value: memory
        - uuid: 5713761897054b199b11516654b8d3f5
          name: 'Memory utilization, %'
          type: CALCULATED
          key: system.memory.util
          value_type: FLOAT
          units: '%'
          params: '(last(//system.memory.total[memTotalReal.0]) - (last(//system.memory.free[memAvailReal.0]) + last(//system.memory.buffers[memBuffer.0]) + last(//system.memory.cached[memCached.0]))) / last(//system.memory.total[memTotalReal.0]) * 100'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - 'return Math.round(value * 100) / 100;'
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: a56dca7d427d43f8958325a5f9152a09
              expression: 'min(/Vyatta Virtual Router by SNMP/system.memory.util, 5m) > {$VYATTA.MEMORY.USED.WARN}'
              name: 'Vyatta: Memory utilization is high'
              event_name: 'Vyatta: Memory utilization is high (>{$VYATTA.MEMORY.USED.WARN} for over 5m)'
              priority: WARNING
              description: 'Memory utilization is high.'
              dependencies:
                - name: 'Vyatta: Memory utilization is too high'
                  expression: 'min(/Vyatta Virtual Router by SNMP/system.memory.util, 5m) > {$VYATTA.MEMORY.USED.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 9e071152a1814b619c9d9d79c88c149c
              expression: 'min(/Vyatta Virtual Router by SNMP/system.memory.util, 5m) > {$VYATTA.MEMORY.USED.HIGH}'
              name: 'Vyatta: Memory utilization is too high'
              event_name: 'Vyatta: Memory utilization is too high (>{$VYATTA.MEMORY.USED.HIGH} for over 5m)'
              priority: HIGH
              description: 'Memory utilization is too high.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 24e4f749136e43d39df31ffac86adc31
          name: 'System name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: 'system.name[sysName.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            System name.
          tags:
            - tag: component
              value: system
        - uuid: 64bfceeb04de48c99749ded0d63cd39d
          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
            System object ID.
          tags:
            - tag: component
              value: system
        - uuid: b8654c54a80f42778237a3c4eff8d3bd
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: 'system.uptime.hardware[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: 539e2a396aae4d2bafbc6f7b9b8822d4
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: 'system.uptime.network[sysUpTimeInstance]'
          value_type: FLOAT
          units: uptime
          description: |
            MIB: DISMAN-EVENT-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: 39a6adfd468e45309efe3b0eb7e18202
          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: 'Host availability'
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 0990c1aadc3849bf881a4068ae97aedc
              expression: 'max(/Vyatta Virtual Router by SNMP/zabbix[host,snmp,available],{$VYATTA.SNMP.TIMEOUT})=0'
              name: 'Vyatta: 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: 'Vyatta: Unavailable by ICMP ping'
                  expression: 'max(/Vyatta Virtual Router by SNMP/icmpping,#3)=0'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 89ad5c092c1f4d95a817fe35b10f74d9
          name: 'BGP peer discovery'
          type: DEPENDENT
          key: bgp.peer.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#BGP_PEER_REMOTE_ADDR}'
                value: '{$VYATTA.DISCOVERY.BGP.REMOTE.ADDR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#SNMPINDEX}'
                value: '{$VYATTA.DISCOVERY.BGP.REMOTE.ADDR.MATCHES}'
              - macro: '{#SNMPINDEX}'
                value: '{$VYATTA.DISCOVERY.BGP.REMOTE.ADDR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'BGP4-MIB::bgpPeer discovery.'
          item_prototypes:
            - uuid: 0f879918305142d689efa0bcc4061bd1
              name: 'BGP AS [{#BGP_PEER_REMOTE_AS}]: Peer [{#SNMPINDEX}]: FSM established transitions, per second'
              type: DEPENDENT
              key: 'bgp.fsm.established.transitions[bgpPeerFsmEstablishedTransitions.{#SNMPINDEX}]'
              value_type: FLOAT
              description: |
                MIB: BGP4-MIB
                Rate of transitions of the BGP FSM into the Established state for this peer, expressed as transitions per second.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.15.3.1.15.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: bgp.peers.walk
              tags:
                - tag: address
                  value: '{#SNMPINDEX}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
            - uuid: 33d51b57f6f94d65963b5c137a4a91ff
              name: 'BGP AS [{#BGP_PEER_REMOTE_AS}]: Peer [{#SNMPINDEX}]: Hold time'
              type: DEPENDENT
              key: 'bgp.hold.time[bgpPeerHoldTime.{#SNMPINDEX}]'
              value_type: FLOAT
              units: s
              description: |
                MIB: BGP4-MIB
                Time interval in seconds for the Hold Timer established with the peer.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.15.3.1.18.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: bgp.peers.walk
              tags:
                - tag: address
                  value: '{#SNMPINDEX}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
            - uuid: 63569acec667424d9ed3c16deb68266d
              name: 'BGP AS [{#BGP_PEER_REMOTE_AS}]: Peer [{#SNMPINDEX}]: Remote address'
              type: DEPENDENT
              key: 'bgp.remote.addr[bgpPeerRemoteAddr.{#SNMPINDEX}]'
              value_type: CHAR
              description: |
                MIB: BGP4-MIB
                The BGP peer remote address.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.15.3.1.7.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: bgp.peers.walk
              tags:
                - tag: address
                  value: '{#SNMPINDEX}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
            - uuid: 0d2ea55a220c4fccba9e2e668b800a60
              name: 'BGP AS [{#BGP_PEER_REMOTE_AS}]: Peer [{#SNMPINDEX}]: Remote AS'
              type: DEPENDENT
              key: 'bgp.remote.as[bgpPeerRemoteAs.{#SNMPINDEX}]'
              description: |
                MIB: BGP4-MIB
                The remote autonomous system number received in the BGP OPEN message.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.15.3.1.9.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: bgp.peers.walk
              tags:
                - tag: address
                  value: '{#SNMPINDEX}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
            - uuid: 3a5a8b71be45458ca6520f534df27cb8
              name: 'BGP AS [{#BGP_PEER_REMOTE_AS}]: Peer [{#SNMPINDEX}]: Connection state'
              type: DEPENDENT
              key: 'bgp.state[bgpPeerState.{#SNMPINDEX}]'
              description: |
                MIB: BGP4-MIB
                The BGP peer connection state.
              valuemap:
                name: 'BGP peer state'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.15.3.1.2.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: bgp.peers.walk
              tags:
                - tag: address
                  value: '{#SNMPINDEX}'
                - tag: as
                  value: '{#BGP_PEER_REMOTE_AS}'
                - tag: component
                  value: bgp
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: a1aa65db0c3f443abe09f1f215412e4c
                  expression: 'last(/Vyatta Virtual Router by SNMP/bgp.state[bgpPeerState.{#SNMPINDEX}])<>6'
                  name: 'Vyatta: BGP AS [{#BGP_PEER_REMOTE_AS}]: Peer [{#SNMPINDEX}]: State is not Established'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: HIGH
                  description: 'The peer connection state is not "Established".'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: bgp.peers.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#BGP_PEER_REMOTE_ADDR}'
                - 1.3.6.1.2.1.15.3.1.7
                - '0'
                - '{#BGP_PEER_REMOTE_AS}'
                - 1.3.6.1.2.1.15.3.1.9
                - '0'
              error_handler: CUSTOM_ERROR
              error_handler_params: 'BGP instance is not running'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 8a38fbfa070e46cfb7643b9bd91c4817
          name: 'CPU discovery'
          type: DEPENDENT
          key: cpu.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#TYPE}'
                value: '{$VYATTA.DISCOVERY.CPU.MATCHES}'
              - macro: '{#TYPE}'
                value: '{$VYATTA.DISCOVERY.CPU.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: a23544bf7c56405aaf4ba61ee6d6dc8f
              name: 'CPU [{#DESCRIPTION}][{#SNMPINDEX}]: Status'
              type: DEPENDENT
              key: 'cpu.status[hrDeviceStatus.{#SNMPINDEX}]'
              description: |
                MIB: HOST-RESOURCES-MIB
                The current operational state of the device described by this row of the table.
                * `unknown(1)` indicates that the current state of the device is unknown.
                * `running(2)` indicates that the device is up and running and that no unusual error conditions are known.
                * `warning(3)` indicates that the agent has been informed of an unusual error condition by the operational software (e.g., a disk device driver) but that the device is still operational.
                * `testing(4)` indicates that the device is not available for use because it is in the testing state.
                * `down(5)` is used only when the agent has been informed that the device is not available for any use.
              valuemap:
                name: 'HOST-RESOURCES-MIB::hrDeviceStatus'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.25.3.2.1.5.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: devices.walk
              tags:
                - tag: component
                  value: cpu
              trigger_prototypes:
                - uuid: 121927a633ba4d1d95d38457c7dca003
                  expression: 'last(/Vyatta Virtual Router by SNMP/cpu.status[hrDeviceStatus.{#SNMPINDEX}]) <> 2'
                  name: 'Vyatta: CPU [{#DESCRIPTION}][{#SNMPINDEX}]: CPU abnormal state'
                  priority: HIGH
                  description: 'CPU utilization is too high.'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
            - uuid: 0cff8ea287f14b1084ac52008817d6bd
              name: 'CPU [{#DESCRIPTION}][{#SNMPINDEX}]: Utilization, %'
              type: DEPENDENT
              key: 'cpu.utilization[hrProcessorLoad.{#SNMPINDEX}]'
              units: '%'
              description: |
                MIB: HOST-RESOURCES-MIB
                The average, over the last minute, of the percentage of time that this processor was not idle.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.25.3.3.1.2.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: devices.walk
              tags:
                - tag: component
                  value: cpu
              trigger_prototypes:
                - uuid: 7948f5b2eaf44f3f99672fb4be7e3b6a
                  expression: 'min(/Vyatta Virtual Router by SNMP/cpu.utilization[hrProcessorLoad.{#SNMPINDEX}], 5m) > {$VYATTA.CPU.USED.WARN}'
                  name: 'Vyatta: CPU [{#DESCRIPTION}][{#SNMPINDEX}]: CPU utilization is high'
                  event_name: 'Vyatta: CPU [{#DESCRIPTION}][{#SNMPINDEX}]: CPU utilization is high (>{$VYATTA.CPU.USED.WARN} for over 5m)'
                  priority: WARNING
                  description: 'CPU utilization is high.'
                  dependencies:
                    - name: 'Vyatta: CPU [{#DESCRIPTION}][{#SNMPINDEX}]: CPU utilization is too high'
                      expression: 'min(/Vyatta Virtual Router by SNMP/cpu.utilization[hrProcessorLoad.{#SNMPINDEX}], 5m) > {$VYATTA.CPU.USED.HIGH}'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 780584cbd65c46339f4ba04b5b682e9d
                  expression: 'min(/Vyatta Virtual Router by SNMP/cpu.utilization[hrProcessorLoad.{#SNMPINDEX}], 5m) > {$VYATTA.CPU.USED.HIGH}'
                  name: 'Vyatta: CPU [{#DESCRIPTION}][{#SNMPINDEX}]: CPU utilization is too high'
                  event_name: 'Vyatta: CPU [{#DESCRIPTION}][{#SNMPINDEX}]: CPU utilization is too high (>{$VYATTA.CPU.USED.HIGH} for over 5m)'
                  priority: HIGH
                  description: 'CPU utilization is too high.'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 488302ccbe4047d0abbbb0c9a115a4e7
              name: 'CPU [{#DESCRIPTION}][{#SNMPINDEX}]: CPU utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Vyatta Virtual Router by SNMP'
                    key: 'cpu.utilization[hrProcessorLoad.{#SNMPINDEX}]'
          master_item:
            key: devices.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#TYPE}'
                - 1.3.6.1.2.1.25.3.2.1.2
                - '0'
                - '{#DESCRIPTION}'
                - 1.3.6.1.2.1.25.3.2.1.3
                - '0'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 6134e0f1e63d48b399d1d99f2e200a4b
          name: 'Network interface discovery'
          type: DEPENDENT
          key: net.if.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#IFADMINSTATUS}'
                value: '{$VYATTA.DISCOVERY.IFACE.ADMINSTATUS.MATCHES}'
              - macro: '{#IFADMINSTATUS}'
                value: '{$VYATTA.DISCOVERY.IFACE.ADMINSTATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFALIAS}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFALIAS.MATCHES}'
              - macro: '{#IFALIAS}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFALIAS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFDESCR}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFDESCR.MATCHES}'
              - macro: '{#IFDESCR}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFDESCR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFNAME}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFNAME.MATCHES}'
              - macro: '{#IFNAME}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFOPERSTATUS}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFOPERSTATUS.MATCHES}'
              - macro: '{#IFOPERSTATUS}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFOPERSTATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFTYPE}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFTYPE.MATCHES}'
              - macro: '{#IFTYPE}'
                value: '{$VYATTA.DISCOVERY.IFACE.IFTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          item_prototypes:
            - uuid: 0fd1b14144c04ca88d2f22eae5fc8f17
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Inbound packets discarded'
              type: DEPENDENT
              key: 'net.if.in.discards[ifInDiscards.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.
                One possible reason for discarding such a packet could be to free up buffer space.
                Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.13.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3m
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: fa6827aae5ff47ad883def44815b0f5e
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Inbound packets with errors'
              type: DEPENDENT
              key: 'net.if.in.errors[ifInErrors.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol.
                For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol.
                Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.14.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3m
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: d2d777d1006e4af9b11f518dec439340
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Bits received'
              type: DEPENDENT
              key: 'net.if.in[ifHCInOctets.{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets received on the interface, including framing characters. This object is a 64-bit version of `ifInOctets`. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: a1a28b609d61401ebcfba4fce096792c
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Outbound packets discarded'
              type: DEPENDENT
              key: 'net.if.out.discards[ifOutDiscards.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.
                One possible reason for discarding such a packet could be to free up buffer space.
                Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.19.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3m
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: ce289cb583e34cab9677e0e24eb1ffc3
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Outbound packets with errors'
              type: DEPENDENT
              key: 'net.if.out.errors[ifInErrors.{#SNMPINDEX}]'
              description: |
                MIB: IF-MIB
                For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol.
                For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol.
                Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.20.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3m
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 2c0336b89498463d92f1773097e09014
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Bits sent'
              type: DEPENDENT
              key: 'net.if.out[ifHCOutOctets.{#SNMPINDEX}]'
              units: bps
              description: |
                MIB: IF-MIB
                The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of `ifOutOctets`. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of `ifCounterDiscontinuityTime`.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}'
                    - '0'
                - type: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: ceeb5cdb54ee42a096c391f6438edb20
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Speed'
              type: DEPENDENT
              key: 'net.if.speed[ifHighSpeed.{#SNMPINDEX}]'
              trends: '0'
              units: bps
              description: |
                MIB: IF-MIB
                An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of `n`, then the speed of the interface is somewhere in the range of `n-500,000` to `n+499,999`.
                For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth.
                For a sub-layer which has no concept of bandwidth, this object should be zero.
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}'
                    - '0'
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 362b9269e9294c9c953c31ab111fe2e5
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Operational status'
              type: DEPENDENT
              key: 'net.if.status[ifOperStatus.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: IF-MIB
                The current operational state of the interface.
                - The `testing(3)` state indicates that no operational packet scan be passed
                - If `ifAdminStatus` is `down(2)`, then `ifOperStatus` should be `down(2)`
                - If `ifAdminStatus` is changed to `up(1)`, then `ifOperStatus` should change to `up(1)` if the interface is ready to transmit and receive network traffic
                - It should change to `dormant(5)` if the interface is waiting for external actions (such as a serial line waiting for an incoming connection)
                - It should remain in the `down(2)` state if and only if there is a fault that prevents it from going to the `up(1)` state
                - It should remain in the `notPresent(6)` state if the interface has missing (typically, hardware) components
              valuemap:
                name: 'IF-MIB::ifOperStatus'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}'
                    - '0'
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
              trigger_prototypes:
                - uuid: b832172ce9994c838920c04df3154c02
                  expression: |
                    {$VYATTA.IFCONTROL:"{#IFNAME}"}=1 and last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and
                    (last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$VYATTA.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: Link down'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is down.
                    2. `{$VYATTA.IFCONTROL:"{#IFNAME}"}=1` - a user can redefine the context macro to "0", marking this interface as not important. No new trigger will be fired if this interface is down.
                    3. `last(/TEMPLATE_NAME/METRIC,#1)<>last(/TEMPLATE_NAME/METRIC,#2)` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for "eternal off" interfaces).
                    
                    WARNING: if closed manually - it will not fire again on the next poll because of `.diff`.
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 7fe4aa478e774dc1a74356eab2df65d7
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Interface type'
              type: DEPENDENT
              key: 'net.if.type[ifType.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: IF-MIB
                The type of interface.
                Additional values for `ifType` are assigned by the Internet Assigned Numbers Authority (IANA) through updating the syntax of the `IANAifType` textual convention.
              valuemap:
                name: 'IF-MIB::ifType'
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.2.2.1.3.{#SNMPINDEX}'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: net.if.walk
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
          trigger_prototypes:
            - uuid: 3873dd1e6a4449eb9d4b2f835549c082
              expression: |
                change(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])<0 and last(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0
                and (
                last(/Vyatta Virtual Router by SNMP/net.if.type[ifType.{#SNMPINDEX}])=6 or
                last(/Vyatta Virtual Router by SNMP/net.if.type[ifType.{#SNMPINDEX}])=7 or
                last(/Vyatta Virtual Router by SNMP/net.if.type[ifType.{#SNMPINDEX}])=11 or
                last(/Vyatta Virtual Router by SNMP/net.if.type[ifType.{#SNMPINDEX}])=62 or
                last(/Vyatta Virtual Router by SNMP/net.if.type[ifType.{#SNMPINDEX}])=69 or
                last(/Vyatta Virtual Router by SNMP/net.if.type[ifType.{#SNMPINDEX}])=117
                )
                and
                (last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2)
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: |
                (change(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0 and last(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}],#2)>0) or
                (last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2)
              name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: Ethernet has changed to lower speed than it was before'
              opdata: 'Current reported speed: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              dependencies:
                - name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: Link down'
                  expression: |
                    {$VYATTA.IFCONTROL:"{#IFNAME}"}=1 and last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and
                    (last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))
                  recovery_expression: 'last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$VYATTA.IFCONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: performance
            - uuid: 0cf252aaa8bf429c9c9c7340e8d83d0d
              expression: |
                (avg(/Vyatta Virtual Router by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) or
                avg(/Vyatta Virtual Router by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])) and
                last(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])>0
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: |
                avg(/Vyatta Virtual Router by SNMP/net.if.in[ifHCInOctets.{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}]) and
                avg(/Vyatta Virtual Router by SNMP/net.if.out[ifHCOutOctets.{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/Vyatta Virtual Router by SNMP/net.if.speed[ifHighSpeed.{#SNMPINDEX}])
              name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: High bandwidth usage'
              event_name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: High bandwidth usage (>{$IF.UTIL.MAX:"{#IFNAME}"}%)'
              opdata: 'In: {ITEM.LASTVALUE1}, out: {ITEM.LASTVALUE3}, speed: {ITEM.LASTVALUE2}'
              priority: WARNING
              description: 'The utilization of the network interface is close to its estimated maximum bandwidth.'
              manual_close: 'YES'
              dependencies:
                - name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: Link down'
                  expression: |
                    {$VYATTA.IFCONTROL:"{#IFNAME}"}=1 and last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and
                    (last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))
                  recovery_expression: 'last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$VYATTA.IFCONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: performance
            - uuid: 63a2ca4b750546e1a95a7a6aadcdff6b
              expression: |
                min(/Vyatta Virtual Router by SNMP/net.if.in.errors[ifInErrors.{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}
                or min(/Vyatta Virtual Router by SNMP/net.if.out.errors[ifInErrors.{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: |
                max(/Vyatta Virtual Router by SNMP/net.if.in.errors[ifInErrors.{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8
                and max(/Vyatta Virtual Router by SNMP/net.if.out.errors[ifInErrors.{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8
              name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: High error rate'
              event_name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: High error rate (>{$IF.ERRORS.WARN:"{#IFNAME}"} for 5m)'
              opdata: 'Errors in: {ITEM.LASTVALUE1}, errors out: {ITEM.LASTVALUE2}'
              priority: WARNING
              description: 'It recovers when it is below 80% of the `{$IF.ERRORS.WARN:"{#IFNAME}"}` threshold.'
              manual_close: 'YES'
              dependencies:
                - name: 'Vyatta: Interface [{#IFNAME}][{#IFALIAS}]: Link down'
                  expression: |
                    {$VYATTA.IFCONTROL:"{#IFNAME}"}=1 and last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])=2 and
                    (last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}],#2))
                  recovery_expression: 'last(/Vyatta Virtual Router by SNMP/net.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$VYATTA.IFCONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: availability
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: 0049016b880945a5b129d172c74bc0ca
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Network traffic'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Vyatta Virtual Router by SNMP'
                    key: 'net.if.in[ifHCInOctets.{#SNMPINDEX}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Vyatta Virtual Router by SNMP'
                    key: 'net.if.out[ifHCOutOctets.{#SNMPINDEX}]'
            - uuid: a2d6187ba68246269bfc96ee57ede300
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Packets discarded'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Vyatta Virtual Router by SNMP'
                    key: 'net.if.in.discards[ifInDiscards.{#SNMPINDEX}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Vyatta Virtual Router by SNMP'
                    key: 'net.if.out.discards[ifOutDiscards.{#SNMPINDEX}]'
            - uuid: 9a161f45a8804d119fff8e41a4b2a4c9
              name: 'Interface [{#IFNAME}][{#IFALIAS}]: Packets with errors'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Vyatta Virtual Router by SNMP'
                    key: 'net.if.in.errors[ifInErrors.{#SNMPINDEX}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Vyatta Virtual Router by SNMP'
                    key: 'net.if.out.errors[ifInErrors.{#SNMPINDEX}]'
          master_item:
            key: net.if.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#IFADMINSTATUS}'
                - 1.3.6.1.2.1.2.2.1.7
                - '0'
                - '{#IFOPERSTATUS}'
                - 1.3.6.1.2.1.2.2.1.8
                - '0'
                - '{#IFALIAS}'
                - 1.3.6.1.2.1.31.1.1.1.18
                - '0'
                - '{#IFNAME}'
                - 1.3.6.1.2.1.31.1.1.1.1
                - '0'
                - '{#IFDESCR}'
                - 1.3.6.1.2.1.2.2.1.2
                - '0'
                - '{#IFTYPE}'
                - 1.3.6.1.2.1.2.2.1.3
                - '0'
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 4f07c208d82e479094662f1cffef4293
          name: 'Storage discovery'
          type: DEPENDENT
          key: storage.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#STORAGE_NAME}'
                value: '{$VYATTA.DISCOVERY.STORAGE.NAME.MATCHES}'
              - macro: '{#STORAGE_NAME}'
                value: '{$VYATTA.DISCOVERY.STORAGE.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#STORAGE_TYPE}'
                value: '{$VYATTA.DISCOVERY.STORAGE.TYPE.MATCHES}'
              - macro: '{#STORAGE_TYPE}'
                value: '{$VYATTA.DISCOVERY.STORAGE.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'HOST-RESOURCES-MIB::hrStorage discovery with storage filter.'
          item_prototypes:
            - uuid: 1ee68cea0fed47da831652d3de011532
              name: 'Storage [{#STORAGE_NAME}]: Storage utilization, %'
              type: CALCULATED
              key: 'storage.size.percent[hrStorageUsed.{#SNMPINDEX}]'
              value_type: FLOAT
              units: '%'
              params: '(last(//storage.used[hrStorageUsed.{#SNMPINDEX}]) / last(//storage.size[hrStorageSize.{#SNMPINDEX}])) * 100'
              preprocessing:
                - type: JAVASCRIPT
                  parameters:
                    - 'return Math.round(value * 100) / 100;'
              tags:
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 7cc45fc012b64650a4705fec30ed539d
                  expression: 'min(/Vyatta Virtual Router by SNMP/storage.size.percent[hrStorageUsed.{#SNMPINDEX}], 5m) > {$VYATTA.STORAGE.USED.WARN}'
                  name: 'Vyatta: Storage [{#STORAGE_NAME}]: Storage utilization is high'
                  event_name: 'Vyatta: {#STORAGE}: Utilization is high (>{$VYATTA.STORAGE.USED.WARN} for over 5m)'
                  priority: WARNING
                  description: 'Storage utilization is high.'
                  dependencies:
                    - name: 'Vyatta: Storage [{#STORAGE_NAME}]: Storage utilization is too high'
                      expression: 'min(/Vyatta Virtual Router by SNMP/storage.size.percent[hrStorageUsed.{#SNMPINDEX}], 5m) > {$VYATTA.STORAGE.USED.HIGH}'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: 3f2ca086a98f42bd974000e564d94ea7
                  expression: 'min(/Vyatta Virtual Router by SNMP/storage.size.percent[hrStorageUsed.{#SNMPINDEX}], 5m) > {$VYATTA.STORAGE.USED.HIGH}'
                  name: 'Vyatta: Storage [{#STORAGE_NAME}]: Storage utilization is too high'
                  event_name: 'Vyatta: {#STORAGE}: Utilization is high (>{$VYATTA.STORAGE.USED.HIGH} for over 5m)'
                  priority: HIGH
                  description: 'Storage utilization is too high.'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 21e238374ab14a579745bc303f109e77
              name: 'Storage [{#STORAGE_NAME}]: Total size'
              type: DEPENDENT
              key: 'storage.size[hrStorageSize.{#SNMPINDEX}]'
              units: B
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.25.2.3.1.5.{#SNMPINDEX}'
                    - '0'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: storage.walk
              tags:
                - tag: component
                  value: storage
            - uuid: 64d1791c1ad545f6aa56314b37a27072
              name: 'Storage [{#STORAGE_NAME}]: Used size'
              type: DEPENDENT
              key: 'storage.used[hrStorageUsed.{#SNMPINDEX}]'
              units: B
              preprocessing:
                - type: SNMP_WALK_VALUE
                  parameters:
                    - '1.3.6.1.2.1.25.2.3.1.6.{#SNMPINDEX}'
                    - '0'
                - type: MULTIPLIER
                  parameters:
                    - '1024'
              master_item:
                key: storage.walk
              tags:
                - tag: component
                  value: storage
          graph_prototypes:
            - uuid: b8d837f4ca7440dd81d1da5af7d7a087
              name: 'Storage [{#STORAGE_NAME}]: Storage utilization'
              ymin_type_1: FIXED
              ymax_type_1: FIXED
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Vyatta Virtual Router by SNMP'
                    key: 'storage.size.percent[hrStorageUsed.{#SNMPINDEX}]'
          master_item:
            key: storage.walk
          preprocessing:
            - type: SNMP_WALK_TO_JSON
              parameters:
                - '{#STORAGE_TYPE}'
                - 1.3.6.1.2.1.25.2.3.1.2
                - '0'
                - '{#STORAGE_NAME}'
                - 1.3.6.1.2.1.25.2.3.1.3
                - '0'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: network
        - tag: target
          value: vyatta
        - tag: target
          value: vyatta-1908e
      macros:
        - macro: '{$VYATTA.CPU.USED.HIGH}'
          value: '95'
          description: 'High severity threshold of CPU utilization.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'CPU usage (high)'
            description: 'High severity threshold of CPU utilization.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VYATTA.CPU.USED.WARN}'
          value: '80'
          description: 'Warning threshold of CPU utilization.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'CPU usage (warning)'
            description: 'Warning threshold of CPU utilization.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VYATTA.DISCOVERY.BGP.REMOTE.ADDR.MATCHES}'
          value: '.*'
          description: 'Sets the IP regex filter to use in BGP peer discovery for including.'
          config:
            type: TEXT
            priority: '30'
            section_name: 'Filters: BGP peers'
            label: 'Type filter for bgp peers discovery (include)'
            description: 'Sets the IP regex filter to use in BGP peer discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.BGP.REMOTE.ADDR.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the IP regex filter to use in BGP peer discovery for excluding.'
          config:
            type: TEXT
            priority: '31'
            section_name: 'Filters: BGP peers'
            label: 'Type filter for bgp peers discovery (exclude)'
            description: 'Sets the IP regex filter to use in BGP peer discovery for excluding.'
        - macro: '{$VYATTA.DISCOVERY.CPU.MATCHES}'
          value: ^.+\.3$
          description: 'Sets the OID regex filter to use in CPU discovery for including. Matches `hrDeviceProcessor` from MIB: HOST-RESOURCES-TYPES - the device type identifier used for a CPU.'
          config:
            type: TEXT
            priority: '16'
            section_name: 'Filters: CPU'
            label: 'OID filter for CPU discovery (include)'
            description: 'Sets the OID regex filter to use in CPU discovery for including. Matches `hrDeviceProcessor` from MIB: HOST-RESOURCES-TYPES - the device type identifier used for a CPU.'
        - macro: '{$VYATTA.DISCOVERY.CPU.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the OID regex filter to use in CPU discovery for excluding. Matches `hrDeviceProcessor` from MIB: HOST-RESOURCES-TYPES - the device type identifier used for a CPU.'
          config:
            type: TEXT
            priority: '17'
            section_name: 'Filters: CPU'
            label: 'OID filter for CPU discovery (exclude)'
            description: 'Sets the OID regex filter to use in CPU discovery for excluding. Matches `hrDeviceProcessor` from MIB: HOST-RESOURCES-TYPES - the device type identifier used for a CPU.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.ADMINSTATUS.MATCHES}'
          value: '.*'
          description: 'Sets the administrative status regex filter to use in network interface discovery for including.'
          config:
            type: TEXT
            priority: '18'
            section_name: 'Filters: Interfaces'
            label: 'Administrative status filter for interface discovery (include)'
            description: 'Sets the administrative status regex filter to use in network interface discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.ADMINSTATUS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the administrative status regex filter to use in network interface discovery for excluding.'
          config:
            type: TEXT
            priority: '19'
            section_name: 'Filters: Interfaces'
            label: 'Administrative status filter for interface discovery (exclude)'
            description: 'Sets the administrative status regex filter to use in network interface discovery for excluding.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFALIAS.MATCHES}'
          value: '.*'
          description: 'Sets the alias regex filter to use in network interface discovery for including.'
          config:
            type: TEXT
            priority: '24'
            section_name: 'Filters: Interfaces'
            label: 'Alias filter for interface discovery (include)'
            description: 'Sets the alias regex filter to use in network interface discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFALIAS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the alias regex filter to use in network interface discovery for excluding.'
          config:
            type: TEXT
            priority: '25'
            section_name: 'Filters: Interfaces'
            label: 'Alias filter for interface discovery (exclude)'
            description: 'Sets the alias regex filter to use in network interface discovery for excluding.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFDESCR.MATCHES}'
          value: '.*'
          description: 'Sets the description regex filter to use in network interface discovery for including.'
          config:
            type: TEXT
            priority: '26'
            section_name: 'Filters: Interfaces'
            label: 'Description filter for interface discovery (include)'
            description: 'Sets the description regex filter to use in network interface discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFDESCR.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the description regex filter to use in network interface discovery for excluding.'
          config:
            type: TEXT
            priority: '27'
            section_name: 'Filters: Interfaces'
            label: 'Description filter for interface discovery (exclude)'
            description: 'Sets the description regex filter to use in network interface discovery for excluding.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFNAME.MATCHES}'
          value: '^.*$'
          description: 'Sets the name regex filter to use in network interface discovery for including.'
          config:
            type: TEXT
            priority: '22'
            section_name: 'Filters: Interfaces'
            label: 'Name filter for interface discovery (include)'
            description: 'Sets the name regex filter to use in network interface discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFNAME.NOT_MATCHES}'
          value: '(^Software Loopback Interface|^NULL[0-9.]*$|^[Ll]o[0-9.]*$|^[Ss]ystem$|^Nu[0-9.]*$|^veth[0-9a-z]+$|docker[0-9]+|br-[a-z0-9]{12})'
          description: 'Sets the name regex filter to use in network interface discovery for excluding. Filters out `loopbacks`, `nulls`, docker `veth` links, and `docker0 bridge` by default.'
          config:
            type: TEXT
            priority: '23'
            section_name: 'Filters: Interfaces'
            label: 'Name filter for interface discovery (exclude)'
            description: 'Sets the name regex filter to use in network interface discovery for excluding. Filters out `loopbacks`, `nulls`, docker `veth` links, and `docker0 bridge` by default.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFOPERSTATUS.MATCHES}'
          value: '^.*$'
          description: 'Sets the operative status regex filter to use in network interface discovery for including.'
          config:
            type: TEXT
            priority: '20'
            section_name: 'Filters: Interfaces'
            label: 'Operative status filter for interface discovery (include)'
            description: 'Sets the operative status regex filter to use in network interface discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFOPERSTATUS.NOT_MATCHES}'
          value: ^6$
          description: 'Sets the operative status regex filter to use in network interface discovery for excluding. Ignore `notPresent(6)`.'
          config:
            type: TEXT
            priority: '21'
            section_name: 'Filters: Interfaces'
            label: 'Operative status filter for interface discovery (exclude)'
            description: 'Sets the operative status regex filter to use in network interface discovery for excluding. Ignore `notPresent(6)`.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFTYPE.MATCHES}'
          value: '.*'
          description: 'Sets the type regex filter to use in network interface discovery for including.'
          config:
            type: TEXT
            priority: '28'
            section_name: 'Filters: Interfaces'
            label: 'Type filter for interface discovery (include)'
            description: 'Sets the type regex filter to use in network interface discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.IFACE.IFTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the type regex filter to use in network interface discovery for excluding.'
          config:
            type: TEXT
            priority: '29'
            section_name: 'Filters: Interfaces'
            label: 'Type filter for interface discovery (exclude)'
            description: 'Sets the type regex filter to use in network interface discovery for excluding.'
        - macro: '{$VYATTA.DISCOVERY.STORAGE.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the name regex filter to use in storage discovery for including.'
          config:
            type: TEXT
            priority: '12'
            section_name: 'Filters: Storage'
            label: 'Name filter for storage discovery (include)'
            description: 'Sets the name regex filter to use in storage discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.STORAGE.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the name regex filter to use in storage discovery for excluding.'
          config:
            type: TEXT
            priority: '13'
            section_name: 'Filters: Storage'
            label: 'Name filter for storage discovery (exclude)'
            description: 'Sets the name regex filter to use in storage discovery for excluding.'
        - macro: '{$VYATTA.DISCOVERY.STORAGE.TYPE.MATCHES}'
          value: '.*(\.4|hrStorageFixedDisk)$'
          description: 'Sets the type regex filter to use in storage discovery for including.'
          config:
            type: TEXT
            priority: '14'
            section_name: 'Filters: Storage'
            label: 'Type filter for storage discovery (include)'
            description: 'Sets the type regex filter to use in storage discovery for including.'
        - macro: '{$VYATTA.DISCOVERY.STORAGE.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the type regex filter to use in storage discovery for excluding.'
          config:
            type: TEXT
            priority: '15'
            section_name: 'Filters: Storage'
            label: 'Type filter for storage discovery (exclude)'
            description: 'Sets the type regex filter to use in storage discovery for excluding.'
        - macro: '{$VYATTA.ICMP.LOSS.WARN}'
          value: '20'
          description: 'Warning threshold of ICMP packet loss in %.'
          config:
            type: TEXT
            priority: '2'
            section_name: Thresholds
            label: 'ICMP packet loss (warning)'
            description: 'Warning threshold of ICMP packet loss in %.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VYATTA.ICMP.RESPONSE.TIME.WARN}'
          value: '0.15'
          description: 'Warning threshold of the average ICMP response time in seconds.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'ICMP response time (warning)'
            description: 'Warning threshold of the average ICMP response time in seconds.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VYATTA.IFCONTROL}'
          value: '1'
          description: 'Macro for the operational state of the interface for the link down trigger. Can be used with the interface name as context.'
          config:
            type: CHECKBOX
            priority: '11'
            label: 'Interfaces control'
            description: 'Macro for the operational state of the interface for the link down trigger. Can be used with the interface name as context.'
            options:
              - checked: '1'
                unchecked: '0'
        - macro: '{$VYATTA.LOAD_AVG_PER_CPU.MAX.WARN}'
          value: '1.0'
          description: 'Load per CPU considered sustainable. Tune if needed.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'The CPU load per core'
            description: 'CPU load per core is considered sustainable. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VYATTA.MEMORY.USED.HIGH}'
          value: '95'
          description: 'High severity threshold of memory utilization.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Memory usage (high)'
            description: 'High severity threshold of memory utilization.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VYATTA.MEMORY.USED.WARN}'
          value: '80'
          description: 'Warning threshold of memory utilization.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Memory usage (warning)'
            description: 'Warning threshold of memory utilization.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VYATTA.SNMP.TIMEOUT}'
          value: 5m
          description: 'Time interval for the SNMP availability trigger.'
          config:
            type: TEXT
            priority: '1'
            label: 'SNMP timeout interval.'
            description: 'Time interval for the SNMP availability trigger.'
        - macro: '{$VYATTA.STORAGE.USED.HIGH}'
          value: '95'
          description: 'High severity threshold of storage utilization.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Storage usage (high)'
            description: 'High severity threshold of storage utilization.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VYATTA.STORAGE.USED.WARN}'
          value: '80'
          description: 'Warning threshold of storage utilization.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Storage usage (warning)'
            description: 'Warning threshold of storage utilization.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 23e44027bbf84385a71fe1b2a6beb196
          name: Overview
          pages:
            - name: Overview
              widgets:
                - type: item
                  name: 'System name'
                  width: '20'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'System name'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.name[sysName.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  name: 'System location'
                  'y': '4'
                  width: '20'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'System location'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.location[sysLocation.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  name: 'System contact'
                  'y': '7'
                  width: '20'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'System contact'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.contact[sysContact.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  name: 'System description'
                  'y': '10'
                  width: '20'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'System description'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.descr[sysDescr.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  name: 'Uptime (hardware)'
                  x: '20'
                  width: '12'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Uptime (hardware)'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.uptime.hardware[hrSystemUptime.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  name: 'Uptime (network)'
                  x: '20'
                  'y': '3'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Uptime (network)'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.uptime.network[sysUpTimeInstance]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '25'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: 'SNMP agent availability'
                  x: '20'
                  'y': '5'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'SNMP agent availability'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'zabbix[host,snmp,available]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: INTEGER
                      name: units_show
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: 'ICMP ping'
                  x: '20'
                  'y': '7'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '15'
                    - type: STRING
                      name: description
                      value: 'ICMP ping'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: icmpping
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: 'ICMP response time'
                  x: '20'
                  'y': '9'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: STRING
                      name: description
                      value: 'ICMP response time'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: icmppingsec
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '25'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: 'ICMP loss'
                  x: '20'
                  'y': '11'
                  width: '12'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: STRING
                      name: description
                      value: 'ICMP loss'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: icmppingloss
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '25'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: svggraph
                  name: 'System load'
                  x: '32'
                  width: '40'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: STRING
                      name: ds.0.color.1
                      value: 7499FF
                    - type: STRING
                      name: ds.0.color.2
                      value: FFBF59
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.load.avg1
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.load.avg5
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.load.avg15
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: ds.1.axisy
                      value: '1'
                    - type: STRING
                      name: ds.1.color.0
                      value: 97AAB3
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.num
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: INTEGER
                      name: legend_lines
                      value: '4'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: CPULO
                    - type: INTEGER
                      name: righty
                      value: '1'
                    - type: STRING
                      name: righty_min
                      value: '0'
                - type: gauge
                  name: 'Memory utilization'
                  x: '32'
                  'y': '5'
                  width: '20'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Memory utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '8'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.memory.util
                    - type: INTEGER
                      name: rf_rate
                      value: '30'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: show.2
                      value: '5'
                    - type: STRING
                      name: units
                      value: '%'
                    - type: INTEGER
                      name: units_bold
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '15'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: INTEGER
                      name: value_size
                      value: '20'
                - type: item
                  name: 'Total memory'
                  x: '32'
                  'y': '9'
                  width: '20'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: STRING
                      name: description
                      value: 'Total memory'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.memory.total[memTotalReal.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: 'Free memory'
                  x: '32'
                  'y': '11'
                  width: '20'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: STRING
                      name: description
                      value: 'Free memory'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.memory.free[memAvailReal.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: honeycomb
                  name: 'CPU utilization'
                  x: '52'
                  'y': '5'
                  width: '20'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'CPU [*]: Utilization, %'
                    - type: STRING
                      name: primary_label
                      value: 'CPU .{{ITEM.NAME}.regsub("^.*\]\[(.*)\].*$","\1")}'
                    - type: STRING
                      name: reference
                      value: CPUUT
                    - type: STRING
                      name: secondary_label_units
                      value: '%'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '80'
                    - type: STRING
                      name: thresholds.2.color
                      value: E45959
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '95'
                - type: item
                  name: 'Cached memory'
                  x: '52'
                  'y': '9'
                  width: '20'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: STRING
                      name: description
                      value: 'Cached memory'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.memory.cached[memCached.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_size
                      value: '25'
                - type: item
                  name: 'Buffer memory'
                  x: '52'
                  'y': '11'
                  width: '20'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '20'
                    - type: STRING
                      name: description
                      value: 'Buffer memory'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: 'system.memory.buffers[memBuffer.0]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_size
                      value: '25'
            - name: 'Interfaces: Traffic'
              widgets:
                - type: honeycomb
                  name: 'Operational status'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Operational status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFTST
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: E45959
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.3.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '5'
                    - type: STRING
                      name: thresholds.4.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '6'
                    - type: STRING
                      name: thresholds.5.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '7'
                - type: honeycomb
                  name: 'Bits received'
                  'y': '3'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Bits received'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFTBR
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: STRING
                      name: secondary_label_units
                      value: bps
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '100'
                - type: honeycomb
                  name: 'Bits sent'
                  'y': '6'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Bits sent'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFTBS
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: STRING
                      name: secondary_label_units
                      value: bps
                    - type: STRING
                      name: thresholds.0.color
                      value: 7499FF
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '100'
                - type: svggraph
                  name: 'Network interfaces traffic'
                  'y': '9'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: STRING
                      name: ds.0.color.1
                      value: 7499FF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: IFTBR._itemid
                    - type: STRING
                      name: ds.0.itemids.1._reference
                      value: IFTBS._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: IFTGR
                    - type: INTEGER
                      name: working_time
                      value: '1'
            - name: 'Interfaces: Errors'
              widgets:
                - type: honeycomb
                  name: 'Operational status'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Operational status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFEST
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: E45959
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.3.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '5'
                    - type: STRING
                      name: thresholds.4.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '6'
                    - type: STRING
                      name: thresholds.5.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '7'
                - type: honeycomb
                  name: 'Inbound packets with errors'
                  'y': '3'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Inbound packets with errors'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFEIE
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                - type: honeycomb
                  name: 'Outbound packets with errors'
                  'y': '6'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Outbound packets with errors'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFEOE
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                - type: svggraph
                  name: 'Network interfaces packets with errors'
                  'y': '9'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: STRING
                      name: ds.0.color.1
                      value: 7499FF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: IFEIE._itemid
                    - type: STRING
                      name: ds.0.itemids.1._reference
                      value: IFEOE._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: IFEGR
                    - type: INTEGER
                      name: working_time
                      value: '1'
            - name: 'Interfaces: Discards'
              widgets:
                - type: honeycomb
                  name: 'Operational status'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Operational status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFDST
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: E45959
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.3.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '5'
                    - type: STRING
                      name: thresholds.4.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '6'
                    - type: STRING
                      name: thresholds.5.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '7'
                - type: honeycomb
                  name: 'Inbound packets discarded'
                  'y': '3'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Inbound packets discarded'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFDID
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                - type: honeycomb
                  name: 'Outbound packets discarded'
                  'y': '6'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*: Outbound packets discarded'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Interface\s\[(.+)\]\[.*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '25'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IFDOD
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                - type: svggraph
                  name: 'Network interfaces packets discarded'
                  'y': '9'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: STRING
                      name: ds.0.color.1
                      value: 7499FF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: IFDID._itemid
                    - type: STRING
                      name: ds.0.itemids.1._reference
                      value: IFDOD._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: IFDGR
                    - type: INTEGER
                      name: working_time
                      value: '1'
            - name: 'BGP: Peers'
              widgets:
                - type: honeycomb
                  name: 'Connection state'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'BGP*Connection state'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("(\[\d{1,3}(?:\.\d{1,3}){3}\])","Peer: \1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '15'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: BGPCN
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_size
                      value: '25'
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: E45959
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: E45959
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: E45959
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.3.color
                      value: E45959
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '5'
                    - type: STRING
                      name: thresholds.4.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '6'
                - type: honeycomb
                  name: 'FSM established transitions (per second)'
                  'y': '3'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'BGP*FSM established transitions, per second'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("(\[\d{1,3}(?:\.\d{1,3}){3}\])","Peer: \1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '15'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: BGPFS
                    - type: INTEGER
                      name: secondary_label_size
                      value: '25'
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: E45959
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '0.01'
                - type: honeycomb
                  name: 'Hold time'
                  'y': '6'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'BGP*Hold time'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("(\[\d{1,3}(?:\.\d{1,3}){3}\])","Peer: \1")}'
                    - type: INTEGER
                      name: primary_label_size
                      value: '15'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: BGPHT
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_size
                      value: '25'
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: INTEGER
                      name: secondary_label_units_show
                      value: '0'
                - type: svggraph
                  name: 'FSM established transitions (per second) and connection state'
                  'y': '9'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: BGPCN._itemid
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: ds.1.axisy
                      value: '1'
                    - type: STRING
                      name: ds.1.color.0
                      value: 7499FF
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.1.itemids.0._reference
                      value: BGPFS._itemid
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: lefty_max
                      value: '6'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: STRING
                      name: reference
                      value: BGPGP
                    - type: INTEGER
                      name: righty
                      value: '1'
                    - type: STRING
                      name: righty_min
                      value: '0'
                    - type: INTEGER
                      name: severities.0
                      value: '4'
                    - type: INTEGER
                      name: severities.1
                      value: '5'
                    - type: INTEGER
                      name: show_problems
                      value: '1'
            - name: CPU
              widgets:
                - type: svggraph
                  name: 'System load'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: STRING
                      name: ds.0.color.1
                      value: 7499FF
                    - type: STRING
                      name: ds.0.color.2
                      value: FFBF59
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.load.avg1
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.load.avg5
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.load.avg15
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: ds.1.axisy
                      value: '1'
                    - type: STRING
                      name: ds.1.color.0
                      value: 97AAB3
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: ITEM
                      name: ds.1.itemids.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.num
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: STRING
                      name: reference
                      value: CPULO
                    - type: INTEGER
                      name: righty
                      value: '1'
                    - type: STRING
                      name: righty_min
                      value: '0'
                - type: svggraph
                  name: 'CPU usage'
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: STRING
                      name: ds.0.color.1
                      value: 7499FF
                    - type: STRING
                      name: ds.0.color.2
                      value: FFBF59
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.system
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.user
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'Vyatta Virtual Router by SNMP'
                        key: system.cpu.idle
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: INTEGER
                      name: legend_columns
                      value: '3'
                    - type: STRING
                      name: reference
                      value: CPUUG
                - type: svggraph
                  name: 'CPU [{#DESCRIPTION}][{#SNMPINDEX}]: CPU utilization'
                  'y': '8'
                  width: '72'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'CPU [*]: Utilization, %'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: CPUUT
            - name: 'Storage: Utilization'
              widgets:
                - type: honeycomb
                  name: 'Storage utilization'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Storage*: Storage utilization, %'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Storage\s\[(.+)\].*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: STOUT
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: STRING
                      name: secondary_label_units
                      value: '%'
                    - type: STRING
                      name: thresholds.0.color
                      value: 00C48C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFBF59
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '80'
                    - type: STRING
                      name: thresholds.2.color
                      value: E45959
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '95'
                - type: honeycomb
                  name: 'Total size'
                  'y': '3'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Storage*: Total size'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Storage\s\[(.+)\].*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: STOTS
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: STRING
                      name: secondary_label_units
                      value: b
                - type: honeycomb
                  name: 'Used size'
                  'y': '6'
                  width: '72'
                  height: '3'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Storage*: Used size'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^Storage\s\[(.+)\].*$","\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: STOUS
                    - type: INTEGER
                      name: secondary_label_size_type
                      value: '1'
                    - type: STRING
                      name: secondary_label_units
                      value: b
                - type: svggraph
                  name: 'Storage data'
                  'y': '9'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 00C48C
                    - type: STRING
                      name: ds.0.color.1
                      value: 7499FF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: STOTS._itemid
                    - type: STRING
                      name: ds.0.itemids.1._reference
                      value: STOUS._itemid
                    - type: INTEGER
                      name: ds.0.missingdatafunc
                      value: '3'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: ds.1.axisy
                      value: '1'
                    - type: STRING
                      name: ds.1.color.0
                      value: E45959
                    - type: INTEGER
                      name: ds.1.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.1.itemids.0._reference
                      value: STOUT._itemid
                    - type: INTEGER
                      name: ds.1.missingdatafunc
                      value: '3'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: STRING
                      name: reference
                      value: STOGR
                    - type: INTEGER
                      name: righty
                      value: '1'
                    - type: STRING
                      name: righty_max
                      value: '100'
                    - type: STRING
                      name: righty_min
                      value: '0'
                    - type: INTEGER
                      name: working_time
                      value: '1'
      valuemaps:
        - uuid: ea6e1f12288943f5890837c8cb38431e
          name: 'BGP peer state'
          mappings:
            - value: '1'
              newvalue: Idle
            - value: '2'
              newvalue: Connect
            - value: '3'
              newvalue: Active
            - value: '4'
              newvalue: Opensent
            - value: '5'
              newvalue: Openconfirm
            - value: '6'
              newvalue: Established
        - uuid: 0af4bd0246d3414a946fdb800a964a43
          name: 'HOST-RESOURCES-MIB::hrDeviceStatus'
          mappings:
            - value: '1'
              newvalue: Unknown
            - value: '2'
              newvalue: Running
            - value: '3'
              newvalue: Warning
            - value: '4'
              newvalue: Testing
            - value: '5'
              newvalue: Down
        - uuid: 1d9b43546b654370a6f38ed6fe4d4b43
          name: 'Host availability'
          mappings:
            - value: '0'
              newvalue: 'Not available'
            - value: '1'
              newvalue: Available
            - value: '2'
              newvalue: Unknown
        - uuid: 692e46f1836c4e2682a0dc882fec89a0
          name: 'IF-MIB::ifOperStatus'
          mappings:
            - value: '1'
              newvalue: up
            - value: '2'
              newvalue: down
            - value: '4'
              newvalue: unknown
            - value: '5'
              newvalue: dormant
            - value: '6'
              newvalue: notPresent
            - value: '7'
              newvalue: lowerLayerDown
        - uuid: 7a288ac5cdbf429b9d568b12b312ad70
          name: 'IF-MIB::ifType'
          mappings:
            - value: '1'
              newvalue: other
            - value: '2'
              newvalue: regular1822
            - value: '3'
              newvalue: hdh1822
            - value: '4'
              newvalue: ddnX25
            - value: '5'
              newvalue: rfc877x25
            - value: '6'
              newvalue: ethernetCsmacd
            - value: '7'
              newvalue: iso88023Csmacd
            - value: '8'
              newvalue: iso88024TokenBus
            - value: '9'
              newvalue: iso88025TokenRing
            - value: '10'
              newvalue: iso88026Man
            - value: '11'
              newvalue: starLan
            - value: '12'
              newvalue: proteon10Mbit
            - value: '13'
              newvalue: proteon80Mbit
            - value: '14'
              newvalue: hyperchannel
            - value: '15'
              newvalue: fddi
            - value: '16'
              newvalue: lapb
            - value: '17'
              newvalue: sdlc
            - value: '18'
              newvalue: ds1
            - value: '19'
              newvalue: e1
            - value: '20'
              newvalue: basicISDN
            - value: '21'
              newvalue: primaryISDN
            - value: '22'
              newvalue: propPointToPointSerial
            - value: '23'
              newvalue: ppp
            - value: '24'
              newvalue: softwareLoopback
            - value: '25'
              newvalue: eon
            - value: '26'
              newvalue: ethernet3Mbit
            - value: '27'
              newvalue: nsip
            - value: '28'
              newvalue: slip
            - value: '29'
              newvalue: ultra
            - value: '30'
              newvalue: ds3
            - value: '31'
              newvalue: sip
            - value: '32'
              newvalue: frameRelay
            - value: '33'
              newvalue: rs232
            - value: '34'
              newvalue: para
            - value: '35'
              newvalue: arcnet
            - value: '36'
              newvalue: arcnetPlus
            - value: '37'
              newvalue: atm
            - value: '38'
              newvalue: miox25
            - value: '39'
              newvalue: sonet
            - value: '40'
              newvalue: x25ple
            - value: '41'
              newvalue: iso88022llc
            - value: '42'
              newvalue: localTalk
            - value: '43'
              newvalue: smdsDxi
            - value: '44'
              newvalue: frameRelayService
            - value: '45'
              newvalue: v35
            - value: '46'
              newvalue: hssi
            - value: '47'
              newvalue: hippi
            - value: '48'
              newvalue: modem
            - value: '49'
              newvalue: aal5
            - value: '50'
              newvalue: sonetPath
            - value: '51'
              newvalue: sonetVT
            - value: '52'
              newvalue: smdsIcip
            - value: '53'
              newvalue: propVirtual
            - value: '54'
              newvalue: propMultiplexor
            - value: '55'
              newvalue: ieee80212
            - value: '56'
              newvalue: fibreChannel
            - value: '57'
              newvalue: hippiInterface
            - value: '58'
              newvalue: frameRelayInterconnect
            - value: '59'
              newvalue: aflane8023
            - value: '60'
              newvalue: aflane8025
            - value: '61'
              newvalue: cctEmul
            - value: '62'
              newvalue: fastEther
            - value: '63'
              newvalue: isdn
            - value: '64'
              newvalue: v11
            - value: '65'
              newvalue: v36
            - value: '66'
              newvalue: g703at64k
            - value: '67'
              newvalue: g703at2mb
            - value: '68'
              newvalue: qllc
            - value: '69'
              newvalue: fastEtherFX
            - value: '70'
              newvalue: channel
            - value: '71'
              newvalue: ieee80211
            - value: '72'
              newvalue: ibm370parChan
            - value: '73'
              newvalue: escon
            - value: '74'
              newvalue: dlsw
            - value: '75'
              newvalue: isdns
            - value: '76'
              newvalue: isdnu
            - value: '77'
              newvalue: lapd
            - value: '78'
              newvalue: ipSwitch
            - value: '79'
              newvalue: rsrb
            - value: '80'
              newvalue: atmLogical
            - value: '81'
              newvalue: ds0
            - value: '82'
              newvalue: ds0Bundle
            - value: '83'
              newvalue: bsc
            - value: '84'
              newvalue: async
            - value: '85'
              newvalue: cnr
            - value: '86'
              newvalue: iso88025Dtr
            - value: '87'
              newvalue: eplrs
            - value: '88'
              newvalue: arap
            - value: '89'
              newvalue: propCnls
            - value: '90'
              newvalue: hostPad
            - value: '91'
              newvalue: termPad
            - value: '92'
              newvalue: frameRelayMPI
            - value: '93'
              newvalue: x213
            - value: '94'
              newvalue: adsl
            - value: '95'
              newvalue: radsl
            - value: '96'
              newvalue: sdsl
            - value: '97'
              newvalue: vdsl
            - value: '98'
              newvalue: iso88025CRFPInt
            - value: '99'
              newvalue: myrinet
            - value: '100'
              newvalue: voiceEM
            - value: '101'
              newvalue: voiceFXO
            - value: '102'
              newvalue: voiceFXS
            - value: '103'
              newvalue: voiceEncap
            - value: '104'
              newvalue: voiceOverIp
            - value: '105'
              newvalue: atmDxi
            - value: '106'
              newvalue: atmFuni
            - value: '107'
              newvalue: atmIma
            - value: '108'
              newvalue: pppMultilinkBundle
            - value: '109'
              newvalue: ipOverCdlc
            - value: '110'
              newvalue: ipOverClaw
            - value: '111'
              newvalue: stackToStack
            - value: '112'
              newvalue: virtualIpAddress
            - value: '113'
              newvalue: mpc
            - value: '114'
              newvalue: ipOverAtm
            - value: '115'
              newvalue: iso88025Fiber
            - value: '116'
              newvalue: tdlc
            - value: '117'
              newvalue: gigabitEthernet
            - value: '118'
              newvalue: hdlc
            - value: '119'
              newvalue: lapf
            - value: '120'
              newvalue: v37
            - value: '121'
              newvalue: x25mlp
            - value: '122'
              newvalue: x25huntGroup
            - value: '123'
              newvalue: trasnpHdlc
            - value: '124'
              newvalue: interleave
            - value: '125'
              newvalue: fast
            - value: '126'
              newvalue: ip
            - value: '127'
              newvalue: docsCableMaclayer
            - value: '128'
              newvalue: docsCableDownstream
            - value: '129'
              newvalue: docsCableUpstream
            - value: '130'
              newvalue: a12MppSwitch
            - value: '131'
              newvalue: tunnel
            - value: '132'
              newvalue: coffee
            - value: '133'
              newvalue: ces
            - value: '134'
              newvalue: atmSubInterface
            - value: '135'
              newvalue: l2vlan
            - value: '136'
              newvalue: l3ipvlan
            - value: '137'
              newvalue: l3ipxvlan
            - value: '138'
              newvalue: digitalPowerline
            - value: '139'
              newvalue: mediaMailOverIp
            - value: '140'
              newvalue: dtm
            - value: '141'
              newvalue: dcn
            - value: '142'
              newvalue: ipForward
            - value: '143'
              newvalue: msdsl
            - value: '144'
              newvalue: ieee1394
            - value: '145'
              newvalue: if-gsn
            - value: '146'
              newvalue: dvbRccMacLayer
            - value: '147'
              newvalue: dvbRccDownstream
            - value: '148'
              newvalue: dvbRccUpstream
            - value: '149'
              newvalue: atmVirtual
            - value: '150'
              newvalue: mplsTunnel
            - value: '151'
              newvalue: srp
            - value: '152'
              newvalue: voiceOverAtm
            - value: '153'
              newvalue: voiceOverFrameRelay
            - value: '154'
              newvalue: idsl
            - value: '155'
              newvalue: compositeLink
            - value: '156'
              newvalue: ss7SigLink
            - value: '157'
              newvalue: propWirelessP2P
            - value: '158'
              newvalue: frForward
            - value: '159'
              newvalue: rfc1483
            - value: '160'
              newvalue: usb
            - value: '161'
              newvalue: ieee8023adLag
            - value: '162'
              newvalue: bgppolicyaccounting
            - value: '163'
              newvalue: frf16MfrBundle
            - value: '164'
              newvalue: h323Gatekeeper
            - value: '165'
              newvalue: h323Proxy
            - value: '166'
              newvalue: mpls
            - value: '167'
              newvalue: mfSigLink
            - value: '168'
              newvalue: hdsl2
            - value: '169'
              newvalue: shdsl
            - value: '170'
              newvalue: ds1FDL
            - value: '171'
              newvalue: pos
            - value: '172'
              newvalue: dvbAsiIn
            - value: '173'
              newvalue: dvbAsiOut
            - value: '174'
              newvalue: plc
            - value: '175'
              newvalue: nfas
            - value: '176'
              newvalue: tr008
            - value: '177'
              newvalue: gr303RDT
            - value: '178'
              newvalue: gr303IDT
            - value: '179'
              newvalue: isup
            - value: '180'
              newvalue: propDocsWirelessMaclayer
            - value: '181'
              newvalue: propDocsWirelessDownstream
            - value: '182'
              newvalue: propDocsWirelessUpstream
            - value: '183'
              newvalue: hiperlan2
            - value: '184'
              newvalue: propBWAp2Mp
            - value: '185'
              newvalue: sonetOverheadChannel
            - value: '186'
              newvalue: digitalWrapperOverheadChannel
            - value: '187'
              newvalue: aal2
            - value: '188'
              newvalue: radioMAC
            - value: '189'
              newvalue: atmRadio
            - value: '190'
              newvalue: imt
            - value: '191'
              newvalue: mvl
            - value: '192'
              newvalue: reachDSL
            - value: '193'
              newvalue: frDlciEndPt
            - value: '194'
              newvalue: atmVciEndPt
            - value: '195'
              newvalue: opticalChannel
            - value: '196'
              newvalue: opticalTransport
            - value: '197'
              newvalue: propAtm
            - value: '198'
              newvalue: voiceOverCable
            - value: '199'
              newvalue: infiniband
            - value: '200'
              newvalue: teLink
            - value: '201'
              newvalue: q2931
            - value: '202'
              newvalue: virtualTg
            - value: '203'
              newvalue: sipTg
            - value: '204'
              newvalue: sipSig
            - value: '205'
              newvalue: docsCableUpstreamChannel
            - value: '206'
              newvalue: econet
            - value: '207'
              newvalue: pon155
            - value: '208'
              newvalue: pon622
            - value: '209'
              newvalue: bridge
            - value: '210'
              newvalue: linegroup
            - value: '211'
              newvalue: voiceEMFGD
            - value: '212'
              newvalue: voiceFGDEANA
            - value: '213'
              newvalue: voiceDID
            - value: '214'
              newvalue: mpegTransport
            - value: '215'
              newvalue: sixToFour
            - value: '216'
              newvalue: gtp
            - value: '217'
              newvalue: pdnEtherLoop1
            - value: '218'
              newvalue: pdnEtherLoop2
            - value: '219'
              newvalue: opticalChannelGroup
            - value: '220'
              newvalue: homepna
            - value: '221'
              newvalue: gfp
            - value: '222'
              newvalue: ciscoISLvlan
            - value: '223'
              newvalue: actelisMetaLOOP
            - value: '224'
              newvalue: fcipLink
            - value: '225'
              newvalue: rpr
            - value: '226'
              newvalue: qam
            - value: '227'
              newvalue: lmp
            - value: '228'
              newvalue: cblVectaStar
            - value: '229'
              newvalue: docsCableMCmtsDownstream
            - value: '230'
              newvalue: adsl2
            - value: '231'
              newvalue: macSecControlledIF
            - value: '232'
              newvalue: macSecUncontrolledIF
            - value: '233'
              newvalue: aviciOpticalEther
            - value: '234'
              newvalue: atmbond
            - value: '235'
              newvalue: voiceFGDOS
            - value: '236'
              newvalue: mocaVersion1
            - value: '237'
              newvalue: ieee80216WMAN
            - value: '238'
              newvalue: adsl2plus
            - value: '239'
              newvalue: dvbRcsMacLayer
            - value: '240'
              newvalue: dvbTdm
            - value: '241'
              newvalue: dvbRcsTdma
            - value: '242'
              newvalue: x86Laps
            - value: '243'
              newvalue: wwanPP
            - value: '244'
              newvalue: wwanPP2
            - value: '245'
              newvalue: voiceEBS
            - value: '246'
              newvalue: ifPwType
            - value: '247'
              newvalue: ilan
            - value: '248'
              newvalue: pip
            - value: '249'
              newvalue: aluELP
            - value: '250'
              newvalue: gpon
            - value: '251'
              newvalue: vdsl2
            - value: '252'
              newvalue: capwapDot11Profile
            - value: '253'
              newvalue: capwapDot11Bss
            - value: '254'
              newvalue: capwapWtpVirtualRadio
            - value: '255'
              newvalue: bits
            - value: '256'
              newvalue: docsCableUpstreamRfPort
            - value: '257'
              newvalue: cableDownstreamRfPort
            - value: '258'
              newvalue: vmwareVirtualNic
            - value: '259'
              newvalue: ieee802154
            - value: '260'
              newvalue: otnOdu
            - value: '261'
              newvalue: otnOtu
            - value: '262'
              newvalue: ifVfiType
            - value: '263'
              newvalue: g9981
            - value: '264'
              newvalue: g9982
            - value: '265'
              newvalue: g9983
            - value: '266'
              newvalue: aluEpon
            - value: '267'
              newvalue: aluEponOnu
            - value: '268'
              newvalue: aluEponPhysicalUni
            - value: '269'
              newvalue: aluEponLogicalLink
            - value: '270'
              newvalue: aluGponOnu
            - value: '271'
              newvalue: aluGponPhysicalUni
            - value: '272'
              newvalue: vmwareNicTeam
            - value: '277'
              newvalue: docsOfdmDownstream
            - value: '278'
              newvalue: docsOfdmaUpstream
            - value: '279'
              newvalue: gfast
            - value: '280'
              newvalue: sdci
            - value: '281'
              newvalue: xboxWireless
            - value: '282'
              newvalue: fastdsl
            - value: '283'
              newvalue: docsCableScte55d1FwdOob
            - value: '284'
              newvalue: docsCableScte55d1RetOob
            - value: '285'
              newvalue: docsCableScte55d2DsOob
            - value: '286'
              newvalue: docsCableScte55d2UsOob
            - value: '287'
              newvalue: docsCableNdf
            - value: '288'
              newvalue: docsCableNdr
            - value: '289'
              newvalue: ptm
            - value: '290'
              newvalue: ghn
        - uuid: 31a78150623d4ce39a0c98a59bfa5c47
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
  triggers:
    - uuid: a1397bd4e9334a24a34dba0687b263e6
      expression: 'last(/MSSQL by ODBC/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by ODBC/mssql.batch_requests_sec.rate)'
      name: 'MSSQL: Too frequently using pointers'
      priority: WARNING
      description: 'Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes.'
      tags:
        - tag: scope
          value: performance
    - uuid: 366fa3cfcba94e038ad77c2f5a2649a2
      expression: 'last(/MSSQL by Zabbix agent 2/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by Zabbix agent 2/mssql.batch_requests_sec.rate)'
      name: 'MSSQL: Too frequently using pointers'
      priority: WARNING
      description: 'Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes.'
      tags:
        - tag: scope
          value: performance
    - uuid: 2a58729eb605461b853ec4e855878226
      expression: 'last(/MSSQL by ODBC/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by ODBC/mssql.page_reads_sec.rate)'
      name: 'MSSQL: Too many physical reads occurring'
      priority: WARNING
      description: 'If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring.'
      tags:
        - tag: scope
          value: performance
    - uuid: 274773f4bb9d4af798e8922b5054226b
      expression: 'last(/MSSQL by Zabbix agent 2/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate)'
      name: 'MSSQL: Too many physical reads occurring'
      priority: WARNING
      description: 'If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring.'
      tags:
        - tag: scope
          value: performance
    - uuid: ab635805cfb74121827f3f31e985e875
      expression: '(last(/Vyatta Virtual Router by SNMP/system.uptime.hardware[hrSystemUptime.0])>0 and last(/Vyatta Virtual Router by SNMP/system.uptime.hardware[hrSystemUptime.0])<10m) or (last(/Vyatta Virtual Router by SNMP/system.uptime.hardware[hrSystemUptime.0])=0 and last(/Vyatta Virtual Router by SNMP/system.uptime.network[sysUpTimeInstance])<10m)'
      name: 'Vyatta: Host has been restarted'
      event_name: 'Vyatta: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: WARNING
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      dependencies:
        - name: 'Vyatta: No SNMP data collection'
          expression: 'max(/Vyatta Virtual Router by SNMP/zabbix[host,snmp,available],{$VYATTA.SNMP.TIMEOUT})=0'
      tags:
        - tag: scope
          value: notice
    - uuid: 14ad5e7b60624d5bbcd7124278d23a48
      expression: |
        min(/Vyatta Virtual Router by SNMP/system.cpu.load.avg1,5m)/last(/Vyatta Virtual Router by SNMP/system.cpu.num)>{$VYATTA.LOAD_AVG_PER_CPU.MAX.WARN}
        and last(/Vyatta Virtual Router by SNMP/system.cpu.load.avg5)>0
        and last(/Vyatta Virtual Router by SNMP/system.cpu.load.avg15)>0
      name: 'Vyatta: Load average is too high'
      event_name: 'Vyatta: Load average is too high (per CPU load over {$VYATTA.LOAD_AVG_PER_CPU.MAX.WARN} for 5m)'
      opdata: 'Load averages(1m 5m 15m): ({ITEM.LASTVALUE1} {ITEM.LASTVALUE3} {ITEM.LASTVALUE4}), # of CPUs: {ITEM.LASTVALUE2}'
      priority: AVERAGE
      description: 'The load average per CPU is too high. The system may be slow to respond.'
      tags:
        - tag: scope
          value: capacity
        - tag: scope
          value: performance
  graphs:
    - uuid: dfd6533466a74f348ba660166166ce85
      name: 'CPU usage'
      type: STACKED
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - color: 199C0D
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: system.cpu.system
        - sortorder: '1'
          color: F63100
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: system.cpu.user
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: system.cpu.idle
    - uuid: 10704dd2fbe3420884903ec095f80f57
      name: 'FortiGate: CPU utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - color: 199C0D
          item:
            host: 'FortiGate by SNMP'
            key: 'system.cpu.util[fgSysCpuUsage.0]'
    - uuid: 1adeceeb1cd345aa88bb69e66b34557a
      name: 'FortiGate: Disk usage'
      graph_items:
        - color: 199C0D
          item:
            host: 'FortiGate by SNMP'
            key: 'vfs.fs.total[fgSysDiskCapacity.0]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'FortiGate by SNMP'
            key: vfs.fs.free
    - uuid: 37a96e0d20fe4084901087278327a24b
      name: 'FortiGate: IPS statistics'
      graph_items:
        - color: 199C0D
          yaxisside: RIGHT
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.blocked[fgIpsIntrusionsBlocked.0]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.detected.total[fgIpsIntrusionsDetected.0]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.detected.crit[fgIpsCritSevDetections.0]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.detected.high[fgIpsHighSevDetections.0]'
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.detected.med[fgIpsMedSevDetections.0]'
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.detected.low[fgIpsLowSevDetections.0]'
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.detected.info[fgIpsInfoSevDetections.0]'
        - sortorder: '7'
          color: BA2A5D
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.detected.anomaly[fgIpsAnomalyDetections.0]'
        - sortorder: '8'
          color: F230E0
          item:
            host: 'FortiGate by SNMP'
            key: 'ips.detected.sign[fgIpsSignatureDetections.0]'
    - uuid: 50e99d0db49c4d88b2aff88e63834b6d
      name: 'FortiGate: Memory usage'
      graph_items:
        - color: 199C0D
          item:
            host: 'FortiGate by SNMP'
            key: 'vm.memory.total[fgSysMemCapacity.0]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'FortiGate by SNMP'
            key: 'vm.memory.available[fgSysMemFree.0]'
    - uuid: a444a1d380e542d2b0390fd94af5eb9a
      name: 'FortiGate: Memory utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - color: 199C0D
          item:
            host: 'FortiGate by SNMP'
            key: 'vm.memory.util[memoryUsedPercentage.0]'
    - uuid: ab9f0c1098fd46a991ee8afab8987916
      name: 'Memory utilization'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: 'system.memory.total[memTotalReal.0]'
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: 'system.memory.free[memAvailReal.0]'
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: system.memory.util
    - uuid: d2db0e08beb6445a8b5dd9fb46249265
      name: 'MSSQL: Access methods'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.forwarded_records_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.full_scans_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by ODBC'
            key: mssql.index_searches_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.page_splits_sec.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MSSQL by ODBC'
            key: mssql.workfiles_created_sec.rate
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'MSSQL by ODBC'
            key: mssql.worktables_created_sec.rate
    - uuid: 7d06995b2daf4496a3f4856e5c562e59
      name: 'MSSQL: Access methods'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.forwarded_records_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.full_scans_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.index_searches_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.page_splits_sec.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.workfiles_created_sec.rate
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.worktables_created_sec.rate
    - uuid: f22186d86d9346fe9e1f3292e1f0017c
      name: 'MSSQL: Auto-params'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.autoparam_attempts_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.failed_autoparams_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by ODBC'
            key: mssql.safe_autoparams_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.unsafe_autoparams_sec.rate
    - uuid: c1df070c49994a9fb3b15a3f9f15cf59
      name: 'MSSQL: Auto-params'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.autoparam_attempts_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.failed_autoparams_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.safe_autoparams_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.unsafe_autoparams_sec.rate
    - uuid: 24ef7368fb364616892c4928ba6167c6
      name: 'MSSQL: Cache objects'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.cache_object_counts
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.cache_objects_in_use
    - uuid: 15b49ae51375483182c927a06c7e094a
      name: 'MSSQL: Cache objects'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.cache_object_counts
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.cache_objects_in_use
    - uuid: 1f713999d38745b6bb2828e397a32970
      name: 'MSSQL: Compilations'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.sql_compilations_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.sql_recompilations_sec.rate
    - uuid: b3422c184eb7476e97e5b0f09bb70160
      name: 'MSSQL: Compilations'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.sql_compilations_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.sql_recompilations_sec.rate
    - uuid: 91af398cfb86472ba4a69e3df0816be7
      name: 'MSSQL: Database pages'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.database_pages
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.target_pages
    - uuid: ecc056aa9b4d4da3b41f6ad7ec8d600c
      name: 'MSSQL: Database pages'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.database_pages
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.target_pages
    - uuid: 0c9aaf223d6f4ba9bd17b0289af4bbe2
      name: 'MSSQL: Errors'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.errors_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.offline_errors_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by ODBC'
            key: mssql.info_errors_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.kill_connection_errors_sec.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MSSQL by ODBC'
            key: mssql.user_errors_sec.rate
    - uuid: b1decdef518c43c3bc8813b028e04025
      name: 'MSSQL: Errors'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.errors_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.offline_errors_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.info_errors_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.kill_connection_errors_sec.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.user_errors_sec.rate
    - uuid: e35985317393409b9a764adcb05f07d0
      name: 'MSSQL: Locks'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.lock_requests_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.lock_timeouts_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by ODBC'
            key: mssql.number_deadlocks_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.lock_waits_sec.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MSSQL by ODBC'
            key: mssql.average_wait_time
    - uuid: 6dff1806a75343a6a81a94c5fee6a632
      name: 'MSSQL: Locks'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.lock_requests_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.lock_timeouts_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.number_deadlocks_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.lock_waits_sec.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.average_wait_time
    - uuid: 8796ad9cc04f48cdbe8ef2cb5f429997
      name: 'MSSQL: Logins per second and Logouts per second'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.logins_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.logouts_sec.rate
    - uuid: ef6f803fbb744e8faa04673b5e3f5b38
      name: 'MSSQL: Logins per second and Logouts per second'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.logins_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.logouts_sec.rate
    - uuid: bc588f8933d846a19accdb66eb29ccb9
      name: 'MSSQL: Memory/cache load'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.cache_hit_ratio
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.buffer_cache_hit_ratio
    - uuid: b68986ff810f4336ad907d550f973b56
      name: 'MSSQL: Memory/cache load'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.cache_hit_ratio
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.buffer_cache_hit_ratio
    - uuid: 3d431f6cc6d34ef5820f2a24f3872b41
      name: 'MSSQL: Memory grants outstanding and pending'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.memory_grants_outstanding
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.memory_grants_pending
    - uuid: 335d81ea81384d1e85de7527598ce3f6
      name: 'MSSQL: Memory grants outstanding and pending'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.memory_grants_outstanding
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.memory_grants_pending
    - uuid: 0f0bc58e0c18421591d265f81c000021
      name: 'MSSQL: Page life expectancy'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.page_life_expectancy
    - uuid: 157c122b6d474441b4f95b91beee5730
      name: 'MSSQL: Page life expectancy'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.page_life_expectancy
    - uuid: 2b1d0e42f61a4312998775d21f7cabb7
      name: 'MSSQL: Pages'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.page_lookups_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.page_reads_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by ODBC'
            key: mssql.page_writes_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.readahead_pages_sec.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MSSQL by ODBC'
            key: mssql.checkpoint_pages_sec.rate
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'MSSQL by ODBC'
            key: mssql.free_list_stalls_sec.rate
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.lazy_writes_sec.rate
    - uuid: fff870597f4649d2a72941fb972d201c
      name: 'MSSQL: Pages'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.page_lookups_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.page_reads_sec.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.page_writes_sec.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.readahead_pages_sec.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.checkpoint_pages_sec.rate
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.free_list_stalls_sec.rate
        - sortorder: '6'
          color: C7A72D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.lazy_writes_sec.rate
    - uuid: 2e9273b0472c4a3e9049bea3548301d5
      name: 'MSSQL: Processes blocked'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.processes_blocked
    - uuid: 3297eadad79f4f7d8597f0eccb0af926
      name: 'MSSQL: Processes blocked'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.processes_blocked
    - uuid: f124ce3778bd4722bf0d2d598ac31b0f
      name: 'MSSQL: Server memory'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.target_server_memory
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.total_server_memory
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by ODBC'
            key: mssql.granted_workspace_memory
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.maximum_workspace_memory
    - uuid: 418dc893929c4f62beb361dcaaa6c56a
      name: 'MSSQL: Server memory'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.target_server_memory
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.total_server_memory
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.granted_workspace_memory
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.maximum_workspace_memory
    - uuid: 59ffd52c5c334d20870fc209c6c61398
      name: 'MSSQL: Transactions'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.transactions_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.batch_requests_sec.rate
    - uuid: 31467ce0afe24b2fa1a547f28eebc24a
      name: 'MSSQL: Transactions'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.transactions_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.batch_requests_sec.rate
    - uuid: 6979c0bcba0e4ac08c6bfefa0c648d40
      name: 'MSSQL: Waits per second'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.latch_waits_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.lock_waits_sec.rate
    - uuid: e35b61f7a547477cba31c9949be61f5e
      name: 'MSSQL: Waits per second'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.latch_waits_sec.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.lock_waits_sec.rate
    - uuid: 41cc736d93ce45d6aeb6dede77c97f08
      name: 'MSSQL: Wait times'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.average_latch_wait_time
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by ODBC'
            key: mssql.total_latch_wait_time
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by ODBC'
            key: mssql.average_wait_time
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by ODBC'
            key: mssql.lock_wait_time
    - uuid: ae485dce95974187a046b9743f32f629
      name: 'MSSQL: Wait times'
      graph_items:
        - color: 199C0D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.average_latch_wait_time
        - sortorder: '1'
          color: F63100
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.total_latch_wait_time
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.average_wait_time
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MSSQL by Zabbix agent 2'
            key: mssql.lock_wait_time
    - uuid: 517cd4cc43394fe98ff85c921e32e602
      name: 'System load'
      ymin_type_1: FIXED
      graph_items:
        - color: 199C0D
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: system.cpu.load.avg1
        - sortorder: '1'
          color: F63100
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: system.cpu.load.avg5
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: system.cpu.load.avg15
        - sortorder: '3'
          color: F7941D
          yaxisside: RIGHT
          item:
            host: 'Vyatta Virtual Router by SNMP'
            key: system.cpu.num
