zabbix_export:
  version: '8.0'
  template_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Templates/Applications
    - uuid: 36bff6c29af64692839d077febfc7079
      name: 'Templates/Network devices'
    - uuid: e960332b3f6c46a1956486d4f3f99fce
      name: 'Templates/Server hardware'
  host_groups:
    - uuid: f2481361f99448eea617b7b1d4765566
      name: 'Discovered hosts'
  templates:
    - uuid: d5eb4ce08a334098a85e6e02c534be90
      template: 'Cisco UCS Manager by SNMP'
      name: 'Cisco UCS Manager by SNMP'
      description: |
        This is a template for Cisco UCS Manager monitoring via Zabbix SNMP Agent that works without any external scripts.
        
        
        MIBs used:
        CISCO-UNIFIED-COMPUTING-COMPUTE-MIB
        CISCO-UNIFIED-COMPUTING-EQUIPMENT-MIB
        IF-MIB
        HOST-RESOURCES-MIB
        SNMPv2-MIB
        CISCO-UNIFIED-COMPUTING-PROCESSOR-MIB
        CISCO-UNIFIED-COMPUTING-STORAGE-MIB
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/418396-discussion-thread-for-official-zabbix-templates-for-cisco
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Cisco UCS® Manager provides unified, embedded management of all software and hardware components of the Cisco Unified Computing System™ (Cisco UCS) across multiple chassis and rack servers. It enables server, fabric, and storage provisioning as well as,
        device discovery, inventory, configuration, diagnostics, monitoring, fault detection, auditing, and statistics collection.
        This is a template for Cisco UCS Manager monitoring via Zabbix SNMP Agent that works without any external scripts.
        You can download UCS MIB files there ftp://ftp.cisco.com/pub/mibs/ucs-mibs/.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Server hardware'
      items:
        - uuid: ad342e11ce9f4f79bf9b0182c3f83488
          name: 'System contact details'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: 'cisco.ucs.contact[sysContact.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            The textual identification of the contact person for this managed
            node, together with information on how to contact this person.  If no contact
            information is known, the value is the zero-length string.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 286fdb0fa49a4b378a6219a5ed76aac4
          name: 'System description'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: 'cisco.ucs.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: 5af56ed99d09489aafc2d08d4bd4903a
          name: 'Uptime (hardware)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.25.1.1.0]'
          key: 'cisco.ucs.hw.uptime[hrSystemUptime.0]'
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: HOST-RESOURCES-MIB
            The amount of time since this host was last initialized.
            Note that this is different from sysUpTime in the SNMPv2-MIB
            [RFC1907] because sysUpTime is the uptime of the
            network management portion of the system.
          preprocessing:
            - type: CHECK_NOT_SUPPORTED
              parameters:
                - '-1'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 88bd32f8520144858a8ddb03dd200638
          name: 'System location'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: 'cisco.ucs.location[sysLocation.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            The physical location of this node (e.g., `telephone closet,
            3rd floor').  If the location is unknown, the value is the zero-length string.
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 8bd3a60e4c70450492432c6abfa7b5f9
          name: 'System name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: 'cisco.ucs.name[sysName.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            An administratively-assigned name for this managed node.By
            convention, this is the node's fully-qualified domain name.  If the name is unknown,
            the value is the zero-length string.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 622ac72c0e534bba94bb93636e4dc103
              expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.name[sysName.0],#1)<>last(/Cisco UCS Manager by SNMP/cisco.ucs.name[sysName.0],#2) and length(last(/Cisco UCS Manager by SNMP/cisco.ucs.name[sysName.0]))>0'
              name: 'Cisco UCS Manager: System name has changed'
              event_name: 'Cisco UCS Manager: 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
        - uuid: b87e425f1bdf404a8e53ff277c0ff0c0
          name: 'Uptime (network)'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.3.0]'
          key: 'cisco.ucs.net.uptime[sysUpTime.0]'
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: SNMPv2-MIB
            The time in seconds since the network management
            portion of the system was last re-initialized.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
        - uuid: 10d22e53318347658b2418ff33c26e0d
          name: 'System object ID'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.2.0]'
          key: 'cisco.ucs.objectid[sysObjectID.0]'
          delay: 15m
          value_type: CHAR
          description: |
            MIB: SNMPv2-MIB
            The vendor's authoritative identification of the network management
            subsystem contained in the entity.  This value is allocated within the SMI enterprises
            subtree (1.3.6.1.4.1) and provides an easy and unambiguous means for determining 'what
            kind of box' is being managed. For example, if vendor 'Flintstones, Inc.' was
            assigned the subtree1.3.6.1.4.1.4242, it could assign the identifier 1.3.6.1.4.1.4242.1.1
            to its 'Fred Router'.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: system
        - uuid: 5d839f68b6534dc8bd1fb5db7a757f02
          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: 0926417e279a4e52a7f12587e9422e92
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          description: |
            Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list.
            Possible values:
            0 - not available
            1 - available
            2 - unknown
          valuemap:
            name: zabbix.host.available
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
          triggers:
            - uuid: 010a749e3a3242cd8e3ea30459fae5a4
              expression: 'max(/Cisco UCS Manager by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'Cisco UCS Manager: 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.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: f44bb3e5a8ad4d0c98df56267700b171
          name: 'Array controller cache discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#DISKARRAY_CACHE_LOCATION},1.3.6.1.4.1.9.9.719.1.45.11.1.2]'
          key: cisco.ucs.array.cache.discovery
          delay: 1h
          description: 'Scanning table of Array controllers: CISCO-UNIFIED-COMPUTING-STORAGE-MIB::cucsStorageControllerTable.'
          item_prototypes:
            - uuid: 4e5214066fbb4c719c7e6abfba47e5f6
              name: '{#DISKARRAY_CACHE_LOCATION}: Disk array cache controller battery status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.11.1.9.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.diskarray.cache.battery.status[cucsStorageRaidBatteryOperability.{#SNMPINDEX}]'
              trends: '0'
              description: 'MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB'
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsEquipmentOperability'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: array
                - tag: component
                  value: disk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 0300b4bf4e0b42adb1b9e4985e80e356
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.cache.battery.status[cucsStorageRaidBatteryOperability.{#SNMPINDEX}])={$DISK.ARRAY.CACHE.BATTERY.STATUS.CRIT}'
                  name: 'Cisco UCS Manager: {#DISKARRAY_CACHE_LOCATION}: Disk array cache controller battery is in critical state!'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 158561ecab8b4bbd9c0a616f419bda10
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.cache.battery.status[cucsStorageRaidBatteryOperability.{#SNMPINDEX}])<>{$DISK.ARRAY.CACHE.BATTERY.STATUS.OK}'
                  name: 'Cisco UCS Manager: {#DISKARRAY_CACHE_LOCATION}: Disk array cache controller battery is not in optimal state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for faults'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#DISKARRAY_CACHE_LOCATION}: Disk array cache controller battery is in critical state!'
                      expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.cache.battery.status[cucsStorageRaidBatteryOperability.{#SNMPINDEX}])={$DISK.ARRAY.CACHE.BATTERY.STATUS.CRIT}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: bd1cf5ecd41f4dc49c6e31f32119787b
          name: 'Array controller discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#DISKARRAY_LOCATION},1.3.6.1.4.1.9.9.719.1.45.1.1.2]'
          key: cisco.ucs.array.discovery
          delay: 1h
          description: 'Scanning table of Array controllers: CISCO-UNIFIED-COMPUTING-STORAGE-MIB::cucsStorageControllerTable.'
          item_prototypes:
            - uuid: 5285422113b84c2e8cb00899e0b29493
              name: '{#DISKARRAY_LOCATION}: Disk array controller model'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.1.1.5.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.diskarray.model[cucsStorageControllerModel.{#SNMPINDEX}]'
              delay: 1d
              value_type: CHAR
              description: 'MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: array
                - tag: component
                  value: disk
                - tag: component
                  value: storage
            - uuid: a732688d6fa347b597854078dd084935
              name: '{#DISKARRAY_LOCATION}: Disk array controller status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.1.1.6.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.diskarray.status[cucsStorageControllerOperState.{#SNMPINDEX}]'
              trends: '0'
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:RaidBattery:operability managed object property.
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsEquipmentOperability'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: array
                - tag: component
                  value: disk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 28c32222815f47e193d09afe5aafae79
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.status[cucsStorageControllerOperState.{#SNMPINDEX}])={$DISK.ARRAY.STATUS.CRIT:"inoperable"}'
                  name: 'Cisco UCS Manager: {#DISKARRAY_LOCATION}: Disk array controller is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'Please check the device for faults'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 4e758fac4df54388b5f4555bb170bdd3
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.status[cucsStorageControllerOperState.{#SNMPINDEX}])={$DISK.ARRAY.STATUS.WARN:"degraded"}'
                  name: 'Cisco UCS Manager: {#DISKARRAY_LOCATION}: Disk array controller is in warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#DISKARRAY_LOCATION}: Disk array controller is in critical state'
                      expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.status[cucsStorageControllerOperState.{#SNMPINDEX}])={$DISK.ARRAY.STATUS.CRIT:"inoperable"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 264e15d04626432987c2193bf190c56c
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.status[cucsStorageControllerOperState.{#SNMPINDEX}])>{$DISK.ARRAY.STATUS.OK:"operable"}'
                  name: 'Cisco UCS Manager: {#DISKARRAY_LOCATION}: Disk array controller is not in optimal state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for faults'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#DISKARRAY_LOCATION}: Disk array controller is in critical state'
                      expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.status[cucsStorageControllerOperState.{#SNMPINDEX}])={$DISK.ARRAY.STATUS.CRIT:"inoperable"}'
                    - name: 'Cisco UCS Manager: {#DISKARRAY_LOCATION}: Disk array controller is in warning state'
                      expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.diskarray.status[cucsStorageControllerOperState.{#SNMPINDEX}])={$DISK.ARRAY.STATUS.WARN:"degraded"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: c799941bb99a4ce0af2ab50253c40259
          name: 'FAN discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#FAN_LOCATION},1.3.6.1.4.1.9.9.719.1.15.12.1.2]'
          key: cisco.ucs.fan.discovery
          delay: 1h
          item_prototypes:
            - uuid: 5e4aa59c4ec44fc7b97b9659c0d7a5c5
              name: '{#FAN_LOCATION}: Fan status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.15.12.1.9.{#SNMPINDEX}]'
              key: 'cisco.ucs.sensor.fan.status[cucsEquipmentFanOperState.{#SNMPINDEX}]'
              delay: 3m
              trends: '0'
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-EQUIPMENT-MIB
                Cisco UCS equipment:Fan:operState managed object property
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsEquipmentOperability'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: fan
              trigger_prototypes:
                - uuid: 7417bd7646c248eb9664875d7d19e9ea
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.fan.status[cucsEquipmentFanOperState.{#SNMPINDEX}])={$FAN.STATUS.CRIT:"inoperable"}'
                  name: 'Cisco UCS Manager: {#FAN_LOCATION}: Fan is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: b3d6cb64470e4e4c9bf1d619c0015823
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.fan.status[cucsEquipmentFanOperState.{#SNMPINDEX}])={$FAN.STATUS.WARN:"degraded"}'
                  name: 'Cisco UCS Manager: {#FAN_LOCATION}: Fan is in warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the fan unit'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#FAN_LOCATION}: Fan is in critical state'
                      expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.fan.status[cucsEquipmentFanOperState.{#SNMPINDEX}])={$FAN.STATUS.CRIT:"inoperable"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 20b43c2620114a9da4ff4d97b409f53e
          name: 'Network interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#IFOPERSTATUS},1.3.6.1.2.1.2.2.1.8,{#IFADMINSTATUS},1.3.6.1.2.1.2.2.1.7,{#IFALIAS},1.3.6.1.2.1.31.1.1.1.18,{#IFNAME},1.3.6.1.2.1.31.1.1.1.1,{#IFDESCR},1.3.6.1.2.1.2.2.1.2,{#IFTYPE},1.3.6.1.2.1.2.2.1.3]'
          key: cisco.ucs.net.if.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#IFADMINSTATUS}'
                value: '{$NET.IFADMINSTATUS.MATCHES}'
              - macro: '{#IFADMINSTATUS}'
                value: '{$NET.IFADMINSTATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFALIAS}'
                value: '{$NET.IFALIAS.MATCHES}'
              - macro: '{#IFALIAS}'
                value: '{$NET.IFALIAS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFDESCR}'
                value: '{$NET.IFDESCR.MATCHES}'
              - macro: '{#IFDESCR}'
                value: '{$NET.IFDESCR.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFNAME}'
                value: '{$NET.IFNAME.MATCHES}'
              - macro: '{#IFNAME}'
                value: '{$NET.IFNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFOPERSTATUS}'
                value: '{$NET.IFOPERSTATUS.MATCHES}'
              - macro: '{#IFOPERSTATUS}'
                value: '{$NET.IFOPERSTATUS.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFTYPE}'
                value: '{$NET.IFTYPE.MATCHES}'
              - macro: '{#IFTYPE}'
                value: '{$NET.IFTYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovering interfaces from IF-MIB.'
          item_prototypes:
            - uuid: 361a4c5a4b04432b84f4e6bfcd7775c6
              name: 'Interface {#IFNAME}({#IFALIAS}): Interface description'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.2.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.descr[ifDescr.{#SNMPINDEX}]'
              delay: 1h
              value_type: CHAR
              description: |
                MIB: IF-MIB
                A textual string containing information about the
                interface.  This string should include the name of the
                manufacturer, the product name and the version of the
                interface hardware/software.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 009aeec02b3b46dc93bd52c2f1a4de0a
              name: 'Interface {#IFNAME}({#IFALIAS}): Broadcast packets received'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.9.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.in.broadcast[ifHCInBroadcastPkts.{#SNMPINDEX}]'
              delay: 3m
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a broadcast
                address at this sub-layer.  This object is a 64-bit version
                of ifInBroadcastPkts.
                
                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: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 533b7352983e4adfbd9ca1c0e2e5e4b1
              name: 'Interface {#IFNAME}({#IFALIAS}): Inbound packets discarded'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.13.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.in.discards[ifInDiscards.{#SNMPINDEX}]'
              delay: 3m
              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: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 84e21f59350248c185a79dd916587140
              name: 'Interface {#IFNAME}({#IFALIAS}): Inbound packets with errors'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.14.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.in.errors[ifInErrors.{#SNMPINDEX}]'
              delay: 3m
              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: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: d72b570e01f5479db47628e399932988
              name: 'Interface {#IFNAME}({#IFALIAS}): Multicast packets received'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.8.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.in.multicast[ifHCInMulticastPkts.{#SNMPINDEX}]'
              delay: 3m
              description: |
                MIB: IF-MIB
                The number of packets, delivered by this sub-layer to a
                higher (sub-)layer, which were addressed to a multicast
                address at this sub-layer.  For a MAC layer protocol, this
                includes both Group and Functional addresses.  This object
                is a 64-bit version of ifInMulticastPkts.
                
                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: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: eef7c3f6945a48e886de08a842c08f72
              name: 'Interface {#IFNAME}({#IFALIAS}): Bits received'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.6.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.in[ifHCInOctets.{#SNMPINDEX}]'
              delay: 3m
              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: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: f682fdf3144145f3998066a77353c4e2
              name: 'Interface {#IFNAME}({#IFALIAS}): Broadcast packets sent'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.13.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.out.broadcast[ifHCOutBroadcastPkts.{#SNMPINDEX}]'
              delay: 3m
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                broadcast address at this sub-layer, including those that
                were discarded or not sent.  This object is a 64-bit version
                of ifOutBroadcastPkts.
                
                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: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: b61c1b8a08aa40d696d03ae584230e8e
              name: 'Interface {#IFNAME}({#IFALIAS}): Outbound packets discarded'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.19.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.out.discards[ifOutDiscards.{#SNMPINDEX}]'
              delay: 3m
              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: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 0b9d7feb75674225ac8e6ad0952380ac
              name: 'Interface {#IFNAME}({#IFALIAS}): Outbound packets with errors'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.20.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.out.errors[ifOutErrors.{#SNMPINDEX}]'
              delay: 3m
              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: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 3ddc4cca78f14dfc8e6d51efae831ba2
              name: 'Interface {#IFNAME}({#IFALIAS}): Multicast packets sent'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.12.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.out.multicast[ifHCOutMulticastPkts.{#SNMPINDEX}]'
              delay: 3m
              description: |
                MIB: IF-MIB
                The total number of packets that higher-level protocols
                requested be transmitted, and which were addressed to a
                multicast address at this sub-layer, including those that
                were discarded or not sent.  For a MAC layer protocol, this
                includes both Group and Functional addresses.  This object
                is a 64-bit version of ifOutMulticastPkts.
                
                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: CHANGE_PER_SECOND
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: e48a1926828645c49afec898d01fa81a
              name: 'Interface {#IFNAME}({#IFALIAS}): Bits sent'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.10.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.out[ifHCOutOctets.{#SNMPINDEX}]'
              delay: 3m
              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: CHANGE_PER_SECOND
                - type: MULTIPLIER
                  parameters:
                    - '8'
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 56aa529b14b14f6f8f9a9b5f1a2ba0d8
              name: 'Interface {#IFNAME}({#IFALIAS}): Speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.31.1.1.1.15.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.speed[ifHighSpeed.{#SNMPINDEX}]'
              delay: 5m
              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: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 16a4394c6b824bacbc7f074d487fcdfb
              name: 'Interface {#IFNAME}({#IFALIAS}): Operational status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}]'
              key: 'cisco.ucs.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 todormant(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: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
              trigger_prototypes:
                - uuid: edfbf339b2664fae88e2a9003383e37f
                  expression: '{$IFCONTROL:"{#IFNAME}"}=1 and last(/Cisco UCS Manager by SNMP/cisco.ucs.if.status[ifOperStatus.{#SNMPINDEX}])=2 and (last(/Cisco UCS Manager by SNMP/cisco.ucs.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/Cisco UCS Manager by SNMP/cisco.ucs.if.status[ifOperStatus.{#SNMPINDEX}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Cisco UCS Manager: 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 context macro to value - 0. That marks 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 (so, do not fire for the '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: 00b0f0fb6c0b4026b438627edab908fb
              name: 'Interface {#IFNAME}({#IFALIAS}): Interface type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.2.1.2.2.1.3.{#SNMPINDEX}]'
              key: 'cisco.ucs.if.type[ifType.{#SNMPINDEX}]'
              delay: 1h
              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: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: network
                - tag: description
                  value: '{#IFALIAS}'
                - tag: interface
                  value: '{#IFNAME}'
          trigger_prototypes:
            - uuid: caaa61b8d89540c496678d739610ae38
              expression: |
                min(/Cisco UCS Manager by SNMP/cisco.ucs.if.in.errors[ifInErrors.{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}
                or min(/Cisco UCS Manager by SNMP/cisco.ucs.if.out.errors[ifOutErrors.{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}
              name: 'Cisco UCS Manager: Interface {#IFNAME}({#IFALIAS}): High error rate on {#IFNAME}'
              event_name: 'Cisco UCS Manager: Interface {#IFNAME}({#IFALIAS}): High error rate on {#IFNAME} ( > {$IF.ERRORS.WARN:"{#IFNAME}"} for 5m)'
              opdata: 'errors in: {ITEM.LASTVALUE1}, errors out: {ITEM.LASTVALUE2}'
              priority: WARNING
              description: 'Recovers when value below {$IF.ERRORS.WARN:"{#IFNAME}"} threshold.'
              manual_close: 'YES'
              dependencies:
                - name: 'Cisco UCS Manager: Interface {#IFNAME}({#IFALIAS}): Link down'
                  expression: '{$IFCONTROL:"{#IFNAME}"}=1 and last(/Cisco UCS Manager by SNMP/cisco.ucs.if.status[ifOperStatus.{#SNMPINDEX}])=2 and (last(/Cisco UCS Manager by SNMP/cisco.ucs.if.status[ifOperStatus.{#SNMPINDEX}],#1)<>last(/Cisco UCS Manager by SNMP/cisco.ucs.if.status[ifOperStatus.{#SNMPINDEX}],#2))'
                  recovery_expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.if.status[ifOperStatus.{#SNMPINDEX}])<>2 or {$IFCONTROL:"{#IFNAME}"}=0'
              tags:
                - tag: scope
                  value: performance
          graph_prototypes:
            - uuid: d5e5f60602cc41ba8e0b79a63644bf08
              name: 'Interface {#IFNAME}({#IFALIAS}): Network traffic'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'Cisco UCS Manager by SNMP'
                    key: 'cisco.ucs.if.in[ifHCInOctets.{#SNMPINDEX}]'
                - sortorder: '1'
                  drawtype: BOLD_LINE
                  color: F63100
                  item:
                    host: 'Cisco UCS Manager by SNMP'
                    key: 'cisco.ucs.if.out[ifHCOutOctets.{#SNMPINDEX}]'
                - sortorder: '2'
                  color: 00611C
                  yaxisside: RIGHT
                  item:
                    host: 'Cisco UCS Manager by SNMP'
                    key: 'cisco.ucs.if.out.errors[ifOutErrors.{#SNMPINDEX}]'
                - sortorder: '3'
                  color: F7941D
                  yaxisside: RIGHT
                  item:
                    host: 'Cisco UCS Manager by SNMP'
                    key: 'cisco.ucs.if.in.errors[ifInErrors.{#SNMPINDEX}]'
                - sortorder: '4'
                  color: FC6EA3
                  yaxisside: RIGHT
                  item:
                    host: 'Cisco UCS Manager by SNMP'
                    key: 'cisco.ucs.if.out.discards[ifOutDiscards.{#SNMPINDEX}]'
                - sortorder: '5'
                  color: 6C59DC
                  yaxisside: RIGHT
                  item:
                    host: 'Cisco UCS Manager by SNMP'
                    key: 'cisco.ucs.if.in.discards[ifInDiscards.{#SNMPINDEX}]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var result = [];
                  
                  JSON.parse(value).forEach(function (netif) {
                  	if (typeof netif["{#IFNAME}"] === 'undefined') {
                  		netif["{#IFNAME}"] = netif["{#IFDESCR}"];
                  	}
                  	if (typeof netif["{#IFALIAS}"] === 'undefined') {
                  		netif["{#IFALIAS}"] = "";
                  	}
                  	result.push(netif);
                  });
                  
                  return JSON.stringify(result);
        - uuid: a8794333ae2c4104ac52c6ce421161fd
          name: 'Physical disk discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#DISK_LOCATION},1.3.6.1.4.1.9.9.719.1.45.4.1.2]'
          key: cisco.ucs.physicalDisk.discovery
          delay: 1h
          description: 'Scanning table of physical drive entries CISCO-UNIFIED-COMPUTING-STORAGE-MIB::cucsStorageLocalDiskTable.'
          item_prototypes:
            - uuid: 3a1f21ccf92f43df869f66911ab5c0ea
              name: '{#DISK_LOCATION}: Physical disk media type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.4.1.17.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.physicaldisk.media_type[cucsStorageLocalDiskDeviceType.{#SNMPINDEX}]'
              delay: 1h
              value_type: CHAR
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:LocalDisk:deviceType managed object property. Actually returns 'HDD' or 'SSD'.
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsStorageTechnology'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
            - uuid: 317d489e9bf94467a228f5bbccb03436
              name: '{#DISK_LOCATION}: Physical disk model name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.4.1.7.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.physicaldisk.model[cucsStorageLocalDiskModel.{#SNMPINDEX}]'
              delay: 1h
              value_type: CHAR
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:LocalDisk:model managed object property.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
            - uuid: d768239496f2457fbec3a1103e84914d
              name: '{#DISK_LOCATION}: Physical disk serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.4.1.12.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.physicaldisk.serialnumber[cucsStorageLocalDiskSerial.{#SNMPINDEX}]'
              delay: 1h
              value_type: CHAR
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:LocalDisk:serial managed object property. Actually returns part number code.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 693cdcf58cb34def90ade23e2f2485cb
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.physicaldisk.serialnumber[cucsStorageLocalDiskSerial.{#SNMPINDEX}],#1)<>last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.physicaldisk.serialnumber[cucsStorageLocalDiskSerial.{#SNMPINDEX}],#2) and length(last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.physicaldisk.serialnumber[cucsStorageLocalDiskSerial.{#SNMPINDEX}]))>0'
                  name: 'Cisco UCS Manager: {#DISK_LOCATION}: Disk has been replaced'
                  event_name: 'Cisco UCS Manager: {#DISK_LOCATION}: Disk has been replaced (new serial number received)'
                  priority: INFO
                  description: 'Disk serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: c3c38ffc10fb4d139099c551b3c21728
              name: '{#DISK_LOCATION}: Disk size'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.4.1.13.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.physicaldisk.size[cucsStorageLocalDiskSize.{#SNMPINDEX}]'
              delay: 1h
              trends: '0'
              units: B
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:LocalDisk:size managed object property. In MB.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1048576'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
            - uuid: ad4616916d6644f480a2687dbc56a4a3
              name: '{#DISK_LOCATION}: Physical disk status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.4.1.18.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.physicaldisk.status[cucsStorageLocalDiskDiskState.{#SNMPINDEX}]'
              delay: 3m
              trends: '0'
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:LocalDisk:diskState managed object property.
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsStoragePDriveStatus'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: ba92b99606fa4bf0bc4f1b6a362c2cdb
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.physicaldisk.status[cucsStorageLocalDiskDiskState.{#SNMPINDEX}])={$DISK.STATUS.CRIT:"bad"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.physicaldisk.status[cucsStorageLocalDiskDiskState.{#SNMPINDEX}])={$DISK.STATUS.CRIT:"predictiveFailure"}'
                  name: 'Cisco UCS Manager: {#DISK_LOCATION}: Physical disk error'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check physical disk for warnings or errors'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#DISK_LOCATION}: Physical disk failed'
                      expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.physicaldisk.status[cucsStorageLocalDiskDiskState.{#SNMPINDEX}])={$DISK.STATUS.FAIL:"failed"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: eabf5aa62f004a2c996cc11bb5a6716a
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.physicaldisk.status[cucsStorageLocalDiskDiskState.{#SNMPINDEX}])={$DISK.STATUS.FAIL:"failed"}'
                  name: 'Cisco UCS Manager: {#DISK_LOCATION}: Physical disk failed'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'Please check physical disk for warnings or errors'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 8ac363db6f2346bba13b63f75cdabd22
          name: 'PSU discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#PSU_LOCATION},1.3.6.1.4.1.9.9.719.1.15.56.1.2]'
          key: cisco.ucs.psu.discovery
          delay: 1h
          item_prototypes:
            - uuid: 88a07d360c42431ba4ef31cbe825dc72
              name: '{#PSU_LOCATION}: Power supply status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.15.56.1.7.{#SNMPINDEX}]'
              key: 'cisco.ucs.sensor.psu.status[cucsEquipmentPsuOperState.{#SNMPINDEX}]'
              delay: 3m
              trends: '0'
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-EQUIPMENT-MIB
                Cisco UCS equipment:Psu:operState managed object property
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsEquipmentOperability'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: power
              trigger_prototypes:
                - uuid: 0d2713cf2b72472c8d8896880476c20e
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.psu.status[cucsEquipmentPsuOperState.{#SNMPINDEX}])={$PSU.STATUS.CRIT:"inoperable"}'
                  name: 'Cisco UCS Manager: {#PSU_LOCATION}: Power supply is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the power supply unit for errors'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 468f08407a7448a384e5dcde589cb9d0
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.psu.status[cucsEquipmentPsuOperState.{#SNMPINDEX}])={$PSU.STATUS.WARN:"degraded"}'
                  name: 'Cisco UCS Manager: {#PSU_LOCATION}: Power supply is in warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the power supply unit for errors'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#PSU_LOCATION}: Power supply is in critical state'
                      expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.psu.status[cucsEquipmentPsuOperState.{#SNMPINDEX}])={$PSU.STATUS.CRIT:"inoperable"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 90b24337c3304ff6a30428c7d46c26fd
          name: 'Temperature CPU discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SENSOR_LOCATION},1.3.6.1.4.1.9.9.719.1.41.2.1.2]'
          key: cisco.ucs.temp.cpu.discovery
          delay: 1h
          item_prototypes:
            - uuid: 7b822aeed3e24358aace9693e7f03385
              name: '{#SENSOR_LOCATION}: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.41.2.1.10.{#SNMPINDEX}]'
              key: 'cisco.ucs.sensor.temp.value[cucsProcessorEnvStatsTemperature.{#SNMPINDEX}]'
              delay: 3m
              value_type: FLOAT
              units: °C
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-PROCESSOR-MIB
                Cisco UCS processor:EnvStats:temperature managed object property
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: c3b3933ceb504207a87054a1f9773a76
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsProcessorEnvStatsTemperature.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"CPU"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsProcessorEnvStatsTemperature.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"CPU"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}: Temperature is above critical threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}: Temperature is above critical threshold: >{$TEMP.MAX.CRIT:"CPU"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 13b393265f59431687b776297cb0b104
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsProcessorEnvStatsTemperature.{#SNMPINDEX}],5m)>{$TEMP.MAX.WARN:"CPU"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsProcessorEnvStatsTemperature.{#SNMPINDEX}],5m)<{$TEMP.MAX.WARN:"CPU"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}: Temperature is above warning threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}: Temperature is above warning threshold: >{$TEMP.MAX.WARN:"CPU"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#SENSOR_LOCATION}: Temperature is above critical threshold'
                      expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsProcessorEnvStatsTemperature.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"CPU"}'
                      recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsProcessorEnvStatsTemperature.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"CPU"}-3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: b99a5c977c32418ea9efded6d507e3b5
          name: 'Temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#SENSOR_LOCATION},1.3.6.1.4.1.9.9.719.1.9.44.1.2]'
          key: cisco.ucs.temp.discovery
          delay: 1h
          item_prototypes:
            - uuid: d57481cb764a429f928aa6de6837c4ae
              name: '{#SENSOR_LOCATION}.IOH: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.9.44.1.13.{#SNMPINDEX}]'
              key: 'cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempSltatsIoh1Temp.{#SNMPINDEX}]'
              delay: 3m
              value_type: FLOAT
              units: °C
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-COMPUTE-MIB
                Cisco UCS compute:RackUnitMbTempStats:ioh1Temp managed object property
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: aa4bf1c8b942462dbd21ccf8bd8c4a6b
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempSltatsIoh1Temp.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempSltatsIoh1Temp.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"Ambient"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.IOH: Temperature is above critical threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.IOH: Temperature is above critical threshold: >{$TEMP.MAX.CRIT:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 7751dd6bf1394daa9d918005d2d99d10
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempSltatsIoh1Temp.{#SNMPINDEX}],5m)>{$TEMP.MAX.WARN:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempSltatsIoh1Temp.{#SNMPINDEX}],5m)<{$TEMP.MAX.WARN:"Ambient"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.IOH: Temperature is above warning threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.IOH: Temperature is above warning threshold: >{$TEMP.MAX.WARN:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.IOH: Temperature is above critical threshold'
                      expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempSltatsIoh1Temp.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"Ambient"}'
                      recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempSltatsIoh1Temp.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"Ambient"}-3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
            - uuid: d5e4b5b7e18c4545853c48db018dc127
              name: '{#SENSOR_LOCATION}.Ambient: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.9.44.1.4.{#SNMPINDEX}]'
              key: 'cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsAmbientTemp.{#SNMPINDEX}]'
              delay: 3m
              value_type: FLOAT
              units: °C
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-COMPUTE-MIB
                Temperature readings of testpoint: {#SENSOR_LOCATION}.Ambient
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 230958b560374a118857b77418c6ba11
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsAmbientTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsAmbientTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"Ambient"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Ambient: Temperature is above critical threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Ambient: Temperature is above critical threshold: >{$TEMP.MAX.CRIT:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 4cdcddd04b0e4625893a1e20ce22a10f
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsAmbientTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.WARN:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsAmbientTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.WARN:"Ambient"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Ambient: Temperature is above warning threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Ambient: Temperature is above warning threshold: >{$TEMP.MAX.WARN:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Ambient: Temperature is above critical threshold'
                      expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsAmbientTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"Ambient"}'
                      recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsAmbientTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"Ambient"}-3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
            - uuid: 9980042de8d74353bf4a386bb0f28d30
              name: '{#SENSOR_LOCATION}.Front: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.9.44.1.8.{#SNMPINDEX}]'
              key: 'cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsFrontTemp.{#SNMPINDEX}]'
              delay: 3m
              value_type: FLOAT
              units: °C
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-COMPUTE-MIB
                Cisco UCS compute:RackUnitMbTempStats:frontTemp managed object property
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 8ee1dfc360aa4aca84a03b452ead92ce
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsFrontTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsFrontTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"Ambient"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Front: Temperature is above critical threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Front: Temperature is above critical threshold: >{$TEMP.MAX.CRIT:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 196c9fe3facf4e3db348337714c77e17
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsFrontTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.WARN:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsFrontTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.WARN:"Ambient"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Front: Temperature is above warning threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Front: Temperature is above warning threshold: >{$TEMP.MAX.WARN:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Front: Temperature is above critical threshold'
                      expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsFrontTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"Ambient"}'
                      recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsFrontTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"Ambient"}-3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
            - uuid: e20bfa52f31f4a1a9f08ba02fe27f90c
              name: '{#SENSOR_LOCATION}.Rear: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.9.44.1.21.{#SNMPINDEX}]'
              key: 'cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsRearTemp.{#SNMPINDEX}]'
              delay: 3m
              value_type: FLOAT
              units: °C
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-COMPUTE-MIB
                Cisco UCS compute:RackUnitMbTempStats:rearTemp managed object property
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: a8714fcba51c46f9aa84fa02fba37743
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsRearTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsRearTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"Ambient"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Rear: Temperature is above critical threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Rear: Temperature is above critical threshold: >{$TEMP.MAX.CRIT:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 87068c693e574cd3952ca90e95a7a681
                  expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsRearTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.WARN:"Ambient"}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsRearTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.WARN:"Ambient"}-3'
                  name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Rear: Temperature is above warning threshold'
                  event_name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Rear: Temperature is above warning threshold: >{$TEMP.MAX.WARN:"Ambient"}'
                  opdata: 'Current value: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'This trigger uses temperature sensor values as well as temperature sensor status if available'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#SENSOR_LOCATION}.Rear: Temperature is above critical threshold'
                      expression: 'avg(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsRearTemp.{#SNMPINDEX}],5m)>{$TEMP.MAX.CRIT:"Ambient"}'
                      recovery_expression: 'max(/Cisco UCS Manager by SNMP/cisco.ucs.sensor.temp.value[cucsComputeRackUnitMbTempStatsRearTemp.{#SNMPINDEX}],5m)<{$TEMP.MAX.CRIT:"Ambient"}-3'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 9c5d5ce2f672487db83cf91f22c1a413
          name: 'Unit discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#UNIT_LOCATION},1.3.6.1.4.1.9.9.719.1.9.35.1.2]'
          key: cisco.ucs.unit.discovery
          delay: 1h
          item_prototypes:
            - uuid: 41ecc1caac444d2587d51e33057e6d39
              name: '{#UNIT_LOCATION}: Hardware model name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.9.35.1.32.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.model[cucsComputeRackUnitModel.{#SNMPINDEX}]'
              delay: 1h
              value_type: CHAR
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-COMPUTE-MIB
                Cisco UCS compute:RackUnit:model managed object property
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: system
            - uuid: ac3217187db3453eb8b9932fce7c79c4
              name: '{#UNIT_LOCATION}: Hardware serial number'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.9.35.1.47.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.serialnumber[cucsComputeRackUnitSerial.{#SNMPINDEX}]'
              delay: 1h
              value_type: CHAR
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-COMPUTE-MIB
                Cisco UCS compute:RackUnit:serial managed object property
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: system
              trigger_prototypes:
                - uuid: 27253665837647bb9c3be58f7d0881ae
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.serialnumber[cucsComputeRackUnitSerial.{#SNMPINDEX}],#1)<>last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.serialnumber[cucsComputeRackUnitSerial.{#SNMPINDEX}],#2) and length(last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.serialnumber[cucsComputeRackUnitSerial.{#SNMPINDEX}]))>0'
                  name: 'Cisco UCS Manager: {#UNIT_LOCATION}: Device has been replaced'
                  event_name: 'Cisco UCS Manager: {#UNIT_LOCATION}: 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: c6ebb7db809f4c62aae795a8b1c4b740
              name: '{#UNIT_LOCATION}: Overall system health status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.9.35.1.42.{#SNMPINDEX}]'
              key: 'cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}]'
              delay: 30s
              trends: '0'
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-COMPUTE-MIB
                Cisco UCS compute:RackUnit:operState managed object property
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsLsOperState'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: system
              trigger_prototypes:
                - uuid: 7f7c337f4f9f44a3a176acce5bf27f29
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.CRIT:"computeFailed"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.CRIT:"configFailure"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.CRIT:"unconfigFailure"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.CRIT:"inoperable"}'
                  name: 'Cisco UCS Manager: {#UNIT_LOCATION}: System status is in critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'Please check the device for errors'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
                - uuid: 15ee6a98f2af4da4bcaa95821ffff524
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.WARN:"testFailed"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.WARN:"thermalProblem"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.WARN:"powerProblem"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.WARN:"voltageProblem"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.WARN:"diagnosticsFailed"}'
                  name: 'Cisco UCS Manager: {#UNIT_LOCATION}: System status is in warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings'
                  dependencies:
                    - name: 'Cisco UCS Manager: {#UNIT_LOCATION}: System status is in critical state'
                      expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.CRIT:"computeFailed"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.CRIT:"configFailure"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.CRIT:"unconfigFailure"} or last(/Cisco UCS Manager by SNMP/cisco.ucs.status[cucsComputeRackUnitOperState.{#SNMPINDEX}])={$HEALTH.STATUS.CRIT:"inoperable"}'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
        - uuid: 6d0760c4d29d4113b179b0e5c18f7e3b
          name: 'Virtual disk discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#VDISK_LOCATION},1.3.6.1.4.1.9.9.719.1.45.8.1.2]'
          key: cisco.ucs.virtualDisk.discovery
          delay: 1h
          description: 'CISCO-UNIFIED-COMPUTING-STORAGE-MIB::cucsStorageLocalLunTable'
          item_prototypes:
            - uuid: c80f07f350bc472fb73282f5c80e16e3
              name: '{#VDISK_LOCATION}: Layout type'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.8.1.14.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.virtualdisk.layout[cucsStorageLocalLunType.{#SNMPINDEX}]'
              delay: 1h
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:LocalLun:type managed object property
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsStorageLunType'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
            - uuid: 59a403629e8b40d981c2926ead601966
              name: '{#VDISK_LOCATION}: Disk size'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.8.1.13.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.virtualdisk.size[cucsStorageLocalLunSize.{#SNMPINDEX}]'
              delay: 1h
              trends: '0'
              units: B
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:LocalLun:size managed object property in MB.
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsStorageLunType'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '1048576'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
            - uuid: 39504e417781414081e1198adef562d4
              name: '{#VDISK_LOCATION}: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.9.9.719.1.45.8.1.10.{#SNMPINDEX}]'
              key: 'cisco.ucs.hw.virtualdisk.status[cucsStorageLocalLunPresence.{#SNMPINDEX}]'
              delay: 3m
              description: |
                MIB: CISCO-UNIFIED-COMPUTING-STORAGE-MIB
                Cisco UCS storage:LocalLun:presence managed object property
              valuemap:
                name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsEquipmentPresence'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              tags:
                - tag: component
                  value: disk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 63232b4e1f6b411a93ff8abad1ff3200
                  expression: 'last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.virtualdisk.status[cucsStorageLocalLunPresence.{#SNMPINDEX}])<>{$VDISK.STATUS.OK:"equipped"}'
                  name: 'Cisco UCS Manager: {#VDISK_LOCATION}: Virtual disk is not in OK state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check virtual disk for warnings or errors'
                  tags:
                    - tag: scope
                      value: availability
                    - tag: scope
                      value: performance
      tags:
        - tag: class
          value: hardware
        - tag: subclass
          value: server
        - tag: target
          value: cisco
        - tag: target
          value: cisco-ucs-manager
      macros:
        - macro: '{$DISK.ARRAY.CACHE.BATTERY.STATUS.CRIT}'
          value: '2'
          description: 'The cache battery critical state for trigger expression.'
          config:
            type: TEXT
            priority: '8'
            section_name: Other
            label: 'Cache battery critical'
            description: 'The cache battery critical state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.ARRAY.CACHE.BATTERY.STATUS.OK}'
          value: '1'
          description: 'The cache battery normal state for trigger expression.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Cache battery normal'
            description: 'The cache battery normal state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.ARRAY.STATUS.CRIT:"inoperable"}'
          value: '2'
          description: 'The array controller critical state for trigger expression.'
          config:
            type: TEXT
            priority: '9'
            section_name: Other
            label: 'Controller critical'
            description: 'The array controller critical state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.ARRAY.STATUS.OK:"operable"}'
          value: '1'
          description: 'The array controller normal state for trigger expression.'
          config:
            type: TEXT
            priority: '11'
            section_name: Other
            label: 'Controller normal'
            description: 'The array controller normal state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.ARRAY.STATUS.WARN:"degraded"}'
          value: '3'
          description: 'The array controller warning state for trigger expression.'
          config:
            type: TEXT
            priority: '10'
            section_name: Other
            label: 'Controller warning'
            description: 'The array controller warning state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.STATUS.CRIT:"bad"}'
          value: '16'
          description: 'The disk critical state for trigger expression.'
          config:
            type: TEXT
            priority: '14'
            section_name: Other
            label: 'Disk critical (bad)'
            description: 'The disk critical state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.STATUS.CRIT:"predictiveFailure"}'
          value: '11'
          description: 'The disk critical state for trigger expression.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'Disk critical (predictiveFailure)'
            description: 'The disk critical state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DISK.STATUS.FAIL:"failed"}'
          value: '9'
          description: 'The disk fail state for trigger expression.'
          config:
            type: TEXT
            priority: '12'
            section_name: Other
            label: 'Disk fail'
            description: 'The disk fail state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$FAN.STATUS.CRIT:"inoperable"}'
          value: '2'
          description: 'The critical value of the FAN sensor for trigger expression.'
          config:
            type: TEXT
            priority: '3'
            section_name: Other
            label: 'FAN critical'
            description: 'The critical value of the FAN sensor for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$FAN.STATUS.WARN:"degraded"}'
          value: '3'
          description: 'The warning value of the FAN sensor for trigger expression.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'FAN warning'
            description: 'The warning value of the FAN sensor for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.CRIT:"computeFailed"}'
          value: '30'
          description: 'The unit health critical state for trigger expression.'
          config:
            type: TEXT
            priority: '16'
            section_name: Other
            label: 'Unit health critical (computeFailed)'
            description: 'The unit health critical state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.CRIT:"configFailure"}'
          value: '33'
          description: 'The unit health critical state for trigger expression.'
          config:
            type: TEXT
            priority: '17'
            section_name: Other
            label: 'Unit health critical (configFailure)'
            description: 'The unit health critical state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.CRIT:"inoperable"}'
          value: '60'
          description: 'The unit health critical state for trigger expression.'
          config:
            type: TEXT
            priority: '19'
            section_name: Other
            label: 'Unit health critical (inoperable)'
            description: 'The unit health critical state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.CRIT:"unconfigFailure"}'
          value: '34'
          description: 'The unit health critical state for trigger expression.'
          config:
            type: TEXT
            priority: '18'
            section_name: Other
            label: 'Unit health critical (unconfigFailure)'
            description: 'The unit health critical state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.WARN:"diagnosticsFailed"}'
          value: '204'
          description: 'The unit health warning state for trigger expression.'
          config:
            type: TEXT
            priority: '25'
            section_name: Other
            label: 'Health status warning unit'
            description: 'The unit health warning state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.WARN:"powerProblem"}'
          value: '62'
          description: 'The unit health warning state for trigger expression.'
          config:
            type: TEXT
            priority: '22'
            section_name: Other
            label: 'Unit health warning (powerProblem)'
            description: 'The unit health warning state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.WARN:"testFailed"}'
          value: '35'
          description: 'The unit health warning state for trigger expression.'
          config:
            type: TEXT
            priority: '20'
            section_name: Other
            label: 'Unit health warning (testFailed)'
            description: 'The unit health warning state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.WARN:"thermalProblem"}'
          value: '60'
          description: 'The unit health warning state for trigger expression.'
          config:
            type: TEXT
            priority: '21'
            section_name: Other
            label: 'Unit health warning (thermalProblem)'
            description: 'The unit health warning state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$HEALTH.STATUS.WARN:"voltageProblem"}'
          value: '62'
          description: 'The unit health warning state for trigger expression.'
          config:
            type: TEXT
            priority: '23'
            section_name: Other
            label: 'Unit health warning (voltageProblem)'
            description: 'The unit health warning state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IF.ERRORS.WARN}'
          value: '2'
          config:
            type: TEXT
            priority: '24'
            section_name: Thresholds
            label: 'Threshold of error packet rate'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$IFCONTROL}'
          value: '1'
          config:
            type: TEXT
            priority: '39'
            section_name: Other
            label: 'Interfaces control'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$NET.IFADMINSTATUS.MATCHES}'
          value: '^.*'
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '30'
            section_name: Filters
            label: 'Network interface admin status filter (include)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$NET.IFADMINSTATUS.NOT_MATCHES}'
          value: ^2$
          description: 'This macro is used in network interface discovery. Can be overridden on the host level. Ignore down(2) administrative status by default.'
          config:
            type: TEXT
            priority: '31'
            section_name: Filters
            label: 'Network interface admin status filter (exclude)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level. Ignore down(2) administrative status by default.'
        - macro: '{$NET.IFALIAS.MATCHES}'
          value: '.*'
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '34'
            section_name: Filters
            label: 'Network interface alias filter (include)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$NET.IFALIAS.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '35'
            section_name: Filters
            label: 'Network interface alias filter (exclude)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$NET.IFDESCR.MATCHES}'
          value: '.*'
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '32'
            section_name: Filters
            label: 'Network interface description filter (include)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$NET.IFDESCR.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '33'
            section_name: Filters
            label: 'Network interface description filter (exclude)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$NET.IFNAME.MATCHES}'
          value: '^.*$'
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '26'
            section_name: Filters
            label: 'Network interface name filter (include)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$NET.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}|sup-fc0)'
          description: 'This macro is used in network interface discovery. Can be overridden on the host level. Filter out loopbacks, sup-fc0, nulls, docker veth links and docker0 bridge by default.'
          config:
            type: TEXT
            priority: '27'
            section_name: Filters
            label: 'Network interface name filter (exclude)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level. Filter out loopbacks, sup-fc0, nulls, docker veth links and docker0 bridge by default.'
        - macro: '{$NET.IFOPERSTATUS.MATCHES}'
          value: '^.*$'
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '28'
            section_name: Filters
            label: 'Network interface operational status filter (include)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$NET.IFOPERSTATUS.NOT_MATCHES}'
          value: ^6$
          description: 'This macro is used in network interface discovery. Can be overridden on the host level. Ignore notPresent(6) by default.'
          config:
            type: TEXT
            priority: '29'
            section_name: Filters
            label: 'Network interface operational status filter (exclude)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level. Ignore notPresent(6) by default.'
        - macro: '{$NET.IFTYPE.MATCHES}'
          value: '.*'
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '36'
            section_name: Filters
            label: 'Network interface type filter (include)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$NET.IFTYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
          config:
            type: TEXT
            priority: '37'
            section_name: Filters
            label: 'Network interface type filter (exclude)'
            description: 'This macro is used in network interface discovery. Can be overridden on the host level.'
        - macro: '{$PSU.STATUS.CRIT:"inoperable"}'
          value: '2'
          description: 'The critical value of the PSU sensor for trigger expression.'
          config:
            type: TEXT
            priority: '1'
            section_name: Other
            label: 'PSU critical'
            description: 'The critical value of the PSU sensor for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PSU.STATUS.WARN:"degraded"}'
          value: '3'
          description: 'The warning value of the PSU sensor for trigger expression.'
          config:
            type: TEXT
            priority: '2'
            section_name: Other
            label: 'PSU warning'
            description: 'The warning value of the PSU sensor for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '38'
            section_name: Other
            label: 'Time interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
        - macro: '{$TEMP.MAX.CRIT:"Ambient"}'
          value: '35'
          description: 'The temperature maximum critical value for trigger expression.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'Temperature critical'
            description: 'The temperature maximum critical value for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$TEMP.MAX.WARN:"Ambient"}'
          value: '30'
          description: 'The temperature maximum warning value for trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Temperature warning'
            description: 'The temperature maximum warning value for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VDISK.STATUS.OK:"equipped"}'
          value: '10'
          description: 'The vdisk normal state for trigger expression.'
          config:
            type: TEXT
            priority: '15'
            section_name: Other
            label: 'VDisk normal'
            description: 'The vdisk normal state for trigger expression.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: b28e8cdadce64ba299c56054a18ea31d
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Cisco UCS Manager by SNMP'
                        name: 'Interface {#IFNAME}({#IFALIAS}): Network traffic'
                    - type: STRING
                      name: reference
                      value: AAAAA
      valuemaps:
        - uuid: 8648df22d8be42359900e11ea395a98c
          name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsEquipmentOperability'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: operable
            - value: '2'
              newvalue: inoperable
            - value: '3'
              newvalue: degraded
            - value: '4'
              newvalue: poweredOff
            - value: '5'
              newvalue: powerProblem
            - value: '6'
              newvalue: removed
            - value: '7'
              newvalue: voltageProblem
            - value: '8'
              newvalue: thermalProblem
            - value: '9'
              newvalue: performanceProblem
            - value: '10'
              newvalue: accessibilityProblem
            - value: '11'
              newvalue: identityUnestablishable
            - value: '12'
              newvalue: biosPostTimeout
            - value: '13'
              newvalue: disabled
            - value: '14'
              newvalue: malformedFru
            - value: '15'
              newvalue: backplanePortProblem
            - value: '16'
              newvalue: chassisIntrusion
            - value: '51'
              newvalue: fabricConnProblem
            - value: '52'
              newvalue: fabricUnsupportedConn
            - value: '81'
              newvalue: config
            - value: '82'
              newvalue: equipmentProblem
            - value: '83'
              newvalue: decommissioning
            - value: '84'
              newvalue: chassisLimitExceeded
            - value: '100'
              newvalue: notSupported
            - value: '101'
              newvalue: discovery
            - value: '102'
              newvalue: discoveryFailed
            - value: '103'
              newvalue: identify
            - value: '104'
              newvalue: postFailure
            - value: '105'
              newvalue: upgradeProblem
            - value: '106'
              newvalue: peerCommProblem
            - value: '107'
              newvalue: autoUpgrade
            - value: '108'
              newvalue: linkActivateBlocked
        - uuid: 17dde900e96a47929b0abed0d5006c84
          name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsEquipmentPresence'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: empty
            - value: '10'
              newvalue: equipped
            - value: '11'
              newvalue: missing
            - value: '12'
              newvalue: mismatch
            - value: '13'
              newvalue: equippedNotPrimary
            - value: '14'
              newvalue: equippedSlave
            - value: '15'
              newvalue: mismatchSlave
            - value: '16'
              newvalue: missingSlave
            - value: '20'
              newvalue: equippedIdentityUnestablishable
            - value: '21'
              newvalue: mismatchIdentityUnestablishable
            - value: '22'
              newvalue: equippedWithMalformedFru
            - value: '30'
              newvalue: inaccessible
            - value: '40'
              newvalue: unauthorized
            - value: '100'
              newvalue: notSupported
            - value: '101'
              newvalue: equippedUnsupported
            - value: '102'
              newvalue: equippedDiscNotStarted
            - value: '103'
              newvalue: equippedDiscInProgress
            - value: '104'
              newvalue: equippedDiscError
            - value: '105'
              newvalue: equippedDiscUnknown
        - uuid: c4a3603d4d8944ad8a8d2529bc3f1278
          name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsLsOperState'
          mappings:
            - value: '0'
              newvalue: indeterminate
            - value: '1'
              newvalue: unassociated
            - value: '10'
              newvalue: ok
            - value: '11'
              newvalue: discovery
            - value: '12'
              newvalue: config
            - value: '13'
              newvalue: unconfig
            - value: '14'
              newvalue: powerOff
            - value: '15'
              newvalue: restart
            - value: '20'
              newvalue: maintenance
            - value: '21'
              newvalue: test
            - value: '29'
              newvalue: computeMismatch
            - value: '30'
              newvalue: computeFailed
            - value: '31'
              newvalue: degraded
            - value: '32'
              newvalue: discoveryFailed
            - value: '33'
              newvalue: configFailure
            - value: '34'
              newvalue: unconfigFailed
            - value: '35'
              newvalue: testFailed
            - value: '36'
              newvalue: maintenanceFailed
            - value: '40'
              newvalue: removed
            - value: '41'
              newvalue: disabled
            - value: '50'
              newvalue: inaccessible
            - value: '60'
              newvalue: thermalProblem
            - value: '61'
              newvalue: powerProblem
            - value: '62'
              newvalue: voltageProblem
            - value: '63'
              newvalue: inoperable
            - value: '101'
              newvalue: decommissioning
            - value: '201'
              newvalue: biosRestore
            - value: '202'
              newvalue: cmosReset
            - value: '203'
              newvalue: diagnostics
            - value: '204'
              newvalue: diagnosticsFailed
            - value: '210'
              newvalue: pendingReboot
            - value: '211'
              newvalue: pendingReassociation
            - value: '212'
              newvalue: svnicNotPresent
        - uuid: 7d09a2b8df18410ca871ed9e7dbe6aa1
          name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsStorageLunType'
          mappings:
            - value: '0'
              newvalue: unspecified
            - value: '1'
              newvalue: simple
            - value: '2'
              newvalue: mirror
            - value: '3'
              newvalue: stripe
            - value: '4'
              newvalue: raid
            - value: '5'
              newvalue: stripeParity
            - value: '6'
              newvalue: stripeDualParity
            - value: '7'
              newvalue: mirrorStripe
            - value: '8'
              newvalue: stripeParityStripe
            - value: '9'
              newvalue: stripeDualParityStripe
        - uuid: 70a906bfe3b447a39e5a0f0ba5210ae2
          name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsStoragePDriveStatus'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: online
            - value: '2'
              newvalue: unconfiguredGood
            - value: '3'
              newvalue: globalHotSpare
            - value: '4'
              newvalue: dedicatedHotSpare
            - value: '5'
              newvalue: jbod
            - value: '6'
              newvalue: offline
            - value: '7'
              newvalue: rebuilding
            - value: '8'
              newvalue: copyback
            - value: '9'
              newvalue: failed
            - value: '10'
              newvalue: unconfiguredBad
            - value: '11'
              newvalue: predictiveFailure
            - value: '12'
              newvalue: disabledForRemoval
            - value: '13'
              newvalue: foreignConfiguration
            - value: '14'
              newvalue: zeroing
            - value: '15'
              newvalue: good
            - value: '16'
              newvalue: bad
            - value: '17'
              newvalue: lockedForeignConfiguration
        - uuid: e1407fbe331343d3bda7d7eb122c085a
          name: 'CISCO-UNIFIED-COMPUTING-TC-MIB::CucsStorageTechnology'
          mappings:
            - value: '0'
              newvalue: unspecified
            - value: '1'
              newvalue: hdd
            - value: '2'
              newvalue: ssd
            - value: '3'
              newvalue: nvme
        - uuid: 2b0fde08268f4ce7b47aae3827ebdf23
          name: 'IF-MIB::ifOperStatus'
          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: be402fda36e64dd2ad807925755735c4
          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: 9ea529bf28a84fae95f1506ca6ca37b8
          name: zabbix.host.available
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
    - uuid: 08ef3d687d754b0aba17e1dcbd77d4bd
      template: 'Cloudflare by HTTP'
      name: 'Cloudflare by HTTP'
      description: |
        The template to monitor Cloudflare to see your web traffic and DNS metrics.
        It works without any external scripts and uses Script item.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        1\. Create a host, for example mywebsite.com, for a site in your Cloudflare account.
        
        2\. Link the template to the host.
        
        3\. Customize the values of `Cloudflare API token`, `Cloudflare zone ID` host wizard configuration field.  
            Cloudflare API Tokens are available in your Cloudflare account under My Profile > API Tokens.  
            Zone ID is available in your Cloudflare account under Account Home > Site.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Applications
      items:
        - uuid: 2be79391779a4cd395723e62694262e8
          name: 'Total bandwidth'
          type: DEPENDENT
          key: cloudflare.bandwidth.all
          units: B
          description: 'The volume of all data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bandwidth.all
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: bandwidth
        - uuid: 7f5900d6c707405789624f84f502b042
          name: 'Cached bandwidth'
          type: DEPENDENT
          key: cloudflare.bandwidth.cached
          units: B
          description: 'The volume of cached data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bandwidth.cached
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: bandwidth
        - uuid: c5ab8cc281ff4f75bd4ada79d2c0d1e8
          name: 'Cache hit ratio of bandwidth'
          type: DEPENDENT
          key: cloudflare.bandwidth.cache_hit_ratio
          value_type: FLOAT
          units: '%'
          description: 'The ratio of the amount cached bandwidth to the bandwidth in percentage.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bandwidth.cache_hit_ratio
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: bandwidth
          triggers:
            - uuid: acf573785c394924aae8ef74b2683fd1
              expression: 'max(/Cloudflare by HTTP/cloudflare.bandwidth.cache_hit_ratio,#3) < {$CLOUDFLARE.CACHED_BANDWIDTH.MIN.WARN}'
              name: 'Cloudflare: Cached bandwidth is too low'
              event_name: 'Cloudflare: Cached bandwidth is too low (less than {$CLOUDFLARE.CACHED_BANDWIDTH.MIN.WARN}% for 3 last measurements)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 901db6b121c7473485c91b0f27e7cf50
          name: 'SSL encrypted bandwidth'
          type: DEPENDENT
          key: cloudflare.bandwidth.ssl.encrypted
          units: B
          description: 'The volume of encrypted data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bandwidth.encrypted
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: bandwidth
        - uuid: 4637d88e62204f9d8fb9fc0f179c5319
          name: 'Unencrypted bandwidth'
          type: DEPENDENT
          key: cloudflare.bandwidth.ssl.unencrypted
          units: B
          description: 'The volume of unencrypted data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bandwidth.unencrypted
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: bandwidth
        - uuid: 96e88a64df014997b8c675cbc4bb97a1
          name: 'Uncached bandwidth'
          type: DEPENDENT
          key: cloudflare.bandwidth.uncached
          units: B
          description: 'The volume of uncached data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.bandwidth.uncached
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: bandwidth
        - uuid: 6eff62f2786d42a7925bd516a1c2a958
          name: 'DNS queries'
          type: DEPENDENT
          key: cloudflare.dns.query.all
          units: conn
          description: 'The amount of all DNS queries.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.dns.query.all
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: dns
        - uuid: 4612a834ef054740ba5fea529a08e220
          name: 'Stale DNS queries'
          type: DEPENDENT
          key: cloudflare.dns.query.stale
          units: conn
          description: 'The number of stale DNS queries.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.dns.query.stale
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: dns
        - uuid: 4aeb289b631a402390a833e3c5227d38
          name: 'Uncached DNS queries'
          type: DEPENDENT
          key: cloudflare.dns.query.uncached
          units: conn
          description: 'The number of uncached DNS queries.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.dns.query.uncached
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: dns
        - uuid: 9450a68208fd4cb8bde009296d722064
          name: 'Get data'
          type: SCRIPT
          key: cloudflare.get
          delay: 0;m01
          history: '0'
          value_type: TEXT
          params: |
            var Cloudflare = {
            	params: {},
            
            	setParams: function (params) {
            		['api_endpoint', 'token', 'zone'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined'
            					|| params[field] === '') {
            				throw 'Required param is not set: "' + field + '".';
            			}
            		});
            
            		Cloudflare.params = params;
            		if (typeof Cloudflare.params.api_endpoint === 'string') {
            			if (!Cloudflare.params.api_endpoint.endsWith('/')) {
            				Cloudflare.params.api_endpoint += '/';
            			}
            		}
            	},
            
            	request: function (method, query, data) {
            		var response,
            			request = new HttpRequest(),
            			url = Cloudflare.params.api_endpoint + query;
            
            		request.addHeader('Content-Type: application/json');
            		request.addHeader('Authorization: Bearer ' + Cloudflare.params.token);
            
            		if (typeof data !== 'undefined') {
            			data = JSON.stringify(data);
            		}
            
            		Zabbix.log(4, '[ Cloudflare ] Sending request: ' + url + ((typeof data === 'string') ? ('\n' + data) : ''));
            
            		switch (method) {
            			case 'get':
            				response = request.get(url, data);
            				break;
            
            			case 'post':
            				response = request.post(url, data);
            				break;
            
            			default:
            				throw 'Unsupported HTTP request method: ' + method;
            		}
            
            		Zabbix.log(4, '[ Cloudflare ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() < 200 || request.getStatus() >= 300) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            
            		if (response !== null) {
            			try {
            				response = JSON.parse(response);
            			}
            			catch (error) {
            				throw 'Failed to parse response received from Cloudflare. Check debug log for more information.';
            			}
            		}
            
            		if (query === 'graphql/' && request.getStatus() == 200 && typeof response.errors !== 'undefined'
            				&& Array.isArray(response.errors)) {
            			throw 'Request failed with error "' + (getField(response, 'errors.0.message') || 'unknown') + '"';
            		}
            
            		return {
            			status: request.getStatus(),
            			response: response
            		};
            	}
            }
            
            function getField(object, field, def) {
            	var names = field.split('.');
            	var name = names.shift();
            
            	while (typeof name !== 'undefined') {
            		if (typeof object === undefined || typeof object[name] === 'undefined') {
            			return def;
            		}
            
            		object = object[name];
            		name = names.shift();
            	}
            
            	return object;
            }
            
            try {
            	Cloudflare.setParams(JSON.parse(value));
            
            	var datetime_end = new Date(),
            		datetime_start = new Date();
            
            	datetime_start.setTime(datetime_end.getTime() - 3600000);
            	datetime_start.setMinutes(0, 0, 0);
            	datetime_end.setTime(datetime_start.getTime());
            	datetime_end.setMinutes(59, 59, 0);
            
            	var datetime_start_str = datetime_start.toISOString(),
            		datetime_end_str = datetime_end.toISOString();
            
            	var data = {
            		"query": "{viewer {zones(filter: {zoneTag: \"" + Cloudflare.params.zone + "\"}) {\
            		httpRequests1hGroups(limit: 100 filter: {\
            			datetime_geq: \"" + datetime_start_str + "\",  datetime_leq: \"" + datetime_end_str + "\"\
            			}) {\
            				sum{\
            					requests \
            					cachedRequests \
            					encryptedRequests \
            					responseStatusMap{ requests edgeResponseStatus } \
            					bytes \
            					cachedBytes \
            					encryptedBytes \
            					threats \
            					pageViews \
            				}\
            				uniq{uniques}\
            				}\
            			}}}", "variables": {}
            	}
            	var result = Cloudflare.request('post', 'graphql/', data),
            		cloudflare = {},
            		res = getField(result.response, 'data.viewer.zones.0.httpRequests1hGroups.0.sum');
            
            	if (typeof res === 'object') {
            		cloudflare = {
            			requests: {
            				all: res.requests || 0,
            				cached: res.cachedRequests || 0,
            				encrypted: res.encryptedRequests || 0,
            				cache_hit_ratio: 0,
            				success_ratio: 0,
            				others_ratio: 0,
            				response_100: 0,
            				response_200: 0,
            				response_300: 0,
            				response_400: 0,
            				response_500: 0
            			},
            			bandwidth: {
            				all: res.bytes || 0,
            				cached: res.cachedBytes || 0,
            				cache_hit_ratio: 0,
            				encrypted: res.encryptedBytes || 0,
            			},
            			threats: {
            				all: res.threats || 0
            			},
            			pageviews: {
            				all: res.pageViews || 0
            			}
            		}
            
            		cloudflare.requests.uncached = res.requests - res.cachedRequests;
            		cloudflare.requests.unencrypted = cloudflare.requests.all - cloudflare.requests.encrypted;
            		cloudflare.bandwidth.uncached = cloudflare.bandwidth.all - cloudflare.bandwidth.cached;
            		cloudflare.bandwidth.unencrypted = cloudflare.bandwidth.all - cloudflare.bandwidth.encrypted;
            
            		if (Array.isArray(res.responseStatusMap)) {
            			res.responseStatusMap.forEach(function (element) {
            				var group = Math.floor((element.edgeResponseStatus / 100)) * 100;
            				cloudflare.requests['response_' + group] += element.requests;
            			});
            		}
            
            		if (cloudflare.requests.all > 0) {
            			cloudflare.requests.success_ratio = (cloudflare.requests.response_200
            				/ cloudflare.requests.all * 100).toFixed(2);
            			cloudflare.requests.others_ratio = ((cloudflare.requests.all - cloudflare.requests.response_200)
            				/ cloudflare.requests.all * 100).toFixed(2);
            			cloudflare.requests.cache_hit_ratio = (cloudflare.requests.cached
            				/ cloudflare.requests.all * 100).toFixed(2);
            		}
            
            		if (cloudflare.bandwidth.all > 0) {
            			cloudflare.bandwidth.cache_hit_ratio = (cloudflare.bandwidth.cached / cloudflare.bandwidth.all * 100).toFixed(2);
            		}
            
            		res = getField(result.response, 'data.viewer.zones.0.httpRequests1hGroups.0.uniq');
            
            		if (typeof res === 'object') {
            			cloudflare.uniques = {
            				all: res.uniques || 0
            			}
            		}
            
            		result = Cloudflare.request('get', 'zones/' + encodeURIComponent(Cloudflare.params.zone)
            			+ '/dns_analytics/report?dimensions=queryName&metrics=queryCount,uncachedCount,staleCount&since='
            			+ encodeURIComponent(datetime_start_str) + '&until=' + encodeURIComponent(datetime_end_str));
            
            		res = getField(result.response, 'result.totals');
            
            		if (typeof result.response.result === 'object') {
            			cloudflare.dns = {
            				query: {
            					all: res.queryCount || 0,
            					uncached: res.uncachedCount || 0,
            					stale: res.staleCount || 0
            				}
            			}
            		}
            	}
            
            	return JSON.stringify(cloudflare);
            }
            catch (error) {
            	error += (String(error).endsWith('.')) ? '' : '.';
            	Zabbix.log(3, '[ Cloudflare ] ERROR: ' + error);
            	throw 'Requesting failed: ' + error;
            }
          description: 'The JSON with result of Cloudflare API request.'
          parameters:
            - name: api_endpoint
              value: '{$CLOUDFLARE.API.URL}'
            - name: token
              value: '{$CLOUDFLARE.API.TOKEN}'
            - name: zone
              value: '{$CLOUDFLARE.ZONE_ID}'
          tags:
            - tag: component
              value: raw
        - uuid: 71efacd9f1dc46a7aa29876c8bf7906c
          name: 'Total page views'
          type: DEPENDENT
          key: cloudflare.pageviews.all
          units: pg
          description: 'The amount of all pageviews.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pageviews.all
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: pageviews
        - uuid: d4a7431b1f6a4d3ab11551a36c98fbf7
          name: 'Total requests'
          type: DEPENDENT
          key: cloudflare.requests.all
          units: req
          description: 'The amount of all requests.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.all
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: cc9d651cdec94afeb12ead87b3c3e8f3
          name: 'Cached requests'
          type: DEPENDENT
          key: cloudflare.requests.cached
          units: req
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.cached
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: e1c2a1280d25439f8020b3ebc451d892
          name: 'Cache hit ratio % over time'
          type: DEPENDENT
          key: cloudflare.requests.cache_hit_ratio
          value_type: FLOAT
          units: '%'
          description: 'The ratio of the amount cached requests to all requests in percentage.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.cache_hit_ratio
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: 228912bdae724d70b1abe79510b69082
          name: 'Non-2xx responses ratio'
          type: DEPENDENT
          key: cloudflare.requests.others_ratio
          value_type: FLOAT
          units: '%'
          description: 'The ratio of the amount requests with non-2xx response codes to all requests in percentage.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.others_ratio
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
          triggers:
            - uuid: e76f4a61dd094419b6e0af706758e545
              expression: 'min(/Cloudflare by HTTP/cloudflare.requests.others_ratio,#3) > {$CLOUDFLARE.ERRORS.MAX.WARN}'
              name: 'Cloudflare: Ratio of non-2xx responses is too high'
              event_name: 'Cloudflare: Ratio of non-2xx responses is too high (more than {$CLOUDFLARE.ERRORS.MAX.WARN}% for 3 last measurements)'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'A large number of errors can indicate a malfunction of the site.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 0f427419265a4ef09f052a03c539125d
          name: 'Response codes 1xx'
          type: DEPENDENT
          key: cloudflare.requests.response_100
          units: req
          description: 'The number requests with 1xx response codes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.response_100
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: 3ade3e726d314382a3e841b3d5cb5834
          name: 'Response codes 2xx'
          type: DEPENDENT
          key: cloudflare.requests.response_200
          units: req
          description: 'The number requests with 2xx response codes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.response_200
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: 2caff86e7ca5400889f3b2bd4b6ba986
          name: 'Response codes 3xx'
          type: DEPENDENT
          key: cloudflare.requests.response_300
          units: req
          description: 'The number requests with 3xx response codes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.response_300
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: b3510ec2adc74e10824365012c13250f
          name: 'Response codes 4xx'
          type: DEPENDENT
          key: cloudflare.requests.response_400
          units: req
          description: 'The number requests with 4xx response codes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.response_400
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: 714ef2cbecbe4a93b20988a0bc6863a7
          name: 'Response codes 5xx'
          type: DEPENDENT
          key: cloudflare.requests.response_500
          units: req
          description: 'The number requests with 5xx response codes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.response_500
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: d39fcd4fdc594257bea91de0890d326b
          name: 'SSL encrypted requests'
          type: DEPENDENT
          key: cloudflare.requests.ssl.encrypted
          units: req
          description: 'The number of encrypted requests.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.encrypted
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: acbbc431dfc3431583123380edb6da38
          name: 'Unencrypted requests'
          type: DEPENDENT
          key: cloudflare.requests.ssl.unencrypted
          units: req
          description: 'The number of unencrypted requests.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.unencrypted
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: 6100ff50001543ae83e84ab2c47260f3
          name: '2xx responses ratio'
          type: DEPENDENT
          key: cloudflare.requests.success_ratio
          value_type: FLOAT
          units: '%'
          description: 'The ratio of the amount requests with 2xx response codes to all requests in percentage.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.success_ratio
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: 7907f68e795b40fca1bd520556ea1fff
          name: 'Uncached requests'
          type: DEPENDENT
          key: cloudflare.requests.uncached
          units: req
          description: 'The number of uncached requests.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.requests.uncached
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: requests
        - uuid: 328051a78529494e943edda567aa0e24
          name: 'Total threats'
          type: DEPENDENT
          key: cloudflare.threats.all
          description: 'The number of all threats.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.threats.all
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: threats
        - uuid: d1a2ec213b084701805f3f974af25a21
          name: 'Unique visitors'
          type: DEPENDENT
          key: cloudflare.uniques.all
          units: conn
          description: 'The number of all visitors IPs.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.uniques.all
          master_item:
            key: cloudflare.get
          tags:
            - tag: component
              value: uniques
      tags:
        - tag: class
          value: network
        - tag: class
          value: software
        - tag: subclass
          value: security
        - tag: target
          value: cloudflare
      macros:
        - macro: '{$CLOUDFLARE.API.TOKEN}'
          type: SECRET_TEXT
          description: 'Your Cloudflare API Token.'
          config:
            type: TEXT
            priority: '2'
            label: 'Cloudflare API token'
            description: 'Your Cloudflare API Token.'
            required: 'YES'
        - macro: '{$CLOUDFLARE.API.URL}'
          value: 'https://api.cloudflare.com/client/v4'
          description: 'The URL of Cloudflare API endpoint.'
          config:
            type: TEXT
            priority: '1'
            label: 'Cloudflare API URL'
            description: 'The URL of Cloudflare API endpoint.'
            required: 'YES'
        - macro: '{$CLOUDFLARE.CACHED_BANDWIDTH.MIN.WARN}'
          value: '50'
          description: 'Minimum of cached bandwidth in %.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Min cached bandwidth (%)'
            description: 'Minimum of cached bandwidth in %.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$CLOUDFLARE.ERRORS.MAX.WARN}'
          value: '30'
          description: 'Maximum responses with errors in %.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Max error responses (%)'
            description: 'Maximum responses with errors in %.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$CLOUDFLARE.ZONE_ID}'
          type: SECRET_TEXT
          description: 'Your Cloudflare Site Zone ID.'
          config:
            type: TEXT
            priority: '3'
            label: 'Cloudflare zone ID'
            description: 'Your Cloudflare Site Zone ID.'
            required: 'YES'
      dashboards:
        - uuid: 51f1013e8a3d492faed27fe80b68fc53
          name: Overview
          pages:
            - widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Cloudflare by HTTP'
                        name: 'Cloudflare: Bandwidth'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Cloudflare by HTTP'
                        name: 'Cloudflare: DNS requests'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Cloudflare by HTTP'
                        name: 'Cloudflare: HTTP responses ratio over time'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  'y': '15'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Cloudflare by HTTP'
                        name: 'Cloudflare: HTTP response codes over time'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Cloudflare by HTTP'
                        name: 'Cloudflare: Web requests'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Cloudflare by HTTP'
                        name: 'Cloudflare: Caching'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Cloudflare by HTTP'
                        name: 'Cloudflare: IPs and threats'
                    - type: STRING
                      name: reference
                      value: AAAAF
    - uuid: 185867ae9b4a46b59d53931d3330c770
      template: 'DELL PowerEdge R660 by HTTP'
      name: 'DELL PowerEdge R660 by HTTP'
      description: |
        Template for DELL PowerEdge R660 servers with iDRAC 8/9 firmware 4.32 and later and Redfish API enabled.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/426752-discussion-thread-for-official-zabbix-dell-templates
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This is a template for monitoring DELL PowerEdge R660 servers with iDRAC 8/9 firmware 4.32 (and later) with Redfish API enabled via Zabbix script items. This template works without any external scripts.
        
        ## Setup
        
        1\. Enable Redfish API in the Dell iDRAC interface of your server.
        
        2\. Create a user for monitoring with read-only permissions in the Dell iDRAC interface.
        
        3\. Create a host for Dell server with iDRAC IP as the Zabbix agent interface.
        
        4\. Link the template to the host.
        
        5\. Customize the values of the `{$DELL.HTTP.API.URL}`, `{$DELL.HTTP.API.USER}`, and `{$DELL.HTTP.API.PASSWORD}` macros.
        
        > NOTE! If you are experiencing timeouts on some of the items that are executing requests, adjust the `{$DELL.HTTP.REQUEST.TIMEOUT}` macro accordingly.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Server hardware'
      items:
        - uuid: 0aa82279099d4599acd24f1cf4eccc40
          name: 'Get array controller resources'
          type: SCRIPT
          key: dell.server.array.resources.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Controller', 'Discovery', params);
            
            const controllers = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage?$expand=.($levels=1)'), 'Members');
            
            var arrControllerKeys = [
            	{
            		'name': 'id',
            		'path': 'Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	},
            	{
            		'name': 'health',
            		'path': 'Status.Health'
            	},
            	{
            		'name': 'slot',
            		'path': 'Oem.Dell.DellController.PCISlot'
            	}
            ];
            
            var battControllerKeys = [
            	{
            		'name': 'id',
            		'path': 'Oem.Dell.DellControllerBattery.Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Oem.Dell.DellControllerBattery.Name'
            	},
            	{
            		'name': 'status',
            		'path': 'Oem.Dell.DellControllerBattery.PrimaryStatus'
            	}
            ];
            
            if (!Array.isArray(controllers)) {
            	throw 'Unexpected type for controllers.';
            }
            
            var buffer = { 'arrayControllers': [], 'batteryControllers': [] };
            
            controllers.forEach(function (controller) {
            	if (controller['Id'].search('RAID') > -1) {
            		buffer['arrayControllers'].push(dell.extractData(controller, arrControllerKeys, true));
            		buffer['batteryControllers'].push(dell.extractData(controller, battControllerKeys, true));
            	}
            });
            
            return JSON.stringify(buffer);
          description: 'Returns array controller resources.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 7aa73c13af5a43b6b956362d7e9f2742
          name: 'Get disks'
          type: SCRIPT
          key: dell.server.disks.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Disk', 'Discovery', params);
            
            const disks = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage'), 'Members');
            
            var keys = [
            	{
            		'name': 'path',
            		'path': '@odata.id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	}
            ];
            
            if (!Array.isArray(disks)) {
            	throw 'Unexpected type for disks.';
            }
            
            var buffer = { 'physicalDisks': [], 'virtualDisks': [] };
            
            disks.forEach(function (disk) {
            	var requests = [{ 'usage': 'physicalDisks', 'path': '', 'target': 'Drives' }, { 'usage': 'virtualDisks', 'path': '/Volumes', 'target': 'Members' }];
            
            	requests.forEach(function (request) {
            		const disks = dell.extractData(dell.executeRequest(disk['@odata.id'] + request['path']), request['target']);
            
            		if (!Array.isArray(disks) || disks.length <= 0) {
            			return;
            		}
            
            		disks.forEach(function (drive) {
            			buffer[request['usage']].push(dell.extractData(dell.executeRequest(drive['@odata.id']), keys));
            		});
            	});
            });
            
            return JSON.stringify(buffer);
          description: 'Returns storage resources.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 103aad19a3374c3ca5817a6f9e3b5401
          name: 'Firmware version'
          type: DEPENDENT
          key: dell.server.hw.firmware
          value_type: CHAR
          description: 'This attribute defines the firmware version of a remote access card.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.firmware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: e6688a178fab46d59cc685a223767a12
              expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.firmware,#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.hw.firmware,#2) and length(last(/DELL PowerEdge R660 by HTTP/dell.server.hw.firmware))>0'
              name: 'Dell R660: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'The firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 1c77ed3fe70441228cd99475c70bf61e
          name: 'Hardware model name'
          type: DEPENDENT
          key: dell.server.hw.model
          value_type: CHAR
          description: 'This attribute defines the model name of the system.'
          inventory_link: MODEL
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.model
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
        - uuid: c87090e7bc7443e7ac8ec75e5ae8a549
          name: 'Hardware serial number'
          type: DEPENDENT
          key: dell.server.hw.serialnumber
          value_type: CHAR
          description: 'This attribute defines the service tag of the system.'
          inventory_link: SERIALNO_A
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.serialnumber
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 62ece039dea440c7999f0b93bc32c40a
              expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.serialnumber,#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.hw.serialnumber,#2) and length(last(/DELL PowerEdge R660 by HTTP/dell.server.hw.serialnumber))>0'
              name: 'Dell R660: Device has been replaced'
              event_name: 'Dell R660: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'The device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 02e6c6db566f42aaab92e0fbc634e37c
          name: 'Get network interfaces'
          type: SCRIPT
          key: dell.server.net.iface.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Network Interface', 'Discovery', params);
            
            const netAdapters = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters'), 'Members');
            
            var keys = [
            	{
            		'name': 'path',
            		'path': '@odata.id'
            	},
            	{
            		'name': 'id',
            		'path': 'Id'
            	}
            ];
            
            if (!Array.isArray(netAdapters)) {
            	throw 'Unexpected type for network adapters.';
            }
            
            var buffer = [];
            
            netAdapters.forEach(function (netAdapter) {
            	const netPorts = dell.extractData(dell.executeRequest(netAdapter["@odata.id"] + '/NetworkPorts'), 'Members');
            
            	if (!Array.isArray(netPorts)) {
            		return;
            	}
            
            	netPorts.forEach(function (netPort) {
            		buffer.push(dell.extractData(dell.executeRequest(netPort["@odata.id"]), keys));
            	})
            });
            
            return JSON.stringify(buffer);
          description: 'Returns network interfaces.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 228fc2bc5dc94052bb1eba79756e040f
          name: 'Get sensors'
          type: SCRIPT
          key: dell.server.sensors.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            function formatPSU(psuObj) {
            	var foundPowerSupplies = [],
            		buffer = [];
            
            	psuObj.forEach(function (obj) {
            		const psuName = obj['name'].split(' ')[0];
            
            		if (foundPowerSupplies.indexOf(psuName) === -1) {
            			foundPowerSupplies.push(psuName);
            			buffer.push({
            				'name': psuName,
            				[obj['type'].toLowerCase()]: {'reading': obj['reading'], 'health': obj['health']}
            			});
            		} else {
            			buffer.forEach(function (bufferObj) {
            
            				if (bufferObj['name'] === psuName) {
            					bufferObj[obj['type'].toLowerCase()] = {'reading': obj['reading'], 'health': obj['health']};
            
            					return;
            				}
            			});
            		}
            	})
            	return buffer;
            };
            
            function formatTemp(tempObj) {
            	tempObj.forEach(function (obj) {
            		obj.name = obj.name.split(' ').slice(0, -1).join(' ');
            	});
            
            	return tempObj;
            }
            
            function formatSysBoard(sysObj) {
            	const remove = ['System', 'Board', 'Usage'];
            
            	sysObj.forEach(function (obj) {
            		var buffer = [];
            
            		obj['name'].split(' ').forEach(function (word) {
            			var match = false;
            
            			remove.forEach(function (removeWord) {
            				if (removeWord === word) {
            					match = true;
            				}
            			});
            
            			if (!match) {
            				buffer.push(word);
            			}
            		});
            
            		if (buffer.length > 0) {
            			obj['name'] = buffer.join(' ');
            		}
            	});
            
            	return sysObj;
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Sensor', 'Discovery', params);
            
            const sensors = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/Sensors?$expand=.($levels=1)'), 'Members');
            
            if (!Array.isArray(sensors)) {
            	throw 'Unexpected type for sensors.';
            }
            
            const keys = [
            	{
            		'name': 'id',
            		'path': 'Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	},
            	{
            		'name': 'context',
            		'path': 'PhysicalContext'
            	},
            	{
            		'name': 'reading',
            		'path': 'Reading'
            	},
            	{
            		'name': 'type',
            		'path': 'ReadingType'
            	},
            	{
            		'name': 'health',
            		'path': 'Status.Health'
            	}
            ];
            
            var buffer = { 'fan': [], 'psu': [], 'temperature': [], 'sysBoard': [] };
            
            sensors.forEach(function (sensor) {
            	if (sensor['Name'].substring(0, 2) === 'PS' && sensor['PhysicalContext'] === 'PowerSupply') {
            		buffer['psu'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['ReadingType'] === 'Temperature') {
            		buffer['temperature'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['Name'].includes('Fan') && sensor['ReadingType'] === 'Rotational') {
            		buffer['fan'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['Name'].includes('System Board') && sensor['ReadingType'] === 'Percent') {
            		buffer['sysBoard'].push(dell.extractData(sensor, keys, true));
            	}
            });
            
            buffer['psu'] = formatPSU(buffer['psu']);
            buffer['temperature'] = formatTemp(buffer['temperature']);
            buffer['sysBoard'] = formatSysBoard(buffer['sysBoard']);
            
            return JSON.stringify(buffer);
          description: 'Returns sensors.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: fe81d663497d402c81b1e26fe4ea507e
          name: 'Overall system health status'
          type: DEPENDENT
          key: dell.server.status
          trends: '0'
          description: 'This attribute defines the overall rollup status of all the components in the system monitored by the remote access card. Includes system, storage, IO devices, iDRAC, CPU, memory, etc.'
          valuemap:
            name: 'Redfish status health'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.status
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = {
                  	'OK': 1,
                  	'Warning': 2,
                  	'Critical': 3,
                  };
                  
                  return typeof idx[value] === 'undefined' ? 0 : idx[value];
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: 2ccd53402fea446283e24ebfe5b32bdd
              expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.status,)=3'
              name: 'Dell R660: Server is in a critical state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Please check the device for faults.'
              tags:
                - tag: scope
                  value: availability
            - uuid: d9c93ee01d284b319cdc1acc6919b834
              expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.status,)=2'
              name: 'Dell R660: Server is in a warning state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Please check the device for warnings.'
              dependencies:
                - name: 'Dell R660: Server is in a critical state'
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.status,)=3'
              tags:
                - tag: scope
                  value: availability
        - uuid: c264044dde3241089e003ea431cf98f2
          name: 'Get system'
          type: SCRIPT
          key: dell.server.system.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('System', 'Get system metrics', params);
            
            const requests = [
            	{
            		'path': '/redfish/v1/Systems/System.Embedded.1',
            		'keys': [
            			{
            				'name': 'model',
            				'path': 'Model'
            			},
            			{
            				'name': 'serialnumber',
            				'path': 'Oem.Dell.DellSystem.ChassisServiceTag'
            			},
            			{
            				'name': 'status',
            				'path': 'Status.Health'
            			}
            		]
            	},
            	{
            		'path': '/redfish/v1/Managers/iDRAC.Embedded.1',
            		'keys': {
            			'name': 'firmware',
            			'path': 'FirmwareVersion'
            		}
            	}
            ];
            
            var buffer = {};
            
            for (var i = 0, requestsCount = requests.length; i < requestsCount; i++) {
            	Object.assign(buffer, dell.extractData(dell.executeRequest(requests[i].path), requests[i].keys));
            }
            
            return JSON.stringify(buffer);
          description: 'Returns system metrics.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 0e1f349ff3804a99a1f274134d9a7fb8
          name: 'CPU utilization, in %'
          type: DEPENDENT
          key: dell.server.util.cpu
          value_type: FLOAT
          units: '%'
          description: 'CPU utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardCPUUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: d342f09969114891ae47b50e6e03aa80
              expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.WARN}'
              name: 'Dell R660: CPU utilization is high'
              event_name: 'Dell R660: Current CPU utilization is high (util >= {$DELL.HTTP.CPU.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R660: CPU utilization is too high'
                  expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 7e5960ded30e450a89a153ef1612b03e
              expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
              name: 'Dell R660: CPU utilization is too high'
              event_name: 'Dell R660: Current CPU utilization is too high (util >= {$DELL.HTTP.CPU.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 8ba22cb80bd94ee4a92364b7efa1aaea
          name: 'IO utilization, in %'
          type: DEPENDENT
          key: dell.server.util.io
          value_type: FLOAT
          units: '%'
          description: 'IO utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardIOUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: io
          triggers:
            - uuid: 1fe2219883964e9d9db2fbc83a62f854
              expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.WARN}'
              name: 'Dell R660: IO utilization is high'
              event_name: 'Dell R660: Current IO utilization is high (util >= {$DELL.HTTP.IO.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R660: IO utilization is too high'
                  expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: eab83e0592ec4de7b219ae8a7e9eb54c
              expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              name: 'Dell R660: IO utilization is too high'
              event_name: 'Dell R660: Current IO utilization is too high (util >= {$DELL.HTTP.IO.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 61370ae82d474daa961494bb3c7dc0f2
          name: 'Memory utilization, in %'
          type: DEPENDENT
          key: dell.server.util.mem
          value_type: FLOAT
          units: '%'
          description: 'Memory utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardMEMUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 9f3501907030474580f28cbd602eb951
              expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.WARN}'
              name: 'Dell R660: Memory utilization is high'
              event_name: 'Dell R660: Current memory utilization is high (util >= {$DELL.HTTP.MEM.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R660: Memory utilization is too high'
                  expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 886fcdda4b7847fb9364d6c2f807641e
              expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
              name: 'Dell R660: Memory utilization is too high'
              event_name: 'Dell R660: Current memory utilization is too high (util >= {$DELL.HTTP.MEM.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: ae4ad90d5a8e437d940888d64554805f
          name: 'SYS utilization, in %'
          type: DEPENDENT
          key: dell.server.util.sys
          value_type: FLOAT
          units: '%'
          description: 'SYS utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardSYSUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: sys
          triggers:
            - uuid: b9d668629940497dbf06e212f297dc2a
              expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.WARN}'
              name: 'Dell R660: SYS utilization is high'
              event_name: 'Dell R660: Current SYS utilization is high (util >= {$DELL.HTTP.SYS.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R660: IO utilization is too high'
                  expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: be2e13c07a894816b6566101e31d017b
              expression: 'min(/DELL PowerEdge R660 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.HIGH}'
              name: 'Dell R660: SYS utilization is too high'
              event_name: 'Dell R660: Current SYS utilization is too high (util >= {$DELL.HTTP.SYS.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 9ba8445ce392429a81191dbaffbaa919
          name: 'Redfish API status'
          type: SIMPLE
          key: 'net.tcp.service[https]'
          description: |
            Availability of Redfish API on the server.
            Possible values:
              0 - Unavailable
              1 - Available
          valuemap:
            name: 'Redfish API availability'
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: 28d07a7c2c914523b40d46bc8a19764a
              expression: 'last(/DELL PowerEdge R660 by HTTP/net.tcp.service[https])=0'
              name: 'Dell R660: Redfish API service is unavailable'
              priority: HIGH
              description: 'The service is unavailable or does not accept TCP connections.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 92a3b71de182481ba3add9cc77badf67
          name: 'Array controller discovery'
          type: DEPENDENT
          key: dell.server.array.discovery
          description: 'Discovery of disk array controllers.'
          item_prototypes:
            - uuid: 444a2f831e374f809f012d19e9ffb8fa
              name: 'Controller [{#CNTLR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.array.status[{#ID}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.arrayControllers[?(@.id == "{#ID}")].health.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: dell.server.array.resources.get
              tags:
                - tag: component
                  value: diskarray
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 61c75f4620e04c268abfa84f8dd0de95
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.array.status[{#ID}],)=3'
                  name: 'Dell R660: Controller [{#CNTLR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 5b2ce324b7ed499eb7b0ccaba5132cfa
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.array.status[{#ID}],)=2'
                  name: 'Dell R660: Controller [{#CNTLR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Controller [{#CNTLR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.array.status[{#ID}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: dell.server.array.resources.get
          lld_macro_paths:
            - lld_macro: '{#CNTLR_NAME}'
              path: $.name
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SLOT}'
              path: $.slot
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.arrayControllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 038a5de592cd489d9e71de906ddb8d10
          name: 'Battery discovery'
          type: DEPENDENT
          key: dell.server.controller.battery.discovery
          description: 'Discovery of battery controllers.'
          item_prototypes:
            - uuid: cd2bad7a386a4a2dbcbc5ce1921aaa09
              name: 'Battery [{#BATTERY_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.controller.battery.status[{#ID}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.batteryControllers[?(@.id == "{#ID}")].status.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: dell.server.array.resources.get
              tags:
                - tag: component
                  value: battery
                - tag: component
                  value: diskarray
              trigger_prototypes:
                - uuid: 24fe81eeb566444a9d97bd69b86a8929
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
                  name: 'Dell R660: Battery [{#BATTERY_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 5ca151f6f35b4dc6994f48ea3828f720
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.controller.battery.status[{#ID}],)=2'
                  name: 'Dell R660: Battery [{#BATTERY_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Battery [{#BATTERY_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: dell.server.array.resources.get
          lld_macro_paths:
            - lld_macro: '{#BATTERY_NAME}'
              path: $.name
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.batteryControllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: e08b684570894b20b5f2b7978bbdc6cc
          name: 'FAN discovery'
          type: DEPENDENT
          key: dell.server.fan.discovery
          description: 'Discovery of FAN sensors.'
          item_prototypes:
            - uuid: be494eecb65644b080bcc896503035e7
              name: 'Fan [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.fan.[?(@.id == ''{#ID}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: raw
            - uuid: 5704a3a505db486a806b52af48f48921
              name: 'Fan [{#SENSOR_NAME}]: Speed'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
              units: '!rpm'
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reading
              master_item:
                key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: fan
            - uuid: 3bcd23e100f54b1684667755be3cd9d0
              name: 'Fan [{#SENSOR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: fan
              trigger_prototypes:
                - uuid: 5b1c3844e374460799c186bbdfb57c4a
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R660: Fan [{#SENSOR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 1d868e86dbf24639a90562a8e2adaa6f
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R660: Fan [{#SENSOR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Fan [{#SENSOR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: 035fa59950af4f0caf91f4de59189ed5
              name: 'Dell R660: Fan [{#SENSOR_NAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R660 by HTTP'
                    key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.fan
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 2c726d35378a4eeba24d23e9cb8f7de4
          name: 'Network interface discovery'
          type: DEPENDENT
          key: dell.server.net.if.discovery
          description: 'Discovery of network interfaces.'
          item_prototypes:
            - uuid: c644bf0a447c4067bb4106860d98f813
              name: 'Interface [{#IFNAME}]: Get interface'
              type: SCRIPT
              key: 'dell.server.net.if.get[{#IFNAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Network Interface', 'Get metrics', params);
                
                const keys = [
                	{
                		'name': 'linkStatus',
                		'path': 'LinkStatus'
                	},
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'state',
                		'path': 'Status.State'
                	},
                	{
                		'name': 'linkSpeed',
                		'path': 'CurrentLinkSpeedMbps'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a network interface.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: raw
            - uuid: b72384586f1e472ba4d286281523a430
              name: 'Interface [{#IFNAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.net.if.health[{#IFNAME}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: 73c7ef1f002141a8abe53562d2d711ab
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
                  name: 'Dell R660: Interface [{#IFNAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 6afa44a6dfdc42129f40405ef2749d84
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.health[{#IFNAME}],)=2'
                  name: 'Dell R660: Interface [{#IFNAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Interface [{#IFNAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: ef78ffb8dbfa4aa7b8d75ee67d0b6232
              name: 'Interface [{#IFNAME}]: Speed'
              type: DEPENDENT
              key: 'dell.server.net.if.speed[{#IFNAME}]'
              units: bps
              description: 'The network port current link speed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.linkSpeed
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
            - uuid: d04f33b61a5b4fd6acdc89fe89e8d9f6
              name: 'Interface [{#IFNAME}]: State'
              type: DEPENDENT
              key: 'dell.server.net.if.state[{#IFNAME}]'
              description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
              valuemap:
                name: 'Redfish status state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.state
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Enabled': 1,
                      	'Disabled': 2,
                      	'Absent': 3,
                      	'Deferring': 4,
                      	'InTest': 5,
                      	'Quiesced': 6,
                      	'StandbyOffline': 7,
                      	'StandbySpare': 8,
                      	'Starting': 9,
                      	'UnavailableOffline': 10,
                      	'Updating': 11
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
            - uuid: 4b82f4e9ec27404e8340a9bff4dd54c9
              name: 'Interface [{#IFNAME}]: Link status'
              type: DEPENDENT
              key: 'dell.server.net.if.status[{#IFNAME}]'
              description: 'The status of the link between this port and its link partner. Possible values: Down, Up, null.'
              valuemap:
                name: 'Network interface status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.linkStatus
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'null': 1,
                      	'Down': 2,
                      	'Up': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: a0b08d93fbf042bda4cb17db3bfb8205
                  expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],)=2 and last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],)=1 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Dell R660: Interface [{#IFNAME}]: 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).
                    2. `{$DELL.HTTP.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 (2).
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "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: 1f1be4634d7344679afb26ecbab3955c
                  expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],)<2 and last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.net.if.status[{#IFNAME}],)>=2 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Dell R660: Interface [{#IFNAME}]: Link status issue'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is Null (1) or Unknown (0).
                    2. `{$DELL.HTTP.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 Null (1) or Unknown (0).
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "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
          graph_prototypes:
            - uuid: 461971c0e09446a5ae341bfc40dec119
              name: 'Dell R660: Interface [{#IFNAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R660 by HTTP'
                    key: 'dell.server.net.if.speed[{#IFNAME}]'
          master_item:
            key: dell.server.net.iface.get
          lld_macro_paths:
            - lld_macro: '{#IFNAME}'
              path: $.id
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 5f0b95a603074c96aafb395f6aedd873
          name: 'Physical disk discovery'
          type: DEPENDENT
          key: dell.server.physicaldisk.discovery
          description: 'Discovery of physical disks.'
          item_prototypes:
            - uuid: d1e4d411743040d3892769aa63e18b7f
              name: 'Physical disk [{#DISK_NAME}]: Get disk'
              type: SCRIPT
              key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Disk', 'Get physical disk metrics', params);
                
                const keys = [
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'sn',
                		'path': 'SerialNumber'
                	},
                	{
                		'name': 'model',
                		'path': 'Model'
                	},
                	{
                		'name': 'mediaType',
                		'path': 'MediaType'
                	},
                	{
                		'name': 'capacity',
                		'path': 'CapacityBytes'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a physical disk.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: raw
                - tag: component
                  value: storage
            - uuid: 112cb35eb86748fc84fbc42cb2f27a68
              name: 'Physical disk [{#DISK_NAME}]: Media type'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.media_type[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The type of media contained in this drive. Possible values: HDD, SSD, SMR, null.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.mediaType
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: 4bd6ed5e76e84b11b8819fa000ed4e34
              name: 'Physical disk [{#DISK_NAME}]: Model name'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.model[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The model number of the drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: 36243c8fa1ad4bb6b2a3f8f1ad8ceb99
              name: 'Physical disk [{#DISK_NAME}]: Serial number'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The serial number of this drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.sn
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: bbe632a29504433791396747fd2b997c
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#1)<>last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#2) and length(last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]))>0'
                  name: 'Dell R660: Physical disk [{#DISK_NAME}] has been replaced'
                  event_name: 'Dell R660: [{#DISK_NAME}] has been replaced (new serial number received)'
                  priority: INFO
                  description: '[{#DISK_NAME}] serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 66eef724488c40f0b9c45c394245c29f
              name: 'Physical disk [{#DISK_NAME}]: Size'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
              trends: '0'
              units: B
              description: 'The size, in bytes, of this drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: a2a221a5606744a883c2a914c32e8733
              name: 'Physical disk [{#DISK_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.status[{#DISK_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: f890c971cddc4c16a64bd35b716f9299
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
                  name: 'Dell R660: Physical disk [{#DISK_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: e87e58bbb41d40e39f1d1fae29fd9e4d
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=2'
                  name: 'Dell R660: Physical disk [{#DISK_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Physical disk [{#DISK_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: e8963658181440d9b9fd711103ea7a89
              name: 'Dell R660: Physical disk [{#DISK_NAME}]: Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R660 by HTTP'
                    key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
          master_item:
            key: dell.server.disks.get
          lld_macro_paths:
            - lld_macro: '{#DISK_NAME}'
              path: $.name
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.physicalDisks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: fa352e43355843d08901b70ade3a6926
          name: 'PSU discovery'
          type: DEPENDENT
          key: dell.server.psu.discovery
          description: 'Discovery of PSU sensors.'
          item_prototypes:
            - uuid: 575743aaeed14887b744111150773833
              name: 'Power supply [{#SENSOR_NAME}]: Current sensor status'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.current.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.current.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
              trigger_prototypes:
                - uuid: a6b73b5c3bf74966b62044b9e0c6a269
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 94f3feb429f346e89194533627a63a1c
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Current sensor: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 855af0a279b840caad6283cb9b9e3a2f
              name: 'Power supply [{#SENSOR_NAME}]: Current'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: A
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.current.reading
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: current
                - tag: component
                  value: psu
            - uuid: 0d563e9d3f1546ccb0a56afd0627c5ce
              name: 'Power supply [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.psu.[?(@.name == ''{#SENSOR_NAME}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: raw
            - uuid: d480ce48057e4515827b02ed73e1bc2f
              name: 'Power supply [{#SENSOR_NAME}]: Voltage sensor status'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
              trigger_prototypes:
                - uuid: 84715b0fca5348efb6b7e94f917d090f
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 2dcf0f63718a48d1a7e194c5c4c47c83
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Voltage sensor: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 5ec65db57336463f87efc6c479dcdae9
              name: 'Power supply [{#SENSOR_NAME}]: Voltage'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: V
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage.reading
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: voltage
          graph_prototypes:
            - uuid: 4675b21a22ed4da6a018670f88fe06a2
              name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Current'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R660 by HTTP'
                    key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
            - uuid: 18e119c61b284952890d3168aeba7e09
              name: 'Dell R660: Power supply [{#SENSOR_NAME}]: Voltage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R660 by HTTP'
                    key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.psu
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 212a1244a4f14afbbea66a06e3ff023f
          name: 'Temperature discovery'
          type: DEPENDENT
          key: dell.server.temp.discovery
          description: 'Discovery of temperature sensors.'
          item_prototypes:
            - uuid: 3a43f6fa64e046e79d510e0d2eb00403
              name: 'Probe [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.temperature.[?(@.id == ''{#ID}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: temperature
            - uuid: 9a02c56447bf46138515a4964e859ae0
              name: 'Probe [{#SENSOR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 004befed6db74f798e45e487809773dc
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R660: Probe [{#SENSOR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: bd72de9242054f7e890424c4ef8401ac
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R660: Probe [{#SENSOR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Probe [{#SENSOR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: d9fb53a40fb141a3b480776dae81ca58
              name: 'Probe [{#SENSOR_NAME}]: Value'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: °C
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reading
              master_item:
                key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: temperature
          graph_prototypes:
            - uuid: d30bc3325ef2458a8381ea06ede80762
              name: 'Dell R660: Probe [{#SENSOR_NAME}]: Value'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R660 by HTTP'
                    key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.temperature
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 2638370591cd401e9738db1f11329ce6
          name: 'Virtual disk discovery'
          type: DEPENDENT
          key: dell.server.virtualdisk.discovery
          description: 'Discovery of virtual disks.'
          item_prototypes:
            - uuid: 2d70a9fc34e84fb4b57025fa47eabde8
              name: 'Virtual disk [{#DISK_NAME}]: Get disk'
              type: SCRIPT
              key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Disk', 'Get virtual disk metrics', params);
                
                const keys = [
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'capacity',
                		'path': 'CapacityBytes'
                	},
                	{
                		'name': 'status',
                		'path': 'Status.State'
                	},
                	{
                		'name': 'raidStatus',
                		'path': 'Oem.Dell.DellVirtualDisk.RaidStatus'
                	},
                	{
                		'name': 'readCachePolicy',
                		'path': 'Oem.Dell.DellVirtualDisk.ReadCachePolicy'
                	},
                	{
                		'name': 'writeCachePolicy',
                		'path': 'Oem.Dell.DellVirtualDisk.WriteCachePolicy'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a virtual disk.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: virtualdisk
            - uuid: 28fc2dc811fd49198516c48e65a8cf94
              name: 'Virtual disk [{#DISK_NAME}]: RAID status'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}]'
              description: 'This property represents the RAID specific status. Possible values: Blocked, Degraded, Failed, Foreign, Offline, Online, Ready, Unknown, null.'
              valuemap:
                name: 'Virtual disk RAID status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.raidStatus
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Blocked': 1,
                      	'Degraded': 2,
                      	'Failed': 3,
                      	'Foreign': 4,
                      	'Offline': 5,
                      	'Unknown': 6,
                      	'null': 7,
                      	'Ready': 8,
                      	'Online': 9,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
              trigger_prototypes:
                - uuid: 5669738f4dcc4cf892f2474227b52c26
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}],)<8'
                  name: 'Dell R660: Virtual disk [{#DISK_NAME}]: RAID status not OK'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the disk for faults.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: a4a0c80a539741c9aa1ebe2623cb61cf
              name: 'Virtual disk [{#DISK_NAME}]: Read policy'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.read_policy[{#DISK_NAME}]'
              description: 'Indicates the read cache policy setting for the Volume. Possible values: ReadAhead, NoReadAhead, AdaptiveReadAhead.'
              valuemap:
                name: 'Virtual disk read policy'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.readCachePolicy
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'NoReadAhead': 1,
                      	'ReadAhead': 2,
                      	'AdaptiveReadAhead': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: 375e1eff18f84210975e8726632eed75
              name: 'Virtual disk [{#DISK_NAME}]: Size'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
              trends: '0'
              units: B
              description: 'The size in bytes of this Volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: 6d638199503a4287adbbbdcbe9c68152
              name: 'Virtual disk [{#DISK_NAME}]: Current state'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.state[{#DISK_NAME}]'
              description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
              valuemap:
                name: 'Redfish status state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Enabled': 1,
                      	'Disabled': 2,
                      	'Absent': 3,
                      	'Deferring': 4,
                      	'InTest': 5,
                      	'Quiesced': 6,
                      	'StandbyOffline': 7,
                      	'StandbySpare': 8,
                      	'Starting': 9,
                      	'UnavailableOffline': 10,
                      	'Updating': 11
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: 8e57ee881d9c46088f18fa6bcabe9f2d
              name: 'Virtual disk [{#DISK_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.status[{#DISK_NAME}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
              trigger_prototypes:
                - uuid: b8e7795d584c41f083601b7d11119b49
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
                  name: 'Dell R660: Virtual disk [{#DISK_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 2c9da958cf3749869b504eeb80005d9b
                  expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=2'
                  name: 'Dell R660: Virtual disk [{#DISK_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R660: Virtual disk [{#DISK_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R660 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: b55e8a16144541b0b4043ffa7e3e9679
              name: 'Virtual disk [{#DISK_NAME}]: Write policy'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.write_policy[{#DISK_NAME}]'
              description: 'Indicates the write cache policy setting for the Volume. Possible values: WriteThrough, WriteBack, ProtectedWriteBack, UnprotectedWriteBack.'
              valuemap:
                name: 'Virtual disk write policy'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.writeCachePolicy
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'WriteThrough': 1,
                      	'WriteBack': 2,
                      	'ProtectedWriteBack': 3,
                      	'UnprotectedWriteBack': 4,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
          graph_prototypes:
            - uuid: 4897862f7316481a9447bc70dd54214b
              name: 'Dell R660: Virtual disk [{#DISK_NAME}]: Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R660 by HTTP'
                    key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
          master_item:
            key: dell.server.disks.get
          lld_macro_paths:
            - lld_macro: '{#DISK_NAME}'
              path: $.name
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.virtualDisks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: hardware
        - tag: subclass
          value: server
        - tag: target
          value: dell
        - tag: target
          value: dellpoweredge
      macros:
        - macro: '{$DELL.HTTP.API.PASSWORD}'
          type: SECRET_TEXT
          description: 'The Dell iDRAC user password.'
          config:
            type: TEXT
            priority: '3'
            label: 'iDRAC password'
            description: 'The Dell iDRAC user password.'
            required: 'YES'
        - macro: '{$DELL.HTTP.API.URL}'
          description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
          config:
            type: TEXT
            priority: '1'
            label: 'iDRAC API URL'
            description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
            required: 'YES'
        - macro: '{$DELL.HTTP.API.USER}'
          description: 'The Dell iDRAC username.'
          config:
            type: TEXT
            priority: '2'
            label: 'iDRAC username'
            description: 'The Dell iDRAC username.'
            required: 'YES'
        - macro: '{$DELL.HTTP.CPU.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'CPU usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.CPU.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'CPU usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IFCONTROL}'
          value: '1'
          description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Link status trigger enabled'
            description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IO.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'IO usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IO.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'IO usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.MEM.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Memory usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.MEM.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Memory usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.PROXY}'
          description: 'Set an HTTP proxy for Redfish API requests if needed.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'HTTP proxy'
            description: 'Set an HTTP proxy for Redfish API requests if needed.'
        - macro: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          value: 10s
          description: 'Set the timeout for HTTP requests.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'HTTP timeout'
            description: 'Set the timeout for HTTP requests.'
        - macro: '{$DELL.HTTP.RETURN.CODE.OK}'
          value: '200'
          description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'HTTP OK code'
            description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.SYS.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'SYS usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.SYS.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'SYS usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 92c173b1b13142d197d9bac23f757a05
          name: Overview
          pages:
            - name: Overview
              display_period: '30'
              widgets:
                - type: gauge
                  name: 'CPU utilization'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: CPU
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: dell.server.util.cpu
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'Memory utilization'
                  'y': '3'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: MEM
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: dell.server.util.mem
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'I/O utilization'
                  'y': '6'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: I/O
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: dell.server.util.io
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'SYS utilization'
                  'y': '9'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: SYS
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: dell.server.util.sys
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: item
                  name: 'Redfish API'
                  x: '18'
                  width: '27'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'Redfish API'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: 'net.tcp.service[https]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'HW model'
                  x: '18'
                  'y': '3'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'HW model'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: dell.server.hw.model
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Serial number'
                  x: '18'
                  'y': '6'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'Serial number'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: dell.server.hw.serialnumber
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: Firmware
                  x: '18'
                  'y': '9'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: Firmware
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: dell.server.hw.firmware
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'System health'
                  x: '45'
                  width: '27'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'System Health'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R660 by HTTP'
                        key: dell.server.status
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
            - name: Discoveries
              display_period: '30'
              widgets:
                - type: honeycomb
                  name: 'Interface link'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Link status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: STRING
                      name: thresholds.0.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.1.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '3'
                - type: honeycomb
                  name: 'Temperature sensors'
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Probe*Value'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Physical disks'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Physical disk*Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                - type: honeycomb
                  name: 'Power supplies'
                  'y': '12'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Power supply*Voltage'
                    - type: STRING
                      name: items.1
                      value: 'Power supply*Current'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: honeycomb
                  name: 'Interface speed'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Speed'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAABA
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '10000000'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF980E
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '100000000'
                    - type: STRING
                      name: thresholds.3.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '1000000000'
                    - type: STRING
                      name: thresholds.4.color
                      value: 2196F3
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '10000000000'
                    - type: STRING
                      name: thresholds.5.color
                      value: 6C00D9
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '25000000000'
                    - type: STRING
                      name: thresholds.6.color
                      value: D900A6
                    - type: STRING
                      name: thresholds.6.threshold
                      value: '40000000000'
                - type: honeycomb
                  name: 'Virtual disks'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Virtual disk*: Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                - type: honeycomb
                  name: Fans
                  x: '36'
                  'y': '12'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Probe*Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
      valuemaps:
        - uuid: 122afb9826d4493aa319b67025bd5e74
          name: 'Network interface status'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: 'Null'
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Up
        - uuid: 2cfad557b52d49f7a56f84323c7b098a
          name: 'Redfish API availability'
          mappings:
            - value: '0'
              newvalue: Unavailable
            - value: '1'
              newvalue: Available
        - uuid: 0b3b101349fa4b4d94983d7fdae83679
          name: 'Redfish status health'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: OK
            - value: '2'
              newvalue: Warning
            - value: '3'
              newvalue: Critical
        - uuid: e9e6e46c13fe4bd0a29b65cad929c6bc
          name: 'Redfish status state'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Enabled
            - value: '2'
              newvalue: Disabled
            - value: '3'
              newvalue: Absent
            - value: '4'
              newvalue: Deferring
            - value: '5'
              newvalue: InTest
            - value: '6'
              newvalue: Quiesced
            - value: '7'
              newvalue: StandbyOffline
            - value: '8'
              newvalue: StandbySpare
            - value: '9'
              newvalue: Starting
            - value: '10'
              newvalue: UnavailableOffline
            - value: '11'
              newvalue: Updating
        - uuid: 29051e06a48b444a8ee285cd185ae04f
          name: 'Virtual disk RAID status'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: Blocked
            - value: '2'
              newvalue: Degraded
            - value: '3'
              newvalue: Failed
            - value: '4'
              newvalue: Foreign
            - value: '5'
              newvalue: Offline
            - value: '6'
              newvalue: Unknown
            - value: '7'
              newvalue: 'Null'
            - value: '8'
              newvalue: Ready
            - value: '9'
              newvalue: Online
        - uuid: ac7f30cf50cb459aaa41103c8fa6df1c
          name: 'Virtual disk read policy'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: NoReadAhead
            - value: '2'
              newvalue: ReadAhead
            - value: '3'
              newvalue: AdaptiveReadAhead
        - uuid: 39e0e7ddc8fd459e90fdb247caee7512
          name: 'Virtual disk write policy'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: WriteThrough
            - value: '2'
              newvalue: WriteBack
            - value: '3'
              newvalue: ProtectedWriteBack
            - value: '4'
              newvalue: UnprotectedWriteBack
    - uuid: 3f707f39c32a4b6e8b214c38a260f6f9
      template: 'DELL PowerEdge R740 by HTTP'
      name: 'DELL PowerEdge R740 by HTTP'
      description: |
        Template for DELL PowerEdge R740 servers with iDRAC 8/9 firmware 4.32 and later and Redfish API enabled.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/426752-discussion-thread-for-official-zabbix-dell-templates
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This is a template for monitoring DELL PowerEdge R740 servers with iDRAC 8/9 firmware 4.32 (and later) with Redfish API enabled via Zabbix script items. This template works without any external scripts.
        
        ## Setup
        
        1\. Enable Redfish API in the Dell iDRAC interface of your server.
        
        2\. Create a user for monitoring with read-only permissions in the Dell iDRAC interface.
        
        3\. Create a host for Dell server with iDRAC IP as the Zabbix agent interface.
        
        4\. Link the template to the host.
        
        5\. Customize the values of the `{$DELL.HTTP.API.URL}`, `{$DELL.HTTP.API.USER}`, and `{$DELL.HTTP.API.PASSWORD}` macros.
        
        > NOTE! If you are experiencing timeouts on some of the items that are executing requests, adjust the `{$DELL.HTTP.REQUEST.TIMEOUT}` macro accordingly.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Server hardware'
      items:
        - uuid: d913e585d3834b86a552e5cc7fe717fc
          name: 'Get array controller resources'
          type: SCRIPT
          key: dell.server.array.resources.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Controller', 'Discovery', params);
            
            const controllers = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage?$expand=.($levels=1)'), 'Members');
            
            var arrControllerKeys = [
            	{
            		'name': 'id',
            		'path': 'Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	},
            	{
            		'name': 'health',
            		'path': 'Status.Health'
            	},
            	{
            		'name': 'slot',
            		'path': 'Oem.Dell.DellController.PCISlot'
            	}
            ];
            
            var battControllerKeys = [
            	{
            		'name': 'id',
            		'path': 'Oem.Dell.DellControllerBattery.Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Oem.Dell.DellControllerBattery.Name'
            	},
            	{
            		'name': 'status',
            		'path': 'Oem.Dell.DellControllerBattery.PrimaryStatus'
            	}
            ];
            
            if (!Array.isArray(controllers)) {
            	throw 'Unexpected type for controllers.';
            }
            
            var buffer = { 'arrayControllers': [], 'batteryControllers': [] };
            
            controllers.forEach(function (controller) {
            	if (controller['Id'].search('RAID') > -1) {
            		buffer['arrayControllers'].push(dell.extractData(controller, arrControllerKeys, true));
            		buffer['batteryControllers'].push(dell.extractData(controller, battControllerKeys, true));
            	}
            });
            
            return JSON.stringify(buffer);
          description: 'Returns array controller resources.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 6d340455b52d45fcadc83a1dc9361544
          name: 'Get disks'
          type: SCRIPT
          key: dell.server.disks.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Disk', 'Discovery', params);
            
            const disks = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage'), 'Members');
            
            var keys = [
            	{
            		'name': 'path',
            		'path': '@odata.id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	}
            ];
            
            if (!Array.isArray(disks)) {
            	throw 'Unexpected type for disks.';
            }
            
            var buffer = { 'physicalDisks': [], 'virtualDisks': [] };
            
            disks.forEach(function (disk) {
            	var requests = [{ 'usage': 'physicalDisks', 'path': '', 'target': 'Drives' }, { 'usage': 'virtualDisks', 'path': '/Volumes', 'target': 'Members' }];
            
            	requests.forEach(function (request) {
            		const disks = dell.extractData(dell.executeRequest(disk['@odata.id'] + request['path']), request['target']);
            
            		if (!Array.isArray(disks) || disks.length <= 0) {
            			return;
            		}
            
            		disks.forEach(function (drive) {
            			buffer[request['usage']].push(dell.extractData(dell.executeRequest(drive['@odata.id']), keys));
            		});
            	});
            });
            
            return JSON.stringify(buffer);
          description: 'Returns storage resources.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: aa1def487bd54496aaf8372cb76b2077
          name: 'Firmware version'
          type: DEPENDENT
          key: dell.server.hw.firmware
          value_type: CHAR
          description: 'This attribute defines the firmware version of a remote access card.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.firmware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: e25c62f68b3f4c53a0680b651e99cdc7
              expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.firmware,#1)<>last(/DELL PowerEdge R740 by HTTP/dell.server.hw.firmware,#2) and length(last(/DELL PowerEdge R740 by HTTP/dell.server.hw.firmware))>0'
              name: 'Dell R740: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'The firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 6790e2fb624b4dbc9382f32f9403a9b9
          name: 'Hardware model name'
          type: DEPENDENT
          key: dell.server.hw.model
          value_type: CHAR
          description: 'This attribute defines the model name of the system.'
          inventory_link: MODEL
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.model
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
        - uuid: ac9560837ada4906b898518f3f61d84e
          name: 'Hardware serial number'
          type: DEPENDENT
          key: dell.server.hw.serialnumber
          value_type: CHAR
          description: 'This attribute defines the service tag of the system.'
          inventory_link: SERIALNO_A
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.serialnumber
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 99d9055edb1a486cbfd064b794b37450
              expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.serialnumber,#1)<>last(/DELL PowerEdge R740 by HTTP/dell.server.hw.serialnumber,#2) and length(last(/DELL PowerEdge R740 by HTTP/dell.server.hw.serialnumber))>0'
              name: 'Dell R740: Device has been replaced'
              event_name: 'Dell R740: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'The device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 405e79c2477e41de8af49785c57bbeb4
          name: 'Get network interfaces'
          type: SCRIPT
          key: dell.server.net.iface.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Network Interface', 'Discovery', params);
            
            const netAdapters = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters'), 'Members');
            
            var keys = [
            	{
            		'name': 'path',
            		'path': '@odata.id'
            	},
            	{
            		'name': 'id',
            		'path': 'Id'
            	}
            ];
            
            if (!Array.isArray(netAdapters)) {
            	throw 'Unexpected type for network adapters.';
            }
            
            var buffer = [];
            
            netAdapters.forEach(function (netAdapter) {
            	const netPorts = dell.extractData(dell.executeRequest(netAdapter["@odata.id"] + '/NetworkPorts'), 'Members');
            
            	if (!Array.isArray(netPorts)) {
            		return;
            	}
            
            	netPorts.forEach(function (netPort) {
            		buffer.push(dell.extractData(dell.executeRequest(netPort["@odata.id"]), keys));
            	})
            });
            
            return JSON.stringify(buffer);
          description: 'Returns network interfaces.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: ccd47edb739c47418bdf17141cd60112
          name: 'Get sensors'
          type: SCRIPT
          key: dell.server.sensors.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            function formatPSU(psuObj) {
            	var foundPowerSupplies = [],
            		buffer = [];
            
            	psuObj.forEach(function (obj) {
            		const psuName = obj['name'].split(' ')[0];
            
            		if (foundPowerSupplies.indexOf(psuName) === -1) {
            			foundPowerSupplies.push(psuName);
            			buffer.push({
            				'name': psuName,
            				[obj['type'].toLowerCase()]: {'reading': obj['reading'], 'health': obj['health']}
            			});
            		} else {
            			buffer.forEach(function (bufferObj) {
            
            				if (bufferObj['name'] === psuName) {
            					bufferObj[obj['type'].toLowerCase()] = {'reading': obj['reading'], 'health': obj['health']};
            
            					return;
            				}
            			});
            		}
            	})
            	return buffer;
            };
            
            function formatTemp(tempObj) {
            	tempObj.forEach(function (obj) {
            		obj.name = obj.name.split(' ').slice(0, -1).join(' ');
            	});
            
            	return tempObj;
            }
            
            function formatSysBoard(sysObj) {
            	const remove = ['System', 'Board', 'Usage'];
            
            	sysObj.forEach(function (obj) {
            		var buffer = [];
            
            		obj['name'].split(' ').forEach(function (word) {
            			var match = false;
            
            			remove.forEach(function (removeWord) {
            				if (removeWord === word) {
            					match = true;
            				}
            			});
            
            			if (!match) {
            				buffer.push(word);
            			}
            		});
            
            		if (buffer.length > 0) {
            			obj['name'] = buffer.join(' ');
            		}
            	});
            
            	return sysObj;
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Sensor', 'Discovery', params);
            
            const sensors = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/Sensors?$expand=.($levels=1)'), 'Members');
            
            if (!Array.isArray(sensors)) {
            	throw 'Unexpected type for sensors.';
            }
            
            const keys = [
            	{
            		'name': 'id',
            		'path': 'Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	},
            	{
            		'name': 'context',
            		'path': 'PhysicalContext'
            	},
            	{
            		'name': 'reading',
            		'path': 'Reading'
            	},
            	{
            		'name': 'type',
            		'path': 'ReadingType'
            	},
            	{
            		'name': 'health',
            		'path': 'Status.Health'
            	}
            ];
            
            var buffer = { 'fan': [], 'psu': [], 'temperature': [], 'sysBoard': [] };
            
            sensors.forEach(function (sensor) {
            	if (sensor['Name'].substring(0, 2) === 'PS' && sensor['PhysicalContext'] === 'PowerSupply') {
            		buffer['psu'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['ReadingType'] === 'Temperature') {
            		buffer['temperature'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['Name'].includes('Fan') && sensor['ReadingType'] === 'Rotational') {
            		buffer['fan'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['Name'].includes('System Board') && sensor['ReadingType'] === 'Percent') {
            		buffer['sysBoard'].push(dell.extractData(sensor, keys, true));
            	}
            });
            
            buffer['psu'] = formatPSU(buffer['psu']);
            buffer['temperature'] = formatTemp(buffer['temperature']);
            buffer['sysBoard'] = formatSysBoard(buffer['sysBoard']);
            
            return JSON.stringify(buffer);
          description: 'Returns sensors.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: d4cf468d146b46e9aa2245c5f7136aaa
          name: 'Overall system health status'
          type: DEPENDENT
          key: dell.server.status
          trends: '0'
          description: 'This attribute defines the overall rollup status of all the components in the system monitored by the remote access card. Includes system, storage, IO devices, iDRAC, CPU, memory, etc.'
          valuemap:
            name: 'Redfish status health'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.status
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = {
                  	'OK': 1,
                  	'Warning': 2,
                  	'Critical': 3,
                  };
                  
                  return typeof idx[value] === 'undefined' ? 0 : idx[value];
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: 99ebb04c198c4ce4ba5bb1eabe186d97
              expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.status,)=3'
              name: 'Dell R740: Server is in a critical state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Please check the device for faults.'
              tags:
                - tag: scope
                  value: availability
            - uuid: c36399ae3aef4f18944a92ecc539371d
              expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.status,)=2'
              name: 'Dell R740: Server is in a warning state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Please check the device for warnings.'
              dependencies:
                - name: 'Dell R740: Server is in a critical state'
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.status,)=3'
              tags:
                - tag: scope
                  value: availability
        - uuid: 0bf660f3d66a4322acaeee585d258ddc
          name: 'Get system'
          type: SCRIPT
          key: dell.server.system.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('System', 'Get system metrics', params);
            
            const requests = [
            	{
            		'path': '/redfish/v1/Systems/System.Embedded.1',
            		'keys': [
            			{
            				'name': 'model',
            				'path': 'Model'
            			},
            			{
            				'name': 'serialnumber',
            				'path': 'Oem.Dell.DellSystem.ChassisServiceTag'
            			},
            			{
            				'name': 'status',
            				'path': 'Status.Health'
            			}
            		]
            	},
            	{
            		'path': '/redfish/v1/Managers/iDRAC.Embedded.1',
            		'keys': {
            			'name': 'firmware',
            			'path': 'FirmwareVersion'
            		}
            	}
            ];
            
            var buffer = {};
            
            for (var i = 0, requestsCount = requests.length; i < requestsCount; i++) {
            	Object.assign(buffer, dell.extractData(dell.executeRequest(requests[i].path), requests[i].keys));
            }
            
            return JSON.stringify(buffer);
          description: 'Returns system metrics.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 46c8cbc75634425b88bbe746c0d3ebef
          name: 'CPU utilization, in %'
          type: DEPENDENT
          key: dell.server.util.cpu
          value_type: FLOAT
          units: '%'
          description: 'CPU utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardCPUUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: acfc613fa7ef4aea8673fa9804804480
              expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.WARN}'
              name: 'Dell R740: CPU utilization is high'
              event_name: 'Dell R740: Current CPU utilization is high (util >= {$DELL.HTTP.CPU.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R740: CPU utilization is too high'
                  expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: a65d0e094829439da83b403d0373ad6c
              expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
              name: 'Dell R740: CPU utilization is too high'
              event_name: 'Dell R740: Current CPU utilization is too high (util >= {$DELL.HTTP.CPU.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 4ac933e796074014aeb7fa6d3ec16b81
          name: 'IO utilization, in %'
          type: DEPENDENT
          key: dell.server.util.io
          value_type: FLOAT
          units: '%'
          description: 'IO utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardIOUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: io
          triggers:
            - uuid: a0912c7c62b342bbabc74fda99908c4e
              expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.WARN}'
              name: 'Dell R740: IO utilization is high'
              event_name: 'Dell R740: Current IO utilization is high (util >= {$DELL.HTTP.IO.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R740: IO utilization is too high'
                  expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: c94f37d12fa9446a81095caaf68e4c70
              expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              name: 'Dell R740: IO utilization is too high'
              event_name: 'Dell R740: Current IO utilization is too high (util >= {$DELL.HTTP.IO.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: d2df292726e144559fec8adc302d05b3
          name: 'Memory utilization, in %'
          type: DEPENDENT
          key: dell.server.util.mem
          value_type: FLOAT
          units: '%'
          description: 'Memory utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardMEMUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 52c7a1c084f545b58ede5a24b06d0dda
              expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.WARN}'
              name: 'Dell R740: Memory utilization is high'
              event_name: 'Dell R740: Current memory utilization is high (util >= {$DELL.HTTP.MEM.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R740: Memory utilization is too high'
                  expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 25d4b9b8fb244d58ab805e6f18ab3581
              expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
              name: 'Dell R740: Memory utilization is too high'
              event_name: 'Dell R740: Current memory utilization is too high (util >= {$DELL.HTTP.MEM.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: cb9797b2d98946549bf07c2682672601
          name: 'SYS utilization, in %'
          type: DEPENDENT
          key: dell.server.util.sys
          value_type: FLOAT
          units: '%'
          description: 'SYS utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardSYSUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: sys
          triggers:
            - uuid: 2813184ff5c44f128233860941ffe75b
              expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.WARN}'
              name: 'Dell R740: SYS utilization is high'
              event_name: 'Dell R740: Current SYS utilization is high (util >= {$DELL.HTTP.SYS.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R740: IO utilization is too high'
                  expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: d29b786246364813a98664d892e1189b
              expression: 'min(/DELL PowerEdge R740 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.HIGH}'
              name: 'Dell R740: SYS utilization is too high'
              event_name: 'Dell R740: Current SYS utilization is too high (util >= {$DELL.HTTP.SYS.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 0ce986507b414619bf8cad6dcf1e61b6
          name: 'Redfish API status'
          type: SIMPLE
          key: 'net.tcp.service[https]'
          description: |
            Availability of Redfish API on the server.
            Possible values:
              0 - Unavailable
              1 - Available
          valuemap:
            name: 'Redfish API availability'
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: abc84a9051bc411eab4481b539e58f5c
              expression: 'last(/DELL PowerEdge R740 by HTTP/net.tcp.service[https])=0'
              name: 'Dell R740: Redfish API service is unavailable'
              priority: HIGH
              description: 'The service is unavailable or does not accept TCP connections.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 57f6fe0a9cef448e9a1e05a42886d74b
          name: 'Array controller discovery'
          type: DEPENDENT
          key: dell.server.array.discovery
          description: 'Discovery of disk array controllers.'
          item_prototypes:
            - uuid: 0021ba826a8c4b068b5cae8149a64b16
              name: 'Controller [{#CNTLR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.array.status[{#ID}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.arrayControllers[?(@.id == "{#ID}")].health.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: dell.server.array.resources.get
              tags:
                - tag: component
                  value: diskarray
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 50bdae400b1a434781b3f5f39573aab1
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.array.status[{#ID}],)=3'
                  name: 'Dell R740: Controller [{#CNTLR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 844f79aa364a4b66b1a99a3fec6aafbf
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.array.status[{#ID}],)=2'
                  name: 'Dell R740: Controller [{#CNTLR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Controller [{#CNTLR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.array.status[{#ID}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: dell.server.array.resources.get
          lld_macro_paths:
            - lld_macro: '{#CNTLR_NAME}'
              path: $.name
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SLOT}'
              path: $.slot
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.arrayControllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 670f172f96d449b7a49ddef0c9f47044
          name: 'Battery discovery'
          type: DEPENDENT
          key: dell.server.controller.battery.discovery
          description: 'Discovery of battery controllers.'
          item_prototypes:
            - uuid: 2af258c29e9f4bdd8f764ff3d88bf993
              name: 'Battery [{#BATTERY_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.controller.battery.status[{#ID}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.batteryControllers[?(@.id == "{#ID}")].status.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: dell.server.array.resources.get
              tags:
                - tag: component
                  value: battery
                - tag: component
                  value: diskarray
              trigger_prototypes:
                - uuid: 2692e6af995642f1af4c3c3b8a24a4d3
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
                  name: 'Dell R740: Battery [{#BATTERY_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: e758c396c3fe4fc281afd2b68fa4fe25
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.controller.battery.status[{#ID}],)=2'
                  name: 'Dell R740: Battery [{#BATTERY_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Battery [{#BATTERY_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: dell.server.array.resources.get
          lld_macro_paths:
            - lld_macro: '{#BATTERY_NAME}'
              path: $.name
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.batteryControllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 93993bb9443c4e80b062a2495e89c2cb
          name: 'FAN discovery'
          type: DEPENDENT
          key: dell.server.fan.discovery
          description: 'Discovery of FAN sensors.'
          item_prototypes:
            - uuid: 46c42056f8004caa91a6d9c6e74ca58b
              name: 'Fan [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.fan.[?(@.id == ''{#ID}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: raw
            - uuid: 08d19c50b1b04a37b8152b2be05f7d37
              name: 'Fan [{#SENSOR_NAME}]: Speed'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
              units: '!rpm'
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reading
              master_item:
                key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: fan
            - uuid: 432eed8eb06d4c788cce849ff7ec7c66
              name: 'Fan [{#SENSOR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: fan
              trigger_prototypes:
                - uuid: 509e958d1b4541c79916398a92f1f2da
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R740: Fan [{#SENSOR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: c9477efc33704403a118e2a1fa51f04e
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R740: Fan [{#SENSOR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Fan [{#SENSOR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: c273950f4653461f9ff91f6103eb8ea9
              name: 'Dell R740: Fan [{#SENSOR_NAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R740 by HTTP'
                    key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.fan
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 3cfbe2ab8583452788f53d035985ac3d
          name: 'Network interface discovery'
          type: DEPENDENT
          key: dell.server.net.if.discovery
          description: 'Discovery of network interfaces.'
          item_prototypes:
            - uuid: 9c0d896957234a5b99d8f35074a07d7b
              name: 'Interface [{#IFNAME}]: Get interface'
              type: SCRIPT
              key: 'dell.server.net.if.get[{#IFNAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Network Interface', 'Get metrics', params);
                
                const keys = [
                	{
                		'name': 'linkStatus',
                		'path': 'LinkStatus'
                	},
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'state',
                		'path': 'Status.State'
                	},
                	{
                		'name': 'linkSpeed',
                		'path': 'CurrentLinkSpeedMbps'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a network interface.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: raw
            - uuid: 9e0cdfe87ecf4622a5b9755d37a966e6
              name: 'Interface [{#IFNAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.net.if.health[{#IFNAME}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: cb3e3352f93c4297848e28295763a60c
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
                  name: 'Dell R740: Interface [{#IFNAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 207524d584ac4219be2d7bc15e6dd548
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.health[{#IFNAME}],)=2'
                  name: 'Dell R740: Interface [{#IFNAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Interface [{#IFNAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: d42187489b424ccdbb6b9f2d9d2486fb
              name: 'Interface [{#IFNAME}]: Speed'
              type: DEPENDENT
              key: 'dell.server.net.if.speed[{#IFNAME}]'
              units: bps
              description: 'The network port current link speed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.linkSpeed
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
            - uuid: b280d103cca745999d50eaca7b1d6936
              name: 'Interface [{#IFNAME}]: State'
              type: DEPENDENT
              key: 'dell.server.net.if.state[{#IFNAME}]'
              description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
              valuemap:
                name: 'Redfish status state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.state
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Enabled': 1,
                      	'Disabled': 2,
                      	'Absent': 3,
                      	'Deferring': 4,
                      	'InTest': 5,
                      	'Quiesced': 6,
                      	'StandbyOffline': 7,
                      	'StandbySpare': 8,
                      	'Starting': 9,
                      	'UnavailableOffline': 10,
                      	'Updating': 11
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
            - uuid: 475ee8304c78449bbdd58132f38b39b7
              name: 'Interface [{#IFNAME}]: Link status'
              type: DEPENDENT
              key: 'dell.server.net.if.status[{#IFNAME}]'
              description: 'The status of the link between this port and its link partner. Possible values: Down, Up, null.'
              valuemap:
                name: 'Network interface status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.linkStatus
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'null': 1,
                      	'Down': 2,
                      	'Up': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: 89063973565f43f3986438b83972413c
                  expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.status[{#IFNAME}],)=2 and last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.status[{#IFNAME}],)=1 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Dell R740: Interface [{#IFNAME}]: 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).
                    2. `{$DELL.HTTP.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 (2).
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "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: 00f838261fc74679a8908b413b466314
                  expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.status[{#IFNAME}],)<2 and last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.net.if.status[{#IFNAME}],)>=2 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Dell R740: Interface [{#IFNAME}]: Link status issue'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is Null (1) or Unknown (0).
                    2. `{$DELL.HTTP.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 Null (1) or Unknown (0).
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "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
          graph_prototypes:
            - uuid: 2675aedb87374afdbed6651d4ad5336d
              name: 'Dell R740: Interface [{#IFNAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R740 by HTTP'
                    key: 'dell.server.net.if.speed[{#IFNAME}]'
          master_item:
            key: dell.server.net.iface.get
          lld_macro_paths:
            - lld_macro: '{#IFNAME}'
              path: $.id
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 6ca10e649e1541aa8bcd6fa764bbc86d
          name: 'Physical disk discovery'
          type: DEPENDENT
          key: dell.server.physicaldisk.discovery
          description: 'Discovery of physical disks.'
          item_prototypes:
            - uuid: 84314bd54ce0457f873b6ada5c40cd0d
              name: 'Physical disk [{#DISK_NAME}]: Get disk'
              type: SCRIPT
              key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Disk', 'Get physical disk metrics', params);
                
                const keys = [
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'sn',
                		'path': 'SerialNumber'
                	},
                	{
                		'name': 'model',
                		'path': 'Model'
                	},
                	{
                		'name': 'mediaType',
                		'path': 'MediaType'
                	},
                	{
                		'name': 'capacity',
                		'path': 'CapacityBytes'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a physical disk.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: raw
                - tag: component
                  value: storage
            - uuid: f82a433ebc644ba4bf190a5a980f8ce5
              name: 'Physical disk [{#DISK_NAME}]: Media type'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.media_type[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The type of media contained in this drive. Possible values: HDD, SSD, SMR, null.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.mediaType
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: c6eee821d95a4e83808ef7df99165a0c
              name: 'Physical disk [{#DISK_NAME}]: Model name'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.model[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The model number of the drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: c5fc21adf5444684be84bb764ff66b60
              name: 'Physical disk [{#DISK_NAME}]: Serial number'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The serial number of this drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.sn
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 2bdf2cb7c1964c259174f0bdc215f607
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#1)<>last(/DELL PowerEdge R740 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#2) and length(last(/DELL PowerEdge R740 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]))>0'
                  name: 'Dell R740: Physical disk [{#DISK_NAME}] has been replaced'
                  event_name: 'Dell R740: [{#DISK_NAME}] has been replaced (new serial number received)'
                  priority: INFO
                  description: '[{#DISK_NAME}] serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 5163fa516eeb469c896118ddd99faca9
              name: 'Physical disk [{#DISK_NAME}]: Size'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
              trends: '0'
              units: B
              description: 'The size, in bytes, of this drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: ae81696c53b24c40bf0a984d881fa206
              name: 'Physical disk [{#DISK_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.status[{#DISK_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: d9a974b6bd41407196a337cc0836f090
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
                  name: 'Dell R740: Physical disk [{#DISK_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 2d241b609e6d49b29e3aa1e0cd67b797
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=2'
                  name: 'Dell R740: Physical disk [{#DISK_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Physical disk [{#DISK_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: 3f090c14cd35436fb6777ea0a2952414
              name: 'Dell R740: Physical disk [{#DISK_NAME}]: Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R740 by HTTP'
                    key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
          master_item:
            key: dell.server.disks.get
          lld_macro_paths:
            - lld_macro: '{#DISK_NAME}'
              path: $.name
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.physicalDisks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: a775028b99ce4ef1bcd7de0dbd42368b
          name: 'PSU discovery'
          type: DEPENDENT
          key: dell.server.psu.discovery
          description: 'Discovery of PSU sensors.'
          item_prototypes:
            - uuid: 46a07d9bb9f64ea9b49b17eb47d1a097
              name: 'Power supply [{#SENSOR_NAME}]: Current sensor status'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.current.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.current.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
              trigger_prototypes:
                - uuid: d08b574968104c33a1626ebb2fe2b8fe
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R740: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 0df0092cfa584e9aabae0dad854edccb
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R740: Power supply [{#SENSOR_NAME}]: Current sensor: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 56adb48c71ba4fc58d997aec257ed094
              name: 'Power supply [{#SENSOR_NAME}]: Current'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: A
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.current.reading
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: current
                - tag: component
                  value: psu
            - uuid: 7949614f006244ad898ae27d0a9b4f84
              name: 'Power supply [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.psu.[?(@.name == ''{#SENSOR_NAME}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: raw
            - uuid: 318af72a5a864d34b226a5ee78272b5b
              name: 'Power supply [{#SENSOR_NAME}]: Voltage sensor status'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
              trigger_prototypes:
                - uuid: 55f8e3639ed44b198059eef924f17d6b
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R740: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 1da44fa0377947788adf128188661f28
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R740: Power supply [{#SENSOR_NAME}]: Voltage sensor: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 6d8d7af278e04005891def704ee3cef0
              name: 'Power supply [{#SENSOR_NAME}]: Voltage'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: V
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage.reading
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: voltage
          graph_prototypes:
            - uuid: c44728c06cc7486c868544c3c5777aed
              name: 'Dell R740: Power supply [{#SENSOR_NAME}]: Current'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R740 by HTTP'
                    key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
            - uuid: ba35106532cb4e038a86bde3f7f33085
              name: 'Dell R740: Power supply [{#SENSOR_NAME}]: Voltage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R740 by HTTP'
                    key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.psu
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 46763af306644040a5372a3222089dcb
          name: 'Temperature discovery'
          type: DEPENDENT
          key: dell.server.temp.discovery
          description: 'Discovery of temperature sensors.'
          item_prototypes:
            - uuid: 9bf746e182804bb5a694267b339e37c5
              name: 'Probe [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.temperature.[?(@.id == ''{#ID}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: temperature
            - uuid: d04293051f6c4814bef3723f63eb0362
              name: 'Probe [{#SENSOR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: d1cba1c87d9946baa59459c37ff65c61
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R740: Probe [{#SENSOR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 0e6977fa7fa04e669a367dada93467f1
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R740: Probe [{#SENSOR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Probe [{#SENSOR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: ea4b94edd0664c6f84d28f50042f44be
              name: 'Probe [{#SENSOR_NAME}]: Value'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: °C
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reading
              master_item:
                key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: temperature
          graph_prototypes:
            - uuid: f37adc6452aa4a0aa111ad8797f0f6ec
              name: 'Dell R740: Probe [{#SENSOR_NAME}]: Value'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R740 by HTTP'
                    key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.temperature
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: c891f38a20fe4616bf91bd21baa362a1
          name: 'Virtual disk discovery'
          type: DEPENDENT
          key: dell.server.virtualdisk.discovery
          description: 'Discovery of virtual disks.'
          item_prototypes:
            - uuid: bb156d13a6514151ad9673a91e8463ef
              name: 'Virtual disk [{#DISK_NAME}]: Get disk'
              type: SCRIPT
              key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Disk', 'Get virtual disk metrics', params);
                
                const keys = [
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'capacity',
                		'path': 'CapacityBytes'
                	},
                	{
                		'name': 'status',
                		'path': 'Status.State'
                	},
                	{
                		'name': 'raidStatus',
                		'path': 'Oem.Dell.DellVirtualDisk.RaidStatus'
                	},
                	{
                		'name': 'readCachePolicy',
                		'path': 'Oem.Dell.DellVirtualDisk.ReadCachePolicy'
                	},
                	{
                		'name': 'writeCachePolicy',
                		'path': 'Oem.Dell.DellVirtualDisk.WriteCachePolicy'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a virtual disk.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: virtualdisk
            - uuid: 3d29d7c490c9409da85dddf894fa370e
              name: 'Virtual disk [{#DISK_NAME}]: RAID status'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}]'
              description: 'This property represents the RAID specific status. Possible values: Blocked, Degraded, Failed, Foreign, Offline, Online, Ready, Unknown, null.'
              valuemap:
                name: 'Virtual disk RAID status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.raidStatus
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Blocked': 1,
                      	'Degraded': 2,
                      	'Failed': 3,
                      	'Foreign': 4,
                      	'Offline': 5,
                      	'Unknown': 6,
                      	'null': 7,
                      	'Ready': 8,
                      	'Online': 9,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
              trigger_prototypes:
                - uuid: d20a78108211428682b98e9e3f1f495a
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}],)<8'
                  name: 'Dell R740: Virtual disk [{#DISK_NAME}]: RAID status not OK'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the disk for faults.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 087b29aa0d864313b7f9ae771af83ded
              name: 'Virtual disk [{#DISK_NAME}]: Read policy'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.read_policy[{#DISK_NAME}]'
              description: 'Indicates the read cache policy setting for the Volume. Possible values: ReadAhead, NoReadAhead, AdaptiveReadAhead.'
              valuemap:
                name: 'Virtual disk read policy'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.readCachePolicy
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'NoReadAhead': 1,
                      	'ReadAhead': 2,
                      	'AdaptiveReadAhead': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: b1f36a733e8442dd95f3a4cd16e38370
              name: 'Virtual disk [{#DISK_NAME}]: Size'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
              trends: '0'
              units: B
              description: 'The size in bytes of this Volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: 44f663f292554323a03dcbeb1c84c19e
              name: 'Virtual disk [{#DISK_NAME}]: Current state'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.state[{#DISK_NAME}]'
              description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
              valuemap:
                name: 'Redfish status state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Enabled': 1,
                      	'Disabled': 2,
                      	'Absent': 3,
                      	'Deferring': 4,
                      	'InTest': 5,
                      	'Quiesced': 6,
                      	'StandbyOffline': 7,
                      	'StandbySpare': 8,
                      	'Starting': 9,
                      	'UnavailableOffline': 10,
                      	'Updating': 11
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: edfe6f57e7314b01b4e67c4a8631c025
              name: 'Virtual disk [{#DISK_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.status[{#DISK_NAME}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
              trigger_prototypes:
                - uuid: c09c76dcedd14a67a9f1910c7d8cfc44
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
                  name: 'Dell R740: Virtual disk [{#DISK_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: e64abe29bebe470ea076cbffe0753c4a
                  expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=2'
                  name: 'Dell R740: Virtual disk [{#DISK_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R740: Virtual disk [{#DISK_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R740 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 19d3a0f1c9574db6b408e65cc9b54be3
              name: 'Virtual disk [{#DISK_NAME}]: Write policy'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.write_policy[{#DISK_NAME}]'
              description: 'Indicates the write cache policy setting for the Volume. Possible values: WriteThrough, WriteBack, ProtectedWriteBack, UnprotectedWriteBack.'
              valuemap:
                name: 'Virtual disk write policy'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.writeCachePolicy
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'WriteThrough': 1,
                      	'WriteBack': 2,
                      	'ProtectedWriteBack': 3,
                      	'UnprotectedWriteBack': 4,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
          graph_prototypes:
            - uuid: b3cc98e3860546369e9a5508210c0c5e
              name: 'Dell R740: Virtual disk [{#DISK_NAME}]: Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R740 by HTTP'
                    key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
          master_item:
            key: dell.server.disks.get
          lld_macro_paths:
            - lld_macro: '{#DISK_NAME}'
              path: $.name
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.virtualDisks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: hardware
        - tag: subclass
          value: server
        - tag: target
          value: dell
        - tag: target
          value: dellpoweredge
      macros:
        - macro: '{$DELL.HTTP.API.PASSWORD}'
          type: SECRET_TEXT
          description: 'The Dell iDRAC user password.'
          config:
            type: TEXT
            priority: '3'
            label: 'iDRAC password'
            description: 'The Dell iDRAC user password.'
            required: 'YES'
        - macro: '{$DELL.HTTP.API.URL}'
          description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
          config:
            type: TEXT
            priority: '1'
            label: 'iDRAC API URL'
            description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
            required: 'YES'
        - macro: '{$DELL.HTTP.API.USER}'
          description: 'The Dell iDRAC username.'
          config:
            type: TEXT
            priority: '2'
            label: 'iDRAC username'
            description: 'The Dell iDRAC username.'
            required: 'YES'
        - macro: '{$DELL.HTTP.CPU.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'CPU usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.CPU.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'CPU usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IFCONTROL}'
          value: '1'
          description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Link status trigger enabled'
            description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IO.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'IO usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IO.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'IO usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.MEM.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Memory usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.MEM.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Memory usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.PROXY}'
          description: 'Set an HTTP proxy for Redfish API requests if needed.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'HTTP proxy'
            description: 'Set an HTTP proxy for Redfish API requests if needed.'
        - macro: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          value: 10s
          description: 'Set the timeout for HTTP requests.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'HTTP timeout'
            description: 'Set the timeout for HTTP requests.'
        - macro: '{$DELL.HTTP.RETURN.CODE.OK}'
          value: '200'
          description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'HTTP OK code'
            description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.SYS.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'SYS usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.SYS.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'SYS usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 9607bad18ebc42d281d7b71a6bb15d6e
          name: Overview
          pages:
            - name: Overview
              display_period: '30'
              widgets:
                - type: gauge
                  name: 'CPU utilization'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: CPU
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: dell.server.util.cpu
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'Memory utilization'
                  'y': '3'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: MEM
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: dell.server.util.mem
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'I/O utilization'
                  'y': '6'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: I/O
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: dell.server.util.io
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'SYS utilization'
                  'y': '9'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: SYS
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: dell.server.util.sys
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: item
                  name: 'Redfish API'
                  x: '18'
                  width: '27'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'Redfish API'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: 'net.tcp.service[https]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'HW model'
                  x: '18'
                  'y': '3'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'HW model'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: dell.server.hw.model
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Serial number'
                  x: '18'
                  'y': '6'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'Serial number'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: dell.server.hw.serialnumber
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: Firmware
                  x: '18'
                  'y': '9'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: Firmware
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: dell.server.hw.firmware
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'System health'
                  x: '45'
                  width: '27'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'System Health'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R740 by HTTP'
                        key: dell.server.status
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
            - name: Discoveries
              display_period: '30'
              widgets:
                - type: honeycomb
                  name: 'Interface link'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Link status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: STRING
                      name: thresholds.0.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.1.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '3'
                - type: honeycomb
                  name: 'Temperature sensors'
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Probe*Value'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Physical disks'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Physical disk*Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                - type: honeycomb
                  name: 'Power supplies'
                  'y': '12'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Power supply*Voltage'
                    - type: STRING
                      name: items.1
                      value: 'Power supply*Current'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: honeycomb
                  name: 'Interface speed'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Speed'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAABA
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '10000000'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF980E
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '100000000'
                    - type: STRING
                      name: thresholds.3.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '1000000000'
                    - type: STRING
                      name: thresholds.4.color
                      value: 2196F3
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '10000000000'
                    - type: STRING
                      name: thresholds.5.color
                      value: 6C00D9
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '25000000000'
                    - type: STRING
                      name: thresholds.6.color
                      value: D900A6
                    - type: STRING
                      name: thresholds.6.threshold
                      value: '40000000000'
                - type: honeycomb
                  name: 'Virtual disks'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Virtual disk*: Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                - type: honeycomb
                  name: Fans
                  x: '36'
                  'y': '12'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Probe*Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
      valuemaps:
        - uuid: 14d13bad8ac34a8987c178a3ab12bcd1
          name: 'Network interface status'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: 'Null'
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Up
        - uuid: c38ce461129d4d338847d86a5e051d09
          name: 'Redfish API availability'
          mappings:
            - value: '0'
              newvalue: Unavailable
            - value: '1'
              newvalue: Available
        - uuid: 8074a7bb6e304adc8945bbeffab84ca6
          name: 'Redfish status health'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: OK
            - value: '2'
              newvalue: Warning
            - value: '3'
              newvalue: Critical
        - uuid: 417f088da9f34fd9b0f75769a44cc126
          name: 'Redfish status state'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Enabled
            - value: '2'
              newvalue: Disabled
            - value: '3'
              newvalue: Absent
            - value: '4'
              newvalue: Deferring
            - value: '5'
              newvalue: InTest
            - value: '6'
              newvalue: Quiesced
            - value: '7'
              newvalue: StandbyOffline
            - value: '8'
              newvalue: StandbySpare
            - value: '9'
              newvalue: Starting
            - value: '10'
              newvalue: UnavailableOffline
            - value: '11'
              newvalue: Updating
        - uuid: 78b955ca37dd4d3da9230b7263694206
          name: 'Virtual disk RAID status'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: Blocked
            - value: '2'
              newvalue: Degraded
            - value: '3'
              newvalue: Failed
            - value: '4'
              newvalue: Foreign
            - value: '5'
              newvalue: Offline
            - value: '6'
              newvalue: Unknown
            - value: '7'
              newvalue: 'Null'
            - value: '8'
              newvalue: Ready
            - value: '9'
              newvalue: Online
        - uuid: 90bf833092b8409a818439b6a2eb9fbe
          name: 'Virtual disk read policy'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: NoReadAhead
            - value: '2'
              newvalue: ReadAhead
            - value: '3'
              newvalue: AdaptiveReadAhead
        - uuid: a261537c3f7e4dd3a14ba4bad0c930dd
          name: 'Virtual disk write policy'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: WriteThrough
            - value: '2'
              newvalue: WriteBack
            - value: '3'
              newvalue: ProtectedWriteBack
            - value: '4'
              newvalue: UnprotectedWriteBack
    - uuid: 42b18986c8b34c2d9c36f9cd00565bd5
      template: 'DELL PowerEdge R750 by HTTP'
      name: 'DELL PowerEdge R750 by HTTP'
      description: |
        Template for DELL PowerEdge R750 servers with iDRAC 8/9 firmware 4.32 and later and Redfish API enabled.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/426752-discussion-thread-for-official-zabbix-dell-templates
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This is a template for monitoring DELL PowerEdge R750 servers with iDRAC 8/9 firmware 4.32 (and later) with Redfish API enabled via Zabbix script items. This template works without any external scripts.
        
        ## Setup
        
        1\. Enable Redfish API in the Dell iDRAC interface of your server.
        
        2\. Create a user for monitoring with read-only permissions in the Dell iDRAC interface.
        
        3\. Create a host for Dell server with iDRAC IP as the Zabbix agent interface.
        
        4\. Link the template to the host.
        
        5\. Customize the values of the `{$DELL.HTTP.API.URL}`, `{$DELL.HTTP.API.USER}`, and `{$DELL.HTTP.API.PASSWORD}` macros.
        
        > NOTE! If you are experiencing timeouts on some of the items that are executing requests, adjust the `{$DELL.HTTP.REQUEST.TIMEOUT}` macro accordingly.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Server hardware'
      items:
        - uuid: 5758eff4369d494981404a54f84306e4
          name: 'Get array controller resources'
          type: SCRIPT
          key: dell.server.array.resources.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Controller', 'Discovery', params);
            
            const controllers = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage?$expand=.($levels=1)'), 'Members');
            
            var arrControllerKeys = [
            	{
            		'name': 'id',
            		'path': 'Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	},
            	{
            		'name': 'health',
            		'path': 'Status.Health'
            	},
            	{
            		'name': 'slot',
            		'path': 'Oem.Dell.DellController.PCISlot'
            	}
            ];
            
            var battControllerKeys = [
            	{
            		'name': 'id',
            		'path': 'Oem.Dell.DellControllerBattery.Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Oem.Dell.DellControllerBattery.Name'
            	},
            	{
            		'name': 'status',
            		'path': 'Oem.Dell.DellControllerBattery.PrimaryStatus'
            	}
            ];
            
            if (!Array.isArray(controllers)) {
            	throw 'Unexpected type for controllers.';
            }
            
            var buffer = { 'arrayControllers': [], 'batteryControllers': [] };
            
            controllers.forEach(function (controller) {
            	if (controller['Id'].search('RAID') > -1) {
            		buffer['arrayControllers'].push(dell.extractData(controller, arrControllerKeys, true));
            		buffer['batteryControllers'].push(dell.extractData(controller, battControllerKeys, true));
            	}
            });
            
            return JSON.stringify(buffer);
          description: 'Returns array controller resources.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: fed600a0b427471685abbdf145e7536d
          name: 'Get disks'
          type: SCRIPT
          key: dell.server.disks.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Disk', 'Discovery', params);
            
            const disks = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage'), 'Members');
            
            var keys = [
            	{
            		'name': 'path',
            		'path': '@odata.id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	}
            ];
            
            if (!Array.isArray(disks)) {
            	throw 'Unexpected type for disks.';
            }
            
            var buffer = { 'physicalDisks': [], 'virtualDisks': [] };
            
            disks.forEach(function (disk) {
            	var requests = [{ 'usage': 'physicalDisks', 'path': '', 'target': 'Drives' }, { 'usage': 'virtualDisks', 'path': '/Volumes', 'target': 'Members' }];
            
            	requests.forEach(function (request) {
            		const disks = dell.extractData(dell.executeRequest(disk['@odata.id'] + request['path']), request['target']);
            
            		if (!Array.isArray(disks) || disks.length <= 0) {
            			return;
            		}
            
            		disks.forEach(function (drive) {
            			buffer[request['usage']].push(dell.extractData(dell.executeRequest(drive['@odata.id']), keys));
            		});
            	});
            });
            
            return JSON.stringify(buffer);
          description: 'Returns storage resources.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 6da3df75f68345e98a0169351f2fdbcf
          name: 'Firmware version'
          type: DEPENDENT
          key: dell.server.hw.firmware
          value_type: CHAR
          description: 'This attribute defines the firmware version of a remote access card.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.firmware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 479b1531bed7454d97773967e23d53f1
              expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.firmware,#1)<>last(/DELL PowerEdge R750 by HTTP/dell.server.hw.firmware,#2) and length(last(/DELL PowerEdge R750 by HTTP/dell.server.hw.firmware))>0'
              name: 'Dell R750: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'The firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: aeccd99feba8400aa45cb836b4d9ea3a
          name: 'Hardware model name'
          type: DEPENDENT
          key: dell.server.hw.model
          value_type: CHAR
          description: 'This attribute defines the model name of the system.'
          inventory_link: MODEL
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.model
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
        - uuid: c57b2ba6346b4768be23d01d10f3b83b
          name: 'Hardware serial number'
          type: DEPENDENT
          key: dell.server.hw.serialnumber
          value_type: CHAR
          description: 'This attribute defines the service tag of the system.'
          inventory_link: SERIALNO_A
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.serialnumber
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 5c1ca8b9ce8146b2a7184e8e9b5f2eeb
              expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.serialnumber,#1)<>last(/DELL PowerEdge R750 by HTTP/dell.server.hw.serialnumber,#2) and length(last(/DELL PowerEdge R750 by HTTP/dell.server.hw.serialnumber))>0'
              name: 'Dell R750: Device has been replaced'
              event_name: 'Dell R750: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'The device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 36bb12f18137442aaad4b5c7d0aaa713
          name: 'Get network interfaces'
          type: SCRIPT
          key: dell.server.net.iface.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Network Interface', 'Discovery', params);
            
            const netAdapters = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters'), 'Members');
            
            var keys = [
            	{
            		'name': 'path',
            		'path': '@odata.id'
            	},
            	{
            		'name': 'id',
            		'path': 'Id'
            	}
            ];
            
            if (!Array.isArray(netAdapters)) {
            	throw 'Unexpected type for network adapters.';
            }
            
            var buffer = [];
            
            netAdapters.forEach(function (netAdapter) {
            	const netPorts = dell.extractData(dell.executeRequest(netAdapter["@odata.id"] + '/NetworkPorts'), 'Members');
            
            	if (!Array.isArray(netPorts)) {
            		return;
            	}
            
            	netPorts.forEach(function (netPort) {
            		buffer.push(dell.extractData(dell.executeRequest(netPort["@odata.id"]), keys));
            	})
            });
            
            return JSON.stringify(buffer);
          description: 'Returns network interfaces.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 4cf208355d724de39347889314e2df1d
          name: 'Get sensors'
          type: SCRIPT
          key: dell.server.sensors.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            function formatPSU(psuObj) {
            	var foundPowerSupplies = [],
            		buffer = [];
            
            	psuObj.forEach(function (obj) {
            		const psuName = obj['name'].split(' ')[0];
            
            		if (foundPowerSupplies.indexOf(psuName) === -1) {
            			foundPowerSupplies.push(psuName);
            			buffer.push({
            				'name': psuName,
            				[obj['type'].toLowerCase()]: {'reading': obj['reading'], 'health': obj['health']}
            			});
            		} else {
            			buffer.forEach(function (bufferObj) {
            
            				if (bufferObj['name'] === psuName) {
            					bufferObj[obj['type'].toLowerCase()] = {'reading': obj['reading'], 'health': obj['health']};
            
            					return;
            				}
            			});
            		}
            	})
            	return buffer;
            };
            
            function formatTemp(tempObj) {
            	tempObj.forEach(function (obj) {
            		obj.name = obj.name.split(' ').slice(0, -1).join(' ');
            	});
            
            	return tempObj;
            }
            
            function formatSysBoard(sysObj) {
            	const remove = ['System', 'Board', 'Usage'];
            
            	sysObj.forEach(function (obj) {
            		var buffer = [];
            
            		obj['name'].split(' ').forEach(function (word) {
            			var match = false;
            
            			remove.forEach(function (removeWord) {
            				if (removeWord === word) {
            					match = true;
            				}
            			});
            
            			if (!match) {
            				buffer.push(word);
            			}
            		});
            
            		if (buffer.length > 0) {
            			obj['name'] = buffer.join(' ');
            		}
            	});
            
            	return sysObj;
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Sensor', 'Discovery', params);
            
            const sensors = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/Sensors?$expand=.($levels=1)'), 'Members');
            
            if (!Array.isArray(sensors)) {
            	throw 'Unexpected type for sensors.';
            }
            
            const keys = [
            	{
            		'name': 'id',
            		'path': 'Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	},
            	{
            		'name': 'context',
            		'path': 'PhysicalContext'
            	},
            	{
            		'name': 'reading',
            		'path': 'Reading'
            	},
            	{
            		'name': 'type',
            		'path': 'ReadingType'
            	},
            	{
            		'name': 'health',
            		'path': 'Status.Health'
            	}
            ];
            
            var buffer = { 'fan': [], 'psu': [], 'temperature': [], 'sysBoard': [] };
            
            sensors.forEach(function (sensor) {
            	if (sensor['Name'].substring(0, 2) === 'PS' && sensor['PhysicalContext'] === 'PowerSupply') {
            		buffer['psu'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['ReadingType'] === 'Temperature') {
            		buffer['temperature'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['Name'].includes('Fan') && sensor['ReadingType'] === 'Rotational') {
            		buffer['fan'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['Name'].includes('System Board') && sensor['ReadingType'] === 'Percent') {
            		buffer['sysBoard'].push(dell.extractData(sensor, keys, true));
            	}
            });
            
            buffer['psu'] = formatPSU(buffer['psu']);
            buffer['temperature'] = formatTemp(buffer['temperature']);
            buffer['sysBoard'] = formatSysBoard(buffer['sysBoard']);
            
            return JSON.stringify(buffer);
          description: 'Returns sensors.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 429cd5c9a52944899198a70630c82008
          name: 'Overall system health status'
          type: DEPENDENT
          key: dell.server.status
          trends: '0'
          description: 'This attribute defines the overall rollup status of all the components in the system monitored by the remote access card. Includes system, storage, IO devices, iDRAC, CPU, memory, etc.'
          valuemap:
            name: 'Redfish status health'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.status
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = {
                  	'OK': 1,
                  	'Warning': 2,
                  	'Critical': 3,
                  };
                  
                  return typeof idx[value] === 'undefined' ? 0 : idx[value];
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: 71471cc70f114c43adec7410a9c76d16
              expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.status,)=3'
              name: 'Dell R750: Server is in a critical state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Please check the device for faults.'
              tags:
                - tag: scope
                  value: availability
            - uuid: ca10f6c7deda4c64b5bcc5db15d0a9c5
              expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.status,)=2'
              name: 'Dell R750: Server is in a warning state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Please check the device for warnings.'
              dependencies:
                - name: 'Dell R750: Server is in a critical state'
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.status,)=3'
              tags:
                - tag: scope
                  value: availability
        - uuid: b9acc3a3d4d74a19911fce16f8a3a8d5
          name: 'Get system'
          type: SCRIPT
          key: dell.server.system.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('System', 'Get system metrics', params);
            
            const requests = [
            	{
            		'path': '/redfish/v1/Systems/System.Embedded.1',
            		'keys': [
            			{
            				'name': 'model',
            				'path': 'Model'
            			},
            			{
            				'name': 'serialnumber',
            				'path': 'Oem.Dell.DellSystem.ChassisServiceTag'
            			},
            			{
            				'name': 'status',
            				'path': 'Status.Health'
            			}
            		]
            	},
            	{
            		'path': '/redfish/v1/Managers/iDRAC.Embedded.1',
            		'keys': {
            			'name': 'firmware',
            			'path': 'FirmwareVersion'
            		}
            	}
            ];
            
            var buffer = {};
            
            for (var i = 0, requestsCount = requests.length; i < requestsCount; i++) {
            	Object.assign(buffer, dell.extractData(dell.executeRequest(requests[i].path), requests[i].keys));
            }
            
            return JSON.stringify(buffer);
          description: 'Returns system metrics.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: e04a65c2c83640f694d594f715ed0456
          name: 'CPU utilization, in %'
          type: DEPENDENT
          key: dell.server.util.cpu
          value_type: FLOAT
          units: '%'
          description: 'CPU utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardCPUUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: 3da411d4c9324ece8e54a7eb841a0b00
              expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.WARN}'
              name: 'Dell R750: CPU utilization is high'
              event_name: 'Dell R750: Current CPU utilization is high (util >= {$DELL.HTTP.CPU.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R750: CPU utilization is too high'
                  expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 25ef27dc6f954cf684df80a45b82cb65
              expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
              name: 'Dell R750: CPU utilization is too high'
              event_name: 'Dell R750: Current CPU utilization is too high (util >= {$DELL.HTTP.CPU.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: d2ce7586a8ed4846817982ed7035bbb7
          name: 'IO utilization, in %'
          type: DEPENDENT
          key: dell.server.util.io
          value_type: FLOAT
          units: '%'
          description: 'IO utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardIOUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: io
          triggers:
            - uuid: 96bf746590ef41c5b4eb13e4b5775804
              expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.WARN}'
              name: 'Dell R750: IO utilization is high'
              event_name: 'Dell R750: Current IO utilization is high (util >= {$DELL.HTTP.IO.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R750: IO utilization is too high'
                  expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 04bb737e97e7462ab0b226169191eb86
              expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              name: 'Dell R750: IO utilization is too high'
              event_name: 'Dell R750: Current IO utilization is too high (util >= {$DELL.HTTP.IO.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: f22138f68b8c46cabf1716f1ba7bcec9
          name: 'Memory utilization, in %'
          type: DEPENDENT
          key: dell.server.util.mem
          value_type: FLOAT
          units: '%'
          description: 'Memory utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardMEMUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: c942008a07a140f5b2fc1552f190b240
              expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.WARN}'
              name: 'Dell R750: Memory utilization is high'
              event_name: 'Dell R750: Current memory utilization is high (util >= {$DELL.HTTP.MEM.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R750: Memory utilization is too high'
                  expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 519ccd1746f84716848732a24d6c6adc
              expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
              name: 'Dell R750: Memory utilization is too high'
              event_name: 'Dell R750: Current memory utilization is too high (util >= {$DELL.HTTP.MEM.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: d50e338b587f4e64b80b608428e6f95e
          name: 'SYS utilization, in %'
          type: DEPENDENT
          key: dell.server.util.sys
          value_type: FLOAT
          units: '%'
          description: 'SYS utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardSYSUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: sys
          triggers:
            - uuid: ad3b33164e5c44489b0a58824de01948
              expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.WARN}'
              name: 'Dell R750: SYS utilization is high'
              event_name: 'Dell R750: Current SYS utilization is high (util >= {$DELL.HTTP.SYS.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R750: IO utilization is too high'
                  expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 39ffa53a535a41a5b6143b09afd2e04d
              expression: 'min(/DELL PowerEdge R750 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.HIGH}'
              name: 'Dell R750: SYS utilization is too high'
              event_name: 'Dell R750: Current SYS utilization is too high (util >= {$DELL.HTTP.SYS.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: cb5fc3e47c5444fcaff32a351bb1a392
          name: 'Redfish API status'
          type: SIMPLE
          key: 'net.tcp.service[https]'
          description: |
            Availability of Redfish API on the server.
            Possible values:
              0 - Unavailable
              1 - Available
          valuemap:
            name: 'Redfish API availability'
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: 5cb42d522d814335861831685b6a5e4a
              expression: 'last(/DELL PowerEdge R750 by HTTP/net.tcp.service[https])=0'
              name: 'Dell R750: Redfish API service is unavailable'
              priority: HIGH
              description: 'The service is unavailable or does not accept TCP connections.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 27b8d7b67306418b887e0e1c025cad1f
          name: 'Array controller discovery'
          type: DEPENDENT
          key: dell.server.array.discovery
          description: 'Discovery of disk array controllers.'
          item_prototypes:
            - uuid: d4bae6dc224943aaa66c45769e466745
              name: 'Controller [{#CNTLR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.array.status[{#ID}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.arrayControllers[?(@.id == "{#ID}")].health.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: dell.server.array.resources.get
              tags:
                - tag: component
                  value: diskarray
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 413f12d3e6254eecbdf64042078ed85f
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.array.status[{#ID}],)=3'
                  name: 'Dell R750: Controller [{#CNTLR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 7e5656e12a954c469fe206ba9bdc0894
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.array.status[{#ID}],)=2'
                  name: 'Dell R750: Controller [{#CNTLR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Controller [{#CNTLR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.array.status[{#ID}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: dell.server.array.resources.get
          lld_macro_paths:
            - lld_macro: '{#CNTLR_NAME}'
              path: $.name
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SLOT}'
              path: $.slot
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.arrayControllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 71504dca399244f8b833552828dc99d6
          name: 'Battery discovery'
          type: DEPENDENT
          key: dell.server.controller.battery.discovery
          description: 'Discovery of battery controllers.'
          item_prototypes:
            - uuid: 739a63c6cce543079a2cccda1a32b69c
              name: 'Battery [{#BATTERY_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.controller.battery.status[{#ID}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.batteryControllers[?(@.id == "{#ID}")].status.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: dell.server.array.resources.get
              tags:
                - tag: component
                  value: battery
                - tag: component
                  value: diskarray
              trigger_prototypes:
                - uuid: e70d701b4b1544f788c81ebc778baa7c
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
                  name: 'Dell R750: Battery [{#BATTERY_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 114de801bd8947df82bd3ac2a9488403
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.controller.battery.status[{#ID}],)=2'
                  name: 'Dell R750: Battery [{#BATTERY_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Battery [{#BATTERY_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: dell.server.array.resources.get
          lld_macro_paths:
            - lld_macro: '{#BATTERY_NAME}'
              path: $.name
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.batteryControllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: b5419132c641433887d21573ed57803a
          name: 'FAN discovery'
          type: DEPENDENT
          key: dell.server.fan.discovery
          description: 'Discovery of FAN sensors.'
          item_prototypes:
            - uuid: 389697a7fb8543118c0f68a2b3791184
              name: 'Fan [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.fan.[?(@.id == ''{#ID}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: raw
            - uuid: 266ef80f48d04767aa5b9c6c09ff9817
              name: 'Fan [{#SENSOR_NAME}]: Speed'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
              units: '!rpm'
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reading
              master_item:
                key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: fan
            - uuid: 9740c656008d41a9be415a87bb9e8108
              name: 'Fan [{#SENSOR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: fan
              trigger_prototypes:
                - uuid: 98e69cc779b74216bf87464de3dfd10f
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R750: Fan [{#SENSOR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 56498b5a1a654f0ab75dfed48cc90519
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R750: Fan [{#SENSOR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Fan [{#SENSOR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: 5512fb8c939e4777a4e8440d1afe473a
              name: 'Dell R750: Fan [{#SENSOR_NAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R750 by HTTP'
                    key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.fan
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 4ffe2d326f414e8d9fe1c361abd3bde7
          name: 'Network interface discovery'
          type: DEPENDENT
          key: dell.server.net.if.discovery
          description: 'Discovery of network interfaces.'
          item_prototypes:
            - uuid: 97302beadb364298a72fc90525435812
              name: 'Interface [{#IFNAME}]: Get interface'
              type: SCRIPT
              key: 'dell.server.net.if.get[{#IFNAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Network Interface', 'Get metrics', params);
                
                const keys = [
                	{
                		'name': 'linkStatus',
                		'path': 'LinkStatus'
                	},
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'state',
                		'path': 'Status.State'
                	},
                	{
                		'name': 'linkSpeed',
                		'path': 'CurrentLinkSpeedMbps'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a network interface.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: raw
            - uuid: a839b259f5154f218badb30364b7b7df
              name: 'Interface [{#IFNAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.net.if.health[{#IFNAME}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: b52a77a9ed6040f8a774e90291ee8304
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
                  name: 'Dell R750: Interface [{#IFNAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 1e5ba94a3e61409890de06d2b7145046
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.health[{#IFNAME}],)=2'
                  name: 'Dell R750: Interface [{#IFNAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Interface [{#IFNAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 2119fcd485e74cd2b7157ee154af790f
              name: 'Interface [{#IFNAME}]: Speed'
              type: DEPENDENT
              key: 'dell.server.net.if.speed[{#IFNAME}]'
              units: bps
              description: 'The network port current link speed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.linkSpeed
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
            - uuid: aee183b298004a38bd51f8446efc97ce
              name: 'Interface [{#IFNAME}]: State'
              type: DEPENDENT
              key: 'dell.server.net.if.state[{#IFNAME}]'
              description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
              valuemap:
                name: 'Redfish status state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.state
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Enabled': 1,
                      	'Disabled': 2,
                      	'Absent': 3,
                      	'Deferring': 4,
                      	'InTest': 5,
                      	'Quiesced': 6,
                      	'StandbyOffline': 7,
                      	'StandbySpare': 8,
                      	'Starting': 9,
                      	'UnavailableOffline': 10,
                      	'Updating': 11
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
            - uuid: f06af1f337c6466f9c5706cddc8b7915
              name: 'Interface [{#IFNAME}]: Link status'
              type: DEPENDENT
              key: 'dell.server.net.if.status[{#IFNAME}]'
              description: 'The status of the link between this port and its link partner. Possible values: Down, Up, null.'
              valuemap:
                name: 'Network interface status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.linkStatus
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'null': 1,
                      	'Down': 2,
                      	'Up': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: 14f89419376e4a9f87bb8a8fdce08c4d
                  expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.status[{#IFNAME}],)=2 and last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.status[{#IFNAME}],)=1 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Dell R750: Interface [{#IFNAME}]: 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).
                    2. `{$DELL.HTTP.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 (2).
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "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: 616f54f3f8c24efcb6cfd2dabddfb39a
                  expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.status[{#IFNAME}],)<2 and last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.net.if.status[{#IFNAME}],)>=2 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Dell R750: Interface [{#IFNAME}]: Link status issue'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is Null (1) or Unknown (0).
                    2. `{$DELL.HTTP.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 Null (1) or Unknown (0).
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "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
          graph_prototypes:
            - uuid: 30caeb71fa0c4fda86bcc2e5fd420ec3
              name: 'Dell R750: Interface [{#IFNAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R750 by HTTP'
                    key: 'dell.server.net.if.speed[{#IFNAME}]'
          master_item:
            key: dell.server.net.iface.get
          lld_macro_paths:
            - lld_macro: '{#IFNAME}'
              path: $.id
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: b5348e19cae14ae2b03d7233af32e0b4
          name: 'Physical disk discovery'
          type: DEPENDENT
          key: dell.server.physicaldisk.discovery
          description: 'Discovery of physical disks.'
          item_prototypes:
            - uuid: 235afcffe8b14b32aa67bdb7fc6333cb
              name: 'Physical disk [{#DISK_NAME}]: Get disk'
              type: SCRIPT
              key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Disk', 'Get physical disk metrics', params);
                
                const keys = [
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'sn',
                		'path': 'SerialNumber'
                	},
                	{
                		'name': 'model',
                		'path': 'Model'
                	},
                	{
                		'name': 'mediaType',
                		'path': 'MediaType'
                	},
                	{
                		'name': 'capacity',
                		'path': 'CapacityBytes'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a physical disk.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: raw
                - tag: component
                  value: storage
            - uuid: bd17c2643991431891563776da992e07
              name: 'Physical disk [{#DISK_NAME}]: Media type'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.media_type[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The type of media contained in this drive. Possible values: HDD, SSD, SMR, null.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.mediaType
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: 4547fec41f5f4896bf23325c72293d74
              name: 'Physical disk [{#DISK_NAME}]: Model name'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.model[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The model number of the drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: e6dbc8a224ba4501904167f9a69f542a
              name: 'Physical disk [{#DISK_NAME}]: Serial number'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The serial number of this drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.sn
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 2cf59e5195f44f2294355ff8d7c92cd7
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#1)<>last(/DELL PowerEdge R750 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#2) and length(last(/DELL PowerEdge R750 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]))>0'
                  name: 'Dell R750: Physical disk [{#DISK_NAME}] has been replaced'
                  event_name: 'Dell R750: [{#DISK_NAME}] has been replaced (new serial number received)'
                  priority: INFO
                  description: '[{#DISK_NAME}] serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: da4f9f2c063149a9b148907566b699bf
              name: 'Physical disk [{#DISK_NAME}]: Size'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
              trends: '0'
              units: B
              description: 'The size, in bytes, of this drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: 9ffb57530887440c8e2b37033c1313f8
              name: 'Physical disk [{#DISK_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.status[{#DISK_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 24c1d95610cb4379b771bad57ccf1c6a
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
                  name: 'Dell R750: Physical disk [{#DISK_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 569dc8a30a8e4cb8b83e15265a3cbf55
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=2'
                  name: 'Dell R750: Physical disk [{#DISK_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Physical disk [{#DISK_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: 680fda00a8864d6fbabe2d74055beb10
              name: 'Dell R750: Physical disk [{#DISK_NAME}]: Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R750 by HTTP'
                    key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
          master_item:
            key: dell.server.disks.get
          lld_macro_paths:
            - lld_macro: '{#DISK_NAME}'
              path: $.name
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.physicalDisks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: b00da28f7005454485640302d3b4159c
          name: 'PSU discovery'
          type: DEPENDENT
          key: dell.server.psu.discovery
          description: 'Discovery of PSU sensors.'
          item_prototypes:
            - uuid: 9a07948391284315a46fb5f58dad20be
              name: 'Power supply [{#SENSOR_NAME}]: Current sensor status'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.current.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.current.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
              trigger_prototypes:
                - uuid: 4079021e35c948e4aa221bd3d327cce7
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R750: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: d66e8b1ec51f4e62b773caa27c70610a
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R750: Power supply [{#SENSOR_NAME}]: Current sensor: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 947e2a4eac99437c863c362149d43c6a
              name: 'Power supply [{#SENSOR_NAME}]: Current'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: A
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.current.reading
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: current
                - tag: component
                  value: psu
            - uuid: 8b2b64d5286f4bc69536bccc16669bd9
              name: 'Power supply [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.psu.[?(@.name == ''{#SENSOR_NAME}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: raw
            - uuid: 3bd24762290a463bb24cbf5d79fc6615
              name: 'Power supply [{#SENSOR_NAME}]: Voltage sensor status'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
              trigger_prototypes:
                - uuid: 1ac6f860ec194b2caea307904c52313a
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R750: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: a1f4d65962ff49d1a8fb060650299b9f
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R750: Power supply [{#SENSOR_NAME}]: Voltage sensor: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: a7cd2e9a40f04d2fad64beabc71c73b9
              name: 'Power supply [{#SENSOR_NAME}]: Voltage'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: V
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage.reading
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: voltage
          graph_prototypes:
            - uuid: 18a6ba72261f45248c5d6b7775b003bb
              name: 'Dell R750: Power supply [{#SENSOR_NAME}]: Current'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R750 by HTTP'
                    key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
            - uuid: 1c2fdb8764664403ac21dce61bd887af
              name: 'Dell R750: Power supply [{#SENSOR_NAME}]: Voltage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R750 by HTTP'
                    key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.psu
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 71b1c58fe83b424582396732ecee39f0
          name: 'Temperature discovery'
          type: DEPENDENT
          key: dell.server.temp.discovery
          description: 'Discovery of temperature sensors.'
          item_prototypes:
            - uuid: 0c702302c56944b2bfbf0f899366e098
              name: 'Probe [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.temperature.[?(@.id == ''{#ID}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: temperature
            - uuid: a92fd77103374ae884c4caec3f8a84ef
              name: 'Probe [{#SENSOR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 71d81774eea54ca8a3085b534a9a4352
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R750: Probe [{#SENSOR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: c0556a6e25e24c3ca8b666a35a929564
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R750: Probe [{#SENSOR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Probe [{#SENSOR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: d58c124c61d94c65bb8a3846e659000b
              name: 'Probe [{#SENSOR_NAME}]: Value'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: °C
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reading
              master_item:
                key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: temperature
          graph_prototypes:
            - uuid: 1e598bba591c47f6ac1447b70974284c
              name: 'Dell R750: Probe [{#SENSOR_NAME}]: Value'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R750 by HTTP'
                    key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.temperature
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 92566cdbe5944d44bb5731ddaac795c7
          name: 'Virtual disk discovery'
          type: DEPENDENT
          key: dell.server.virtualdisk.discovery
          description: 'Discovery of virtual disks.'
          item_prototypes:
            - uuid: 0270423f8d1f45699457660f9bd7a1c1
              name: 'Virtual disk [{#DISK_NAME}]: Get disk'
              type: SCRIPT
              key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Disk', 'Get virtual disk metrics', params);
                
                const keys = [
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'capacity',
                		'path': 'CapacityBytes'
                	},
                	{
                		'name': 'status',
                		'path': 'Status.State'
                	},
                	{
                		'name': 'raidStatus',
                		'path': 'Oem.Dell.DellVirtualDisk.RaidStatus'
                	},
                	{
                		'name': 'readCachePolicy',
                		'path': 'Oem.Dell.DellVirtualDisk.ReadCachePolicy'
                	},
                	{
                		'name': 'writeCachePolicy',
                		'path': 'Oem.Dell.DellVirtualDisk.WriteCachePolicy'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a virtual disk.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: virtualdisk
            - uuid: eefaac7bdaa84bc4a3ef657798a93aae
              name: 'Virtual disk [{#DISK_NAME}]: RAID status'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}]'
              description: 'This property represents the RAID specific status. Possible values: Blocked, Degraded, Failed, Foreign, Offline, Online, Ready, Unknown, null.'
              valuemap:
                name: 'Virtual disk RAID status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.raidStatus
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Blocked': 1,
                      	'Degraded': 2,
                      	'Failed': 3,
                      	'Foreign': 4,
                      	'Offline': 5,
                      	'Unknown': 6,
                      	'null': 7,
                      	'Ready': 8,
                      	'Online': 9,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
              trigger_prototypes:
                - uuid: 7cf1f17cf2ca4a4dbe1066d5bb372c28
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}],)<8'
                  name: 'Dell R750: Virtual disk [{#DISK_NAME}]: RAID status not OK'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the disk for faults.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: b133fbbbb0774e4db20fc4063fd65936
              name: 'Virtual disk [{#DISK_NAME}]: Read policy'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.read_policy[{#DISK_NAME}]'
              description: 'Indicates the read cache policy setting for the Volume. Possible values: ReadAhead, NoReadAhead, AdaptiveReadAhead.'
              valuemap:
                name: 'Virtual disk read policy'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.readCachePolicy
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'NoReadAhead': 1,
                      	'ReadAhead': 2,
                      	'AdaptiveReadAhead': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: ad80600ff7bf49879216172b35826689
              name: 'Virtual disk [{#DISK_NAME}]: Size'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
              trends: '0'
              units: B
              description: 'The size in bytes of this Volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: 74aee5b600b24332befeb1f9c403693c
              name: 'Virtual disk [{#DISK_NAME}]: Current state'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.state[{#DISK_NAME}]'
              description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
              valuemap:
                name: 'Redfish status state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Enabled': 1,
                      	'Disabled': 2,
                      	'Absent': 3,
                      	'Deferring': 4,
                      	'InTest': 5,
                      	'Quiesced': 6,
                      	'StandbyOffline': 7,
                      	'StandbySpare': 8,
                      	'Starting': 9,
                      	'UnavailableOffline': 10,
                      	'Updating': 11
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: 2cdf0d7cc69640df96b9d949b37f3f77
              name: 'Virtual disk [{#DISK_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.status[{#DISK_NAME}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
              trigger_prototypes:
                - uuid: e872fea6b96c4b9cad4b313d94723616
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
                  name: 'Dell R750: Virtual disk [{#DISK_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 916b4e10d26c4c6d99e3f40f5dc49c05
                  expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=2'
                  name: 'Dell R750: Virtual disk [{#DISK_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R750: Virtual disk [{#DISK_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R750 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: fff7446780464364bda19db28cc6854c
              name: 'Virtual disk [{#DISK_NAME}]: Write policy'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.write_policy[{#DISK_NAME}]'
              description: 'Indicates the write cache policy setting for the Volume. Possible values: WriteThrough, WriteBack, ProtectedWriteBack, UnprotectedWriteBack.'
              valuemap:
                name: 'Virtual disk write policy'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.writeCachePolicy
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'WriteThrough': 1,
                      	'WriteBack': 2,
                      	'ProtectedWriteBack': 3,
                      	'UnprotectedWriteBack': 4,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
          graph_prototypes:
            - uuid: 92dda4f99e7e453babc83bff7ff5fc81
              name: 'Dell R750: Virtual disk [{#DISK_NAME}]: Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R750 by HTTP'
                    key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
          master_item:
            key: dell.server.disks.get
          lld_macro_paths:
            - lld_macro: '{#DISK_NAME}'
              path: $.name
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.virtualDisks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: hardware
        - tag: subclass
          value: server
        - tag: target
          value: dell
        - tag: target
          value: dellpoweredge
      macros:
        - macro: '{$DELL.HTTP.API.PASSWORD}'
          type: SECRET_TEXT
          description: 'The Dell iDRAC user password.'
          config:
            type: TEXT
            priority: '3'
            label: 'iDRAC password'
            description: 'The Dell iDRAC user password.'
            required: 'YES'
        - macro: '{$DELL.HTTP.API.URL}'
          description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
          config:
            type: TEXT
            priority: '1'
            label: 'iDRAC API URL'
            description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
            required: 'YES'
        - macro: '{$DELL.HTTP.API.USER}'
          description: 'The Dell iDRAC username.'
          config:
            type: TEXT
            priority: '2'
            label: 'iDRAC username'
            description: 'The Dell iDRAC username.'
            required: 'YES'
        - macro: '{$DELL.HTTP.CPU.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'CPU usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.CPU.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'CPU usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IFCONTROL}'
          value: '1'
          description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Link status trigger enabled'
            description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IO.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'IO usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IO.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'IO usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.MEM.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Memory usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.MEM.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Memory usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.PROXY}'
          description: 'Set an HTTP proxy for Redfish API requests if needed.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'HTTP proxy'
            description: 'Set an HTTP proxy for Redfish API requests if needed.'
        - macro: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          value: 10s
          description: 'Set the timeout for HTTP requests.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'HTTP timeout'
            description: 'Set the timeout for HTTP requests.'
        - macro: '{$DELL.HTTP.RETURN.CODE.OK}'
          value: '200'
          description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'HTTP OK code'
            description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.SYS.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'SYS usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.SYS.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'SYS usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: b96317122fe34f54b173083884d0db24
          name: Overview
          pages:
            - name: Overview
              display_period: '30'
              widgets:
                - type: gauge
                  name: 'CPU utilization'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: CPU
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: dell.server.util.cpu
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'Memory utilization'
                  'y': '3'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: MEM
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: dell.server.util.mem
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'I/O utilization'
                  'y': '6'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: I/O
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: dell.server.util.io
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'SYS utilization'
                  'y': '9'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: SYS
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: dell.server.util.sys
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: item
                  name: 'Redfish API'
                  x: '18'
                  width: '27'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'Redfish API'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: 'net.tcp.service[https]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'HW model'
                  x: '18'
                  'y': '3'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'HW model'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: dell.server.hw.model
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Serial number'
                  x: '18'
                  'y': '6'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'Serial number'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: dell.server.hw.serialnumber
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: Firmware
                  x: '18'
                  'y': '9'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: Firmware
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: dell.server.hw.firmware
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'System health'
                  x: '45'
                  width: '27'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'System Health'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R750 by HTTP'
                        key: dell.server.status
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
            - name: Discoveries
              display_period: '30'
              widgets:
                - type: honeycomb
                  name: 'Interface link'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Link status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: STRING
                      name: thresholds.0.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.1.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '3'
                - type: honeycomb
                  name: 'Temperature sensors'
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Probe*Value'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Physical disks'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Physical disk*Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                - type: honeycomb
                  name: 'Power supplies'
                  'y': '12'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Power supply*Voltage'
                    - type: STRING
                      name: items.1
                      value: 'Power supply*Current'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: honeycomb
                  name: 'Interface speed'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Speed'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAABA
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '10000000'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF980E
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '100000000'
                    - type: STRING
                      name: thresholds.3.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '1000000000'
                    - type: STRING
                      name: thresholds.4.color
                      value: 2196F3
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '10000000000'
                    - type: STRING
                      name: thresholds.5.color
                      value: 6C00D9
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '25000000000'
                    - type: STRING
                      name: thresholds.6.color
                      value: D900A6
                    - type: STRING
                      name: thresholds.6.threshold
                      value: '40000000000'
                - type: honeycomb
                  name: 'Virtual disks'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Virtual disk*: Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                - type: honeycomb
                  name: Fans
                  x: '36'
                  'y': '12'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Probe*Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
      valuemaps:
        - uuid: 56fb82a2303e451b9a585687a0902794
          name: 'Network interface status'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: 'Null'
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Up
        - uuid: c1074235685c4d2096c30a3ab686634e
          name: 'Redfish API availability'
          mappings:
            - value: '0'
              newvalue: Unavailable
            - value: '1'
              newvalue: Available
        - uuid: a5e2bf8ce89a482aa87ccccbf01cb1cd
          name: 'Redfish status health'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: OK
            - value: '2'
              newvalue: Warning
            - value: '3'
              newvalue: Critical
        - uuid: c295caa412b74acb918176f8d4543010
          name: 'Redfish status state'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Enabled
            - value: '2'
              newvalue: Disabled
            - value: '3'
              newvalue: Absent
            - value: '4'
              newvalue: Deferring
            - value: '5'
              newvalue: InTest
            - value: '6'
              newvalue: Quiesced
            - value: '7'
              newvalue: StandbyOffline
            - value: '8'
              newvalue: StandbySpare
            - value: '9'
              newvalue: Starting
            - value: '10'
              newvalue: UnavailableOffline
            - value: '11'
              newvalue: Updating
        - uuid: d88a53d7143a49dfb37057f9d80ed48a
          name: 'Virtual disk RAID status'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: Blocked
            - value: '2'
              newvalue: Degraded
            - value: '3'
              newvalue: Failed
            - value: '4'
              newvalue: Foreign
            - value: '5'
              newvalue: Offline
            - value: '6'
              newvalue: Unknown
            - value: '7'
              newvalue: 'Null'
            - value: '8'
              newvalue: Ready
            - value: '9'
              newvalue: Online
        - uuid: 46520ef5e9e544c4a4393bd6a2ed4548
          name: 'Virtual disk read policy'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: NoReadAhead
            - value: '2'
              newvalue: ReadAhead
            - value: '3'
              newvalue: AdaptiveReadAhead
        - uuid: 6c17f062dc8e4f7cb2362adcffbe11c5
          name: 'Virtual disk write policy'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: WriteThrough
            - value: '2'
              newvalue: WriteBack
            - value: '3'
              newvalue: ProtectedWriteBack
            - value: '4'
              newvalue: UnprotectedWriteBack
    - uuid: 20147f00f92d4240aab0b70cf578c022
      template: 'DELL PowerEdge R840 by HTTP'
      name: 'DELL PowerEdge R840 by HTTP'
      description: |
        Template for DELL PowerEdge R840 servers with iDRAC 8/9 firmware 4.32 and later and Redfish API enabled.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/426752-discussion-thread-for-official-zabbix-dell-templates
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This is a template for monitoring DELL PowerEdge R840 servers with iDRAC 8/9 firmware 4.32 (and later) with Redfish API enabled via Zabbix script items. This template works without any external scripts.
        
        ## Setup
        
        1\. Enable Redfish API in the Dell iDRAC interface of your server.
        
        2\. Create a user for monitoring with read-only permissions in the Dell iDRAC interface.
        
        3\. Create a host for Dell server with iDRAC IP as the Zabbix agent interface.
        
        4\. Link the template to the host.
        
        5\. Customize the values of the `{$DELL.HTTP.API.URL}`, `{$DELL.HTTP.API.USER}`, and `{$DELL.HTTP.API.PASSWORD}` macros.
        
        > NOTE! If you are experiencing timeouts on some of the items that are executing requests, adjust the `{$DELL.HTTP.REQUEST.TIMEOUT}` macro accordingly.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Server hardware'
      items:
        - uuid: 7c99c4ba6e3643e5b4672aeb3ecbaa20
          name: 'Get array controller resources'
          type: SCRIPT
          key: dell.server.array.resources.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Controller', 'Discovery', params);
            
            const controllers = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage?$expand=.($levels=1)'), 'Members');
            
            var arrControllerKeys = [
            	{
            		'name': 'id',
            		'path': 'Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	},
            	{
            		'name': 'health',
            		'path': 'Status.Health'
            	},
            	{
            		'name': 'slot',
            		'path': 'Oem.Dell.DellController.PCISlot'
            	}
            ];
            
            var battControllerKeys = [
            	{
            		'name': 'id',
            		'path': 'Oem.Dell.DellControllerBattery.Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Oem.Dell.DellControllerBattery.Name'
            	},
            	{
            		'name': 'status',
            		'path': 'Oem.Dell.DellControllerBattery.PrimaryStatus'
            	}
            ];
            
            if (!Array.isArray(controllers)) {
            	throw 'Unexpected type for controllers.';
            }
            
            var buffer = { 'arrayControllers': [], 'batteryControllers': [] };
            
            controllers.forEach(function (controller) {
            	if (controller['Id'].search('RAID') > -1) {
            		buffer['arrayControllers'].push(dell.extractData(controller, arrControllerKeys, true));
            		buffer['batteryControllers'].push(dell.extractData(controller, battControllerKeys, true));
            	}
            });
            
            return JSON.stringify(buffer);
          description: 'Returns array controller resources.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 4f6df395e903468481990c9d2e6e9a21
          name: 'Get disks'
          type: SCRIPT
          key: dell.server.disks.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Disk', 'Discovery', params);
            
            const disks = dell.extractData(dell.executeRequest('/redfish/v1/Systems/System.Embedded.1/Storage'), 'Members');
            
            var keys = [
            	{
            		'name': 'path',
            		'path': '@odata.id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	}
            ];
            
            if (!Array.isArray(disks)) {
            	throw 'Unexpected type for disks.';
            }
            
            var buffer = { 'physicalDisks': [], 'virtualDisks': [] };
            
            disks.forEach(function (disk) {
            	var requests = [{ 'usage': 'physicalDisks', 'path': '', 'target': 'Drives' }, { 'usage': 'virtualDisks', 'path': '/Volumes', 'target': 'Members' }];
            
            	requests.forEach(function (request) {
            		const disks = dell.extractData(dell.executeRequest(disk['@odata.id'] + request['path']), request['target']);
            
            		if (!Array.isArray(disks) || disks.length <= 0) {
            			return;
            		}
            
            		disks.forEach(function (drive) {
            			buffer[request['usage']].push(dell.extractData(dell.executeRequest(drive['@odata.id']), keys));
            		});
            	});
            });
            
            return JSON.stringify(buffer);
          description: 'Returns storage resources.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: b4b70f1a69fe4dc1a572d580f22134ba
          name: 'Firmware version'
          type: DEPENDENT
          key: dell.server.hw.firmware
          value_type: CHAR
          description: 'This attribute defines the firmware version of a remote access card.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.firmware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: d69a362c4ddb41afac0233aa5cbfe7f2
              expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.firmware,#1)<>last(/DELL PowerEdge R840 by HTTP/dell.server.hw.firmware,#2) and length(last(/DELL PowerEdge R840 by HTTP/dell.server.hw.firmware))>0'
              name: 'Dell R840: Firmware has changed'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'The firmware version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 6369c5e1188949c8a63ea401352dea33
          name: 'Hardware model name'
          type: DEPENDENT
          key: dell.server.hw.model
          value_type: CHAR
          description: 'This attribute defines the model name of the system.'
          inventory_link: MODEL
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.model
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
        - uuid: 93d7f62989bf4009a366dd3db3b57622
          name: 'Hardware serial number'
          type: DEPENDENT
          key: dell.server.hw.serialnumber
          value_type: CHAR
          description: 'This attribute defines the service tag of the system.'
          inventory_link: SERIALNO_A
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.serialnumber
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 7d3b78a42b2840dcac53aaad6fe0fd63
              expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.serialnumber,#1)<>last(/DELL PowerEdge R840 by HTTP/dell.server.hw.serialnumber,#2) and length(last(/DELL PowerEdge R840 by HTTP/dell.server.hw.serialnumber))>0'
              name: 'Dell R840: Device has been replaced'
              event_name: 'Dell R840: Device has been replaced (new serial number received)'
              priority: INFO
              description: 'The device serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: d09bd1c6bccf422286031a7081d2d130
          name: 'Get network interfaces'
          type: SCRIPT
          key: dell.server.net.iface.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Network Interface', 'Discovery', params);
            
            const netAdapters = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters'), 'Members');
            
            var keys = [
            	{
            		'name': 'path',
            		'path': '@odata.id'
            	},
            	{
            		'name': 'id',
            		'path': 'Id'
            	}
            ];
            
            if (!Array.isArray(netAdapters)) {
            	throw 'Unexpected type for network adapters.';
            }
            
            var buffer = [];
            
            netAdapters.forEach(function (netAdapter) {
            	const netPorts = dell.extractData(dell.executeRequest(netAdapter["@odata.id"] + '/NetworkPorts'), 'Members');
            
            	if (!Array.isArray(netPorts)) {
            		return;
            	}
            
            	netPorts.forEach(function (netPort) {
            		buffer.push(dell.extractData(dell.executeRequest(netPort["@odata.id"]), keys));
            	})
            });
            
            return JSON.stringify(buffer);
          description: 'Returns network interfaces.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 860871bf033f443183bed66919fc86e3
          name: 'Get sensors'
          type: SCRIPT
          key: dell.server.sensors.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            function formatPSU(psuObj) {
            	var foundPowerSupplies = [],
            		buffer = [];
            
            	psuObj.forEach(function (obj) {
            		const psuName = obj['name'].split(' ')[0];
            
            		if (foundPowerSupplies.indexOf(psuName) === -1) {
            			foundPowerSupplies.push(psuName);
            			buffer.push({
            				'name': psuName,
            				[obj['type'].toLowerCase()]: {'reading': obj['reading'], 'health': obj['health']}
            			});
            		} else {
            			buffer.forEach(function (bufferObj) {
            
            				if (bufferObj['name'] === psuName) {
            					bufferObj[obj['type'].toLowerCase()] = {'reading': obj['reading'], 'health': obj['health']};
            
            					return;
            				}
            			});
            		}
            	})
            	return buffer;
            };
            
            function formatTemp(tempObj) {
            	tempObj.forEach(function (obj) {
            		obj.name = obj.name.split(' ').slice(0, -1).join(' ');
            	});
            
            	return tempObj;
            }
            
            function formatSysBoard(sysObj) {
            	const remove = ['System', 'Board', 'Usage'];
            
            	sysObj.forEach(function (obj) {
            		var buffer = [];
            
            		obj['name'].split(' ').forEach(function (word) {
            			var match = false;
            
            			remove.forEach(function (removeWord) {
            				if (removeWord === word) {
            					match = true;
            				}
            			});
            
            			if (!match) {
            				buffer.push(word);
            			}
            		});
            
            		if (buffer.length > 0) {
            			obj['name'] = buffer.join(' ');
            		}
            	});
            
            	return sysObj;
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('Sensor', 'Discovery', params);
            
            const sensors = dell.extractData(dell.executeRequest('/redfish/v1/Chassis/System.Embedded.1/Sensors?$expand=.($levels=1)'), 'Members');
            
            if (!Array.isArray(sensors)) {
            	throw 'Unexpected type for sensors.';
            }
            
            const keys = [
            	{
            		'name': 'id',
            		'path': 'Id'
            	},
            	{
            		'name': 'name',
            		'path': 'Name'
            	},
            	{
            		'name': 'context',
            		'path': 'PhysicalContext'
            	},
            	{
            		'name': 'reading',
            		'path': 'Reading'
            	},
            	{
            		'name': 'type',
            		'path': 'ReadingType'
            	},
            	{
            		'name': 'health',
            		'path': 'Status.Health'
            	}
            ];
            
            var buffer = { 'fan': [], 'psu': [], 'temperature': [], 'sysBoard': [] };
            
            sensors.forEach(function (sensor) {
            	if (sensor['Name'].substring(0, 2) === 'PS' && sensor['PhysicalContext'] === 'PowerSupply') {
            		buffer['psu'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['ReadingType'] === 'Temperature') {
            		buffer['temperature'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['Name'].includes('Fan') && sensor['ReadingType'] === 'Rotational') {
            		buffer['fan'].push(dell.extractData(sensor, keys, true));
            	} else if (sensor['Name'].includes('System Board') && sensor['ReadingType'] === 'Percent') {
            		buffer['sysBoard'].push(dell.extractData(sensor, keys, true));
            	}
            });
            
            buffer['psu'] = formatPSU(buffer['psu']);
            buffer['temperature'] = formatTemp(buffer['temperature']);
            buffer['sysBoard'] = formatSysBoard(buffer['sysBoard']);
            
            return JSON.stringify(buffer);
          description: 'Returns sensors.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: d6a5a581ee9b455990cce4532243f9bc
          name: 'Overall system health status'
          type: DEPENDENT
          key: dell.server.status
          trends: '0'
          description: 'This attribute defines the overall rollup status of all the components in the system monitored by the remote access card. Includes system, storage, IO devices, iDRAC, CPU, memory, etc.'
          valuemap:
            name: 'Redfish status health'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.status
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = {
                  	'OK': 1,
                  	'Warning': 2,
                  	'Critical': 3,
                  };
                  
                  return typeof idx[value] === 'undefined' ? 0 : idx[value];
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: dell.server.system.get
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: 66eddf4db30c4f33a04fd1e7779a512b
              expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.status,)=3'
              name: 'Dell R840: Server is in a critical state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'Please check the device for faults.'
              tags:
                - tag: scope
                  value: availability
            - uuid: d7bd59c648884a2db4e40518c80e9a7a
              expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.status,)=2'
              name: 'Dell R840: Server is in a warning state'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Please check the device for warnings.'
              dependencies:
                - name: 'Dell R840: Server is in a critical state'
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.status,)=3'
              tags:
                - tag: scope
                  value: availability
        - uuid: 18157734e10d4eed82a0f43168daff65
          name: 'Get system'
          type: SCRIPT
          key: dell.server.system.get
          history: '0'
          value_type: TEXT
          params: |
            function validateZabbixParams(requiredParams, allParams) {
            	requiredParams.forEach(function (field) {
            		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
            			throw 'Required param is not set: ' + field + '.';
            		}
            	});
            }
            
            function Dell(service, action, params) {
            	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
            	this.request = new HttpRequest();
            
            	this.executeRequest = function (apiPath) {
            		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
            
            		if (params['http_proxy']) {
            			this.request.setProxy(params['http_proxy']);
            			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
            		}
            
            		const response = this.request.get(params['url'] + apiPath);
            
            		this.request.clearHeader();
            
            		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
            			return response;
            		} else {
            			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
            			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
            		}
            	};
            
            	this.extractData = function (data, keys, skipParse) {
            		if (!skipParse) {
            			try {
            				data = JSON.parse(data);
            			} catch (error) {
            				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
            				throw 'Could not parse received JSON object. See logs for more information.';
            			}	
            		}
            
            		if (Array.isArray(keys)) {
            			var returnBuffer = {};
            
            			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
            				if (keys[keyIdx]['path'] === '@odata.id') {
            					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
            				} else {
            					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
            				}
            			}
            
            			return returnBuffer;
            		} else if (typeof keys === 'object') {
            			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
            		} else if (typeof keys === 'string') {
            			return this.parseJSON(data, keys.split('.'));
            		} else {
            			throw 'Unexpected key type';
            		}
            	};
            
            	this.parseJSON = function (data, jsonPath) {
            		for (var i = 0, args = jsonPath.length; i < args; i++) {
            			data = data[jsonPath[i]];
            		}
            
            		return data;
            	}
            }
            
            
            const params = JSON.parse(value);
            
            validateZabbixParams(['url', 'user', 'password', 'http_status_code'], params);
            var dell = new Dell('System', 'Get system metrics', params);
            
            const requests = [
            	{
            		'path': '/redfish/v1/Systems/System.Embedded.1',
            		'keys': [
            			{
            				'name': 'model',
            				'path': 'Model'
            			},
            			{
            				'name': 'serialnumber',
            				'path': 'Oem.Dell.DellSystem.ChassisServiceTag'
            			},
            			{
            				'name': 'status',
            				'path': 'Status.Health'
            			}
            		]
            	},
            	{
            		'path': '/redfish/v1/Managers/iDRAC.Embedded.1',
            		'keys': {
            			'name': 'firmware',
            			'path': 'FirmwareVersion'
            		}
            	}
            ];
            
            var buffer = {};
            
            for (var i = 0, requestsCount = requests.length; i < requestsCount; i++) {
            	Object.assign(buffer, dell.extractData(dell.executeRequest(requests[i].path), requests[i].keys));
            }
            
            return JSON.stringify(buffer);
          description: 'Returns system metrics.'
          timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$DELL.HTTP.PROXY}'
            - name: http_status_code
              value: '{$DELL.HTTP.RETURN.CODE.OK}'
            - name: password
              value: '{$DELL.HTTP.API.PASSWORD}'
            - name: url
              value: '{$DELL.HTTP.API.URL}'
            - name: user
              value: '{$DELL.HTTP.API.USER}'
          tags:
            - tag: component
              value: raw
        - uuid: 67524a4d8c8e4f39b43e1a67b1afede7
          name: 'CPU utilization, in %'
          type: DEPENDENT
          key: dell.server.util.cpu
          value_type: FLOAT
          units: '%'
          description: 'CPU utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardCPUUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: d043506ca50e46688f4e2b5d16fbb6b0
              expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.WARN}'
              name: 'Dell R840: CPU utilization is high'
              event_name: 'Dell R840: Current CPU utilization is high (util >= {$DELL.HTTP.CPU.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R840: CPU utilization is too high'
                  expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 7402c280344d4d1481dc4f9363b114cb
              expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.cpu,5m)>={$DELL.HTTP.CPU.UTIL.HIGH}'
              name: 'Dell R840: CPU utilization is too high'
              event_name: 'Dell R840: Current CPU utilization is too high (util >= {$DELL.HTTP.CPU.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current CPU utilization has exceeded `{$DELL.HTTP.CPU.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 6d5125ef5a484d4c92f63ab698078e17
          name: 'IO utilization, in %'
          type: DEPENDENT
          key: dell.server.util.io
          value_type: FLOAT
          units: '%'
          description: 'IO utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardIOUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: io
          triggers:
            - uuid: 9d9b98ba6f0f4a09b0fe866ac75a45d9
              expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.WARN}'
              name: 'Dell R840: IO utilization is high'
              event_name: 'Dell R840: Current IO utilization is high (util >= {$DELL.HTTP.IO.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R840: IO utilization is too high'
                  expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 6458115ca51b4f82a00f9f70f081168b
              expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              name: 'Dell R840: IO utilization is too high'
              event_name: 'Dell R840: Current IO utilization is too high (util >= {$DELL.HTTP.IO.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current IO utilization has exceeded `{$DELL.HTTP.IO.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 91527c7c68f745f9aef78b4507e096c5
          name: 'Memory utilization, in %'
          type: DEPENDENT
          key: dell.server.util.mem
          value_type: FLOAT
          units: '%'
          description: 'Memory utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardMEMUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 108975d790e84418852a3918ca9c721c
              expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.WARN}'
              name: 'Dell R840: Memory utilization is high'
              event_name: 'Dell R840: Current memory utilization is high (util >= {$DELL.HTTP.MEM.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R840: Memory utilization is too high'
                  expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 28dbce9e2c374351853bce93a4d45533
              expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.mem,5m)>={$DELL.HTTP.MEM.UTIL.HIGH}'
              name: 'Dell R840: Memory utilization is too high'
              event_name: 'Dell R840: Current memory utilization is too high (util >= {$DELL.HTTP.MEM.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current memory utilization has exceeded `{$DELL.HTTP.MEM.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 340a8b4c974e40cc8b694336fd973fb2
          name: 'SYS utilization, in %'
          type: DEPENDENT
          key: dell.server.util.sys
          value_type: FLOAT
          units: '%'
          description: 'SYS utilization.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.sysBoard[?(@.id == "SystemBoardSYSUsage")].reading.first()'
          master_item:
            key: dell.server.sensors.get
          tags:
            - tag: component
              value: sys
          triggers:
            - uuid: 4914f2bb5add4d1e879bd98e723cba68
              expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.WARN}'
              name: 'Dell R840: SYS utilization is high'
              event_name: 'Dell R840: Current SYS utilization is high (util >= {$DELL.HTTP.SYS.UTIL.WARN}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.WARN}`%.'
              dependencies:
                - name: 'Dell R840: IO utilization is too high'
                  expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.io,5m)>={$DELL.HTTP.IO.UTIL.HIGH}'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 32dc9d0ef93649aaa05b80c1681ebd00
              expression: 'min(/DELL PowerEdge R840 by HTTP/dell.server.util.sys,5m)>={$DELL.HTTP.SYS.UTIL.HIGH}'
              name: 'Dell R840: SYS utilization is too high'
              event_name: 'Dell R840: Current SYS utilization is too high (util >= {$DELL.HTTP.SYS.UTIL.HIGH}%)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Current SYS utilization has exceeded `{$DELL.HTTP.SYS.UTIL.HIGH}`%.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 1fe957b97d914400a1814ff8ac1a9fc4
          name: 'Redfish API status'
          type: SIMPLE
          key: 'net.tcp.service[https]'
          description: |
            Availability of Redfish API on the server.
            Possible values:
              0 - Unavailable
              1 - Available
          valuemap:
            name: 'Redfish API availability'
          tags:
            - tag: component
              value: health
            - tag: component
              value: system
          triggers:
            - uuid: 890f7b925b324a9c8ddcbf900248983f
              expression: 'last(/DELL PowerEdge R840 by HTTP/net.tcp.service[https])=0'
              name: 'Dell R840: Redfish API service is unavailable'
              priority: HIGH
              description: 'The service is unavailable or does not accept TCP connections.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 7e9b536c1f494f8db88ebc5817758f87
          name: 'Array controller discovery'
          type: DEPENDENT
          key: dell.server.array.discovery
          description: 'Discovery of disk array controllers.'
          item_prototypes:
            - uuid: d1785196fe1f4d208ef168bfefe5d91e
              name: 'Controller [{#CNTLR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.array.status[{#ID}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.arrayControllers[?(@.id == "{#ID}")].health.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: dell.server.array.resources.get
              tags:
                - tag: component
                  value: diskarray
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: c1c8af8e702d403290edcf852df5108f
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.array.status[{#ID}],)=3'
                  name: 'Dell R840: Controller [{#CNTLR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: e3630192525a446e8ca77b4e1238d41c
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.array.status[{#ID}],)=2'
                  name: 'Dell R840: Controller [{#CNTLR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Controller [{#CNTLR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.array.status[{#ID}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: dell.server.array.resources.get
          lld_macro_paths:
            - lld_macro: '{#CNTLR_NAME}'
              path: $.name
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SLOT}'
              path: $.slot
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.arrayControllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: cf87034baae7473ba507411dd49e9aaa
          name: 'Battery discovery'
          type: DEPENDENT
          key: dell.server.controller.battery.discovery
          description: 'Discovery of battery controllers.'
          item_prototypes:
            - uuid: c130b149d73147488074daa6cf4dffb1
              name: 'Battery [{#BATTERY_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.controller.battery.status[{#ID}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.batteryControllers[?(@.id == "{#ID}")].status.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: dell.server.array.resources.get
              tags:
                - tag: component
                  value: battery
                - tag: component
                  value: diskarray
              trigger_prototypes:
                - uuid: 8a71516737c14f868b530da03f79ac68
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
                  name: 'Dell R840: Battery [{#BATTERY_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 07861b4282664fea9ce13fe8b85fb204
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.controller.battery.status[{#ID}],)=2'
                  name: 'Dell R840: Battery [{#BATTERY_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Battery [{#BATTERY_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.controller.battery.status[{#ID}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: dell.server.array.resources.get
          lld_macro_paths:
            - lld_macro: '{#BATTERY_NAME}'
              path: $.name
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.batteryControllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: c9b1f5035b494f848e7c101bb31f706b
          name: 'FAN discovery'
          type: DEPENDENT
          key: dell.server.fan.discovery
          description: 'Discovery of FAN sensors.'
          item_prototypes:
            - uuid: 9a344ff5fdce4fc6b19c50f70bdc3366
              name: 'Fan [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.fan.[?(@.id == ''{#ID}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: raw
            - uuid: ae4a6ad5d7ae4100a57af30cbfab4bf3
              name: 'Fan [{#SENSOR_NAME}]: Speed'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
              units: '!rpm'
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reading
              master_item:
                key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: fan
            - uuid: 58844e3ec9244f43b2819b3f13ea6a36
              name: 'Fan [{#SENSOR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.sensor.fan.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.fan.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: fan
              trigger_prototypes:
                - uuid: 97142359820f4285a288114ff6c7fa4e
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R840: Fan [{#SENSOR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: e8c5cf1fa754464986958957889784bb
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R840: Fan [{#SENSOR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Fan [{#SENSOR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.fan.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: a07e33e727054074957e95f9b2049ab7
              name: 'Dell R840: Fan [{#SENSOR_NAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R840 by HTTP'
                    key: 'dell.server.sensor.fan.speed[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.fan
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 44e062b33a41457fb0d847cea5b385ed
          name: 'Network interface discovery'
          type: DEPENDENT
          key: dell.server.net.if.discovery
          description: 'Discovery of network interfaces.'
          item_prototypes:
            - uuid: 6a8491b2246f48869bf8a608a2b012d6
              name: 'Interface [{#IFNAME}]: Get interface'
              type: SCRIPT
              key: 'dell.server.net.if.get[{#IFNAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Network Interface', 'Get metrics', params);
                
                const keys = [
                	{
                		'name': 'linkStatus',
                		'path': 'LinkStatus'
                	},
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'state',
                		'path': 'Status.State'
                	},
                	{
                		'name': 'linkSpeed',
                		'path': 'CurrentLinkSpeedMbps'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a network interface.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: raw
            - uuid: deb874e1e9054cc7a7b42654a6862686
              name: 'Interface [{#IFNAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.net.if.health[{#IFNAME}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: 15d95dacf91644de9d83a272c55a8c6f
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
                  name: 'Dell R840: Interface [{#IFNAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 7a743bd6cbee4cfd984e9d9ecb704e0e
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.health[{#IFNAME}],)=2'
                  name: 'Dell R840: Interface [{#IFNAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Interface [{#IFNAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.health[{#IFNAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 3cbcb8e5d8fb46feb051b8633843661a
              name: 'Interface [{#IFNAME}]: Speed'
              type: DEPENDENT
              key: 'dell.server.net.if.speed[{#IFNAME}]'
              units: bps
              description: 'The network port current link speed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.linkSpeed
                - type: MULTIPLIER
                  parameters:
                    - '1000000'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
            - uuid: 2d5a59aef5fe40528b4127a5aeb4e7d9
              name: 'Interface [{#IFNAME}]: State'
              type: DEPENDENT
              key: 'dell.server.net.if.state[{#IFNAME}]'
              description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
              valuemap:
                name: 'Redfish status state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.state
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Enabled': 1,
                      	'Disabled': 2,
                      	'Absent': 3,
                      	'Deferring': 4,
                      	'InTest': 5,
                      	'Quiesced': 6,
                      	'StandbyOffline': 7,
                      	'StandbySpare': 8,
                      	'Starting': 9,
                      	'UnavailableOffline': 10,
                      	'Updating': 11
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
            - uuid: 57be794a2e84405bb256bebdcebbd401
              name: 'Interface [{#IFNAME}]: Link status'
              type: DEPENDENT
              key: 'dell.server.net.if.status[{#IFNAME}]'
              description: 'The status of the link between this port and its link partner. Possible values: Down, Up, null.'
              valuemap:
                name: 'Network interface status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.linkStatus
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'null': 1,
                      	'Down': 2,
                      	'Up': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.net.if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: network
              trigger_prototypes:
                - uuid: c9d3b02a01b54c0288576e797a06f5fd
                  expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.status[{#IFNAME}],)=2 and last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.status[{#IFNAME}],)=1 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Dell R840: Interface [{#IFNAME}]: 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).
                    2. `{$DELL.HTTP.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 (2).
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "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: 2422d2d24fa5470f955e813c6f8ab6da
                  expression: '{$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=1 and (last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.status[{#IFNAME}],)<2 and last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.status[{#IFNAME}],#1)<>last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.status[{#IFNAME}],#2))'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.net.if.status[{#IFNAME}],)>=2 or {$DELL.HTTP.IFCONTROL:"{#IFNAME}"}=0'
                  name: 'Dell R840: Interface [{#IFNAME}]: Link status issue'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: |
                    This trigger expression works as follows:
                    1. It can be triggered if the operations status is Null (1) or Unknown (0).
                    2. `{$DELL.HTTP.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 Null (1) or Unknown (0).
                    3. `{TEMPLATE_NAME:METRIC.diff()}=1` - the trigger fires only if the operational status was up to (1) sometime before (so, does not fire for the "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
          graph_prototypes:
            - uuid: 82c7193482c6496abeeee2ca1869787b
              name: 'Dell R840: Interface [{#IFNAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R840 by HTTP'
                    key: 'dell.server.net.if.speed[{#IFNAME}]'
          master_item:
            key: dell.server.net.iface.get
          lld_macro_paths:
            - lld_macro: '{#IFNAME}'
              path: $.id
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: e6736eb3f84044ff98d4113a3214e863
          name: 'Physical disk discovery'
          type: DEPENDENT
          key: dell.server.physicaldisk.discovery
          description: 'Discovery of physical disks.'
          item_prototypes:
            - uuid: 9ca9eeea67734f1c9a9ae548ac515b22
              name: 'Physical disk [{#DISK_NAME}]: Get disk'
              type: SCRIPT
              key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Disk', 'Get physical disk metrics', params);
                
                const keys = [
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'sn',
                		'path': 'SerialNumber'
                	},
                	{
                		'name': 'model',
                		'path': 'Model'
                	},
                	{
                		'name': 'mediaType',
                		'path': 'MediaType'
                	},
                	{
                		'name': 'capacity',
                		'path': 'CapacityBytes'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a physical disk.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: raw
                - tag: component
                  value: storage
            - uuid: 87d8f9e8a706467099ff0e2400185d37
              name: 'Physical disk [{#DISK_NAME}]: Media type'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.media_type[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The type of media contained in this drive. Possible values: HDD, SSD, SMR, null.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.mediaType
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: eb60004a07d343b2ac4bbc7ee373603c
              name: 'Physical disk [{#DISK_NAME}]: Model name'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.model[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The model number of the drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: f85b8b2bad6e4de4b6a1780379441823
              name: 'Physical disk [{#DISK_NAME}]: Serial number'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]'
              value_type: CHAR
              description: 'The serial number of this drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.sn
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 87a9b87047764511b47498182501953b
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#1)<>last(/DELL PowerEdge R840 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}],#2) and length(last(/DELL PowerEdge R840 by HTTP/dell.server.hw.physicaldisk.serialnumber[{#DISK_NAME}]))>0'
                  name: 'Dell R840: Physical disk [{#DISK_NAME}] has been replaced'
                  event_name: 'Dell R840: [{#DISK_NAME}] has been replaced (new serial number received)'
                  priority: INFO
                  description: '[{#DISK_NAME}] serial number has changed. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 9b5c6889c2d04feb9b399f0226f8a0dd
              name: 'Physical disk [{#DISK_NAME}]: Size'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
              trends: '0'
              units: B
              description: 'The size, in bytes, of this drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
            - uuid: c6e2eca420754851a8601c89e0586b64
              name: 'Physical disk [{#DISK_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.hw.physicaldisk.status[{#DISK_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.physicaldisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: physicaldisk
                - tag: component
                  value: storage
              trigger_prototypes:
                - uuid: 6d3b4cf6c62541f09506487a2dc78139
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
                  name: 'Dell R840: Physical disk [{#DISK_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: bba8d0a074cb4663bedf508ccf2b0c21
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=2'
                  name: 'Dell R840: Physical disk [{#DISK_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Physical disk [{#DISK_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.physicaldisk.status[{#DISK_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
          graph_prototypes:
            - uuid: 8dc2255aa49b49a8b815cf153b580b5e
              name: 'Dell R840: Physical disk [{#DISK_NAME}]: Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R840 by HTTP'
                    key: 'dell.server.hw.physicaldisk.size[{#DISK_NAME}]'
          master_item:
            key: dell.server.disks.get
          lld_macro_paths:
            - lld_macro: '{#DISK_NAME}'
              path: $.name
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.physicalDisks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 1e8d28ae00d04f7ebcdd67257b99e083
          name: 'PSU discovery'
          type: DEPENDENT
          key: dell.server.psu.discovery
          description: 'Discovery of PSU sensors.'
          item_prototypes:
            - uuid: 26c85e9369aa4805a095628e890b1288
              name: 'Power supply [{#SENSOR_NAME}]: Current sensor status'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.current.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.current.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
              trigger_prototypes:
                - uuid: 9afb0fbb617e4b35a9b79136313a3056
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R840: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 414c6fab2ad64985b074e8e46581a4d3
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R840: Power supply [{#SENSOR_NAME}]: Current sensor: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Power supply [{#SENSOR_NAME}]: Current sensor: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.psu.current.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: c18c96e977354b258bd82a0c12433724
              name: 'Power supply [{#SENSOR_NAME}]: Current'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: A
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.current.reading
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: current
                - tag: component
                  value: psu
            - uuid: 541cdf75d8fd4b6298d46d72ea698c8b
              name: 'Power supply [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.psu.[?(@.name == ''{#SENSOR_NAME}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: raw
            - uuid: de636fb95e5a454ca70ae2f2d0ce734a
              name: 'Power supply [{#SENSOR_NAME}]: Voltage sensor status'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
              trigger_prototypes:
                - uuid: 20dbfa3bfbd2411fb47d688b08d491cc
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R840: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 06f2eac8d2244a5caf95e304c08b3073
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R840: Power supply [{#SENSOR_NAME}]: Voltage sensor: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Power supply [{#SENSOR_NAME}]: Voltage sensor: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.psu.voltage.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 3633da59496341c3a35057482388e129
              name: 'Power supply [{#SENSOR_NAME}]: Voltage'
              type: DEPENDENT
              key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: V
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage.reading
              master_item:
                key: 'dell.server.sensor.psu.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: psu
                - tag: component
                  value: voltage
          graph_prototypes:
            - uuid: 75e804154af84501a5460ffe74ffe5b5
              name: 'Dell R840: Power supply [{#SENSOR_NAME}]: Current'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R840 by HTTP'
                    key: 'dell.server.sensor.psu.current[{#SENSOR_NAME}]'
            - uuid: 31d669f53bf64ac09ed74d793618ac9b
              name: 'Dell R840: Power supply [{#SENSOR_NAME}]: Voltage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R840 by HTTP'
                    key: 'dell.server.sensor.psu.voltage[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.psu
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 660e28865c614e25aa1c0cd5e33888ee
          name: 'Temperature discovery'
          type: DEPENDENT
          key: dell.server.temp.discovery
          description: 'Discovery of temperature sensors.'
          item_prototypes:
            - uuid: 53e57d04b3864408b47363ce277cfc40
              name: 'Probe [{#SENSOR_NAME}]: Get sensor'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Returns the metrics of a sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.temperature.[?(@.id == ''{#ID}'')].first()'
              master_item:
                key: dell.server.sensors.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: temperature
            - uuid: 0ba4848ce443431a8680990119f0bb26
              name: 'Probe [{#SENSOR_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.status[{#SENSOR_NAME}]'
              trends: '0'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 3c617590456f495eaa7a1b11dee0ae3a
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
                  name: 'Dell R840: Probe [{#SENSOR_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 0b1fdc118b6a4983ae522cf9f1efb07b
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=2'
                  name: 'Dell R840: Probe [{#SENSOR_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Probe [{#SENSOR_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.sensor.temp.status[{#SENSOR_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 6c01858e79fd4c4bbeae694728d265fe
              name: 'Probe [{#SENSOR_NAME}]: Value'
              type: DEPENDENT
              key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
              value_type: FLOAT
              units: °C
              description: 'Sensor value.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.reading
              master_item:
                key: 'dell.server.sensor.temp.get[{#SENSOR_NAME}]'
              tags:
                - tag: component
                  value: temperature
          graph_prototypes:
            - uuid: dcf65d35e3e640a08ee7d32816857f09
              name: 'Dell R840: Probe [{#SENSOR_NAME}]: Value'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R840 by HTTP'
                    key: 'dell.server.sensor.temp.value[{#SENSOR_NAME}]'
          master_item:
            key: dell.server.sensors.get
          lld_macro_paths:
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#SENSOR_NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.temperature
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 1c5de2df1da844a38dc74763c5c8add4
          name: 'Virtual disk discovery'
          type: DEPENDENT
          key: dell.server.virtualdisk.discovery
          description: 'Discovery of virtual disks.'
          item_prototypes:
            - uuid: 6852216c27c54b5dabf567a15d8467a5
              name: 'Virtual disk [{#DISK_NAME}]: Get disk'
              type: SCRIPT
              key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              history: '0'
              value_type: TEXT
              params: |
                function validateZabbixParams(requiredParams, allParams) {
                	requiredParams.forEach(function (field) {
                		if (typeof allParams !== 'object' || typeof allParams[field] === 'undefined' || allParams[field] === '') {
                			throw 'Required param is not set: ' + field + '.';
                		}
                	});
                }
                
                function Dell(service, action, params) {
                	this.zabbixLogPrefix = '[ DELL ] [ ' + service + ' ] [ ' + action + ' ]';
                	this.request = new HttpRequest();
                
                	this.executeRequest = function (apiPath) {
                		this.request.addHeader('Authorization: Basic ' + btoa(params['user'] + ':' + params['password']));
                
                		if (params['http_proxy']) {
                			this.request.setProxy(params['http_proxy']);
                			Zabbix.log(4, this.zabbixLogPrefix + ' Using http proxy: ' + params['http_proxy']);
                		}
                
                		const response = this.request.get(params['url'] + apiPath);
                
                		this.request.clearHeader();
                
                		if (this.request.getStatus() === parseInt(params['http_status_code'])) {
                			return response;
                		} else {
                			Zabbix.log(3, this.zabbixLogPrefix + ' Unexpected HTTP response code: ' + this.request.getStatus());
                			throw 'Unexpected HTTP response code: ' + this.request.getStatus();
                		}
                	};
                
                	this.extractData = function (data, keys, skipParse) {
                		if (!skipParse) {
                			try {
                				data = JSON.parse(data);
                			} catch (error) {
                				Zabbix.log(3, this.zabbixLogPrefix + ' Could not parse the received JSON object: ' + data);
                				throw 'Could not parse received JSON object. See logs for more information.';
                			}	
                		}
                
                		if (Array.isArray(keys)) {
                			var returnBuffer = {};
                
                			for (keyIdx = 0, keysLength = keys.length; keyIdx < keysLength; keyIdx++) {
                				if (keys[keyIdx]['path'] === '@odata.id') {
                					returnBuffer[keys[keyIdx]['name']] = data[keys[keyIdx]['path']];
                				} else {
                					returnBuffer[keys[keyIdx]['name']] = this.parseJSON(data, keys[keyIdx]['path'].split('.'));
                				}
                			}
                
                			return returnBuffer;
                		} else if (typeof keys === 'object') {
                			return { [keys['name']]: this.parseJSON(data, keys['path'].split('.')) };
                		} else if (typeof keys === 'string') {
                			return this.parseJSON(data, keys.split('.'));
                		} else {
                			throw 'Unexpected key type';
                		}
                	};
                
                	this.parseJSON = function (data, jsonPath) {
                		for (var i = 0, args = jsonPath.length; i < args; i++) {
                			data = data[jsonPath[i]];
                		}
                
                		return data;
                	}
                }
                
                
                const params = JSON.parse(value);
                
                validateZabbixParams(['url', 'path', 'user', 'password', 'http_status_code'], params);
                var dell = new Dell('Disk', 'Get virtual disk metrics', params);
                
                const keys = [
                	{
                		'name': 'health',
                		'path': 'Status.Health'
                	},
                	{
                		'name': 'capacity',
                		'path': 'CapacityBytes'
                	},
                	{
                		'name': 'status',
                		'path': 'Status.State'
                	},
                	{
                		'name': 'raidStatus',
                		'path': 'Oem.Dell.DellVirtualDisk.RaidStatus'
                	},
                	{
                		'name': 'readCachePolicy',
                		'path': 'Oem.Dell.DellVirtualDisk.ReadCachePolicy'
                	},
                	{
                		'name': 'writeCachePolicy',
                		'path': 'Oem.Dell.DellVirtualDisk.WriteCachePolicy'
                	}
                ];
                
                return JSON.stringify(dell.extractData(dell.executeRequest(params.path), keys));
              description: 'Returns the metrics of a virtual disk.'
              timeout: '{$DELL.HTTP.REQUEST.TIMEOUT}'
              parameters:
                - name: http_proxy
                  value: '{$DELL.HTTP.PROXY}'
                - name: http_status_code
                  value: '{$DELL.HTTP.RETURN.CODE.OK}'
                - name: password
                  value: '{$DELL.HTTP.API.PASSWORD}'
                - name: path
                  value: '{#ODATA}'
                - name: url
                  value: '{$DELL.HTTP.API.URL}'
                - name: user
                  value: '{$DELL.HTTP.API.USER}'
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: virtualdisk
            - uuid: 40b6ef0db10049dfa2b47b3d643d52f8
              name: 'Virtual disk [{#DISK_NAME}]: RAID status'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}]'
              description: 'This property represents the RAID specific status. Possible values: Blocked, Degraded, Failed, Foreign, Offline, Online, Ready, Unknown, null.'
              valuemap:
                name: 'Virtual disk RAID status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.raidStatus
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Blocked': 1,
                      	'Degraded': 2,
                      	'Failed': 3,
                      	'Foreign': 4,
                      	'Offline': 5,
                      	'Unknown': 6,
                      	'null': 7,
                      	'Ready': 8,
                      	'Online': 9,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
              trigger_prototypes:
                - uuid: d7399429cfed4a58b89ea0818198b554
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.virtualdisk.raid_status[{#DISK_NAME}],)<8'
                  name: 'Dell R840: Virtual disk [{#DISK_NAME}]: RAID status not OK'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the disk for faults.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 50a61448d1a64cab85af3bd416519a5f
              name: 'Virtual disk [{#DISK_NAME}]: Read policy'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.read_policy[{#DISK_NAME}]'
              description: 'Indicates the read cache policy setting for the Volume. Possible values: ReadAhead, NoReadAhead, AdaptiveReadAhead.'
              valuemap:
                name: 'Virtual disk read policy'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.readCachePolicy
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'NoReadAhead': 1,
                      	'ReadAhead': 2,
                      	'AdaptiveReadAhead': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: 165425c403444bdd829243176cc17728
              name: 'Virtual disk [{#DISK_NAME}]: Size'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
              trends: '0'
              units: B
              description: 'The size in bytes of this Volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: c29744514703440787ecc94d86fac220
              name: 'Virtual disk [{#DISK_NAME}]: Current state'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.state[{#DISK_NAME}]'
              description: 'The known state of the Resource, for example, Enabled. Possible values: Enabled, Disabled, StandbyOffline, StandbySpare, InTest, Starting, Absent, UnavailableOffline, Deferring, Quiesced, Updating, Qualified.'
              valuemap:
                name: 'Redfish status state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'Enabled': 1,
                      	'Disabled': 2,
                      	'Absent': 3,
                      	'Deferring': 4,
                      	'InTest': 5,
                      	'Quiesced': 6,
                      	'StandbyOffline': 7,
                      	'StandbySpare': 8,
                      	'Starting': 9,
                      	'UnavailableOffline': 10,
                      	'Updating': 11
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
            - uuid: 350af9c90f1e4f20b0362d0fcff06b6e
              name: 'Virtual disk [{#DISK_NAME}]: Status'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.status[{#DISK_NAME}]'
              description: 'The status of the job. Possible values: OK, Warning, Critical.'
              valuemap:
                name: 'Redfish status health'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.health
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'OK': 1,
                      	'Warning': 2,
                      	'Critical': 3,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
              trigger_prototypes:
                - uuid: 4072075d6a1c443da08c67795b799d40
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
                  name: 'Dell R840: Virtual disk [{#DISK_NAME}]: Critical state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Please check the device for faults.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 1ac52018cc744f1ba54b04095d0d882f
                  expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=2'
                  name: 'Dell R840: Virtual disk [{#DISK_NAME}]: Warning state'
                  opdata: 'Current state: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Please check the device for warnings.'
                  dependencies:
                    - name: 'Dell R840: Virtual disk [{#DISK_NAME}]: Critical state'
                      expression: 'last(/DELL PowerEdge R840 by HTTP/dell.server.hw.virtualdisk.status[{#DISK_NAME}],)=3'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 126eac1b29f34a6ba144f47e8b46b7cc
              name: 'Virtual disk [{#DISK_NAME}]: Write policy'
              type: DEPENDENT
              key: 'dell.server.hw.virtualdisk.write_policy[{#DISK_NAME}]'
              description: 'Indicates the write cache policy setting for the Volume. Possible values: WriteThrough, WriteBack, ProtectedWriteBack, UnprotectedWriteBack.'
              valuemap:
                name: 'Virtual disk write policy'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.writeCachePolicy
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = {
                      	'WriteThrough': 1,
                      	'WriteBack': 2,
                      	'ProtectedWriteBack': 3,
                      	'UnprotectedWriteBack': 4,
                      };
                      
                      return typeof idx[value] === 'undefined' ? 0 : idx[value];
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 6h
              master_item:
                key: 'dell.server.hw.virtualdisk.get[{#DISK_NAME}]'
              tags:
                - tag: component
                  value: storage
                - tag: component
                  value: virtualdisk
          graph_prototypes:
            - uuid: 2922d5a405cb442cbd7e7c1c6e9441a1
              name: 'Dell R840: Virtual disk [{#DISK_NAME}]: Size'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'DELL PowerEdge R840 by HTTP'
                    key: 'dell.server.hw.virtualdisk.size[{#DISK_NAME}]'
          master_item:
            key: dell.server.disks.get
          lld_macro_paths:
            - lld_macro: '{#DISK_NAME}'
              path: $.name
            - lld_macro: '{#ODATA}'
              path: $.path
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.virtualDisks
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: hardware
        - tag: subclass
          value: server
        - tag: target
          value: dell
        - tag: target
          value: dellpoweredge
      macros:
        - macro: '{$DELL.HTTP.API.PASSWORD}'
          type: SECRET_TEXT
          description: 'The Dell iDRAC user password.'
          config:
            type: TEXT
            priority: '3'
            label: 'iDRAC password'
            description: 'The Dell iDRAC user password.'
            required: 'YES'
        - macro: '{$DELL.HTTP.API.URL}'
          description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
          config:
            type: TEXT
            priority: '1'
            label: 'iDRAC API URL'
            description: 'The Dell iDRAC Redfish API URL in the format `<scheme>://<host>:<port>`.'
            required: 'YES'
        - macro: '{$DELL.HTTP.API.USER}'
          description: 'The Dell iDRAC username.'
          config:
            type: TEXT
            priority: '2'
            label: 'iDRAC username'
            description: 'The Dell iDRAC username.'
            required: 'YES'
        - macro: '{$DELL.HTTP.CPU.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'CPU usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about CPU utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.CPU.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'CPU usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about CPU utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IFCONTROL}'
          value: '1'
          description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'Link status trigger enabled'
            description: 'Link status trigger will be fired only for interfaces that have the context macro equal to "1".'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IO.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'IO usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about IO utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.IO.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'IO usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about IO utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.MEM.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Memory usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about memory utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.MEM.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Memory usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about memory utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.PROXY}'
          description: 'Set an HTTP proxy for Redfish API requests if needed.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'HTTP proxy'
            description: 'Set an HTTP proxy for Redfish API requests if needed.'
        - macro: '{$DELL.HTTP.REQUEST.TIMEOUT}'
          value: 10s
          description: 'Set the timeout for HTTP requests.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'HTTP timeout'
            description: 'Set the timeout for HTTP requests.'
        - macro: '{$DELL.HTTP.RETURN.CODE.OK}'
          value: '200'
          description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'HTTP OK code'
            description: 'Set the HTTP return code that represents an OK response from the API. The default is "200", but can vary, for example, if a proxy is used.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.SYS.UTIL.HIGH}'
          value: '90'
          description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization.'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'SYS usage high (%)'
            description: 'Sets the percentage threshold for creating a "high" severity event about SYS utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$DELL.HTTP.SYS.UTIL.WARN}'
          value: '75'
          description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization.'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'SYS usage warning (%)'
            description: 'Sets the percentage threshold for creating a "warning" severity event about SYS utilization. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 05d7ff8c86274cc0adb76f0d8c39825c
          name: Overview
          pages:
            - name: Overview
              display_period: '30'
              widgets:
                - type: gauge
                  name: 'CPU utilization'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: CPU
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: dell.server.util.cpu
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'Memory utilization'
                  'y': '3'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: MEM
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: dell.server.util.mem
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'I/O utilization'
                  'y': '6'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: I/O
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: dell.server.util.io
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: gauge
                  name: 'SYS utilization'
                  'y': '9'
                  width: '18'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 6C00D9
                    - type: STRING
                      name: description
                      value: SYS
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: STRING
                      name: empty_color
                      value: 5000A1
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: dell.server.util.sys
                    - 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: STRING
                      name: units_color
                      value: FFFFFF
                    - type: STRING
                      name: value_arc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_arc_size
                      value: '35'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                - type: item
                  name: 'Redfish API'
                  x: '18'
                  width: '27'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'Redfish API'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: 'net.tcp.service[https]'
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'HW model'
                  x: '18'
                  'y': '3'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'HW model'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: dell.server.hw.model
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Serial number'
                  x: '18'
                  'y': '6'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'Serial number'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: dell.server.hw.serialnumber
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: Firmware
                  x: '18'
                  'y': '9'
                  width: '54'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: Firmware
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: dell.server.hw.firmware
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'System health'
                  x: '45'
                  width: '27'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 2196F3
                    - type: STRING
                      name: description
                      value: 'System Health'
                    - type: STRING
                      name: desc_color
                      value: FFFFFF
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'DELL PowerEdge R840 by HTTP'
                        key: dell.server.status
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '1'
                    - type: STRING
                      name: value_color
                      value: FFFFFF
                    - type: INTEGER
                      name: value_size
                      value: '35'
            - name: Discoveries
              display_period: '30'
              widgets:
                - type: honeycomb
                  name: 'Interface link'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Link status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: STRING
                      name: thresholds.0.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.1.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '3'
                - type: honeycomb
                  name: 'Temperature sensors'
                  'y': '4'
                  width: '72'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Probe*Value'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAB
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Physical disks'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Physical disk*Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                - type: honeycomb
                  name: 'Power supplies'
                  'y': '12'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Power supply*Voltage'
                    - type: STRING
                      name: items.1
                      value: 'Power supply*Current'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: honeycomb
                  name: 'Interface speed'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Interface*Speed'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAABA
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '10000000'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF980E
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '100000000'
                    - type: STRING
                      name: thresholds.3.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '1000000000'
                    - type: STRING
                      name: thresholds.4.color
                      value: 2196F3
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '10000000000'
                    - type: STRING
                      name: thresholds.5.color
                      value: 6C00D9
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '25000000000'
                    - type: STRING
                      name: thresholds.6.color
                      value: D900A6
                    - type: STRING
                      name: thresholds.6.threshold
                      value: '40000000000'
                - type: honeycomb
                  name: 'Virtual disks'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Virtual disk*: Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                - type: honeycomb
                  name: Fans
                  x: '36'
                  'y': '12'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Probe*Status'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("\[(.*?)\]", "\1")}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: STRING
                      name: thresholds.0.color
                      value: 069C56
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF681E
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.2.color
                      value: D3212C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
      valuemaps:
        - uuid: 4cb6f9b8048a4109849a7f12bf0aba1c
          name: 'Network interface status'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: 'Null'
            - value: '2'
              newvalue: Down
            - value: '3'
              newvalue: Up
        - uuid: dfee913787ba42e49a11dae28d1a603f
          name: 'Redfish API availability'
          mappings:
            - value: '0'
              newvalue: Unavailable
            - value: '1'
              newvalue: Available
        - uuid: 5b5774ab04ec4f3eaf1e528ad02e0978
          name: 'Redfish status health'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: OK
            - value: '2'
              newvalue: Warning
            - value: '3'
              newvalue: Critical
        - uuid: f73f21dc4f964efeb4f54f8565d4cd58
          name: 'Redfish status state'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Enabled
            - value: '2'
              newvalue: Disabled
            - value: '3'
              newvalue: Absent
            - value: '4'
              newvalue: Deferring
            - value: '5'
              newvalue: InTest
            - value: '6'
              newvalue: Quiesced
            - value: '7'
              newvalue: StandbyOffline
            - value: '8'
              newvalue: StandbySpare
            - value: '9'
              newvalue: Starting
            - value: '10'
              newvalue: UnavailableOffline
            - value: '11'
              newvalue: Updating
        - uuid: 865251146a524335be8ec054d8df15aa
          name: 'Virtual disk RAID status'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: Blocked
            - value: '2'
              newvalue: Degraded
            - value: '3'
              newvalue: Failed
            - value: '4'
              newvalue: Foreign
            - value: '5'
              newvalue: Offline
            - value: '6'
              newvalue: Unknown
            - value: '7'
              newvalue: 'Null'
            - value: '8'
              newvalue: Ready
            - value: '9'
              newvalue: Online
        - uuid: b37b8981282944348ab2748fb09d55f4
          name: 'Virtual disk read policy'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: NoReadAhead
            - value: '2'
              newvalue: ReadAhead
            - value: '3'
              newvalue: AdaptiveReadAhead
        - uuid: ccdd0a176df640e09b95837aba7580f1
          name: 'Virtual disk write policy'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: WriteThrough
            - value: '2'
              newvalue: WriteBack
            - value: '3'
              newvalue: ProtectedWriteBack
            - value: '4'
              newvalue: UnprotectedWriteBack
    - uuid: 44c2c2d94a4447c6a924386640e4854a
      template: 'F5 Big-IP by SNMP'
      name: 'F5 Big-IP by SNMP'
      description: |
        MIBs used:
        RFC1213-MIB
        F5-BIGIP-LOCAL-MIB
        F5-BIGIP-SYSTEM-MIB
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      vendor:
        name: Zabbix
        version: 8.0-5
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 907424caaf7c4b11b7a567db84ea1e17
          name: Contact
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.4.0]'
          key: bigip.contact
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The textual identification of the contact person
            for this managed node, together with information
            on how to contact this person.
          inventory_link: CONTACT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 0f7ecc11f860443582eb6dbe64b2bbb6
          name: 'Failover status'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.14.3.1.0]'
          key: bigip.failover
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The failover status ID on the system.
            unknown - the failover status of the device is unknown;
            offline - the device is offline;
            forcedOffline - the device is forced offline;
            standby - the device is standby;
            active - the device is active.
          valuemap:
            name: 'SNMP sysCmFailoverStatusId'
          tags:
            - tag: component
              value: cluster
          triggers:
            - uuid: f93a7ff7cc614c0b84789f325ebb662b
              expression: 'count(/F5 Big-IP by SNMP/bigip.failover,10m,"ne","3")>8 and count(/F5 Big-IP by SNMP/bigip.failover,10m,"ne","4")>6'
              name: 'F5 Big-IP: Cluster not in sync'
              event_name: 'F5 Big-IP: Cluster not in sync: {ITEM.VALUE}'
              opdata: '{ITEM.LASTVALUE}'
              priority: WARNING
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 8ce387e2d78e42bfa6180b4b22096468
          name: Location
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.6.0]'
          key: bigip.location
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            The physical location of this node (e.g.,
            `telephone closet, 3rd floor').
          inventory_link: LOCATION
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: d9bf23e66ae347eb8f6f58867cdc3ca7
          name: 'Hardware model name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.1.0]'
          key: bigip.model
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-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.  It is mandatory that this only contain
            printable ASCII characters.
          inventory_link: MODEL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 97d896e7b8ed422caf9c4ebf053bb8d9
          name: 'Host name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.2.1.1.5.0]'
          key: bigip.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: RFC1213-MIB
            An administratively-assigned name for this
            managed node.  By convention, this is the node's
            fully-qualified domain name.
          inventory_link: NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 3d7299dcbfee4b4a8b39bbf8daa4a077
          name: 'Product build'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.4.3.0]'
          key: bigip.product.build
          delay: 1h
          value_type: CHAR
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The product build number.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 065a6b42397e40c3874cf4176bd0fa6b
          name: 'Product build date'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.4.5.0]'
          key: bigip.product.date
          delay: 1h
          value_type: CHAR
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The product build date.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: 5b3c2a650f474a6da05262dc5b3634a9
          name: 'Product edition'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.4.4.0]'
          key: bigip.product.edition
          delay: 1h
          value_type: CHAR
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The product edition.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: dd91be3044a2465781af744dc45dd06f
          name: 'Product name'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.4.1.0]'
          key: bigip.product.name
          delay: 1h
          value_type: CHAR
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The product name.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: b670cf1b43d84b8784acfeaca1f01320
          name: 'Product version'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.4.2.0]'
          key: bigip.product.version
          delay: 1h
          value_type: CHAR
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The product version.
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
        - uuid: a80409ff52bf4fe183a68ed257279db5
          name: 'Chassis serial number'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.3.3.0]'
          key: bigip.serialnumber
          delay: 1h
          value_type: CHAR
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            Serial number
          inventory_link: SERIALNO_A
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          tags:
            - tag: component
              value: inventory
          triggers:
            - uuid: 8a55167ddebb43f2ac8f6d028aef87c2
              expression: 'last(/F5 Big-IP by SNMP/bigip.serialnumber,#1)<>last(/F5 Big-IP by SNMP/bigip.serialnumber,#2) and length(last(/F5 Big-IP by SNMP/bigip.serialnumber))>0'
              name: 'F5 Big-IP: Chassis has been replaced'
              event_name: 'F5 Big-IP: Chassis has been replaced (new serial number received)'
              priority: INFO
              description: 'Chassis serial number has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 46bf5611d32340fdb9129966cca2c5da
          name: 'Sync Status'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.14.1.1.0]'
          key: bigip.syncstatus
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The sync status ID on the system.
            unknown - the device is disconnected from the device group;
            syncing - the device is joining the device group or has requested changes from device group or inconsistent with the group;
            needManualSync - changes have been made on the device not syncd to the device group;
            inSync - the device is consistent with the device group;
            syncFailed - the device is inconsistent with the device group, requires user intervention;
            syncDisconnected - the device is not connected to any peers;
            standalone - the device is in a standalone configuration;
            awaitingInitialSync - the device is waiting for initial sync;
            incompatibleVersion - the device's version is incompatible with rest of the devices in the device group;
            partialSync - some but not all devices successfully received the last sync.
          valuemap:
            name: 'SNMP sysCmSyncStatusId'
          tags:
            - tag: component
              value: cluster
          triggers:
            - uuid: 098fe258e8cc4216b0c1800913ba8e18
              expression: 'last(/F5 Big-IP by SNMP/bigip.syncstatus)=2'
              name: 'F5 Big-IP: Changes have been made on the device not sync'
              event_name: 'F5 Big-IP: Changes have been made on the device not sync to the device group: {ITEM.VALUE}'
              opdata: '{ITEM.LASTVALUE}'
              priority: WARNING
              description: 'Changes have been made on the device not sync to the device group, requires user intervention'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
            - uuid: eb3517626c6d425f9b88a2bc35641ab6
              expression: 'last(/F5 Big-IP by SNMP/bigip.syncstatus)=4'
              name: 'F5 Big-IP: The device is inconsistent with the device group'
              event_name: 'F5 Big-IP: The device is inconsistent with the device group: {ITEM.VALUE}'
              opdata: '{ITEM.LASTVALUE}'
              priority: WARNING
              description: 'The device is inconsistent with the device group, requires user intervention'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 78d6c13d575a41a8b160bd4e2c0bea7b
          name: 'TCP connections, CLOSE-WAIT/LAST-ACK'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.1.2.12.3.0]'
          key: bigip.tcp.close_wait
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The number of current TCP connections in CLOSE-WAIT/LAST-ACK.
          tags:
            - tag: component
              value: network
        - uuid: e28c1bfcd63e4a5c8394680886395669
          name: 'TCP connections, FIN-WAIT-1/CLOSING'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.1.2.12.4.0]'
          key: bigip.tcp.fin1_wait
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The number of current TCP connections in FIN-WAIT-1/CLOSING.
          tags:
            - tag: component
              value: network
        - uuid: 69576083e02c486998512c58ab2a6371
          name: 'TCP connections, FIN-WAIT-2'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.1.2.12.20.0]'
          key: bigip.tcp.fin2_wait
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The number of current TCP connections in FIN-WAIT-2.
          tags:
            - tag: component
              value: network
        - uuid: b58bae7e2e4f403ba7bce846ccf5228e
          name: 'Open TCP connections'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.1.2.12.2.0]'
          key: bigip.tcp.open
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The number of current open TCP connections.
          tags:
            - tag: component
              value: network
        - uuid: bd3982fd369142878ffb9530656556e3
          name: 'TCP connections, TIME-WAIT'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.1.2.12.5.0]'
          key: bigip.tcp.time_wait
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The number of current TCP connections in TIME-WAIT.
          tags:
            - tag: component
              value: network
        - uuid: 843e855fb10f4cb0be81953dd8dbb87e
          name: 'Open UDP connections'
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.1.2.13.2.0]'
          key: bigip.udp.open
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The number of current open UDP connections.
          tags:
            - tag: component
              value: network
        - uuid: efb83b0cb4864b249ecf61b2f81ec468
          name: Uptime
          type: SNMP_AGENT
          snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.6.6.0]'
          key: bigip.uptime
          delay: 30s
          trends: '0'
          units: uptime
          description: |
            MIB: F5-BIGIP-SYSTEM-MIB
            The system up time in 1/100 seconds since boot.
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.01'
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 551fd3b77d144ed58f138865e4862901
              expression: 'last(/F5 Big-IP by SNMP/bigip.uptime)<10m'
              name: 'F5 Big-IP: Host has been restarted'
              event_name: 'F5 Big-IP: {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: c91416602a9c451ca0eb959073f65fb0
          name: 'SNMP agent availability'
          type: INTERNAL
          key: 'zabbix[host,snmp,available]'
          valuemap:
            name: 'SNMP available'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          tags:
            - tag: component
              value: network
          triggers:
            - uuid: 9ec4425af8dd4cf59dcb3146e6a8263c
              expression: 'max(/F5 Big-IP by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
              name: 'F5 Big-IP: 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.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: 9368bf7cbf0742e5af8e0b1200200a15
          name: 'Blade temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#TEMP.INDEX},1.3.6.1.4.1.3375.2.1.3.2.4.2.1.1,{#SLOT.INDEX},1.3.6.1.4.1.3375.2.1.3.2.4.2.1.4,{#TEMP.LOCATION},1.3.6.1.4.1.3375.2.1.3.2.4.2.1.3]'
          key: bigip.blade.temp.discovery
          delay: 1h
          description: 'Containing information of blade temperature of the system'
          item_prototypes:
            - uuid: 6e0239a64c2c43ee94e225efcf970ef1
              name: 'Sensor [{#SLOT.INDEX}:{#TEMP.INDEX}]: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.2.4.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.blade.temp.value[{#SLOT.INDEX},{#TEMP.INDEX}]'
              value_type: FLOAT
              units: °C
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                Location: {#TEMP.LOCATION}
                The blade temperature (in Celsius) of the indexed sensor on the system.,
                This is only supported for the platform where
                the sensor data is available.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
          graph_prototypes:
            - uuid: 1b43fb6913274a34ab6ad122d5db38ba
              name: 'F5 BIG-IP: Sensor [{#SLOT.INDEX}:{#TEMP.INDEX}] temperature'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.blade.temp.value[{#SLOT.INDEX},{#TEMP.INDEX}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 099e4de8464e49aca8e0d24b4276c804
          name: 'Blade voltage discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#VOLT.INDEX},1.3.6.1.4.1.3375.2.1.3.2.5.2.1.1]'
          key: bigip.blade.voltage.discovery
          delay: 1h
          description: 'A table containing information of blade voltage of the system.'
          item_prototypes:
            - uuid: 6f7cf365f10440b18a08d63880356401
              name: 'Voltage [{#VOLT.INDEX}]: Slot'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.2.5.2.1.3.{#SNMPINDEX}]'
              key: 'bigip.blade.voltage.slot[{#VOLT.INDEX}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The chassis slot number, if applicable.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
            - uuid: 1c0bf38bb0d3473cae285704ccd3ee0b
              name: 'Voltage [{#VOLT.INDEX}]: Value'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.2.4.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.blade.voltage.value[{#VOLT.INDEX}]'
              value_type: FLOAT
              units: V
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The blade voltage (in V) of the indexed sensor on the system.,
                This is only supported for the platform where
                the sensor data is available.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: voltage
          graph_prototypes:
            - uuid: b5b1a26c3c9043d79eff63272c3e4b8d
              name: 'F5 BIG-IP: Voltage [{#VOLT.INDEX}] value'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.blade.voltage.value[{#VOLT.INDEX}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: dfdcfd160cfe4e798f29576280bf1627
          name: 'Certificate discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#CERT.NAME},1.3.6.1.4.1.3375.2.1.15.1.2.1.1]'
          key: bigip.cert.discovery
          delay: 1d
          description: 'A table containing certificate configuration.'
          item_prototypes:
            - uuid: d27c1c13d6984728aebacdcf26777025
              name: 'Certificate [{#CERT.NAME}]: Expiration date'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.15.1.2.1.5.{#SNMPINDEX}]'
              key: 'bigip.cert.expiration.date[{#CERT.NAME}]'
              delay: 12h
              trends: '0'
              units: unixtime
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The expiration date of the certificate in unix time.
              tags:
                - tag: certificate
                  value: '{#CERT.NAME}'
                - tag: component
                  value: certificate
              trigger_prototypes:
                - uuid: 015ce3f5d10749aca1d871a1d26c51c5
                  expression: 'last(/F5 Big-IP by SNMP/bigip.cert.expiration.date[{#CERT.NAME}]) - 86400 * {$BIGIP.CERT.MIN} < now()'
                  name: 'F5 Big-IP: Certificate expires ({#CERT.NAME})'
                  event_name: 'F5 Big-IP: Less than {$BIGIP.CERT.MIN} days left until the certificate expires ({#CERT.NAME})'
                  opdata: 'Expires: {ITEM.VALUE}'
                  priority: WARNING
                  description: 'Please check certificate'
                  tags:
                    - tag: scope
                      value: security
        - uuid: 1bab90f9f015432c817cabebb98453af
          name: 'Chassis fan discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#FAN.INDEX},1.3.6.1.4.1.3375.2.1.3.2.1.2.1.1]'
          key: bigip.chassis.fan.discovery
          delay: 1h
          description: 'A table containing information of chassis fan status of the system'
          item_prototypes:
            - uuid: 973e0443ecc84630afc327d1917d9e57
              name: 'FAN [{#FAN.INDEX}]: Speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.2.1.2.1.3.{#SNMPINDEX}]'
              key: 'bigip.chassis.fan.speed[{#FAN.INDEX}]'
              delay: 5m
              units: '!rpm'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The actual speed of the indexed chassis fan on the system.
                This is only supported for the platform where the actual
                fan speed data is available.
                '0' means fan speed is unavailable while the associated chassis status is good.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
            - uuid: 13b1890ae83547d482c9130ea0ccf876
              name: 'FAN [{#FAN.INDEX}]: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.2.1.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.chassis.fan.status[{#FAN.INDEX}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The status of the indexed chassis fan on the system.,
                This is only supported for the platform where
                the sensor data is available.
                Possible values: 0 - bad, 1 - good, 2 - notpresent.
              valuemap:
                name: 'Chassis status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
              trigger_prototypes:
                - uuid: 546745f6edf7470896d5bf251d760dfe
                  expression: 'last(/F5 Big-IP by SNMP/bigip.chassis.fan.status[{#FAN.INDEX}])=0'
                  name: 'F5 Big-IP: Fan[{#FAN.INDEX}] is in critical state'
                  priority: AVERAGE
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: d20c56720aa54efba37f5fcdfdde0225
                  expression: 'last(/F5 Big-IP by SNMP/bigip.chassis.fan.status[{#FAN.INDEX}])=2'
                  name: 'F5 Big-IP: Fan[{#FAN.INDEX}] is not present'
                  priority: INFO
                  description: 'Please check the fan unit'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: f0a043ed6fb249e489f143350b681a63
              name: 'F5 BIG-IP: FAN [{#FAN.INDEX}] speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.chassis.fan.speed[{#FAN.INDEX}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: ee07355820ae4281ba5c6b4640a9fcc4
          name: 'Chassis power supply discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#POWER.INDEX},1.3.6.1.4.1.3375.2.1.3.2.2.2.1.1]'
          key: bigip.chassis.power.discovery
          delay: 1h
          description: 'A table containing information of chassis power supply status of the system.'
          item_prototypes:
            - uuid: d72e501362eb4e70bb324d42d304b7a8
              name: 'Power supply [{#POWER.INDEX}]: Status'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.2.2.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.chassis.power.status[{#POWER.INDEX}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The status of the indexed power supply on the system.,
                This is only supported for the platform where
                the sensor data is available.
                Possible values: 0 - bad, 1 - good, 2 - notpresent.
              valuemap:
                name: 'Chassis status'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: power
              trigger_prototypes:
                - uuid: 1e85cee65875477b85f74aedba6e86c9
                  expression: 'last(/F5 Big-IP by SNMP/bigip.chassis.power.status[{#POWER.INDEX}])=0'
                  name: 'F5 Big-IP: Power supply [{#POWER.INDEX}] is in critical state'
                  priority: HIGH
                  description: 'Please check the power supply unit'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 84469f28c4bf47f790a85b9f1f37cff0
                  expression: 'last(/F5 Big-IP by SNMP/bigip.chassis.power.status[{#POWER.INDEX}])=2'
                  name: 'F5 Big-IP: Power supply [{#POWER.INDEX}] is not present'
                  priority: INFO
                  description: 'Please check the power supply unit'
                  tags:
                    - tag: scope
                      value: notice
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 795b91aa746b43fdb8171cd30aa249ee
          name: 'Chassis temperature discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#TEMP.INDEX},1.3.6.1.4.1.3375.2.1.3.2.3.2.1.1]'
          key: bigip.chassis.temp.discovery
          delay: 1h
          description: 'A table containing information of chassis temperature of the system'
          item_prototypes:
            - uuid: e49355bacceb473eb9f548d044a9742b
              name: 'Sensor [{#TEMP.INDEX}]: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.2.3.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.chassis.temp.value[{#TEMP.INDEX}]'
              delay: 5m
              value_type: FLOAT
              units: °C
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The chassis temperature (in Celsius) of the indexed sensor on the system.,
                This is only supported for the platform where
                the sensor data is available.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
              trigger_prototypes:
                - uuid: 452167aafe594e3faa3748e6dc470fb1
                  expression: 'last(/F5 Big-IP by SNMP/bigip.chassis.temp.value[{#TEMP.INDEX}])>{$BIGIP.TEMP.HIGH}'
                  name: 'F5 Big-IP: Chassis temperature'
                  event_name: 'F5 Big-IP: Chassis temperature ({ITEM.LASTVALUE}) of sensor {#TEMP.INDEX} exceeds threshold of {$BIGIP.TEMP.HIGH} °C'
                  opdata: '{ITEM.LASTVALUE}'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 00c0212fcb8049309bf0b3de2b2363b4
                  expression: 'last(/F5 Big-IP by SNMP/bigip.chassis.temp.value[{#TEMP.INDEX}])>{$BIGIP.TEMP.WARN}'
                  name: 'F5 Big-IP: Chassis temperature'
                  event_name: 'F5 Big-IP: Chassis temperature ({ITEM.LASTVALUE}) of sensor {#TEMP.INDEX} exceeds threshold of {$BIGIP.TEMP.WARN} °C'
                  opdata: '{ITEM.LASTVALUE}'
                  priority: WARNING
                  dependencies:
                    - name: 'F5 Big-IP: Chassis temperature'
                      expression: 'last(/F5 Big-IP by SNMP/bigip.chassis.temp.value[{#TEMP.INDEX}])>{$BIGIP.TEMP.HIGH}'
                  tags:
                    - tag: scope
                      value: notice
          graph_prototypes:
            - uuid: ceea250c715948f3907290738451c328
              name: 'F5 BIG-IP: Sensor [{#TEMP.INDEX}] temperature'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.chassis.temp.value[{#TEMP.INDEX}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 1f27aaedf30243c2a704bf6350490d8c
          name: 'CPU discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#HOST.ID},1.3.6.1.4.1.3375.2.1.7.5.2.1.1,{#CPU.ID},1.3.6.1.4.1.3375.2.1.7.5.2.1.3]'
          key: bigip.cpu.discovery
          delay: 1h
          description: 'A table containing entries of system CPU usage information for a system.'
          item_prototypes:
            - uuid: 7cf45a392cd7465988eb527de7b3ad63
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Idle, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.23.{#SNMPINDEX}]'
              key: 'bigip.cpu.idle.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor doing nothing for the associated host in the last one minute.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 12acd2da83b04353aca2bd3cff842c97
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Idle, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.31.{#SNMPINDEX}]'
              key: 'bigip.cpu.idle.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor doing nothing for the associated host in the last five minutes.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: dd169e972fe041cca93020b8a942a4d2
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Idle, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.15.{#SNMPINDEX}]'
              key: 'bigip.cpu.idle.5s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor doing nothing for the associated host in the last five seconds.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 808a6933a1834291b80d0cb072dded09
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: IO wait, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.26.{#SNMPINDEX}]'
              key: 'bigip.cpu.iowait.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor waiting for external I/O to complete for the associated host in the last one minute.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 6144e3ca25ac4f998559b860d059c385
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: IO wait, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.34.{#SNMPINDEX}]'
              key: 'bigip.cpu.iowait.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor waiting for external I/O to complete for the associated host in the last five minutes.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: b4715714c727483fb3ca6004a829ac46
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: IO wait, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.18.{#SNMPINDEX}]'
              key: 'bigip.cpu.iowait.5s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor waiting for external I/O to complete for the associated host in the last five seconds.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 9f0f6dabac314744809a60161592a89f
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: IRQ, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.24.{#SNMPINDEX}]'
              key: 'bigip.cpu.irq.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing hardware interrupts for the associated host in the last one minute.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: f3d8ac2412ee4f0b88f264e590e278cb
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: IRQ, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.32.{#SNMPINDEX}]'
              key: 'bigip.cpu.irq.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing hardware interrupts for the associated host in the last five minutes.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 7bc53c5f9a7148759d426e8e5fd7f358
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: IRQ, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.16.{#SNMPINDEX}]'
              key: 'bigip.cpu.irq.5s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing hardware interrupts for the associated host in the last five seconds.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: b74f502d97f54041a4c129f5993e0967
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Nice, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.21.{#SNMPINDEX}]'
              key: 'bigip.cpu.nice.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor running niced processes for the associated host in the last one minute.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: bf51a4638db443a083ec19b934a6a915
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Nice, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.29.{#SNMPINDEX}]'
              key: 'bigip.cpu.nice.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor running niced processes for the associated host in the last five minutes.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 0046e43000b7477ea410970884829e5c
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Nice, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.13.{#SNMPINDEX}]'
              key: 'bigip.cpu.nice.5s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor running niced processes for the associated host in the last five seconds.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: f2b1962e10b04dc28a124b91b7e9a235
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Soft IRQ, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.25.{#SNMPINDEX}]'
              key: 'bigip.cpu.spftirq.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing soft interrupts for the associated host in the last one minute.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 56f459510e444326bba84ab12c4c232c
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Soft IRQ, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.33.{#SNMPINDEX}]'
              key: 'bigip.cpu.spftirq.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing soft interrupts for the associated host in the last five minutes.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 8a6c086c524c4f5c93e66f9f453ed767
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Soft IRQ, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.17.{#SNMPINDEX}]'
              key: 'bigip.cpu.spftirq.5s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing soft interrupts for the associated host in the last five seconds.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 62e59d3a63014976a6c052ef259dbbc1
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Stolen, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.38.{#SNMPINDEX}]'
              key: 'bigip.cpu.stolen.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time 'stolen' from the specified processor for the associated host in the last one minute.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 757178b5d85041959609de5d38d93f20
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Stolen, avg 1s)'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.37.{#SNMPINDEX}]'
              key: 'bigip.cpu.stolen.1s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time 'stolen' from the specified processor for the associated host in the last five seconds.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: c229331551284955befbed59fedae445
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Stolen, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.39.{#SNMPINDEX}]'
              key: 'bigip.cpu.stolen.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time 'stolen' from the specified processor for the associated host in the last five minutes.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 20a60cec7a50457a9c6c5a5e318b53e2
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: System, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.22.{#SNMPINDEX}]'
              key: 'bigip.cpu.system.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing system calls for the associated host in the last one minute.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 9dc919dcc789473db23f989943f9a759
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: System, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.30.{#SNMPINDEX}]'
              key: 'bigip.cpu.system.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing system calls for the associated host in the last five minutes.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 8b1bd4e936c149cfa44d8cf5d88bee4b
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: System, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.14.{#SNMPINDEX}]'
              key: 'bigip.cpu.system.5s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor servicing system calls for the associated host in the last five seconds.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: e8f3b63e951d4de0b845647bcdd1524f
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Usage ratio, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.27.{#SNMPINDEX}]'
              key: 'bigip.cpu.usageratio.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                This is  average usage ratio of CPU for the associated host in the last one minute. It is calculated by
                (sum of deltas for user, niced, system)/(sum of deltas of user, niced, system, idle, irq, softirq, and iowait),
                where each delta is the difference for each stat over the last 5-second interval;
                user:sysMultiHostCpuUser1m;
                niced:sysMultiHostCpuNiced1m;
                stolen:sysMultiHostCpuStolen1m;
                system:sysMultiHostCpuSystem1m;
                idle:sysMultiHostCpuIdle1m;
                irq:sysMultiHostCpuIrq1m;
                iowait:sysMultiHostCpuIowait1m
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 46e78b7f00904778abf5160fff93670a
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Usage ratio, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.35.{#SNMPINDEX}]'
              key: 'bigip.cpu.usageratio.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                This is  average usage ratio of CPU for the associated host in the last five minutes. It is calculated by
                (sum of deltas for user, niced, system)/(sum of deltas of user, niced, system, idle, irq, softirq, and iowait),
                where each delta is the difference for each stat over the last 5-second interval;
                user:sysMultiHostCpuUser5m;
                niced:sysMultiHostCpuNiced5m;
                stolen:sysMultiHostCpuStolen5m;
                system:sysMultiHostCpuSystem5m;
                idle:sysMultiHostCpuIdle5m;
                irq:sysMultiHostCpuIrq5m;
                iowait:sysMultiHostCpuIowait5m
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
              trigger_prototypes:
                - uuid: 1163080e05d3433f884773fe1ee0271a
                  expression: 'last(/F5 Big-IP by SNMP/bigip.cpu.usageratio.5m[{#HOST.ID},{#CPU.ID}])>{$BIGIP.CPU.UTIL.WARN.MAX}'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: 'last(/F5 Big-IP by SNMP/bigip.cpu.usageratio.5m[{#HOST.ID},{#CPU.ID}])<{$BIGIP.CPU.UTIL.WARN.MIN}'
                  name: 'F5 Big-IP: High CPU utilization'
                  event_name: 'F5 Big-IP: High CPU utilization (over {$BIGIP.CPU.UTIL.WARN.MAX}% for 5m)'
                  priority: WARNING
                  description: 'The CPU utilization is too high. The system might be slow to respond.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: e0e3bbd21d3e434c80e7bb1969388b27
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: Usage ratio, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.19.{#SNMPINDEX}]'
              key: 'bigip.cpu.usageratio.5s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                This is  average usage ratio of CPU for the associated host in the last five seconds. It is calculated by
                (sum of deltas for user, niced, system)/(sum of deltas of user, niced, system, idle, irq, softirq, and iowait),
                where each delta is the difference for each stat over the last 5-second interval;
                user:sysMultiHostCpuUser5s;
                niced:sysMultiHostCpuNiced5s;
                stolen:sysMultiHostCpuStolen5s;
                system:sysMultiHostCpuSystem5s;
                idle:sysMultiHostCpuIdle5s;
                irq:sysMultiHostCpuIrq5s;
                iowait:sysMultiHostCpuIowait5s
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: beaece1c9eaa41768e7c05993d2f4b3b
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: User, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.20.{#SNMPINDEX}]'
              key: 'bigip.cpu.user.1m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor in user context for the associated host in the last one minute.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 7344ae137ef94f80a99865057c105d96
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: User, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.28.{#SNMPINDEX}]'
              key: 'bigip.cpu.user.5m[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor in user context for the associated host in the last five minutes.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
            - uuid: 61176fa2de794fcf90f1eef2ead10df6
              name: 'Host [{#HOST.ID}] CPU{#CPU.ID}: User, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.5.2.1.12.{#SNMPINDEX}]'
              key: 'bigip.cpu.user.5s[{#HOST.ID},{#CPU.ID}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The average time spent by the specified processor in user context for the associated host in the last five seconds.
              tags:
                - tag: component
                  value: cpu
                - tag: cpu-id
                  value: '{#CPU.ID}'
                - tag: host-id
                  value: '{#HOST.ID}'
          graph_prototypes:
            - uuid: 64c251a6b0384d2ea7d5b498c7fe6422
              name: 'F5 BIG-IP: Host [{#HOST.ID}] CPU{#CPU.ID}: Usage ratio, avg 1m'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.user.1m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.nice.1m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.system.1m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.idle.1m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.irq.1m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.iowait.1m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '6'
                  color: C7A72D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.stolen.1m[{#HOST.ID},{#CPU.ID}]'
            - uuid: 3fd0ca58d8f14e06afa2c58f9d1b46f3
              name: 'F5 BIG-IP: Host [{#HOST.ID}] CPU{#CPU.ID}: Usage ratio, avg 5m'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.user.5m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.nice.5m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.system.5m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.idle.5m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.irq.5m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.iowait.5m[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '6'
                  color: C7A72D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.stolen.5m[{#HOST.ID},{#CPU.ID}]'
            - uuid: dba5e4f4c3714f438eacba4b213ce640
              name: 'F5 BIG-IP: Host [{#HOST.ID}] CPU{#CPU.ID}: Usage ratio, avg 5s'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.user.5s[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.nice.5s[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.system.5s[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.idle.5s[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.irq.5s[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.iowait.5s[{#HOST.ID},{#CPU.ID}]'
                - sortorder: '6'
                  color: C7A72D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.stolen.1s[{#HOST.ID},{#CPU.ID}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: a0bdcabc8c7c4a349a9c4711be33c417
          name: 'CPU sensor discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#CPU.SENSOR.INDEX},1.3.6.1.4.1.3375.2.1.3.6.2.1.1,{#CPU.SENSOR.SLOT},1.3.6.1.4.1.3375.2.1.3.6.2.1.5,{#CPU.SENSOR.NAME},1.3.6.1.4.1.3375.2.1.3.6.2.1.4]'
          key: bigip.cpu.sensor.discovery
          delay: 1h
          description: 'A table containing information of CPU sensor status on the system.'
          item_prototypes:
            - uuid: 065993688a2e4b0e8e88998d24193a85
              name: 'Sensor [{#CPU.SENSOR.SLOT}:{#CPU.SENSOR.INDEX}]: FAN speed'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.6.2.1.3.{#SNMPINDEX}]'
              key: 'bigip.cpu.sensor.fan[{#CPU.SENSOR.SLOT},{#CPU.SENSOR.INDEX}]'
              delay: 5m
              units: '!rpm'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                CPU: {#CPU.SENSOR.NAME}
                The fan speed (in RPM) of the indexed CPU on the system.,
                This is only supported for the platform where
                the sensor data is available.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: fan
                - tag: component
                  value: sensor
            - uuid: 03bd45f8a7004fd3a3d8b361a37547d3
              name: 'Sensor [{#CPU.SENSOR.SLOT}:{#CPU.SENSOR.INDEX}]: Name'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.6.2.1.4.{#SNMPINDEX}]'
              key: 'bigip.cpu.sensor.name[{#CPU.SENSOR.SLOT},{#CPU.SENSOR.INDEX}]'
              delay: 1h
              value_type: CHAR
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                Identifier for the CPU.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: name
                - tag: component
                  value: sensor
            - uuid: 1ffd09c7d99843b88e259de3614d003a
              name: 'Sensor [{#CPU.SENSOR.SLOT}:{#CPU.SENSOR.INDEX}]: Temperature'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.3.6.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.cpu.sensor.temperature[{#CPU.SENSOR.SLOT},{#CPU.SENSOR.INDEX}]'
              delay: 5m
              units: °C
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                CPU: {#CPU.SENSOR.NAME}
                The temperature of the indexed CPU on the system.
                This is only supported for the platform where
                the sensor data is available.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: sensor
                - tag: component
                  value: temperature
          graph_prototypes:
            - uuid: 714b13fd29ec47009f183d44ddaa8df6
              name: 'F5 BIG-IP: Sensor [{#CPU.SENSOR.SLOT}:{#CPU.SENSOR.INDEX}] FAN speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.sensor.fan[{#CPU.SENSOR.SLOT},{#CPU.SENSOR.INDEX}]'
            - uuid: be756734cec74d9fb427fb1d515c7888
              name: 'F5 BIG-IP: Sensor [{#CPU.SENSOR.SLOT}:{#CPU.SENSOR.INDEX}] temperature'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.cpu.sensor.temperature[{#CPU.SENSOR.SLOT},{#CPU.SENSOR.INDEX}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 26027ab56e7841d1b73747935a5e6157
          name: 'File system discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#PART.NAME},1.3.6.1.4.1.3375.2.1.7.3.2.1.1]'
          key: bigip.disktable.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              - macro: '{#PART.NAME}'
                value: '{$BIGIP.LLD.FILTER.PART.NAME.MATCHES}'
              - macro: '{#PART.NAME}'
                value: '{$BIGIP.LLD.FILTER.PART.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'A table containing entries of system disk usage information.'
          item_prototypes:
            - uuid: 4c86e62a1a1a4f3eb990b2f17f6191fd
              name: 'Mount point [{#PART.NAME}]: Block size'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.3.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.disktable.blocksize[{#PART.NAME}]'
              delay: 1h
              units: B
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of bytes in the specified partition.
              tags:
                - tag: component
                  value: storage
                - tag: mount-point
                  value: '{#PART.NAME}'
            - uuid: 8fd4ee3dc199419189daf478ff2dc01d
              name: 'Mount point [{#PART.NAME}]: Free blocks'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.3.2.1.4.{#SNMPINDEX}]'
              key: 'bigip.disktable.freeblocks[{#PART.NAME}]'
              delay: 1h
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of free blocks in the specified partition.
              tags:
                - tag: component
                  value: storage
                - tag: mount-point
                  value: '{#PART.NAME}'
            - uuid: 5c0724be667946f192a46cc2a0584971
              name: 'Mount point [{#PART.NAME}]: Free nodes'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.3.2.1.6.{#SNMPINDEX}]'
              key: 'bigip.disktable.freenodes[{#PART.NAME}]'
              delay: 1h
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of free file nodes in the specified partition.
              tags:
                - tag: component
                  value: storage
                - tag: mount-point
                  value: '{#PART.NAME}'
            - uuid: 50d267f74f9c476fac23884828f5275f
              name: 'Mount point [{#PART.NAME}]: Total blocks'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.3.2.1.3.{#SNMPINDEX}]'
              key: 'bigip.disktable.totalblocks[{#PART.NAME}]'
              delay: 1h
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of total blocks in the specified partition.
              tags:
                - tag: component
                  value: storage
                - tag: mount-point
                  value: '{#PART.NAME}'
            - uuid: 49cd22a896d941a2b55f3ba6e95698b4
              name: 'Mount point [{#PART.NAME}]: Total nodes'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.3.2.1.5.{#SNMPINDEX}]'
              key: 'bigip.disktable.totalnodes[{#PART.NAME}]'
              delay: 1h
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of total file nodes in the specified partition.
              tags:
                - tag: component
                  value: storage
                - tag: mount-point
                  value: '{#PART.NAME}'
          trigger_prototypes:
            - uuid: 32b87997dc0b4967bdb158f1dc0baad2
              expression: 'last(/F5 Big-IP by SNMP/bigip.disktable.freeblocks[{#PART.NAME}])/last(/F5 Big-IP by SNMP/bigip.disktable.totalblocks[{#PART.NAME}])*100<{$BIGIP.FS.FREE.WARN.MIN:"{#PART.NAME}"}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'last(/F5 Big-IP by SNMP/bigip.disktable.freeblocks[{#PART.NAME}])/last(/F5 Big-IP by SNMP/bigip.disktable.totalblocks[{#PART.NAME}])*100>{$BIGIP.FS.FREE.WARN.MAX:"{#PART.NAME}"}'
              name: 'F5 Big-IP: Low free space in file system [{#PART.NAME}]'
              event_name: 'F5 Big-IP: Low free space in file system [{#PART.NAME}] (less than {$BIGIP.FS.FREE.WARN.MIN}% for 5m)'
              priority: WARNING
              description: 'The system is running out of free space.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: capacity
          graph_prototypes:
            - uuid: ed63eb409eb2497bb9dc7721ac789022
              name: 'F5 BIG-IP: Mount point [{#PART.NAME}]: Blocks'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.disktable.freeblocks[{#PART.NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.disktable.totalblocks[{#PART.NAME}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          overrides:
            - name: 'Skip trigger for defined filesystems'
              step: '1'
              filter:
                conditions:
                  - macro: '{#PART.NAME}'
                    value: '{$BIGIP.LLD.OVERRIDE.PART.FILTER_LOW_SPACE_TRIGGER}'
              operations:
                - operationobject: TRIGGER_PROTOTYPE
                  operator: LIKE
                  value: 'Low free space in file system'
                  discover: NO_DISCOVER
        - uuid: 8aeb7920d1fe4ba4884f92e45e711228
          name: 'Memory discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#HOST.ID},1.3.6.1.4.1.3375.2.1.7.4.2.1.1]'
          key: bigip.memory.discovery
          delay: 1h
          description: 'Containing system statistics information of the memory usage'
          item_prototypes:
            - uuid: 39b39f06ae574927b90dfe9235301788
              name: 'Host [{#HOST.ID}]: Total other non-TMM memory'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.4.2.1.7.{#SNMPINDEX}]'
              key: 'bigip.memory.total.other[{#HOST.ID}]'
              delay: 5m
              units: B
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The total other non-TMM memory in bytes for the specified host.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
            - uuid: e01e3283d37a4ae09d62fbc679cc4dee
              name: 'Host [{#HOST.ID}]: Total swap'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.4.2.1.9.{#SNMPINDEX}]'
              key: 'bigip.memory.total.swap[{#HOST.ID}]'
              delay: 1d
              units: B
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The total swap in bytes for the specified host.
              tags:
                - tag: component
                  value: memory
            - uuid: d1ebd77bd2bc4d24b45b32eb6cda6722
              name: 'Host [{#HOST.ID}]: Total memory'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.4.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.memory.total[{#HOST.ID}]'
              delay: 1d
              units: B
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The total host memory in bytes for the specified host.
              tags:
                - tag: component
                  value: memory
            - uuid: 6c73ea2e54594a1ab6edbdc6de30f711
              name: 'Host [{#HOST.ID}]: Used other non-TMM memory'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.4.2.1.8.{#SNMPINDEX}]'
              key: 'bigip.memory.used.other[{#HOST.ID}]'
              delay: 5m
              units: B
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The other non-TMM memory in bytes currently in use for the specified host.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
            - uuid: 3a9d6f2815644a4f93e008ccacbdb290
              name: 'Host [{#HOST.ID}]: Used swap'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.4.2.1.10.{#SNMPINDEX}]'
              key: 'bigip.memory.used.swap[{#HOST.ID}]'
              delay: 5m
              units: B
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The swap in bytes currently in use for the specified host.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
            - uuid: d5af8fa1079b4c0aa47b98e25a184af3
              name: 'Host [{#HOST.ID}]: Used memory'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.7.4.2.1.3.{#SNMPINDEX}]'
              key: 'bigip.memory.used[{#HOST.ID}]'
              delay: 5m
              units: B
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The host memory in bytes currently in use for the specified host.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: memory
          trigger_prototypes:
            - uuid: e72f446075214129ab1d6269fcd87051
              expression: 'last(/F5 Big-IP by SNMP/bigip.memory.used[{#HOST.ID}])/last(/F5 Big-IP by SNMP/bigip.memory.total[{#HOST.ID}])*100>{$BIGIP.MEMORY.UTIL.WARN.MAX}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'last(/F5 Big-IP by SNMP/bigip.memory.used[{#HOST.ID}])/last(/F5 Big-IP by SNMP/bigip.memory.total[{#HOST.ID}])*100<{$BIGIP.MEMORY.UTIL.WARN.MIN}'
              name: 'F5 Big-IP: High memory utilization in host [{#HOST.ID}]'
              event_name: 'F5 Big-IP: High memory utilization in host [{#HOST.ID}] (over {$BIGIP.MEMORY.UTIL.WARN.MAX}%)'
              priority: WARNING
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: performance
            - uuid: 5cf3e1f819ee46f49ba89156c53274ec
              expression: 'last(/F5 Big-IP by SNMP/bigip.memory.used.swap[{#HOST.ID}])/last(/F5 Big-IP by SNMP/bigip.memory.total.swap[{#HOST.ID}])*100>{$BIGIP.SWAP.UTIL.WARN.MAX}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'last(/F5 Big-IP by SNMP/bigip.memory.used.swap[{#HOST.ID}])/last(/F5 Big-IP by SNMP/bigip.memory.total.swap[{#HOST.ID}])*100<{$BIGIP.SWAP.UTIL.WARN.MIN}'
              name: 'F5 Big-IP: High swap utilization in host [{#HOST.ID}]'
              event_name: 'F5 Big-IP: High swap utilization in host [{#HOST.ID}] (over {$BIGIP.SWAP.UTIL.WARN.MAX}%)'
              priority: WARNING
              description: 'The system is running out of free swap memory.'
              tags:
                - tag: scope
                  value: capacity
          graph_prototypes:
            - uuid: 3414dd36b37e434f9c28eacc0e8c58b9
              name: 'F5 BIG-IP: Host [{#HOST.ID}]: Memory'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.memory.used[{#HOST.ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.memory.total[{#HOST.ID}]'
            - uuid: 4b7815c72f264209b288c019541a09e6
              name: 'F5 BIG-IP: Host [{#HOST.ID}]: Swap'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.memory.used.swap[{#HOST.ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.memory.total.swap[{#HOST.ID}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 6fa254ddaea74df1928e3582b34c292d
          name: 'Module discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#MODULE.NAME},1.3.6.1.4.1.3375.2.1.11.1.2.1.1]'
          key: bigip.module.discovery
          delay: 1h
          description: 'Resource allocation information about modules on the system'
          item_prototypes:
            - uuid: 36a1032bb74145c8ae51dbb54ec988a2
              name: 'Module [{#MODULE.NAME}]: CPU ratio'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.11.1.2.1.4.{#SNMPINDEX}]'
              key: 'bigip.module.cpu.ratio[{#MODULE.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The ratio of CPU to allocate to this module. Only valid if level is 'custom'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: module
                - tag: module
                  value: '{#MODULE.NAME}'
            - uuid: eaeb7bc1225b48689124c373b04fc56f
              name: 'Module [{#MODULE.NAME}]: Disk ratio'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.11.1.2.1.5.{#SNMPINDEX}]'
              key: 'bigip.module.disk.ratio[{#MODULE.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The ratio of available disk space to allocate to this module. Only valid if level is 'custom'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: module
                - tag: module
                  value: '{#MODULE.NAME}'
            - uuid: b384a7e297f844c89cc40c486e0c69db
              name: 'Module [{#MODULE.NAME}]: Memory ratio'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.11.1.2.1.3.{#SNMPINDEX}]'
              key: 'bigip.module.memory.ratio[{#MODULE.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The ratio of available memory to allocate. Only valid if level is 'custom'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: module
                - tag: module
                  value: '{#MODULE.NAME}'
            - uuid: 36dbc22d430e477ab2105323ad8b0850
              name: 'Module [{#MODULE.NAME}]: Provision level'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.11.1.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.module.provision.level[{#MODULE.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The provisioning level indicates how the systems resources
                are distributed amongst the modules
                Possible values: 1 - none, 2 - minimum, 3 - nominal, 4 - dedicated, 5 - custom.
              valuemap:
                name: 'Module provision level'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: module
                - tag: module
                  value: '{#MODULE.NAME}'
          graph_prototypes:
            - uuid: cfc1606bfbdd40b095620e32e646e2fd
              name: 'F5 BIG-IP: Module [{#MODULE.NAME}] resource usage ratio'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.module.memory.ratio[{#MODULE.NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.module.cpu.ratio[{#MODULE.NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.module.disk.ratio[{#MODULE.NAME}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 053063ca377e4438bfa93d08a07adbe9
          name: 'Network interface discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#IF.NAME},1.3.6.1.4.1.3375.2.1.2.4.4.3.1.1]'
          key: bigip.net.discovery
          delay: 1h
          description: 'A table containing statistic information of the interfaces on the device.'
          item_prototypes:
            - uuid: 87fd58c620c142a99dc810f13b3d109e
              name: 'Interface [{#IF.NAME}]: Collisions'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.12.{#SNMPINDEX}]'
              key: 'bigip.net.collisions[{#IF.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of collisions on the specified interface, incremented by the
                number of collisions experienced during transmissions of a frame
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 1ddb57921289497fb2c2e4f047f58c02
              name: 'Interface [{#IF.NAME}]: Incoming traffic, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.3.{#SNMPINDEX}]'
              key: 'bigip.net.in.bytes.rate[{#IF.NAME}]'
              units: Bps
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The rate of bytes received on this interface.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 45342d637fa440f8b73968a14bf39374
              name: 'Interface [{#IF.NAME}]: Incoming packet drops'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.10.{#SNMPINDEX}]'
              key: 'bigip.net.in.drops[{#IF.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of packets dropped on ingress for various reasons on the specified interface.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 5bc37dde99024866a2a5f97fbce15c2f
              name: 'Interface [{#IF.NAME}]: Incoming packet error'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.8.{#SNMPINDEX}]'
              key: 'bigip.net.in.error[{#IF.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of received packets that are either undersized,
                oversized, or have FCS errors by the specified interface.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 8aaff266f1b74a81a3eba46d321eb524
              name: 'Interface [{#IF.NAME}]: Incoming multicast packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.6.{#SNMPINDEX}]'
              key: 'bigip.net.in.multicast.rate[{#IF.NAME}]'
              units: pps
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The rate of multicast packets received on this interface.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 40e811829adc4715af4e10d223be3bc5
              name: 'Interface [{#IF.NAME}]: Incoming packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.2.{#SNMPINDEX}]'
              key: 'bigip.net.in.pkts.rate[{#IF.NAME}]'
              units: pps
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The rate of packets received on this interface.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 202717aa54194cf882c86640e73b17af
              name: 'Interface [{#IF.NAME}]: Incoming QnQ packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.13.{#SNMPINDEX}]'
              key: 'bigip.net.in.qq.rate[{#IF.NAME}]'
              units: pps
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The rate of double tagged packets received on the specified interface.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: c98f48ddf6bc46f39ab9aec6cc249fa4
              name: 'Interface [{#IF.NAME}]: Outgoing traffic, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.5.{#SNMPINDEX}]'
              key: 'bigip.net.out.bytes.rate[{#IF.NAME}]'
              units: Bps
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The rate of bytes transmitted out of the specified interface.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: b19203459ac842e2b96eee75b6754eac
              name: 'Interface [{#IF.NAME}]: Outgoing packet drops'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.11.{#SNMPINDEX}]'
              key: 'bigip.net.out.drops[{#IF.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of packets aged out or with excessive transmission
                delays due to multiple deferrals on the specified interface.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 1496879429724a6daee4b97fa162419b
              name: 'Interface [{#IF.NAME}]: Outgoing packet error'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.9.{#SNMPINDEX}]'
              key: 'bigip.net.out.error[{#IF.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The number of excessive collisions, incremented for each
                frame that experienced 16 collisions during transmission and
                was aborted on the specified interface.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 8ecd6a8dd5fa43c8b87a94119aac90b9
              name: 'Interface [{#IF.NAME}]: Outgoing multicast packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.7.{#SNMPINDEX}]'
              key: 'bigip.net.out.multicast.rate[{#IF.NAME}]'
              units: pps
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The rate of multicast packets transmitted out of the specified interface.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: fd4416466734469b85eec03c8e69185c
              name: 'Interface [{#IF.NAME}]: Outgoing packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.4.{#SNMPINDEX}]'
              key: 'bigip.net.out.pkts.rate[{#IF.NAME}]'
              units: pps
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The rate of packets transmitted out of the specified interface.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: a4cb060cc3854aab9715c85174cc4933
              name: 'Interface [{#IF.NAME}]: Outgoing QnQ packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.14.{#SNMPINDEX}]'
              key: 'bigip.net.out.qq.rate[{#IF.NAME}]'
              units: pps
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The rate of double tagged packets transmitted out of the specified interface.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
            - uuid: 93a1107cb0ea44078f2ac04a7dc9e941
              name: 'Interface [{#IF.NAME}]: Pause state'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.1.2.4.4.3.1.15.{#SNMPINDEX}]'
              key: 'bigip.net.pause[{#IF.NAME}]'
              description: |
                MIB: F5-BIGIP-SYSTEM-MIB
                The pause state of the specified interface.
                none - no pause;
                txrx - pause all data flow;
                tx - pause outgoing data flow;
                rx - pause incoming data flow.
              valuemap:
                name: 'Pause state'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: interface
                - tag: component
                  value: network
                - tag: interface
                  value: 'port-{#IF.NAME}'
          trigger_prototypes:
            - uuid: 2d9214768b684ba880703d738ac52099
              expression: 'last(/F5 Big-IP by SNMP/bigip.net.in.error[{#IF.NAME}])>last(/F5 Big-IP by SNMP/bigip.net.in.error[{#IF.NAME}],#2) or last(/F5 Big-IP by SNMP/bigip.net.out.error[{#IF.NAME}])>last(/F5 Big-IP by SNMP/bigip.net.out.error[{#IF.NAME}],#2)'
              name: 'F5 Big-IP: There are errors on the network interface'
              event_name: 'F5 Big-IP: There are errors on the network interface ({#IF.NAME})'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: notice
          graph_prototypes:
            - uuid: f784ab335a314bd7b328c0fe5053f5f7
              name: 'F5 BIG-IP: Interface [{#IF.NAME}]'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.net.in.pkts.rate[{#IF.NAME}]'
                - sortorder: '1'
                  color: F63100
                  yaxisside: RIGHT
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.net.in.bytes.rate[{#IF.NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.net.out.pkts.rate[{#IF.NAME}]'
                - sortorder: '3'
                  color: F7941D
                  yaxisside: RIGHT
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.net.out.bytes.rate[{#IF.NAME}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.net.in.multicast.rate[{#IF.NAME}]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.net.out.multicast.rate[{#IF.NAME}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 4e93191505d148e98b915ed38a681a03
          name: 'Node discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#NODE.NAME},1.3.6.1.4.1.3375.2.2.4.2.3.1.20]'
          key: bigip.node.discovery
          delay: 1h
          description: 'A table containing statistic information of node addresses.'
          item_prototypes:
            - uuid: 6292623c4482485f9f866be8b7d39367
              name: 'Node [{#NODE.NAME}]: Current connections'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.4.2.3.1.9.{#SNMPINDEX}]'
              key: 'bigip.node.net.conn[{#NODE.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The current connections from server-side to the specified node address.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 9530c81b45c24ddda2440e2589964d28
              name: 'Node [{#NODE.NAME}]: Incoming traffic, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.4.2.3.1.4.{#SNMPINDEX}]'
              key: 'bigip.node.net.in.bytes.rate[{#NODE.NAME}]'
              delay: 5m
              units: Bps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of bytes received by the specified node address from server-side.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 8e7ae014ea73489b81de960acad301b8
              name: 'Node [{#NODE.NAME}]: Incoming packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.4.2.3.1.3.{#SNMPINDEX}]'
              key: 'bigip.node.net.in.pkts.rate[{#NODE.NAME}]'
              delay: 5m
              units: pps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of packets received by the specified node address from server-side.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 88ec665ad6eb43e88a3625b50e130e82
              name: 'Node [{#NODE.NAME}]: Outgoing traffic, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.4.2.3.1.6.{#SNMPINDEX}]'
              key: 'bigip.node.net.out.bytes.rate[{#NODE.NAME}]'
              delay: 5m
              units: Bps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of bytes sent to server-side from the specified node address.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 077bb28cd8a1429fb564786e7d150dbc
              name: 'Node [{#NODE.NAME}]: Outgoing packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.4.2.3.1.5.{#SNMPINDEX}]'
              key: 'bigip.node.net.out.pkts.rate[{#NODE.NAME}]'
              delay: 5m
              units: pps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of packets sent to server-side from the specified node address.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 5a0278f4cfd04611895207d9b7f3b13c
              name: 'Node [{#NODE.NAME}]: Current sessions'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.4.2.3.1.21.{#SNMPINDEX}]'
              key: 'bigip.node.net.sessions[{#NODE.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The number of current sessions going through the specified node address.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 15129cb2af84466d8c58641854ad0b54
              name: 'Node [{#NODE.NAME}]: Connections hit a rate limit'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.4.2.3.1.22.{#SNMPINDEX}]'
              key: 'bigip.node.overlimit[{#NODE.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The last recorded value for the number of connections to the node address when connections hit a rate limit;
                this calculation is only maintained if rate limiting is configured for the node.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 6be4c0fd41d6459db5acd6c33461c7f9
              name: 'Node [{#NODE.NAME}]: Duration of exceeding rate limit'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.4.2.3.1.23.{#SNMPINDEX}]'
              key: 'bigip.node.overtime[{#NODE.NAME}]'
              delay: 5m
              units: s
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                Duration of time in seconds the specified node address has exceeded the
                configured connection rate limit.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
          graph_prototypes:
            - uuid: 920bf6830fae4d168a3d9fc772a8f25c
              name: 'F5 BIG-IP: Node [{#NODE.NAME}] network ratio'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.node.net.in.pkts.rate[{#NODE.NAME}]'
                - sortorder: '1'
                  color: F63100
                  yaxisside: RIGHT
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.node.net.in.bytes.rate[{#NODE.NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.node.net.out.pkts.rate[{#NODE.NAME}]'
                - sortorder: '3'
                  color: F7941D
                  yaxisside: RIGHT
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.node.net.out.bytes.rate[{#NODE.NAME}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 45e61df153b94d4bad42503e9221e44c
          name: 'Pool discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#POOL.NAME},1.3.6.1.4.1.3375.2.2.5.2.3.1.1]'
          key: bigip.pool.discovery
          delay: 1h
          description: 'A table containing statistic information of pools.'
          item_prototypes:
            - uuid: a2668f5ffc604a61953cb87f0afe4e6f
              name: 'Pool [{#POOL.NAME}]: Status available'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.5.2.1.2.{#SNMPINDEX}]'
              key: 'bigip.pool.available[{#POOL.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                none(0),
                green(1),
                tyellow(2),
                tred(3),
                tblue(4),
                tgrey(5)
              valuemap:
                name: 'SNMP ltmVsStatusAvailState'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
              trigger_prototypes:
                - uuid: 0b6e708075684cbab0d8c598f3467e0c
                  expression: 'count(/F5 Big-IP by SNMP/bigip.pool.available[{#POOL.NAME}],120m,"ne","1")>20'
                  name: 'F5 Big-IP: Pool {#POOL.NAME} is not available in some capacity: {ITEM.VALUE1}'
                  opdata: '{ITEM.LASTVALUE}'
                  priority: AVERAGE
                  dependencies:
                    - name: 'F5 Big-IP: Pool {#POOL.NAME} is not enabled in some capacity: {ITEM.VALUE1}'
                      expression: 'count(/F5 Big-IP by SNMP/bigip.pool.enabled[{#POOL.NAME}],120m,"ne","1")>4'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 391d21a1a44d49d4beb219b726e0f55e
              name: 'Pool [{#POOL.NAME}]: Status enabled'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.5.2.1.3.{#SNMPINDEX}]'
              key: 'bigip.pool.enabled[{#POOL.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The activity status of the specified pool, as specified by the user.
                none(0),
                enabled(1),
                disabled(2),
                disabledbyparent(3)
              valuemap:
                name: 'SNMP ltmPoolStatusEnabledState'
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
              trigger_prototypes:
                - uuid: 4d0431e2c4934f37be7302ffedd69e8a
                  expression: 'count(/F5 Big-IP by SNMP/bigip.pool.enabled[{#POOL.NAME}],120m,"ne","1")>4'
                  name: 'F5 Big-IP: Pool {#POOL.NAME} is not enabled in some capacity: {ITEM.VALUE1}'
                  opdata: '{ITEM.LASTVALUE}'
                  priority: AVERAGE
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: 0c53c6f3ab9e49b688a8e97252471ded
              name: 'Pool [{#POOL.NAME}]: Current connections'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.2.3.1.8.{#SNMPINDEX}]'
              key: 'bigip.pool.net.conn[{#POOL.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The current connections from server-side to the specified pool.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
            - uuid: e6daed4f364c463dba542948b2272296
              name: 'Pool [{#POOL.NAME}]: Incoming traffic, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.2.3.1.3.{#SNMPINDEX}]'
              key: 'bigip.pool.net.in.bytes.rate[{#POOL.NAME}]'
              delay: 5m
              units: Bps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of bytes received by the specified pool from server-side.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
            - uuid: b65e8d23fa3b4129936f0f3d7034c8a4
              name: 'Pool [{#POOL.NAME}]: Incoming packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.2.3.1.2.{#SNMPINDEX}]'
              key: 'bigip.pool.net.in.pkts.rate[{#POOL.NAME}]'
              delay: 5m
              units: pps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of packets received by the specified pool from server-side.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
            - uuid: 6c58f56d63e34166b02ad7c31271e2bb
              name: 'Pool [{#POOL.NAME}]: Outgoing traffic, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.2.3.1.5.{#SNMPINDEX}]'
              key: 'bigip.pool.net.out.bytes.rate[{#POOL.NAME}]'
              delay: 5m
              units: Bps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of bytes sent to server-side from the specified pool.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
            - uuid: e432732fc4dd478892c6d4bab3fbd11c
              name: 'Pool [{#POOL.NAME}]: Outgoing packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.2.3.1.4.{#SNMPINDEX}]'
              key: 'bigip.pool.net.out.pkts.rate[{#POOL.NAME}]'
              delay: 5m
              units: pps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of packets sent to server-side from the specified pool.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
            - uuid: 068028e704f049b4b3daae524fe16d27
              name: 'Pool [{#POOL.NAME}]: Current sessions'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.2.3.1.31.{#SNMPINDEX}]'
              key: 'bigip.pool.net.sessions[{#POOL.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The number of current sessions going through the specified pool.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
            - uuid: 6bacc7e284f14aa7804f69c8b2f744d4
              name: 'Pool [{#POOL.NAME}]: Age of the oldest queue entry'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.2.3.1.19.{#SNMPINDEX}]'
              key: 'bigip.pool.queue.age[{#POOL.NAME}]'
              delay: 5m
              units: s
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                Age of the oldest queue entry, max.
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
            - uuid: 44ad195489cd46be87ae8cc029bcb480
              name: 'Pool [{#POOL.NAME}]: Queue'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.5.2.3.1.18.{#SNMPINDEX}]'
              key: 'bigip.pool.queue[{#POOL.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                Number of connections currently in queue, sum.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: pool
                - tag: pool
                  value: '{#POOL.NAME}'
          graph_prototypes:
            - uuid: a077af6d72a447a99a35f2daa8b0205e
              name: 'F5 BIG-IP: Pool [{#POOL.NAME}] network ratio'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.pool.net.in.pkts.rate[{#POOL.NAME}]'
                - sortorder: '1'
                  color: F63100
                  yaxisside: RIGHT
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.pool.net.in.bytes.rate[{#POOL.NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.pool.net.out.pkts.rate[{#POOL.NAME}]'
                - sortorder: '3'
                  color: F7941D
                  yaxisside: RIGHT
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.pool.net.out.bytes.rate[{#POOL.NAME}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
        - uuid: 6bb0a20248ba473b91a9b4a4261229a7
          name: 'Virtual server discovery'
          type: SNMP_AGENT
          snmp_oid: 'discovery[{#VSERVER.NAME},1.3.6.1.4.1.3375.2.2.10.2.3.1.1]'
          key: bigip.virtual_server.discovery
          delay: 1h
          description: 'A table containing information of virtual servers.'
          item_prototypes:
            - uuid: 28ecf3f03cad44bda0e6243bb02e2ae4
              name: 'Virtual server [{#VSERVER.NAME}]: Current connections'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.12.{#SNMPINDEX}]'
              key: 'bigip.vserver.net.conn[{#VSERVER.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The current connections from client-side to the specified virtual server.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: 206503cc777a4156a29f0687d8fb5a7c
              name: 'Virtual server [{#VSERVER.NAME}]: Incoming traffic, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.7.{#SNMPINDEX}]'
              key: 'bigip.vserver.net.in.bytes.rate[{#VSERVER.NAME}]'
              delay: 5m
              units: Bps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of bytes received by the specified virtual server from client-side.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: d8a36a30d99c44ca9b7172a5b66e74d6
              name: 'Virtual server [{#VSERVER.NAME}]: Incoming packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.6.{#SNMPINDEX}]'
              key: 'bigip.vserver.net.in.pkts.rate[{#VSERVER.NAME}]'
              delay: 5m
              units: pps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of packets received by the specified virtual server from client-side.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: efeb720fb7e44d068572d59eff947bc6
              name: 'Virtual server [{#VSERVER.NAME}]: Outgoing traffic, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.9.{#SNMPINDEX}]'
              key: 'bigip.vserver.net.out.bytes.rate[{#VSERVER.NAME}]'
              delay: 5m
              units: Bps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of bytes sent to client-side from the specified virtual server.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: bd588ea58eb4420085691046fa0a1e3b
              name: 'Virtual server [{#VSERVER.NAME}]: Outgoing packet, rate'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.8.{#SNMPINDEX}]'
              key: 'bigip.vserver.net.out.pkts.rate[{#VSERVER.NAME}]'
              delay: 5m
              units: pps
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The rate of packets sent to client-side from the specified virtual server.
              preprocessing:
                - type: CHANGE_PER_SECOND
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: 01352ac9b6c24f13a6ceebac666026cb
              name: 'Virtual server [{#VSERVER.NAME}]: Connections hit a rate limit'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.34.{#SNMPINDEX}]'
              key: 'bigip.vserver.overlimit[{#VSERVER.NAME}]'
              delay: 5m
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The last recorded value for the number of connections to the virtual server when connections hit a rate limit;
                this calculation is only maintained if rate limiting is configured for the service.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: baa7718513a54ae4a7bd669f9b652521
              name: 'Virtual server [{#VSERVER.NAME}]: Duration of exceeding rate limit'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.35.{#SNMPINDEX}]'
              key: 'bigip.vserver.overtime[{#VSERVER.NAME}]'
              delay: 5m
              units: s
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                Duration of time in seconds the specified virtual server has exceeded the configured connection rate limit.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: 3e97e22368b84674a9720c3f076503c5
              name: 'Virtual server [{#VSERVER.NAME}]: Usage ratio, avg 1m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.32.{#SNMPINDEX}]'
              key: 'bigip.vserver.usage.1m[{#VSERVER.NAME}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The percentage of time Virtual Server was busy over the last 1 minute.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: 2c8c5e0e53e34e4ebc84ed9e5a8c4bd9
              name: 'Virtual server [{#VSERVER.NAME}]: Usage ratio, avg 5m'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.33.{#SNMPINDEX}]'
              key: 'bigip.vserver.usage.5m[{#VSERVER.NAME}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The percentage of time Virtual Server was busy over the last 5 minutes.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
            - uuid: d6079ebaebbb40d09386e2b1abcbe987
              name: 'Virtual server [{#VSERVER.NAME}]: Usage ratio, avg 5s'
              type: SNMP_AGENT
              snmp_oid: 'get[1.3.6.1.4.1.3375.2.2.10.2.3.1.31.{#SNMPINDEX}]'
              key: 'bigip.vserver.usage.5s[{#VSERVER.NAME}]'
              delay: 5m
              units: '%'
              description: |
                MIB: F5-BIGIP-LOCAL-MIB
                The percentage of time Virtual Server was busy over the last 5 seconds.
              preprocessing:
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: virtual-server
                - tag: virtual-server
                  value: '{#VSERVER.NAME}'
          graph_prototypes:
            - uuid: b49ee8a27f634c238317663d7cc9d426
              name: 'F5 BIG-IP: Virtual server [{#VSERVER.NAME}] network'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.vserver.net.in.pkts.rate[{#VSERVER.NAME}]'
                - sortorder: '1'
                  color: F63100
                  yaxisside: RIGHT
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.vserver.net.in.bytes.rate[{#VSERVER.NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.vserver.net.out.pkts.rate[{#VSERVER.NAME}]'
                - sortorder: '3'
                  color: F7941D
                  yaxisside: RIGHT
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.vserver.net.out.bytes.rate[{#VSERVER.NAME}]'
            - uuid: 17d18d4117f943d18873972584f3374e
              name: 'F5 BIG-IP: Virtual server [{#VSERVER.NAME}] usage ratio'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.vserver.usage.5s[{#VSERVER.NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.vserver.usage.1m[{#VSERVER.NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'F5 Big-IP by SNMP'
                    key: 'bigip.vserver.usage.5m[{#VSERVER.NAME}]'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: network
        - tag: target
          value: big-ip
        - tag: target
          value: f5
      macros:
        - macro: '{$BIGIP.CERT.MIN}'
          value: '7'
          description: 'Minimum number of days before certificate expiration.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Cert expiry threshold (days)'
            description: 'Minimum number of days before certificate expiration.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.CPU.UTIL.WARN.MAX}'
          value: '85'
          description: 'The warning threshold of the CPU utilization expressed in %.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'CPU usage warning (%)'
            description: 'The warning threshold of the CPU utilization expressed in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.CPU.UTIL.WARN.MIN}'
          value: '65'
          description: 'The recovery threshold of the CPU utilization expressed in %.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'CPU usage recovery (%)'
            description: 'The recovery threshold of the CPU utilization expressed in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.FS.FREE.WARN.MAX}'
          value: '20'
          description: 'The recovery threshold of the file system utilization in %.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'Filesystem usage recovery (%)'
            description: 'The recovery threshold of the file system utilization in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.FS.FREE.WARN.MIN}'
          value: '10'
          description: 'The warning threshold of the file system utilization in %.'
          config:
            type: TEXT
            priority: '13'
            section_name: Thresholds
            label: 'Filesystem usage warning (%)'
            description: 'The warning threshold of the file system utilization in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.LLD.FILTER.PART.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable mount point names.'
          config:
            type: TEXT
            priority: '2'
            section_name: Filters
            label: 'Mount point filter (include)'
            description: 'Filter of discoverable mount point names.'
        - macro: '{$BIGIP.LLD.FILTER.PART.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered by mount point names.'
          config:
            type: TEXT
            priority: '3'
            section_name: Filters
            label: 'Mount point filter (exclude)'
            description: 'Filter to exclude discovered by mount point names.'
        - macro: '{$BIGIP.LLD.OVERRIDE.PART.FILTER_LOW_SPACE_TRIGGER}'
          value: '^(?:/usr|/opt/\.sdm/(?:usr|lib|lib64))$'
          description: 'Partitions that low free space trigger should ignore.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Partitions ignored for low space trigger'
            description: 'Partitions that low free space trigger should ignore.'
        - macro: '{$BIGIP.MEMORY.UTIL.WARN.MAX}'
          value: '85'
          description: 'The warning threshold of the memory utilization in %.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Memory usage warning (%)'
            description: 'The warning threshold of the memory utilization in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.MEMORY.UTIL.WARN.MIN}'
          value: '65'
          description: 'The recovery threshold of the memory utilization in %.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Memory usage recovery (%)'
            description: 'The recovery threshold of the memory utilization in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.SWAP.UTIL.WARN.MAX}'
          value: '85'
          description: 'The warning threshold of the swap utilization in %.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Swap usage warning (%)'
            description: 'The warning threshold of the swap utilization in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.SWAP.UTIL.WARN.MIN}'
          value: '65'
          description: 'The recovery threshold of the swap utilization in %.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Swap usage recovery (%)'
            description: 'The recovery threshold of the swap utilization in %. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.TEMP.HIGH}'
          value: '50'
          description: 'The critical threshold of the temperature in °C'
          config:
            type: TEXT
            priority: '14'
            section_name: Thresholds
            label: 'Temperature critical (°C)'
            description: 'The critical threshold of the temperature in °C'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$BIGIP.TEMP.WARN}'
          value: '45'
          description: 'The warning threshold of the temperature in °C'
          config:
            type: TEXT
            priority: '15'
            section_name: Thresholds
            label: 'Temperature warning (°C)'
            description: 'The warning threshold of the temperature in °C'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$SNMP.TIMEOUT}'
          value: 5m
          description: 'The time interval for SNMP agent availability trigger expression.'
          config:
            type: TEXT
            priority: '1'
            section_name: Other
            label: 'SNMP agent availability interval'
            description: 'The time interval for SNMP agent availability trigger expression.'
      dashboards:
        - uuid: 43de1fe7767e4cbaaedef55aeaf9f2ba
          name: 'Network interfaces'
          pages:
            - widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'F5 Big-IP by SNMP'
                        name: 'F5 BIG-IP: Interface [{#IF.NAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAA
                    - type: INTEGER
                      name: rows
                      value: '5'
      valuemaps:
        - uuid: 849febb31f524e9296afc5ec6ffb2fe3
          name: 'Chassis status'
          mappings:
            - value: '0'
              newvalue: bad
            - value: '1'
              newvalue: good
            - value: '2'
              newvalue: notpresent
        - uuid: ed7e1317987b433e9aa7168db3824c94
          name: 'Module provision level'
          mappings:
            - value: '1'
              newvalue: none
            - value: '2'
              newvalue: minimum
            - value: '3'
              newvalue: nominal
            - value: '4'
              newvalue: dedicated
            - value: '5'
              newvalue: custom
        - uuid: 6e590fa7db7441d5a4b145204ee254bb
          name: 'Pause state'
          mappings:
            - value: '0'
              newvalue: none
            - value: '1'
              newvalue: txrx
            - value: '2'
              newvalue: tx
            - value: '3'
              newvalue: rx
        - uuid: b615a47192fc48f4b2cedb205c33f7d0
          name: 'SNMP available'
          mappings:
            - value: '0'
              newvalue: 'not available'
            - value: '1'
              newvalue: available
            - value: '2'
              newvalue: unknown
        - uuid: 74bcf04a70da49f89f04a20a9830fe13
          name: 'SNMP ltmPoolStatusEnabledState'
          mappings:
            - value: '0'
              newvalue: none
            - value: '1'
              newvalue: enabled
            - value: '2'
              newvalue: disabled
            - value: '3'
              newvalue: disabledbyparent
        - uuid: 3a8776175b1f4cd7aa62f0182c7e3ed7
          name: 'SNMP ltmVsStatusAvailState'
          mappings:
            - value: '0'
              newvalue: none
            - value: '1'
              newvalue: green
            - value: '2'
              newvalue: yellow
            - value: '3'
              newvalue: red
            - value: '4'
              newvalue: blue
            - value: '5'
              newvalue: gray
        - uuid: 6f96920248994bca92eb8d4394346027
          name: 'SNMP sysCmFailoverStatusId'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: offline
            - value: '2'
              newvalue: forcedOffline
            - value: '3'
              newvalue: standby
            - value: '4'
              newvalue: active
        - uuid: 1a42ed91b734453ab29a4c1f1feaca89
          name: 'SNMP sysCmSyncStatusId'
          mappings:
            - value: '0'
              newvalue: unknown
            - value: '1'
              newvalue: syncing
            - value: '2'
              newvalue: needManualSync
            - value: '3'
              newvalue: inSync
            - value: '4'
              newvalue: syncFailed
            - value: '5'
              newvalue: syncDisconnected
            - value: '6'
              newvalue: standalone
            - value: '7'
              newvalue: awaitingInitialSync
            - value: '8'
              newvalue: incompatibleVersion
            - value: '9'
              newvalue: partialSync
    - uuid: e1ca624566424496bff9d90c261ab37b
      template: 'VeloCloud SD-WAN by HTTP'
      name: 'VeloCloud SD-WAN by HTTP'
      description: |
        Template for monitoring VeloCloud SD-WAN https://www.arista.com/en/support/velocloud-resources
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        - This template provides monitoring capabilities for VeloCloud SD-WAN using the API.
        - It works without any external scripts and uses the script item.
        
        ## Setup
        
        1. Create an API token in the VeloCloud SD-WAN Orchestrator.
        > See [Arista documentation](https://www.arista.com/en/global-settings-guide-vc-6-4/sase-6-4-user-management) for details.
        
        2. Link the template to a host.
        3. Set the following fields: `API token`, `API URL`.
        
        **Note**: By default, the `Enterprise ID` field is empty. In this case, data will be retrieved for all Enterprises (privileges required: READ ENTERPRISE and READ EDGE).
        If you need to monitor only one Enterprise, fill in this field (requires only READ EDGE privileges).
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 3d96f6e755934bc8a4ee7300a165adae
          name: 'Get data'
          type: SCRIPT
          key: velocloud.get
          delay: '{$VELOCLOUD.SDWAN.FREQUENCY}'
          history: '0'
          value_type: TEXT
          params: |
            var VeloCloud = {
            	params: {},
            
            	setParams: function (params) {
            		['url', 'token'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		VeloCloud.params = params;
            
            		if (VeloCloud.params.token === '{' + '$VELOCLOUD.TOKEN}') {
            			throw 'Please change {' + '$VELOCLOUD.TOKEN} macro with the proper value.';
            		}
            		if (!VeloCloud.params.url.startsWith('http://') && !VeloCloud.params.url.startsWith('https://')) {
            			VeloCloud.params.url = 'https://' + params.url;
            		}
            		if (!VeloCloud.params.url.endsWith('/')) {
            			VeloCloud.params.url += '/';
            		}
            
            	},
            
            	getField: function (data, path, trace) {
            		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 + ' - ' + trace;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	request: function (url, body) {
            
            		var response, request = new HttpRequest();
            
            		if (typeof VeloCloud.params.http_proxy !== 'undefined' && VeloCloud.params.http_proxy !== '') {
            			request.setProxy(VeloCloud.params.http_proxy);
            		}
            
            		request.addHeader('Content-Type: application/json');
            		request.addHeader('Authorization: Token ' + VeloCloud.params.token);
            
            		response = request.post(url, body);
            
            		Zabbix.log(4, '[ SD-WAN API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            		try {
            			response = JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from SD-WAN API. Check debug log for more information.';
            		}
            		if (response.error && response.error.message) {
            			throw response.error.message;
            		}
            
            		return response;
            
            	},
            
            	getMetricsData: function () {
            		var enterprises = [],
            			edges = [];
            
            		if (typeof VeloCloud.params.enterprise_id !== 'undefined' && VeloCloud.params.enterprise_id !== '') {
            			response_edges = VeloCloud.request(VeloCloud.params.url + 'portal/rest/enterprise/getEnterpriseEdges',
            				JSON.stringify({
            					enterpriseId: Number(VeloCloud.params.enterprise_id),
            					with: ['site'],
            					fieldsNeeded: [
            						"id",
            						"enterpriseId",
            						"name"
            					]
            				}));
            
            			edges = response_edges;
            
            		} else {
            
            			enterprises = VeloCloud.getField(VeloCloud.request(VeloCloud.params.url + 'portal/rest/monitoring/getAggregates', '{}'), 'enterprises', 'error get enterprises');
            
            			if (!Array.isArray(enterprises)) {
            				enterprises = [enterprises];
            			}
            			for (var i in enterprises) {
            				response_edges = VeloCloud.request(VeloCloud.params.url + 'portal/rest/enterprise/getEnterpriseEdges', JSON.stringify({
            					enterpriseId: VeloCloud.getField(enterprises[i], 'id', 'error get enterpriseId'),
            					with: ['site'],
            					fieldsNeeded: [
            						"id",
            						"enterpriseId",
            						"name"
            					]
            				}));
            				edges = edges.concat(response_edges);
            			}
            
            		}
            
            		return { edges: edges, enterprises: enterprises };
            	}
            }
            
            try {
            	VeloCloud.setParams(JSON.parse(value));
            	return JSON.stringify(VeloCloud.getMetricsData());
            }
            catch (error) {
            	error += (String(error).endsWith('.')) ? '' : '.';
            	Zabbix.log(3, '[ VeloCloud ] ERROR: ' + error);
            	return JSON.stringify({ 'error': error });
            }
          description: 'JSON result from VeloCloud API requests.'
          timeout: '{$VELOCLOUD.SDWAN.DATA.TIMEOUT}'
          parameters:
            - name: enterprise_id
              value: '{$VELOCLOUD.ENTERPRISE.ID}'
            - name: http_proxy
              value: '{$VELOCLOUD.HTTP_PROXY}'
            - name: token
              value: '{$VELOCLOUD.TOKEN}'
            - name: url
              value: '{$VELOCLOUD.URL}'
          tags:
            - tag: component
              value: raw
        - uuid: 0e201ebcdc2f491f901a883f9cc3ce69
          name: 'Get network gateway data collection errors'
          type: DEPENDENT
          key: velocloud.get.edges.error
          value_type: TEXT
          description: 'Errors from aggregate data collection for network gateways.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: velocloud.network.gateway.get
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 40aad027b5fc43babe9f5bcb2d458453
              expression: 'length(last(/VeloCloud SD-WAN by HTTP/velocloud.get.edges.error))>0'
              name: 'VeloCloud: There are errors in network gateways item'
              priority: WARNING
              description: 'There are errors in the aggregate script item for network gateways.'
              tags:
                - tag: scope
                  value: notice
        - uuid: 8a54309d8abc4fc7816b168329243de4
          name: 'Get data collection errors'
          type: DEPENDENT
          key: velocloud.get.error
          value_type: TEXT
          description: 'Errors from aggregate data collection.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: velocloud.get
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: a0623655a2fa4f60962ad560b8bb5a13
              expression: 'length(last(/VeloCloud SD-WAN by HTTP/velocloud.get.error))>0'
              name: 'VeloCloud: There are errors in aggregate script item'
              priority: WARNING
              description: 'There are errors in the aggregate script item.'
              tags:
                - tag: scope
                  value: notice
        - uuid: d7444ca3a03b468385b5cccad55c0492
          name: 'Get version info errors'
          type: DEPENDENT
          key: velocloud.info.get.error
          value_type: TEXT
          description: 'Errors from version info response.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: velocloud.version.info.get
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: cbdb8c53e1f1496facd1225e38bf98eb
              expression: 'length(last(/VeloCloud SD-WAN by HTTP/velocloud.info.get.error))>0'
              name: 'VeloCloud: There are errors in version info item'
              priority: WARNING
              description: 'There are errors in the version info item.'
              tags:
                - tag: scope
                  value: notice
        - uuid: 5fdaf4757bf34657984cb7f071c304cb
          name: 'Get network gateways'
          type: HTTP_AGENT
          key: velocloud.network.gateway.get
          delay: '{$VELOCLOUD.SDWAN.FREQUENCY}'
          history: '0'
          value_type: TEXT
          description: 'Gets network gateway information.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          url: 'https://{$VELOCLOUD.URL}/portal/rest/network/getNetworkGateways'
          posts: '{ "with": ["site"] }'
          headers:
            - name: Content-Type
              value: application/json
            - name: Authorization
              value: 'Token {$VELOCLOUD.TOKEN}'
          request_method: POST
          tags:
            - tag: component
              value: raw
        - uuid: 3f589e2191c5419fb89cc33639595ae9
          name: 'Orchestrator API version'
          type: DEPENDENT
          key: velocloud.orchestrator.api_version
          value_type: TEXT
          description: 'Version of VeloCloud SD-WAN Orchestrator API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.apiVersion
          master_item:
            key: velocloud.version.info.get
          tags:
            - tag: component
              value: orchestrator
          triggers:
            - uuid: 5a95d9c614e74c2c8b6181fc8dff2226
              expression: 'last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.api_version,#1)<>last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.api_version,#2) and length(last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.api_version))>0'
              name: 'VeloCloud: Orchestrator API version has changed'
              priority: AVERAGE
              description: 'The VeloCloud Orchestrator API version has changed.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: ab24d8fc4c2a4130bca1b4b6d4f311ae
          name: 'Orchestrator build'
          type: DEPENDENT
          key: velocloud.orchestrator.build
          value_type: CHAR
          description: 'Build of VeloCloud SD-WAN Orchestrator API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.build
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: velocloud.version.info.get
          tags:
            - tag: component
              value: orchestrator
          triggers:
            - uuid: 37c16b3cbd8b4680ab85a1fea819611f
              expression: 'last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.build,#1)<>last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.build,#2) and length(last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.build))>0'
              name: 'VeloCloud: Orchestrator build has changed'
              priority: INFO
              description: 'The VeloCloud Orchestrator build has changed.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 1f60b61051494ab495de4dfe2cd83450
          name: 'Orchestrator version'
          type: DEPENDENT
          key: velocloud.orchestrator.version
          value_type: CHAR
          description: 'Version of VMware SD-WAN Orchestrator API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: velocloud.version.info.get
          tags:
            - tag: component
              value: orchestrator
          triggers:
            - uuid: a1d8e4d61a804c8fb11b33f590f0885c
              expression: 'last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.version,#1)<>last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.version,#2) and length(last(/VeloCloud SD-WAN by HTTP/velocloud.orchestrator.version))>0'
              name: 'VeloCloud: Orchestrator version has changed'
              priority: INFO
              description: 'The VeloCloud Orchestrator version has changed.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 1206789df5b44af7ba1c5416662344dd
          name: 'System properties'
          type: HTTP_AGENT
          key: velocloud.system.properties
          delay: 6h
          value_type: TEXT
          description: 'System properties of VMware SD-WAN.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          url: 'https://{$VELOCLOUD.URL}/portal/rest/systemProperty/getSystemProperties'
          posts: '{ "normalize": true }'
          headers:
            - name: Content-Type
              value: application/json
            - name: Authorization
              value: 'Token {$VELOCLOUD.TOKEN}'
          request_method: POST
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 58541dfe798843fa822276e84a32b919
              expression: 'last(/VeloCloud SD-WAN by HTTP/velocloud.system.properties,#1)<>last(/VeloCloud SD-WAN by HTTP/velocloud.system.properties,#2)'
              name: 'VeloCloud: System properties have changed'
              priority: INFO
              description: 'The system properties have changed.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: d0d6978941fb45dda2791e9c0e2cf7c7
          name: 'Get version info data'
          type: HTTP_AGENT
          key: velocloud.version.info.get
          delay: '{$VELOCLOUD.SDWAN.FREQUENCY}'
          history: '0'
          value_type: TEXT
          description: 'Gets system version information.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          url: 'https://{$VELOCLOUD.URL}/portal/rest/system/getVersionInfo'
          posts: '{}'
          headers:
            - name: Content-Type
              value: application/json
            - name: Authorization
              value: 'Token {$VELOCLOUD.TOKEN}'
          request_method: POST
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: 522ba6551cc64094b60a136d07c9921d
          name: 'Edge discovery'
          type: DEPENDENT
          key: velocloud.edge.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#EDGE.NAME}'
                value: '{$VELOCLOUD.LLD.EDGES.NAME.FILTER.MATCHES}'
              - macro: '{#EDGE.NAME}'
                value: '{$VELOCLOUD.LLD.EDGES.NAME.FILTER.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#EDGE.STATE}'
                value: '{$VELOCLOUD.LLD.EDGES.STATE.FILTER.MATCHES}'
              - macro: '{#EDGE.STATE}'
                value: '{$VELOCLOUD.LLD.EDGES.STATE.FILTER.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Get Edge instances.'
          host_prototypes:
            - uuid: 5896745a4b844f1a826d5dd060bc2b5b
              host: '{#EDGE.NAME}'
              name: '{#EDGE.NAME}'
              inventory_mode: AUTOMATIC
              group_links:
                - group:
                    name: 'Discovered hosts'
              templates:
                - name: 'VeloCloud SD-WAN Edge by HTTP'
              macros:
                - macro: '{$VELOCLOUD.EDGE.ID}'
                  value: '{#EDGE.ID}'
                  description: 'SD-WAN Edge id.'
                - macro: '{$VELOCLOUD.EDGE.INVENTORY}'
                  value: '{#EDGE.INVENTORY}'
                  description: 'SD-WAN Edge inventory.'
                - macro: '{$VELOCLOUD.EDGE.NAME}'
                  value: '{#EDGE.NAME}'
                  description: 'SD-WAN Edge name.'
                - macro: '{$VELOCLOUD.ENTERPRISE.ID}'
                  value: '{#ENTERPRISE.ID}'
                  description: 'SD-WAN Enterprise id.'
              tags:
                - tag: city
                  value: '{#EDGE.CITY}'
                - tag: country
                  value: '{#EDGE.COUNTRY}'
                - tag: service
                  value: edge
          master_item:
            key: velocloud.get
          lld_macro_paths:
            - lld_macro: '{#EDGE.CITY}'
              path: $.site.city
            - lld_macro: '{#EDGE.COUNTRY}'
              path: $.site.country
            - lld_macro: '{#EDGE.ID}'
              path: $.id
            - lld_macro: '{#EDGE.INVENTORY}'
              path: $.site
            - lld_macro: '{#EDGE.NAME}'
              path: $.name
            - lld_macro: '{#EDGE.STATE}'
              path: $.site.state
            - lld_macro: '{#ENTERPRISE.ID}'
              path: $.enterpriseId
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.edges
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: e2879e0ce6e44203b0615c36ba626cc0
          name: 'Gateway metric discovery'
          type: DEPENDENT
          key: velocloud.gateway.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$VELOCLOUD.LLD.GATEWAYS.FILTER.MATCHES}'
              - macro: '{#NAME}'
                value: '{$VELOCLOUD.LLD.GATEWAYS.FILTER.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Metrics for gateway statistics.'
          item_prototypes:
            - uuid: 52859166849d4cdf860664f8d3b8088d
              name: 'Gateway [{#NAME}]: Connected edges'
              type: DEPENDENT
              key: 'velocloud.gateway.connected_edges[{#ID}]'
              description: 'Edges connected to gateway.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.connectedEdges
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
              trigger_prototypes:
                - uuid: f0d7bdb2ac3540258ab6a276b43a382c
                  expression: 'last(/VeloCloud SD-WAN by HTTP/velocloud.gateway.connected_edges[{#ID}],#1)<>last(/VeloCloud SD-WAN by HTTP/velocloud.gateway.connected_edges[{#ID}],#2)'
                  name: 'VeloCloud: Gateway [{#NAME}]: The number of connected edges has changed'
                  priority: WARNING
                  description: 'The number of connected Edges has changed.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 5e588efb83be4dc2bc29eaa0a6630718
              name: 'Gateway [{#NAME}]: Description'
              type: DEPENDENT
              key: 'velocloud.gateway.description[{#ID}]'
              value_type: TEXT
              description: 'Gateway description.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.description
                - type: STR_REPLACE
                  parameters:
                    - 'null'
                    - ''
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
            - uuid: 7f2a0a68386744cb84fab35df8c55a07
              name: 'Gateway [{#NAME}]: IP address'
              type: DEPENDENT
              key: 'velocloud.gateway.ip_address[{#ID}]'
              value_type: TEXT
              description: 'Gateway IP address.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ipAddress
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
            - uuid: b304460854f0485189f88df12483b5ac
              name: 'Gateway [{#NAME}]: Service uptime'
              type: DEPENDENT
              key: 'velocloud.gateway.service_uptime[{#ID}]'
              units: uptime
              description: 'Gateway service uptime.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.serviceUpSince
                - type: JAVASCRIPT
                  parameters:
                    - |
                      value == '0000-00-00 00:00:00' ? value = 0 : value = Math.round((Date.now() - new Date(value).valueOf()) / 1000);
                      return value;
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
            - uuid: 91784583eda943a7ace430413450391c
              name: 'Gateway [{#NAME}]: State'
              type: DEPENDENT
              key: 'velocloud.gateway.state[{#ID}]'
              value_type: TEXT
              description: 'Gateway state.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.gatewayState
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
            - uuid: d902600ef51640ffaaa4384ce505bcc2
              name: 'Gateway [{#NAME}]: System uptime'
              type: DEPENDENT
              key: 'velocloud.gateway.system_uptime[{#ID}]'
              units: uptime
              description: 'Gateway system uptime.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.systemUpSince
                - type: JAVASCRIPT
                  parameters:
                    - |
                      value == '0000-00-00 00:00:00' ? value = 0 : value = Math.round((Date.now() - new Date(value).valueOf()) / 1000);
                      return value;
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
              trigger_prototypes:
                - uuid: e51ea2da27284067bd3ec8fa4faffdde
                  expression: 'last(/VeloCloud SD-WAN by HTTP/velocloud.gateway.system_uptime[{#ID}])>0 and last(/VeloCloud SD-WAN by HTTP/velocloud.gateway.system_uptime[{#ID}])<600'
                  name: 'VeloCloud: Gateway [{#NAME}]: Gateway has been restarted'
                  event_name: 'VeloCloud: Gateway [{#NAME}]: Gateway has been restarted (uptime < 10m)'
                  priority: WARNING
                  description: 'Gateway was restarted.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 66c8fe8095724fb38966b05ef5d77a37
              name: 'Gateway [{#NAME}]: Utilization CPU'
              type: DEPENDENT
              key: 'velocloud.gateway.utilization.cpu[{#ID}]'
              value_type: FLOAT
              units: '%'
              description: 'Gateway CPU utilization.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.utilizationDetail.cpu
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: cpu
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
            - uuid: b510c38771464024a66dc20ce9d75505
              name: 'Gateway [{#NAME}]: Utilization load'
              type: DEPENDENT
              key: 'velocloud.gateway.utilization.load[{#ID}]'
              value_type: FLOAT
              units: '%'
              description: 'Gateway load.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.utilizationDetail.load
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
            - uuid: ad83565ae40f480dacd56e63bd475ddc
              name: 'Gateway [{#NAME}]: Utilization memory'
              type: DEPENDENT
              key: 'velocloud.gateway.utilization.memory[{#ID}]'
              value_type: FLOAT
              units: '%'
              description: 'Gateway memory utilization.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.utilizationDetail.memory
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: component
                  value: memory
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
            - uuid: b10c51350f604a8195e9c0176ca2de85
              name: 'Gateway [{#NAME}]: Utilization overall'
              type: DEPENDENT
              key: 'velocloud.gateway.utilization.overall[{#ID}]'
              value_type: FLOAT
              units: '%'
              description: 'Gateway overall utilization.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.utilizationDetail.overall
              master_item:
                key: 'velocloud.get.gateway[{#ID}]'
              tags:
                - tag: city
                  value: '{#CITY}'
                - tag: component
                  value: gateway
                - tag: name
                  value: '{#NAME}'
                - tag: state
                  value: '{#STATE}'
            - uuid: 5c11969073ab415abe08c74626bd5dd1
              name: 'Gateway [{#NAME}]: Raw data'
              type: DEPENDENT
              key: 'velocloud.get.gateway[{#ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for VeloCloud gateway.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.id==''{#ID}'')].first()'
              master_item:
                key: velocloud.network.gateway.get
              tags:
                - tag: component
                  value: raw
          graph_prototypes:
            - uuid: d8d9b176f439436ba6fe69ec8bc6409e
              name: 'Gateway [{#NAME}]: Utilization'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'VeloCloud SD-WAN by HTTP'
                    key: 'velocloud.gateway.utilization.cpu[{#ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'VeloCloud SD-WAN by HTTP'
                    key: 'velocloud.gateway.utilization.load[{#ID}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'VeloCloud SD-WAN by HTTP'
                    key: 'velocloud.gateway.utilization.memory[{#ID}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'VeloCloud SD-WAN by HTTP'
                    key: 'velocloud.gateway.utilization.overall[{#ID}]'
          master_item:
            key: velocloud.network.gateway.get
          lld_macro_paths:
            - lld_macro: '{#CITY}'
              path: $.site.city
            - lld_macro: '{#ID}'
              path: $.id
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#STATE}'
              path: $.site.state
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: network
        - tag: target
          value: velocloud-sd-wan
      macros:
        - macro: '{$VELOCLOUD.ENTERPRISE.ID}'
          description: 'VeloCloud SD-WAN Enterprise ID. Specify a single Enterprise ID (requires READ EDGE privileges). By default parameter is empty, data will be retrieved for all Enterprises (privileges required: READ ENTERPRISE and READ EDGE).'
          config:
            type: TEXT
            priority: '3'
            section_name: Other
            label: 'Enterprise ID'
            description: 'VeloCloud SD-WAN Enterprise ID.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VELOCLOUD.HTTP_PROXY}'
          description: 'The HTTP proxy for script items (set if needed). If the macro is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'HTTP proxy'
            description: 'HTTP proxy to use for requests.'
        - macro: '{$VELOCLOUD.LLD.EDGES.NAME.FILTER.MATCHES}'
          value: '.*'
          description: 'Filter for discoverable Edges by name.'
          config:
            type: TEXT
            priority: '7'
            section_name: 'Discovery filters'
            label: 'Edges name matches'
            description: 'Regex to match Edges names.'
        - macro: '{$VELOCLOUD.LLD.EDGES.NAME.FILTER.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered Edges by name.'
          config:
            type: TEXT
            priority: '8'
            section_name: 'Discovery filters'
            label: 'Edges name not matches'
            description: 'A regex to exclude certain Edges names from discovery.'
        - macro: '{$VELOCLOUD.LLD.EDGES.STATE.FILTER.MATCHES}'
          value: '.*'
          description: 'Filter for discoverable Edges by state.'
          config:
            type: TEXT
            priority: '9'
            section_name: 'Discovery filters'
            label: 'Edges state matches'
            description: 'Regex to match Edges state.'
        - macro: '{$VELOCLOUD.LLD.EDGES.STATE.FILTER.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered Edges by state.'
          config:
            type: TEXT
            priority: '10'
            section_name: 'Discovery filters'
            label: 'Edges state not matches'
            description: 'A regex to exclude Edges by state from discovery.'
        - macro: '{$VELOCLOUD.LLD.GATEWAYS.FILTER.MATCHES}'
          value: '.*'
          description: 'Filter for discoverable gateways.'
          config:
            type: TEXT
            priority: '11'
            section_name: 'Discovery filters'
            label: 'Gateways name matches'
            description: 'Regex to match gateways name.'
        - macro: '{$VELOCLOUD.LLD.GATEWAYS.FILTER.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered gateways.'
          config:
            type: TEXT
            priority: '12'
            section_name: 'Discovery filters'
            label: 'Gateways name not matches'
            description: 'A regex to exclude certain gateways names from discovery.'
        - macro: '{$VELOCLOUD.SDWAN.DATA.TIMEOUT}'
          value: 15s
          description: 'Response timeout for API.'
          config:
            type: TEXT
            priority: '5'
            label: 'API timeout'
            description: 'Response timeout for the API (e.g., 15s). In the range from 1 to 60 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VELOCLOUD.SDWAN.FREQUENCY}'
          value: 1h
          description: 'Update interval for raw item, expressed in hours.'
          config:
            type: TEXT
            priority: '4'
            label: 'Update interval'
            description: 'Update interval for raw item (e.g., 1h).'
        - macro: '{$VELOCLOUD.TOKEN}'
          type: SECRET_TEXT
          description: 'VeloCloud SD-WAN Orchestrator API token.'
          config:
            type: TEXT
            priority: '1'
            label: 'API token'
            description: 'VeloCloud SD-WAN Orchestrator API token.'
            required: 'YES'
        - macro: '{$VELOCLOUD.URL}'
          description: 'VeloCloud SD-WAN Orchestrator URL, e.g., `vco.velocloud.net`.'
          config:
            type: TEXT
            priority: '2'
            label: 'API URL'
            description: 'VeloCloud SD-WAN Orchestrator API URL. Format example: `vco.velocloud.net`'
            required: 'YES'
      dashboards:
        - uuid: 05278fc67ef34ec191e6a76f12e13627
          name: 'VeloCloud: General'
          pages:
            - name: Overview
              widgets:
                - type: item
                  width: '24'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN by HTTP'
                        key: velocloud.orchestrator.api_version
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  x: '24'
                  width: '24'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN by HTTP'
                        key: velocloud.orchestrator.build
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: item
                  x: '48'
                  width: '24'
                  height: '4'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN by HTTP'
                        key: velocloud.orchestrator.version
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: value_size
                      value: '20'
            - name: Gateways
              widgets:
                - type: honeycomb
                  name: State
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Gateway [*]: State'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: STRING
                      name: reference
                      value: YWRAS
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: 'Utilization load'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 78909C
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Gateway [*]: Utilization load'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: CBDAC
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: honeycomb
                  name: 'IP address'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'Gateway [*]: IP address'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: STRING
                      name: reference
                      value: XGHBR
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: 'Utilization overall'
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 78909C
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Gateway [*]: Utilization overall'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: CBFDD
                    - type: INTEGER
                      name: righty
                      value: '0'
    - uuid: 6fd1bd7226934f498169202ba4e9a482
      template: 'VeloCloud SD-WAN Edge by HTTP'
      name: 'VeloCloud SD-WAN Edge by HTTP'
      description: |
        Template for monitoring VeloCloud SD-WAN Edges https://www.arista.com/en/solutions/sd-wan
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        - This template provides monitoring capabilities for VeloCloud SD-WAN Edge using the API.
        - It works without any external scripts and uses the script item.
        
        ## Setup
        
        1. Create an API token in the VeloCloud SD-WAN Orchestrator.
        > See [Arista documentation](https://www.arista.com/en/global-settings-guide-vc-6-4/sase-6-4-user-management) for details.
        
        2. Link the template to a host.
        3. Set the following fields: `API token`, `API URL`, `Enterprise ID`, `Edge ID`.
      vendor:
        name: Zabbix
        version: 8.0-0
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 79aa9ebb1ce64944a78a7c8d7603f53b
          name: 'Activation state'
          type: DEPENDENT
          key: velocloud.edge.activation
          description: 'Edge activation state.'
          valuemap:
            name: 'Edge activation state'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..activationState.first()
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  switch (value) {
                  	case 'PENDING':
                  		return 0;
                  	case 'ACTIVATED':
                  		return 1;
                  	default:
                  		return 10;
                  }
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: edge
            - tag: component
              value: system
        - uuid: 8a57dfd93a334b8bb606ae3b4f0c5cb7
          name: 'CPU core temperature'
          type: DEPENDENT
          key: velocloud.edge.cpu.core.temp
          units: °C
          description: 'Temperature of the CPU core.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.cpuCoreTemp.max
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: velocloud.edge.status.metric.get
          tags:
            - tag: component
              value: cpu
        - uuid: 89f694d5b7784af5a5cd853e30a722e5
          name: 'CPU usage in percent'
          type: DEPENDENT
          key: velocloud.edge.cpu.usage
          value_type: FLOAT
          units: '%'
          description: 'CPU usage as a percentage.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.cpuPct.max
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: velocloud.edge.status.metric.get
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: c8a6374d35fd49bf8952873b63570ae2
              expression: 'min(/VeloCloud SD-WAN Edge by HTTP/velocloud.edge.cpu.usage,15m)>{$VELOCLOUD.EDGE.CPU.UTIL.WARN}'
              name: 'VeloCloud Edge: High CPU utilization'
              event_name: 'VeloCloud Edge: High CPU utilization (over {$VELOCLOUD.EDGE.CPU.UTIL.WARN}% for 15m)'
              opdata: 'Current CPU usage: {ITEM.LASTVALUE1}%'
              priority: WARNING
              description: 'The system is experiencing high CPU usage.'
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: cecb2a3698704c4c89ef12eb3bb39222
          name: Description
          type: DEPENDENT
          key: velocloud.edge.description
          value_type: TEXT
          description: 'Edge description.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..description.first()
            - type: STR_REPLACE
              parameters:
                - 'null'
                - ''
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: edge
            - tag: component
              value: system
        - uuid: e875793d90e04672b1ac4ffa79c0e40a
          name: 'Flow count'
          type: DEPENDENT
          key: velocloud.edge.flow.count
          description: 'Number of flows.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.flowCount.max
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: velocloud.edge.status.metric.get
          tags:
            - tag: component
              value: system
        - uuid: e159cb72d8c44b4aab356eebc15da589
          name: 'Get edge data'
          type: HTTP_AGENT
          key: velocloud.edge.get.data
          delay: '{$VELOCLOUD.EDGE.FREQUENCY}'
          history: '0'
          value_type: TEXT
          description: 'Edge data in JSON format.'
          timeout: '{$VELOCLOUD.EDGE.DATA.TIMEOUT}'
          url: 'https://{$VELOCLOUD.URL}/portal/rest/edge/getEdge'
          posts: '{ "enterpriseId": {$VELOCLOUD.ENTERPRISE.ID}, "id": {$VELOCLOUD.EDGE.ID} }'
          headers:
            - name: Content-Type
              value: application/json
            - name: Authorization
              value: 'Token {$VELOCLOUD.TOKEN}'
          request_method: POST
          tags:
            - tag: component
              value: raw
        - uuid: f0b94440c1db4638b79b48aee74f770f
          name: 'Get edge data collection errors'
          type: DEPENDENT
          key: velocloud.edge.get.data.error
          value_type: TEXT
          description: 'Verify that data collection completed without errors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 411e557e080b470f8dfb8267b78a0851
              expression: 'length(last(/VeloCloud SD-WAN Edge by HTTP/velocloud.edge.get.data.error))>0'
              name: 'VeloCloud Edge: Failed to get metric data'
              priority: WARNING
              description: 'Failed to get API metrics for Edge.'
              tags:
                - tag: scope
                  value: notice
        - uuid: 37aac853345e4b9f954cca4b37ae4047
          name: 'Get edge peer data'
          type: SCRIPT
          key: velocloud.edge.get.peer.data
          delay: '{$VELOCLOUD.EDGE.FREQUENCY}'
          history: '0'
          value_type: TEXT
          params: |
            var VeloCloud = {
            	params: {},
            
            	setParams: function (params) {
            		['url', 'token'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		VeloCloud.params = params;
            
            		if (VeloCloud.params.token === '{' + '$VELOCLOUD.TOKEN}') {
            			throw 'Please change {' + '$VELOCLOUD.TOKEN} macro with the proper value.';
            		}
            		if (!VeloCloud.params.url.startsWith('http://') && !VeloCloud.params.url.startsWith('https://')) {
            			VeloCloud.params.url = 'https://' + params.url;
            		}
            		if (!VeloCloud.params.url.endsWith('/')) {
            			VeloCloud.params.url += '/';
            		}
            
            	},
            
            	getField: function (data, path, trace) {
            		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 + ' - ' + trace;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	request: function (url, body) {
            
            		var response, request = new HttpRequest();
            
            		if (typeof VeloCloud.params.http_proxy !== 'undefined' && VeloCloud.params.http_proxy !== '') {
            			request.setProxy(VeloCloud.params.http_proxy);
            		}
            
            		request.addHeader('Content-Type: application/json');
            		request.addHeader('Authorization: Token ' + VeloCloud.params.token);
            
            		response = request.post(url, body);
            
            		Zabbix.log(4, '[ SD-WAN API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            		try {
            			response = JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from SD-WAN API. Check debug log for more information.';
            		}
            		if (response.error && response.error.message) {
            			throw response.error.message;
            		}
            
            		return response;
            
            	},
            
            	getMetricsData: function () {
            		var edge_sdwan = [],
            			edge_sdwan_path = [];
            
            
            		response_edge_sdwan = VeloCloud.request(VeloCloud.params.url + 'portal/rest/edge/getEdgeSDWANPeers', JSON.stringify({ enterpriseId: Number(VeloCloud.params.enterprise_id), edgeId: Number(VeloCloud.params.edge_id) }));
            
            		if (!Array.isArray(response_edge_sdwan)) {
            			response_edge_sdwan = [response_edge_sdwan];
            		}
            
            		for (var e in response_edge_sdwan) {
            			data = {
            				enterpriseId: Number(VeloCloud.params.enterprise_id),
            				edgeId: Number(VeloCloud.params.edge_id),
            				peerLogicalId: VeloCloud.getField(response_edge_sdwan[e], 'deviceLogicalId', 'error get peerLogicalId')
            			};
            			response_edge_sdwan_path = VeloCloud.request(VeloCloud.params.url + 'portal/rest/metrics/getEdgeSDWANPeerPathMetrics', JSON.stringify(data));
            			edge_sdwan_path = edge_sdwan_path.concat(response_edge_sdwan_path);
            
            			response_edge_sdwan[e].edgeId = Number(VeloCloud.params.edge_id);
            			response_edge_sdwan[e].edgeName = VeloCloud.params.edge_name;
            			response_edge_sdwan[e].enterpriseId = Number(VeloCloud.params.enterprise_id);
            		}
            
            		edge_sdwan = edge_sdwan.concat(response_edge_sdwan);
            
            		return { edgeSDWan: edge_sdwan, edgeSDWanPath: edge_sdwan_path };
            
            	}
            }
            
            try {
            	VeloCloud.setParams(JSON.parse(value));
            	return JSON.stringify(VeloCloud.getMetricsData());
            }
            catch (error) {
            	error += (String(error).endsWith('.')) ? '' : '.';
            	Zabbix.log(3, '[ VeloCloud ] ERROR: ' + error);
            	return JSON.stringify({ 'error': error });
            }
          description: 'Edge peer metric data in JSON format.'
          timeout: '{$VELOCLOUD.EDGE.DATA.TIMEOUT}'
          parameters:
            - name: edge_id
              value: '{$VELOCLOUD.EDGE.ID}'
            - name: edge_name
              value: '{$VELOCLOUD.EDGE.NAME}'
            - name: enterprise_id
              value: '{$VELOCLOUD.ENTERPRISE.ID}'
            - name: token
              value: '{$VELOCLOUD.TOKEN}'
            - name: url
              value: '{$VELOCLOUD.URL}'
          tags:
            - tag: component
              value: raw
        - uuid: 09290826633842e39c25839307046872
          name: 'Handoff queue drops'
          type: DEPENDENT
          key: velocloud.edge.handoff.queue.drops
          description: 'Packets dropped from the handoff queue.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.handoffQueueDrops.max
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: velocloud.edge.status.metric.get
          tags:
            - tag: component
              value: system
        - uuid: ff105efa22c4445e8fc3236ccb7eb32a
          name: 'HA state'
          type: DEPENDENT
          key: velocloud.edge.ha_state
          description: 'Edge high availability state.'
          valuemap:
            name: 'Edge HA status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..haState.first()
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  switch (value) {
                  	case 'UNCONFIGURED':
                  		return 0;
                  	case 'READY':
                  		return 1;
                  	case 'PENDING_INIT':
                  		return 2;
                  	case 'FAILED':
                  		return 3;
                  	default:
                  		return 10;
                  }
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: edge
            - tag: component
              value: system
          triggers:
            - uuid: 182bf6b988be490dbfa580b304fce19c
              expression: 'last(/VeloCloud SD-WAN Edge by HTTP/velocloud.edge.ha_state)=3'
              name: 'VeloCloud Edge: HA state is in "FAILED" state'
              priority: WARNING
              description: 'High availability state is "FAILED".'
              tags:
                - tag: scope
                  value: availability
        - uuid: c155979946c44782b7eb64de0a9e80fd
          name: 'Get link metric data'
          type: HTTP_AGENT
          key: velocloud.edge.link.get.data
          delay: '{$VELOCLOUD.EDGE.FREQUENCY}'
          history: '0'
          value_type: TEXT
          description: 'Link metric data in JSON format.'
          timeout: '{$VELOCLOUD.EDGE.DATA.TIMEOUT}'
          url: 'https://{$VELOCLOUD.URL}/portal/rest/monitoring/getAggregateEdgeLinkMetrics'
          posts: '{ "enterpriseId": {$VELOCLOUD.ENTERPRISE.ID}, "id": {$VELOCLOUD.EDGE.ID} }'
          headers:
            - name: Content-Type
              value: application/json
            - name: Authorization
              value: 'Token {$VELOCLOUD.TOKEN}'
          request_method: POST
          tags:
            - tag: component
              value: raw
        - uuid: 2bc1862325494b9bb7ffabfc3c67c527
          name: 'Memory usage in percent'
          type: DEPENDENT
          key: velocloud.edge.memory.usage
          value_type: FLOAT
          units: '%'
          description: 'Percentage of memory usage.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.memoryPct.max
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: velocloud.edge.status.metric.get
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 03e08de7977f4299a46e65d3ef0c8d8f
              expression: 'min(/VeloCloud SD-WAN Edge by HTTP/velocloud.edge.memory.usage,15m)>{$VELOCLOUD.EDGE.MEMORY.UTIL.WARN}'
              name: 'VeloCloud Edge: High memory utilization'
              event_name: 'VeloCloud Edge: High memory utilization (over {$VELOCLOUD.EDGE.MEMORY.UTIL.WARN}% for 15m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: capacity
                - tag: scope
                  value: performance
        - uuid: 08e7d1bb35634163b6d8afbde9e580ef
          name: 'Model number'
          type: DEPENDENT
          key: velocloud.edge.model
          value_type: TEXT
          description: 'Edge model number.'
          inventory_link: MODEL
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..modelNumber.first()
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: edge
            - tag: component
              value: system
        - uuid: f6f3f357d8d84c528bc5c1b6ae9ac868
          name: 'Service uptime'
          type: DEPENDENT
          key: velocloud.edge.service_uptime
          units: uptime
          description: 'Edge service uptime.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..serviceUpSince.first()
            - type: JAVASCRIPT
              parameters:
                - |
                  value == '0000-00-00 00:00:00' ? value = 0 : value = Math.round((Date.now() - new Date(value).valueOf()) / 1000);
                  return value;
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: system
        - uuid: 9c2607c18dd740fdaa6ccaf07b2e4605
          name: 'Site city'
          type: SCRIPT
          key: velocloud.edge.site.city
          delay: 15m
          value_type: CHAR
          params: 'var inventory = JSON.stringify({$VELOCLOUD.EDGE.INVENTORY}), site = JSON.parse(inventory); if (site && site.city) { return site.city; } return '''';'
          description: 'Edge site city.'
          inventory_link: SITE_CITY
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          timeout: 10s
          tags:
            - tag: component
              value: inventory
        - uuid: f42d576a55e1483597120086a1ad82bb
          name: 'Site contact email'
          type: SCRIPT
          key: velocloud.edge.site.contact.email
          delay: 15m
          value_type: CHAR
          params: 'var inventory = JSON.stringify({$VELOCLOUD.EDGE.INVENTORY}), site = JSON.parse(inventory); if (site && site.contactEmail) { return site.contactEmail; } return '''';'
          description: 'Edge site contact email.'
          inventory_link: POC_1_EMAIL
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          timeout: 10s
          tags:
            - tag: component
              value: inventory
        - uuid: 3af49b08f5e045dda5e6fde965c57a36
          name: 'Site contact name'
          type: SCRIPT
          key: velocloud.edge.site.contact.name
          delay: 15m
          value_type: CHAR
          params: 'var inventory = JSON.stringify({$VELOCLOUD.EDGE.INVENTORY}), site = JSON.parse(inventory); if (site && site.contactName) { return site.contactName; } return '''';'
          description: 'Edge site contact name.'
          inventory_link: POC_1_NAME
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          timeout: 10s
          tags:
            - tag: component
              value: inventory
        - uuid: 1202af89193f4e86a016b5b77abf904c
          name: 'Site country'
          type: SCRIPT
          key: velocloud.edge.site.country
          delay: 15m
          value_type: CHAR
          params: 'var inventory = JSON.stringify({$VELOCLOUD.EDGE.INVENTORY}), site = JSON.parse(inventory); if (site && site.country) { return site.country; } return '''';'
          description: 'Edge site country.'
          inventory_link: SITE_COUNTRY
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          timeout: 10s
          tags:
            - tag: component
              value: inventory
        - uuid: b3e6b124960a4f169aba84bb3d65e618
          name: 'Site latitude'
          type: SCRIPT
          key: velocloud.edge.site.latitude
          delay: 15m
          value_type: CHAR
          params: 'var inventory = JSON.stringify({$VELOCLOUD.EDGE.INVENTORY}), site = JSON.parse(inventory); if (site && site.lat) { return site.lat; } return '''';'
          description: 'Edge site location latitude.'
          inventory_link: LOCATION_LAT
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          timeout: 10s
          tags:
            - tag: component
              value: inventory
        - uuid: a603e0982b5b40f79c4d2d6b9c7d0499
          name: 'Site longitude'
          type: SCRIPT
          key: velocloud.edge.site.longitude
          delay: 15m
          value_type: CHAR
          params: 'var inventory = JSON.stringify({$VELOCLOUD.EDGE.INVENTORY}), site = JSON.parse(inventory); if (site && site.lon) { return site.lon; } return '''';'
          description: 'Edge site location longitude.'
          inventory_link: LOCATION_LON
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          timeout: 10s
          tags:
            - tag: component
              value: inventory
        - uuid: 9afbf4ea56724985b225e351abba686e
          name: 'Site state'
          type: SCRIPT
          key: velocloud.edge.site.state
          delay: 15m
          value_type: CHAR
          params: 'var inventory = JSON.stringify({$VELOCLOUD.EDGE.INVENTORY}), site = JSON.parse(inventory); if (site && site.state) { return site.state; } return '''';'
          description: 'Edge site state.'
          inventory_link: SITE_STATE
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          timeout: 10s
          tags:
            - tag: component
              value: inventory
        - uuid: a262b95d6bd142acbb5f60d3a5197e0b
          name: 'Software version'
          type: DEPENDENT
          key: velocloud.edge.software_version
          value_type: TEXT
          description: 'Edge software version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..softwareVersion.first()
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: system
        - uuid: 719ede2402b248a49b01565eeadee98d
          name: State
          type: DEPENDENT
          key: velocloud.edge.state
          description: 'Edge state.'
          valuemap:
            name: 'Edge states'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..edgeState.first()
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
            - type: JAVASCRIPT
              parameters:
                - |
                  switch (value) {
                  	case 'OFFLINE':
                  		return 0;
                  	case 'CONNECTED':
                  		return 1;
                  	case 'NEVER_ACTIVATED':
                  		return 2;
                  	default:
                  		return 10;
                  }
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 962d2d0c6f124424b2e5a7aca89d293f
              expression: 'last(/VeloCloud SD-WAN Edge by HTTP/velocloud.edge.state)=0'
              name: 'VeloCloud Edge: Edge is in "OFFLINE" state'
              priority: WARNING
              description: 'Edge state is "OFFLINE".'
              tags:
                - tag: scope
                  value: availability
        - uuid: fe7c54e7cdd143e0ac7a7fb173905202
          name: 'Get edge status metrics'
          type: HTTP_AGENT
          key: velocloud.edge.status.metric.get
          delay: 15m
          history: '0'
          value_type: TEXT
          description: 'Edge status metrics in JSON format.'
          url: 'https://{$VELOCLOUD.URL}/portal/rest/metrics/getEdgeStatusMetrics'
          posts: '{ "enterpriseId": {$VELOCLOUD.ENTERPRISE.ID}, "edgeId": {$VELOCLOUD.EDGE.ID} }'
          headers:
            - name: Content-Type
              value: application/json
            - name: Authorization
              value: 'Token {$VELOCLOUD.TOKEN}'
          request_method: POST
          tags:
            - tag: component
              value: raw
        - uuid: a32cf2363fda411eb55b9103c67c95f3
          name: 'System uptime'
          type: DEPENDENT
          key: velocloud.edge.system_uptime
          units: uptime
          description: 'Edge system uptime.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..systemUpSince.first()
            - type: JAVASCRIPT
              parameters:
                - |
                  value == '0000-00-00 00:00:00' ? value = 0 : value = Math.round((Date.now() - new Date(value).valueOf()) / 1000);
                  return value;
          master_item:
            key: velocloud.edge.get.data
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 32e7a8a9b28a4f288254b8fbcba058dd
              expression: 'last(/VeloCloud SD-WAN Edge by HTTP/velocloud.edge.system_uptime)>0 and last(/VeloCloud SD-WAN Edge by HTTP/velocloud.edge.system_uptime)<600'
              name: 'VeloCloud Edge: Edge has been restarted'
              event_name: 'VeloCloud Edge: Edge has been restarted (uptime < 10m)'
              priority: WARNING
              description: 'Edge was restarted.'
              tags:
                - tag: scope
                  value: notice
        - uuid: d700795b93814e4e8e24d08ebdbc311b
          name: 'Tunnel count'
          type: DEPENDENT
          key: velocloud.edge.tunnel.count
          description: 'Total number of active tunnels.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.tunnelCount.max
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: velocloud.edge.status.metric.get
          tags:
            - tag: component
              value: system
        - uuid: 8253db4d5b8e407fa29f5ad47e98ee97
          name: 'Tunnel count V6'
          type: DEPENDENT
          key: velocloud.edge.tunnel.count.v6
          description: 'Total number of IPv6 tunnels.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.tunnelCountV6.max
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: velocloud.edge.status.metric.get
          tags:
            - tag: component
              value: system
      discovery_rules:
        - uuid: e334e0f58230456f83b5efc3801bd775
          name: 'Link metric discovery'
          type: DEPENDENT
          key: velocloud.link.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$VELOCLOUD.LLD.LINKS.NAME.FILTER.MATCHES}'
              - macro: '{#NAME}'
                value: '{$VELOCLOUD.LLD.LINKS.NAME.FILTER.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Metrics for link statistics.'
          item_prototypes:
            - uuid: 7067ea17701b4c92af83ae0fdecbac0d
              name: 'Link [{#NAME}]:[{#IP}]: Raw data'
              type: DEPENDENT
              key: 'velocloud.get.link[{#ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for this VeloCloud link.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.[?(@.linkId==''{#ID}'')].first()'
              master_item:
                key: velocloud.edge.link.get.data
              tags:
                - tag: component
                  value: raw
            - uuid: ca85601c81d943119e8e61a3eb878479
              name: 'Link [{#NAME}]:[{#IP}]: Best latency rx, ms'
              type: DEPENDENT
              key: 'velocloud.link.best_latency_rx[{#ID}]'
              value_type: FLOAT
              units: ms
              description: 'Best receive latency in milliseconds.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bestLatencyMsRx
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: 924da40ad2024275a08aef84de24569a
              name: 'Link [{#NAME}]:[{#IP}]: Best latency tx, ms'
              type: DEPENDENT
              key: 'velocloud.link.best_latency_tx[{#ID}]'
              value_type: FLOAT
              units: ms
              description: 'Best transmit latency in milliseconds.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bestLatencyMsTx
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: 05f14fbb358a46408f33fb6b08d7ea6d
              name: 'Link [{#NAME}]:[{#IP}]: Best loss rx, %'
              type: DEPENDENT
              key: 'velocloud.link.best_loss_rx.pct[{#ID}]'
              value_type: FLOAT
              description: 'Best receive loss in percent.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bestLossPctRx
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: 2dbe6a58e02e42f4afec515daff6948f
              name: 'Link [{#NAME}]:[{#IP}]: Best loss tx, %'
              type: DEPENDENT
              key: 'velocloud.link.best_loss_tx.pct[{#ID}]'
              value_type: FLOAT
              description: 'Best transmit loss in percent.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bestLossPctTx
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: c1e039d841c1461fb6afb4a5b589e029
              name: 'Link [{#NAME}]:[{#IP}]: Bytes in'
              type: DEPENDENT
              key: 'velocloud.link.bytes_rx[{#ID}]'
              units: B
              description: 'Received bytes for link.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytesRx
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: 91a0963dc57144e39902dbf49cfa07de
              name: 'Link [{#NAME}]:[{#IP}]: Bytes out'
              type: DEPENDENT
              key: 'velocloud.link.bytes_tx[{#ID}]'
              units: B
              description: 'Transmitted bytes for link.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bytesTx
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: d74da7b2097d4ebcbafdf37d1a77150d
              name: 'Link [{#NAME}]:[{#IP}]: Last active'
              type: DEPENDENT
              key: 'velocloud.link.last_active[{#ID}]'
              units: s
              description: 'Time since last activity for link, in seconds.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.link.linkLastActive
                - type: JAVASCRIPT
                  parameters:
                    - 'return Math.round((Date.now() - new Date(value).valueOf()) / 1000);'
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: ae9c4dc8bc7542a0a36c8879c3ad54df
              name: 'Link [{#NAME}]:[{#IP}]: Packets in'
              type: DEPENDENT
              key: 'velocloud.link.packets_rx[{#ID}]'
              units: '!packets'
              description: 'Received packets for link.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.packetsRx
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: 583457c341cf41529e98b7631d8b52d6
              name: 'Link [{#NAME}]:[{#IP}]: Packets out'
              type: DEPENDENT
              key: 'velocloud.link.packets_tx[{#ID}]'
              units: '!packets'
              description: 'Transmitted packets for link.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.packetsTx
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: ebb11f5f2445427cb6e4dbe82d63017c
              name: 'Link [{#NAME}]:[{#IP}]: State'
              type: DEPENDENT
              key: 'velocloud.link.state[{#ID}]'
              description: 'Link state.'
              valuemap:
                name: 'Link states'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.link.linkState
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
                - type: JAVASCRIPT
                  parameters:
                    - |
                      switch (value) {
                      	case 'UNSTABLE':
                      		return 0;
                      	case 'STABLE':
                      		return 1;
                      	case 'DISCONNECTED':
                      		return 2;
                      	default:
                      		return 10;
                      }
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
              trigger_prototypes:
                - uuid: 7505955885414bdbbee9b93227a2c69e
                  expression: 'last(/VeloCloud SD-WAN Edge by HTTP/velocloud.link.state[{#ID}])<>1'
                  name: 'VeloCloud Edge: Link [{#NAME}]:[{#IP}]: Link state is not "STABLE"'
                  priority: WARNING
                  description: 'Link state is not "STABLE".'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 547fd14177874f0eb9871248589e55c5
              name: 'Link [{#NAME}]:[{#IP}]: Total bytes'
              type: DEPENDENT
              key: 'velocloud.link.total_bytes[{#ID}]'
              units: B
              description: 'Total bytes for link.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.totalBytes
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
            - uuid: 849d47a34d7742eeb660b25871d6f43a
              name: 'Link [{#NAME}]:[{#IP}]: Total packets'
              type: DEPENDENT
              key: 'velocloud.link.total_packets[{#ID}]'
              units: '!packets'
              description: 'Total packets for link.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.totalPackets
              master_item:
                key: 'velocloud.get.link[{#ID}]'
              tags:
                - tag: component
                  value: link
                - tag: enterprise
                  value: '{#ENTERPRISE}'
                - tag: interface
                  value: '{#IF}'
                - tag: ip
                  value: '{#IP}'
                - tag: name
                  value: '{#NAME}'
          graph_prototypes:
            - uuid: 3d166d25437640faa3f708dbfec91d85
              name: 'Link [{#NAME}]:[{#IP}]:[{#ID}]: Best latency'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.best_latency_rx[{#ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.best_latency_tx[{#ID}]'
            - uuid: 01e93c93fd0545a4bbb6c14bcea5f862
              name: 'Link [{#NAME}]:[{#IP}]:[{#ID}]: Best loss'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.best_loss_rx.pct[{#ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.best_loss_tx.pct[{#ID}]'
            - uuid: 3023541e671242618f3a0860e38c76a9
              name: 'Link [{#NAME}]:[{#IP}]:[{#ID}]: Bytes summary'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.bytes_rx[{#ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.bytes_tx[{#ID}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.total_bytes[{#ID}]'
            - uuid: a27f4d1877e541beb18c3144988e48fa
              name: 'Link [{#NAME}]:[{#IP}]:[{#ID}]: Packets summary'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.packets_rx[{#ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.packets_tx[{#ID}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.link.total_packets[{#ID}]'
          master_item:
            key: velocloud.edge.link.get.data
          lld_macro_paths:
            - lld_macro: '{#ENTERPRISE}'
              path: $.link.enterpriseName
            - lld_macro: '{#ID}'
              path: $.link.linkId
            - lld_macro: '{#IF}'
              path: $.link.interface
            - lld_macro: '{#IP}'
              path: $.link.linkIpAddress
            - lld_macro: '{#NAME}'
              path: $.link.displayName
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: e3c8ac51bd304a96ab9fb7876b1b70f6
          name: 'SD-WAN peer path metric discovery'
          type: DEPENDENT
          key: velocloud.sdwan.path.discovery
          description: 'Metrics for SD-WAN peer paths.'
          item_prototypes:
            - uuid: a9cd1da8eb3e4844a39119e8fac033e9
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Raw data'
              type: DEPENDENT
              key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for VeloCloud SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.edgeSDWanPath[?(@.source.linkName==''{#NAME}'' && @.source.linkLogicalId==''{#LINK.LOGICAL.ID}'' && @.source.deviceName==''{#SOURCE}'' && @.destination.deviceName==''{#DESTINATION}'')].first()'
              master_item:
                key: velocloud.edge.get.peer.data
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: sd-wan-path
            - uuid: 54e1f10281d64c859a7a210fa091ee4d
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Bytes in'
              type: DEPENDENT
              key: 'velocloud.sdwan.path.bytes_rx[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              units: B
              description: 'Bytes received for SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.bytesRx
              master_item:
                key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              tags:
                - tag: component
                  value: sd-wan-path
                - tag: destination
                  value: '{#DESTINATION}'
                - tag: path
                  value: '{#NAME}'
                - tag: source
                  value: '{#SOURCE}'
            - uuid: 57873613524b4cc29600971457b4ea85
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Bytes out'
              type: DEPENDENT
              key: 'velocloud.sdwan.path.bytes_tx[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              units: B
              description: 'Bytes transmitted for SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.bytesTx
              master_item:
                key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              tags:
                - tag: component
                  value: sd-wan-path
                - tag: destination
                  value: '{#DESTINATION}'
                - tag: path
                  value: '{#NAME}'
                - tag: source
                  value: '{#SOURCE}'
            - uuid: 37d693c024c14b168689d860fbdafb14
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Packets in'
              type: DEPENDENT
              key: 'velocloud.sdwan.path.packets_rx[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              units: '!packets'
              description: 'Packets received for SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.packetsRx
              master_item:
                key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              tags:
                - tag: component
                  value: sd-wan-path
                - tag: destination
                  value: '{#DESTINATION}'
                - tag: path
                  value: '{#NAME}'
                - tag: source
                  value: '{#SOURCE}'
            - uuid: 61141a5b812c47ebb00ab042a2acee8f
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Packets out'
              type: DEPENDENT
              key: 'velocloud.sdwan.path.packets_tx[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              units: '!packets'
              description: 'Packets transmitted for SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.packetsTx
              master_item:
                key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              tags:
                - tag: component
                  value: sd-wan-path
                - tag: destination
                  value: '{#DESTINATION}'
                - tag: path
                  value: '{#NAME}'
                - tag: source
                  value: '{#SOURCE}'
            - uuid: 3a858422652644cdbede50a3b86097be
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Packet loss in'
              type: DEPENDENT
              key: 'velocloud.sdwan.path.packet_loss_rx[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              value_type: FLOAT
              units: '%'
              description: 'Received packet loss for SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.packetLossRx
              master_item:
                key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              tags:
                - tag: component
                  value: sd-wan-path
                - tag: destination
                  value: '{#DESTINATION}'
                - tag: path
                  value: '{#NAME}'
                - tag: source
                  value: '{#SOURCE}'
            - uuid: 75369efc91734964b8a5872fc921c684
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Packet loss out'
              type: DEPENDENT
              key: 'velocloud.sdwan.path.packet_loss_tx[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              value_type: FLOAT
              units: '%'
              description: 'Transmitted packet loss for SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.packetLossTx
              master_item:
                key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              tags:
                - tag: component
                  value: sd-wan-path
                - tag: destination
                  value: '{#DESTINATION}'
                - tag: path
                  value: '{#NAME}'
                - tag: source
                  value: '{#SOURCE}'
            - uuid: 2a52d7cab0604ff2bb87e17d6e3cfda1
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Bytes total'
              type: DEPENDENT
              key: 'velocloud.sdwan.path.total_bytes[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              units: B
              description: 'Total bytes for SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.totalBytes
              master_item:
                key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              tags:
                - tag: component
                  value: sd-wan-path
                - tag: destination
                  value: '{#DESTINATION}'
                - tag: path
                  value: '{#NAME}'
                - tag: source
                  value: '{#SOURCE}'
            - uuid: e071f96cdb7f48909e6afba191fa31f2
              name: 'Path [{#NAME}]:[{#SOURCE} => {#DESTINATION}]: Total packets'
              type: DEPENDENT
              key: 'velocloud.sdwan.path.total_packets[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              units: '!packets'
              description: 'Total packets for SD-WAN peer path.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.totalPackets
              master_item:
                key: 'velocloud.get.sdwan_path[{#NAME}/{#SOURCE}/{#DESTINATION}/{#LINK.LOGICAL.ID}]'
              tags:
                - tag: component
                  value: sd-wan-path
                - tag: destination
                  value: '{#DESTINATION}'
                - tag: path
                  value: '{#NAME}'
                - tag: source
                  value: '{#SOURCE}'
          master_item:
            key: velocloud.edge.get.peer.data
          lld_macro_paths:
            - lld_macro: '{#DESTINATION}'
              path: $.destination.deviceName
            - lld_macro: '{#LINK.LOGICAL.ID}'
              path: $.source.linkLogicalId
            - lld_macro: '{#NAME}'
              path: $.source.linkName
            - lld_macro: '{#SOURCE}'
              path: $.source.deviceName
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.edgeSDWanPath
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 5fcdbf684e29440f92d9a5718931966e
          name: 'SD-WAN peer metric discovery'
          type: DEPENDENT
          key: velocloud.sdwan.peer.discovery
          description: 'Metrics for SD-WAN peers.'
          item_prototypes:
            - uuid: b49bcac20607419084db11943224e85f
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: Raw data'
              type: DEPENDENT
              key: 'velocloud.get.sdwan.peer[{#EDGE.ID}/{#ID}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data for VeloCloud SD-WAN peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.edgeSDWan[?(@.deviceLogicalId==''{#ID}'' && @.edgeId==''{#EDGE.ID}'')].first()'
              master_item:
                key: velocloud.edge.get.peer.data
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: sd-wan-peer
            - uuid: f10ff8d7db5e4c08835aa317d975854a
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: Dead path'
              type: DEPENDENT
              key: 'velocloud.sdwan.peer.dead_path[{#EDGE.ID}/{#ID}]'
              description: 'Number of dead paths for SD-WAN peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pathStatusCount.dead
              master_item:
                key: 'velocloud.get.sdwan.peer[{#EDGE.ID}/{#ID}]'
              tags:
                - tag: component
                  value: sd-wan-peer
                - tag: edge
                  value: '{#EDGE}'
                - tag: peer
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 917d56352c444a8babf0b499540b8cf3
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: Description'
              type: DEPENDENT
              key: 'velocloud.sdwan.peer.description[{#EDGE.ID}/{#ID}]'
              value_type: TEXT
              description: 'Description of SD-WAN peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.description
                - type: STR_REPLACE
                  parameters:
                    - 'null'
                    - ''
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: 'velocloud.get.sdwan.peer[{#EDGE.ID}/{#ID}]'
              tags:
                - tag: component
                  value: sd-wan-peer
                - tag: edge
                  value: '{#EDGE}'
                - tag: peer
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 7e3d1fa5d1224972b5db03e6ff52cd6b
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: Stable path'
              type: DEPENDENT
              key: 'velocloud.sdwan.peer.stable_path[{#EDGE.ID}/{#ID}]'
              description: 'Number of stable paths for SD-WAN peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pathStatusCount.stable
              master_item:
                key: 'velocloud.get.sdwan.peer[{#EDGE.ID}/{#ID}]'
              tags:
                - tag: component
                  value: sd-wan-peer
                - tag: edge
                  value: '{#EDGE}'
                - tag: peer
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 8db7e0a4e7db4a1e85a785468a601a5f
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: Standby path'
              type: DEPENDENT
              key: 'velocloud.sdwan.peer.standby_path[{#EDGE.ID}/{#ID}]'
              description: 'Number of standby paths for SD-WAN peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pathStatusCount.standby
              master_item:
                key: 'velocloud.get.sdwan.peer[{#EDGE.ID}/{#ID}]'
              tags:
                - tag: component
                  value: sd-wan-peer
                - tag: edge
                  value: '{#EDGE}'
                - tag: peer
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 91c755ccf2d4463583a96d0fc8806507
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: Total path'
              type: DEPENDENT
              key: 'velocloud.sdwan.peer.total_path[{#EDGE.ID}/{#ID}]'
              description: 'Number of total paths for SD-WAN peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pathStatusCount.total
              master_item:
                key: 'velocloud.get.sdwan.peer[{#EDGE.ID}/{#ID}]'
              tags:
                - tag: component
                  value: sd-wan-peer
                - tag: edge
                  value: '{#EDGE}'
                - tag: peer
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: b7451d0fb6f4487f981c183dd6680f62
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: Unknown path'
              type: DEPENDENT
              key: 'velocloud.sdwan.peer.unknown_path[{#EDGE.ID}/{#ID}]'
              description: 'Number of unknown paths for SD-WAN peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pathStatusCount.unknown
              master_item:
                key: 'velocloud.get.sdwan.peer[{#EDGE.ID}/{#ID}]'
              tags:
                - tag: component
                  value: sd-wan-peer
                - tag: edge
                  value: '{#EDGE}'
                - tag: peer
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 7c4ba627011a447e89232e082c15174c
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: Unstable path'
              type: DEPENDENT
              key: 'velocloud.sdwan.peer.unstable_path[{#EDGE.ID}/{#ID}]'
              description: 'Number of unstable paths for SD-WAN peer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.pathStatusCount.unstable
              master_item:
                key: 'velocloud.get.sdwan.peer[{#EDGE.ID}/{#ID}]'
              tags:
                - tag: component
                  value: sd-wan-peer
                - tag: edge
                  value: '{#EDGE}'
                - tag: peer
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
          graph_prototypes:
            - uuid: acc5c04f97724dbfa18293211ebbd70c
              name: 'SD-WAN Peer [{#NAME}]:[{#TYPE}]: {#EDGE.ID}: Path overview'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.sdwan.peer.stable_path[{#EDGE.ID}/{#ID}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.sdwan.peer.dead_path[{#EDGE.ID}/{#ID}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.sdwan.peer.standby_path[{#EDGE.ID}/{#ID}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.sdwan.peer.unknown_path[{#EDGE.ID}/{#ID}]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'VeloCloud SD-WAN Edge by HTTP'
                    key: 'velocloud.sdwan.peer.unstable_path[{#EDGE.ID}/{#ID}]'
          master_item:
            key: velocloud.edge.get.peer.data
          lld_macro_paths:
            - lld_macro: '{#EDGE.ID}'
              path: $.edgeId
            - lld_macro: '{#EDGE}'
              path: $.edgeName
            - lld_macro: '{#ID}'
              path: $.deviceLogicalId
            - lld_macro: '{#NAME}'
              path: $.peerName
            - lld_macro: '{#TYPE}'
              path: $.peerType
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.edgeSDWan
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: network
        - tag: target
          value: velocloud-sd-wan-edge
      macros:
        - macro: '{$VELOCLOUD.EDGE.CPU.UTIL.WARN}'
          value: '80'
          description: 'Warning threshold of cluster service CPU utilization expressed in percent.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'CPU Utilization Warning Threshold'
            description: 'The maximum CPU utilization percentage before a warning is triggered.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VELOCLOUD.EDGE.DATA.TIMEOUT}'
          value: 15s
          description: 'Response timeout for API.'
          config:
            type: TEXT
            priority: '8'
            label: 'API timeout'
            description: 'Response timeout for the API (e.g., 15s). In the range from 1 to 60 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VELOCLOUD.EDGE.FREQUENCY}'
          value: 15m
          description: 'Update interval for raw item collection.'
          config:
            type: TEXT
            priority: '7'
            label: 'Update interval'
            description: 'Update interval for raw item (e.g., 1h).'
        - macro: '{$VELOCLOUD.EDGE.ID}'
          description: 'SD-WAN Edge ID.'
          config:
            type: TEXT
            priority: '4'
            label: 'Edge ID'
            description: 'VeloCloud SD-WAN Edge ID.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VELOCLOUD.EDGE.MEMORY.UTIL.WARN}'
          value: '70'
          description: 'Warning threshold of cluster memory utilization expressed in percent.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Memory Utilization Warning Threshold'
            description: 'The maximum memory utilization percentage before a warning is triggered.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VELOCLOUD.ENTERPRISE.ID}'
          description: 'VeloCloud SD-WAN Enterprise ID. Specify a single Enterprise ID (requires READ EDGE privileges). By default parameter is empty, data will be retrieved for all Enterprises (privileges required: READ ENTERPRISE and READ EDGE).'
          config:
            type: TEXT
            priority: '3'
            label: 'Enterprise ID'
            description: 'VeloCloud SD-WAN Enterprise ID.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$VELOCLOUD.LLD.LINKS.NAME.FILTER.MATCHES}'
          value: '.*'
          description: 'Filter for discoverable links.'
          config:
            type: TEXT
            priority: '9'
            section_name: 'Discovery filters'
            label: 'links name matches'
            description: 'Regex to match links names.'
        - macro: '{$VELOCLOUD.LLD.LINKS.NAME.FILTER.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered links.'
          config:
            type: TEXT
            priority: '10'
            section_name: 'Discovery filters'
            label: 'Links name not matches'
            description: 'A regex to exclude certain links names from discovery.'
        - macro: '{$VELOCLOUD.TOKEN}'
          type: SECRET_TEXT
          description: 'VeloCloud SD-WAN Orchestrator API token.'
          config:
            type: TEXT
            priority: '1'
            label: 'API token'
            description: 'VeloCloud SD-WAN Orchestrator API token.'
            required: 'YES'
        - macro: '{$VELOCLOUD.URL}'
          description: 'VeloCloud SD-WAN Orchestrator URL, e.g., `vco.velocloud.net`.'
          config:
            type: TEXT
            priority: '2'
            label: 'API URL'
            description: 'VeloCloud SD-WAN Orchestrator API URL. Format example: `vco.velocloud.net`'
            required: 'YES'
      dashboards:
        - uuid: e286e61fd48b42e0b2cc10375f947966
          name: 'VeloCloud: General'
          pages:
            - name: Overview
              widgets:
                - type: item
                  width: '14'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN Edge by HTTP'
                        key: velocloud.edge.activation
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: gauge
                  name: 'CPU usage'
                  'y': '4'
                  width: '14'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: angle
                      value: '270'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN Edge by HTTP'
                        key: velocloud.edge.cpu.usage
                    - type: INTEGER
                      name: show.0
                      value: '3'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: show.3
                      value: '5'
                    - type: STRING
                      name: thresholds.0.color
                      value: 2196F3
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF8000
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '60'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '80'
                    - type: INTEGER
                      name: th_arc_size
                      value: '20'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: units_bold
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: INTEGER
                      name: value_size
                      value: '20'
                - type: gauge
                  name: 'Memory usage'
                  'y': '9'
                  width: '14'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: angle
                      value: '270'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN Edge by HTTP'
                        key: velocloud.edge.memory.usage
                    - type: INTEGER
                      name: show.0
                      value: '3'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: show.3
                      value: '5'
                    - type: STRING
                      name: thresholds.0.color
                      value: 9CCC65
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FF8000
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '60'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '80'
                    - type: INTEGER
                      name: th_arc_size
                      value: '20'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: units_bold
                      value: '1'
                    - type: INTEGER
                      name: units_size
                      value: '20'
                    - type: INTEGER
                      name: value_bold
                      value: '1'
                    - type: INTEGER
                      name: value_size
                      value: '20'
                - type: geomap
                  name: 'Edge geo'
                  'y': '14'
                  width: '72'
                  height: '7'
                  fields:
                    - type: STRING
                      name: default_view
                      value: '40.6892494,-74.0466891,10'
                    - type: STRING
                      name: reference
                      value: FZFLX
                - type: item
                  x: '14'
                  width: '14'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN Edge by HTTP'
                        key: velocloud.edge.ha_state
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: show.1
                      value: '4'
                    - type: INTEGER
                      name: value_size
                      value: '15'
                - type: svggraph
                  name: 'Best latency sent'
                  x: '14'
                  'y': '4'
                  width: '58'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 388E3C
                    - type: STRING
                      name: ds.0.items.0
                      value: '*Best latency tx, ms'
                    - type: STRING
                      name: reference
                      value: FDBBC
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Best latency received'
                  x: '14'
                  'y': '9'
                  width: '58'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 1565C0
                    - type: STRING
                      name: ds.0.items.0
                      value: '*Best latency rx, ms'
                    - type: STRING
                      name: reference
                      value: XMHZG
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: item
                  x: '28'
                  width: '14'
                  height: '4'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN Edge by HTTP'
                        key: velocloud.edge.model
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: value_size
                      value: '20'
                - type: item
                  x: '42'
                  width: '14'
                  height: '4'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN Edge by HTTP'
                        key: velocloud.edge.software_version
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: value_size
                      value: '20'
                - type: item
                  x: '56'
                  width: '16'
                  height: '4'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'VeloCloud SD-WAN Edge by HTTP'
                        key: velocloud.edge.system_uptime
                    - type: INTEGER
                      name: show.0
                      value: '2'
                    - type: INTEGER
                      name: value_size
                      value: '20'
            - name: Links
              widgets:
                - type: svggraph
                  name: 'Output packets'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 5E35B1
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Link *: Packets out'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '4'
                    - type: STRING
                      name: reference
                      value: FFCAF
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Best loss tx'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '795548'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Link *: Best loss tx, %'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: FCDDA
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Incoming traffic'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 78909C
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Link *: Bytes in'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: FEECA
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Input packets'
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 0D47A1
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Link *: Packets in'
                    - type: INTEGER
                      name: legend_lines
                      value: '4'
                    - type: STRING
                      name: reference
                      value: AEBCF
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Best loss rx'
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: AC3C00
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Link *: Best loss rx, %'
                    - type: STRING
                      name: reference
                      value: ACDAE
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Outgoing traffic'
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 9575CD
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Link *: Bytes out'
                    - type: STRING
                      name: reference
                      value: AEBFA
                    - type: INTEGER
                      name: righty
                      value: '0'
            - name: 'SD-WAN peers'
              widgets:
                - type: honeycomb
                  name: 'Stable path'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'SD-WAN Peer [*]:[*]: Stable path'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: STRING
                      name: reference
                      value: YWRAS
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Unstable path'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'SD-WAN Peer [*]:[*]: Unstable path'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AGOOH
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Unknown path'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'SD-WAN Peer [*]:[*]: Unknown path'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: ACDEB
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Standby path'
                  x: '36'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'SD-WAN Peer [*]:[*]: Standby path'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: STRING
                      name: reference
                      value: XGHBR
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Dead path'
                  x: '36'
                  'y': '4'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'SD-WAN Peer [*]:[*]: Dead path'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: CBFDD
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: honeycomb
                  name: 'Total path'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '4'
                  fields:
                    - type: STRING
                      name: items.0
                      value: 'SD-WAN Peer [*]:[*]: Total path'
                    - type: STRING
                      name: primary_label
                      value: '{ITEM.NAME}'
                    - type: INTEGER
                      name: primary_label_bold
                      value: '1'
                    - type: STRING
                      name: reference
                      value: ABBEA
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
            - name: 'SD-WAN peers path'
              widgets:
                - type: svggraph
                  name: 'Output packets'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 5E35B1
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Path *: Packets out'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '4'
                    - type: STRING
                      name: reference
                      value: EBDDA
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Packet loss in'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '795548'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Path *: Packet loss in'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: DBDFF
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Incoming traffic'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 78909C
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Path *: Bytes in'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: reference
                      value: CBDAC
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Input packets'
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 0D47A1
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Path *: Packets in'
                    - type: INTEGER
                      name: legend_lines
                      value: '4'
                    - type: STRING
                      name: reference
                      value: FDDAB
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Packet loss out'
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: AC3C00
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Path *: Packet loss out'
                    - type: STRING
                      name: reference
                      value: BFDDC
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Outgoing traffic'
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 9575CD
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Path *: Bytes out'
                    - type: STRING
                      name: reference
                      value: DCBAD
                    - type: INTEGER
                      name: righty
                      value: '0'
      valuemaps:
        - uuid: fb5c3e8c7565458b80e55f16c3e088d7
          name: 'Edge activation state'
          mappings:
            - value: '0'
              newvalue: PENDING
            - value: '1'
              newvalue: ACTIVATED
            - value: '10'
              newvalue: UNKNOWN
        - uuid: 017a5a34c8984720ae2032855255fb76
          name: 'Edge HA status'
          mappings:
            - value: '0'
              newvalue: UNCONFIGURED
            - value: '1'
              newvalue: READY
            - value: '2'
              newvalue: PENDING_INIT
            - value: '3'
              newvalue: FAILED
            - value: '10'
              newvalue: UNKNOWN
        - uuid: 1ca0e7345c1b4bfd89da2009cf81a6a8
          name: 'Edge states'
          mappings:
            - value: '0'
              newvalue: OFFLINE
            - value: '1'
              newvalue: CONNECTED
            - value: '2'
              newvalue: NEVER_ACTIVATED
            - value: '10'
              newvalue: UNKNOWN
        - uuid: 4233328ae66d4961ab1709bd9fbaa791
          name: 'Link states'
          mappings:
            - value: '0'
              newvalue: UNSTABLE
            - value: '1'
              newvalue: STABLE
            - value: '2'
              newvalue: DISCONNECTED
            - value: '10'
              newvalue: UNKNOWN
  triggers:
    - uuid: 9026e680b409424e8fa29934878cb771
      expression: '(last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.uptime[hrSystemUptime.0])>0 and last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.uptime[hrSystemUptime.0])<10m) or (last(/Cisco UCS Manager by SNMP/cisco.ucs.hw.uptime[hrSystemUptime.0])=0 and last(/Cisco UCS Manager by SNMP/cisco.ucs.net.uptime[sysUpTime.0])<10m)'
      name: 'Cisco UCS Manager: Host has been restarted'
      event_name: 'Cisco UCS Manager: {HOST.NAME} has been restarted (uptime < 10m)'
      priority: WARNING
      description: 'Uptime is less than 10 minutes.'
      manual_close: 'YES'
      dependencies:
        - name: 'Cisco UCS Manager: No SNMP data collection'
          expression: 'max(/Cisco UCS Manager by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0'
      tags:
        - tag: scope
          value: notice
  graphs:
    - uuid: 09e113216680490c9dd15805474bcac7
      name: 'Cloudflare: Bandwidth'
      graph_items:
        - color: 199C0D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.bandwidth.all
        - sortorder: '1'
          color: F63100
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.bandwidth.cached
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.bandwidth.uncached
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.bandwidth.ssl.encrypted
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.bandwidth.ssl.unencrypted
    - uuid: ed4ef5ce4a6a4c5692c22079d8879e0e
      name: 'Cloudflare: Caching'
      graph_items:
        - color: 199C0D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.cache_hit_ratio
        - sortorder: '1'
          color: F63100
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.bandwidth.cache_hit_ratio
    - uuid: 25df26cece41403d864f1ced5901bffa
      name: 'Cloudflare: DNS requests'
      graph_items:
        - color: 199C0D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.dns.query.all
        - sortorder: '1'
          color: F63100
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.dns.query.stale
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.dns.query.uncached
    - uuid: 3fb3b089a115420bbc051c14fcd2f3aa
      name: 'Cloudflare: HTTP response codes over time'
      graph_items:
        - color: 199C0D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.response_100
        - sortorder: '1'
          color: F63100
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.response_200
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.response_300
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.response_400
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.response_500
    - uuid: c9e1708427a84182a406faec327bb6f1
      name: 'Cloudflare: HTTP responses ratio over time'
      graph_items:
        - color: 199C0D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.others_ratio
        - sortorder: '1'
          color: F63100
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.success_ratio
    - uuid: 6a0da78eec23423ab084a0760f1691be
      name: 'Cloudflare: IPs and threats'
      graph_items:
        - color: 199C0D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.threats.all
        - sortorder: '1'
          color: F63100
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.uniques.all
    - uuid: 659df99629a341449c77baf7a9b99b77
      name: 'Cloudflare: Web requests'
      graph_items:
        - color: 199C0D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.all
        - sortorder: '1'
          color: F63100
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.cached
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.uncached
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.ssl.encrypted
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Cloudflare by HTTP'
            key: cloudflare.requests.ssl.unencrypted
    - uuid: 09fa360f516e4a8b84b88f0e503a806d
      name: 'Dell R660: CPU utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R660 by HTTP'
            key: dell.server.util.cpu
    - uuid: e232b8717dd745b99d49ce3a0f22825e
      name: 'Dell R660: IO utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R660 by HTTP'
            key: dell.server.util.io
    - uuid: f6b5a4da810742b3b1d8c77462483a10
      name: 'Dell R660: Memory utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R660 by HTTP'
            key: dell.server.util.mem
    - uuid: 82b7ad603aac49c4a952691f251bab87
      name: 'Dell R660: SYS utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R660 by HTTP'
            key: dell.server.util.sys
    - uuid: 62006f5c2fda42298fb59f3350693491
      name: 'Dell R740: CPU utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R740 by HTTP'
            key: dell.server.util.cpu
    - uuid: 23fa96d23e42490886045cd50d5295f3
      name: 'Dell R740: IO utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R740 by HTTP'
            key: dell.server.util.io
    - uuid: 1578ffaa25bf4906aaa27ae8b9d53b0c
      name: 'Dell R740: Memory utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R740 by HTTP'
            key: dell.server.util.mem
    - uuid: a80589e70f93461a92fc95a5708550c8
      name: 'Dell R740: SYS utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R740 by HTTP'
            key: dell.server.util.sys
    - uuid: f013dc8df1c14dd18d0bd4b5ba7107ea
      name: 'Dell R750: CPU utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R750 by HTTP'
            key: dell.server.util.cpu
    - uuid: c853ecbd5a094bdca722755f53530dcd
      name: 'Dell R750: IO utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R750 by HTTP'
            key: dell.server.util.io
    - uuid: f392e951f84d49d79a95203dcb708437
      name: 'Dell R750: Memory utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R750 by HTTP'
            key: dell.server.util.mem
    - uuid: d9218627e1174e698f1322c0cc0f5a5f
      name: 'Dell R750: SYS utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R750 by HTTP'
            key: dell.server.util.sys
    - uuid: a0444e242bcf432b9464d2fe8edbe9e3
      name: 'Dell R840: CPU utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R840 by HTTP'
            key: dell.server.util.cpu
    - uuid: 893045a4df4c44e6966833c8c5e2d05a
      name: 'Dell R840: IO utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R840 by HTTP'
            key: dell.server.util.io
    - uuid: 1ab63e40fcd54d22a96e1ba6ba7038e2
      name: 'Dell R840: Memory utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R840 by HTTP'
            key: dell.server.util.mem
    - uuid: ce878cd735004169938aefc97e4043aa
      name: 'Dell R840: SYS utilization'
      graph_items:
        - color: 199C0D
          item:
            host: 'DELL PowerEdge R840 by HTTP'
            key: dell.server.util.sys
    - uuid: 9530ea135466433cb25f73ed78960960
      name: 'F5 BIG-IP: TCP/UDP statistics'
      graph_items:
        - color: 199C0D
          item:
            host: 'F5 Big-IP by SNMP'
            key: bigip.tcp.open
        - sortorder: '1'
          color: F63100
          item:
            host: 'F5 Big-IP by SNMP'
            key: bigip.udp.open
        - sortorder: '2'
          color: 00611C
          item:
            host: 'F5 Big-IP by SNMP'
            key: bigip.tcp.close_wait
        - sortorder: '3'
          color: F7941D
          item:
            host: 'F5 Big-IP by SNMP'
            key: bigip.tcp.fin1_wait
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'F5 Big-IP by SNMP'
            key: bigip.tcp.fin2_wait
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'F5 Big-IP by SNMP'
            key: bigip.tcp.time_wait
