zabbix_export:
  version: '8.0'
  template_groups:
    - uuid: 748ad4d098d447d492bb935c907f652f
      name: Templates/Databases
    - uuid: 36bff6c29af64692839d077febfc7079
      name: 'Templates/Network devices'
    - uuid: 7c2cb727f85b492d88cd56e17127c64d
      name: Templates/SAN
  host_groups:
    - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
      name: Applications
    - uuid: 748ad4d098d447d492bb935c907f652f
      name: Databases
  templates:
    - uuid: 5c42de26643c4b43b23a11159df021ce
      template: 'Apache Cassandra by JMX'
      name: 'Apache Cassandra by JMX'
      description: |
        The template to monitor Apache Cassandra by Zabbix that work without any external scripts.
        It works with both standalone and cluster instances.
        The metrics are collected by JMX.
        You can set {$CASSANDRA.USER} and {$CASSANDRA.PASSWORD} macros in the template for using on the host level.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/410057-discussion-thread-for-official-zabbix-template-apache-cassandra
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        This template works with standalone and cluster instances.
        Metrics are collected by JMX.
        
        1. Enable and configure JMX access to Apache cassandra.
         See documentation for [instructions](https://cassandra.apache.org/doc/latest/operating/security.html#jmx-access).
        2. Set the user name and password in host wizard configuration fields `Username` and `Password`.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Databases
      items:
        - uuid: 147ba5946b994324b1f6d88a8d3b6541
          name: 'Cluster - Name'
          type: JMX
          key: 'jmx["org.apache.cassandra.db:type=StorageService","ClusterName"]'
          value_type: CHAR
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cluster
        - uuid: 1bd80c1ce70045cbadf60ee06a09a989
          name: Version
          type: JMX
          key: 'jmx["org.apache.cassandra.db:type=StorageService","ReleaseVersion"]'
          value_type: CHAR
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 855abdc321c74b6baf672c67f6483c1c
              expression: 'last(/Apache Cassandra by JMX/jmx["org.apache.cassandra.db:type=StorageService","ReleaseVersion"],#1)<>last(/Apache Cassandra by JMX/jmx["org.apache.cassandra.db:type=StorageService","ReleaseVersion"],#2) and length(last(/Apache Cassandra by JMX/jmx["org.apache.cassandra.db:type=StorageService","ReleaseVersion"]))>0'
              name: 'Apache Cassandra: Version has changed'
              event_name: 'Apache Cassandra: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'Cassandra version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: b202aa02d0b74e8da321a2a19fe33880
          name: 'Compaction - Number of completed tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=CompletedTasks,type=Compaction","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of completed compactions since server [re]start.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: compactions
        - uuid: 7176e7e8241648d1b7e81a0b4d2d329c
          name: 'Commitlog - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=PendingTasks,type=CommitLog","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of commit log messages written but yet to be fsync''d.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: commitlog
        - uuid: 6e4ad2b5249c465894b87006a38b9542
          name: 'Latency - Read median'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=ReadLatency,type=Table","50thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Latency read from disk in milliseconds - median.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: disk
        - uuid: a8b0499f15a74102b6ca486dee07e99b
          name: 'Latency - Read 75 percentile'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=ReadLatency,type=Table","75thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Latency read from disk in milliseconds - p75.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: disk
        - uuid: 5e3a95a9119149889365691d932b8407
          name: 'Latency - Read 95 percentile'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=ReadLatency,type=Table","95thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Latency read from disk in milliseconds - p95.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: disk
        - uuid: 70eebcf7274942eeae0a80911b7c9095
          name: 'Commitlog - Total size'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=TotalCommitLogSize,type=CommitLog","Value"]'
          units: B
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Current size, in bytes, used by all the commit log segments.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: commitlog
        - uuid: 24e44d0bf8254131a032406ffad86732
          name: 'Compaction - Total compactions completed'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=TotalCompactionsCompleted,type=Compaction","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Throughput of completed compactions since server [re]start.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: compactions
        - uuid: 31ccd8b50bcb412893e91accb853d755
          name: 'Latency - Write median'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=WriteLatency,type=Table","50thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Latency write to disk in milliseconds - median.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: disk
        - uuid: 8f0aa624a54d45f5b6c8ead24694fc58
          name: 'Latency - Write 75 percentile'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=WriteLatency,type=Table","75thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Latency write to disk in milliseconds - p75.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: disk
        - uuid: cc084d0142a94262b585d6b4a7b06468
          name: 'Latency - Write 95 percentile'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:name=WriteLatency,type=Table","95thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Latency write to disk in milliseconds - p95.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: disk
        - uuid: 934eb483047649449bfa221e3cc610d3
          name: 'KeyCache - Capacity'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Capacity","Value"]'
          units: B
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Cache capacity in bytes.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cache
        - uuid: c4f8435dfef0426682781711addbf075
          name: 'KeyCache - Entries'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Entries","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Total number of cache entries.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cache
        - uuid: b3351f07502d4cb8a16d4fa730a72a6a
          name: 'KeyCache - HitRate'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=HitRate","Value"]'
          value_type: FLOAT
          units: '%'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'All time cache hit rate.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '100'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cache
        - uuid: 3980ae66ea1b415baa24078d26ebeaee
          name: 'KeyCache - Hits per second'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Hits","Count"]'
          value_type: FLOAT
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Rate of cache hits.'
          preprocessing:
            - type: CHANGE_PER_SECOND
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cache
        - uuid: 6f6980f9267b4bef93e3a37153ef2184
          name: 'KeyCache - requests per second'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Requests","Count"]'
          value_type: FLOAT
          units: rps
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Rate of cache requests.'
          preprocessing:
            - type: CHANGE_PER_SECOND
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cache
        - uuid: f8fed6058d4b45a7afcaf5a057622c19
          name: 'KeyCache - Size'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Size","Value"]'
          units: B
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Total size of occupied cache, in bytes.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cache
        - uuid: 574ff464fe6b43cfb1d07e4ad1383c33
          name: 'Client connections - Native'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Client,name=connectedNativeClients","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of clients connected to this nodes native protocol server.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: connections
        - uuid: 15d5bd0e534246a7922f8dbcc2a96a21
          name: 'Client connections - Trifts'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Client,name=connectedThriftClients","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of connected to this nodes thrift clients.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: connections
        - uuid: 6c1cf4b7835d4c66ac1e42840199594c
          name: 'Latency - Client request read median'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency","50thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Total latency serving data to clients in milliseconds - median.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: c0606810baad4e438f6d69508cf11581
          name: 'Latency - Client request read 75 percentile'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency","75thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Total latency serving data to clients in milliseconds - p75.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: 4ed583b0546c4897b9ff423e36097046
          name: 'Latency - Client request read 95 percentile'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency","95thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Total latency serving data to clients in milliseconds - p95.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: 4f68953ebaca4d089a11c78e04c9170f
          name: 'Client request - Read per second'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency","Count"]'
          value_type: FLOAT
          units: rps
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'The number of client requests per second.'
          preprocessing:
            - type: CHANGE_PER_SECOND
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: 72cdc0188682483d8c1d837f2c9c475b
          name: 'Latency - Client request write median'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency","50thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Total latency serving write requests from clients in milliseconds - median.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: a63545e0bf8d4c87818fe719c299b508
          name: 'Latency - Client request write 75 percentile'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency","75thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Total latency serving write requests from clients in milliseconds - p75.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: 955f1f2615a14694bb20eedd07963ada
          name: 'Latency - Client request write 95 percentile'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency","95thPercentile"]'
          value_type: FLOAT
          units: ms
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Total latency serving write requests from clients in milliseconds - p95.'
          preprocessing:
            - type: MULTIPLIER
              parameters:
                - '0.001'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: d914d6cd66ad48d09197a30819a386f9
          name: 'Client request - Write per second'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency","Count"]'
          value_type: FLOAT
          units: rps
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'The number of local write requests per second.'
          preprocessing:
            - type: CHANGE_PER_SECOND
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: 30b3ba5b576045dabda9b3a0914a1dc6
          name: 'Client request - Write Timeouts'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Timeouts","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of write requests timeouts encountered.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: requests
        - uuid: e55942a9ef3c41e8993e8c8d849ff026
          name: 'Compaction - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Compaction,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Estimated number of compactions remaining to perform.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: compactions
          triggers:
            - uuid: 885035b2fc804615a54bf2eaca19beee
              expression: 'min(/Apache Cassandra by JMX/jmx["org.apache.cassandra.metrics:type=Compaction,name=PendingTasks","Value"],15m)>{$CASSANDRA.PENDING_TASKS.MAX.WARN}'
              name: 'Apache Cassandra: Many pending tasks'
              event_name: 'Apache Cassandra: Many pending tasks (over {$CASSANDRA.PENDING_TASKS.MAX.WARN} for 15m)'
              priority: WARNING
              dependencies:
                - name: 'Apache Cassandra: Too many pending tasks'
                  expression: 'min(/Apache Cassandra by JMX/jmx["org.apache.cassandra.metrics:type=Compaction,name=PendingTasks","Value"],15m)>{$CASSANDRA.PENDING_TASKS.MAX.HIGH}'
              tags:
                - tag: scope
                  value: performance
            - uuid: f6696c41e9d24144a1a95f74c94728ae
              expression: 'min(/Apache Cassandra by JMX/jmx["org.apache.cassandra.metrics:type=Compaction,name=PendingTasks","Value"],15m)>{$CASSANDRA.PENDING_TASKS.MAX.HIGH}'
              name: 'Apache Cassandra: Too many pending tasks'
              event_name: 'Apache Cassandra: Too many pending tasks (over {$CASSANDRA.PENDING_TASKS.MAX.HIGH} for 15m)'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: performance
        - uuid: f4686c81fe1b42c2bbe049ec421b4533
          name: 'Dropped messages - Write (Mutation)'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=DroppedMessage,scope=MUTATION,name=Dropped","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of dropped regular writes messages.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: messages
        - uuid: 2001c9fa67bc4ec4b693d289edc38cfa
          name: 'Dropped messages - Read'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=DroppedMessage,scope=READ,name=Dropped","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of dropped regular reads messages.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: messages
        - uuid: b15aa6f290d14fd1bee094325c444e8b
          name: 'Storage - Errors'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Storage,name=Exceptions","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of internal exceptions caught. Under normal exceptions this should be zero.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: storage
          triggers:
            - uuid: c7980b33dc794a70a116bd12219f66c3
              expression: 'min(/Apache Cassandra by JMX/jmx["org.apache.cassandra.metrics:type=Storage,name=Exceptions","Count"],5m)>0'
              name: 'Apache Cassandra: Too many storage exceptions'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 31fabd5575074957946328b0257568c6
          name: 'Storage - Used (bytes)'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Storage,name=Load","Count"]'
          units: B
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Size, in bytes, of the on disk data size this node manages.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: storage
          triggers:
            - uuid: bda8e216175044ed829670b6bd272785
              expression: 'nodata(/Apache Cassandra by JMX/jmx["org.apache.cassandra.metrics:type=Storage,name=Load","Count"],15m)=1'
              name: 'Apache Cassandra: Failed to fetch info data'
              event_name: 'Apache Cassandra: Failed to fetch info data (or no data for 15m)'
              priority: WARNING
              description: 'Zabbix has not received data for items for the last 15 minutes'
              tags:
                - tag: scope
                  value: availability
        - uuid: 3e0332f3770046b5b3ba4216111f3b3f
          name: 'Storage - Hints'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=Storage,name=TotalHints","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: 'Number of hint messages written to this node since [re]start. Includes one entry for each host to be hinted per hint.'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: storage
        - uuid: 6c9721f341904c5abb4d4a4637f6c80c
          name: 'Thread pool HintsDispatcher - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=HintsDispatcher,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            HintsDispatcher: Performs hinted handoff.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 0efbb0ab0e3244428f5e5917fa73437c
          name: 'Thread pool HintsDispatcher - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=HintsDispatcher,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            HintsDispatcher: Performs hinted handoff.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 4eb4e405cc564c9c8a694f085b1905dd
          name: 'Thread pool HintsDispatcher - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=HintsDispatcher,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            HintsDispatcher: Performs hinted handoff.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 7fd397d3d09a494fb0032d97c93dc462
          name: 'Thread pool MemtableFlushWriter - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MemtableFlushWriter,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            MemtableFlushWriter: Writes memtables to disk.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: c0eaf8af68114b0eb1f16e7cb456a442
          name: 'Thread pool MemtableFlushWriter - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MemtableFlushWriter,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            MemtableFlushWriter: Writes memtables to disk.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 3e402261b410467cb177b3c02dd237f3
          name: 'Thread pool MemtableFlushWriter - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MemtableFlushWriter,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            MemtableFlushWriter: Writes memtables to disk.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 868e8d31c8424607a7f0aafd4eff46cf
          name: 'Thread pool MemtablePostFlush - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MemtablePostFlush,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            MemtablePostFlush: Cleans up commit log after memtable is written to disk.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 9ddfd1f388ed4c3a9e81558e626f9525
          name: 'Thread pool MemtablePostFlush - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MemtablePostFlush,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            MemtablePostFlush: Cleans up commit log after memtable is written to disk.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: e00f5f7ac9904ea4981c44a506005d62
          name: 'Thread pool MemtablePostFlush - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MemtablePostFlush,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            MemtablePostFlush: Cleans up commit log after memtable is written to disk.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 480f3d158c764cd3877e0b04189eb60c
          name: 'Thread pool MigrationStage - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MigrationStage,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            MigrationStage: Runs schema migrations.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: f9b504b8b9f34f70a15691a16ee69e39
          name: 'Thread pool MigrationStage - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MigrationStage,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            MigrationStage: Runs schema migrations.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 79bc07acfef846768a036243efd3d954
          name: 'Thread pool MigrationStage - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MigrationStage,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            MigrationStage: Runs schema migrations.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 94360cbf59cc4978ab64872f9d0a9100
          name: 'Thread pool MiscStage - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MiscStage,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            MiscStage: Miscellaneous tasks run here.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 0a0ee6e0a2de4da5acfa715959dbae9f
          name: 'Thread pool MiscStage - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MiscStage,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            MiscStage: Miscellaneous tasks run here.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 807494ed64b54f9a95961fa7031e7d7f
          name: 'Thread pool MiscStage - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=MiscStage,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            MiscStage: Miscellaneous tasks run here.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 18b83c6b48164e1f9b8f9ae6058da276
          name: 'Thread pool SecondaryIndexManagement - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=SecondaryIndexManagement,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            SecondaryIndexManagement: Performs updates to secondary indexes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 622728098a35433bb00b7ab1614665bc
          name: 'Thread pool SecondaryIndexManagement - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=SecondaryIndexManagement,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            SecondaryIndexManagement: Performs updates to secondary indexes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 0dbd7303e9a64bc581ef8c6619876d2b
          name: 'Thread pool SecondaryIndexManagement - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=internal,scope=SecondaryIndexManagement,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            SecondaryIndexManagement: Performs updates to secondary indexes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 1ff2b0f1c6a04cfca0d40a68c5a39476
          name: 'Thread pool CounterMutationStage - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=CounterMutationStage,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            CounterMutationStage: Responsible for counter writes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: b0cc87b96d0e4f3c8ff2023665d90379
          name: 'Thread pool CounterMutationStage - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=CounterMutationStage,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            CounterMutationStage: Responsible for counter writes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: ab2b8d88ecf54b028b88cd757581a419
          name: 'Thread pool CounterMutationStage - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=CounterMutationStage,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            CounterMutationStage: Responsible for counter writes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: ef7d71b026ec4e948acf8d7469b21ee2
          name: 'Thread pool MutationStage - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=MutationStage,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            MutationStage: Responsible for writes (exclude materialized and counter writes).
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: b2eb10fe498847c88b395013e4fb516c
          name: 'Thread pool.MutationStage - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=MutationStage,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            MutationStage: Responsible for writes (exclude materialized and counter writes).
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: c6e48ac0ece74e31803dd72310306330
          name: 'Thread pool MutationStage - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=MutationStage,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            MutationStage: Responsible for writes (exclude materialized and counter writes).
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: e588e58881b74123bfa6f2d5d948da93
          name: 'Thread pool ReadStage - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ReadStage,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            ReadStage: Local reads run on this thread pool.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 2770bde0ee834ddebcd773e265fa0aef
          name: 'Thread pool ReadStage - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ReadStage,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            ReadStage: Local reads run on this thread pool.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 9d9b20c6994c40849048cb5d0fe407ad
          name: 'Thread pool ReadStage - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ReadStage,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            ReadStage: Local reads run on this thread pool.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 49df0b39c6a944d5ab96a946b233c380
          name: 'Thread pool ViewMutationStage - Currently blocked task'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ViewMutationStage,name=CurrentlyBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that are currently blocked due to queue saturation but on retry will become unblocked.
            ViewMutationStage: Responsible for materialized view writes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 967065e24d2c44be96687cd829ea928c
          name: 'Thread pool ViewMutationStage - Pending tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ViewMutationStage,name=PendingTasks","Value"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of queued tasks queued up on this pool.
            ViewMutationStage: Responsible for materialized view writes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: 5e6719076bbd46f78d3fb9b625a0cdda
          name: 'Thread pool ViewMutationStage - Total blocked tasks'
          type: JMX
          key: 'jmx["org.apache.cassandra.metrics:type=ThreadPools,path=request,scope=ViewMutationStage,name=TotalBlockedTasks","Count"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          description: |
            Number of tasks that were blocked due to queue saturation.
            ViewMutationStage: Responsible for materialized view writes.
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: thread-pools
        - uuid: f131a5faad964307aa860e3932ba781d
          name: 'Cluster - Nodes down'
          type: JMX
          key: 'jmx["org.apache.cassandra.net:type=FailureDetector","DownEndpointCount"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cluster
          triggers:
            - uuid: 42b527f9cf4e444b82575f2ab48926c0
              expression: 'last(/Apache Cassandra by JMX/jmx["org.apache.cassandra.net:type=FailureDetector","DownEndpointCount"])>0'
              name: 'Apache Cassandra: There are down nodes in cluster'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: availability
        - uuid: fb35aef03e254d98a3d29e8180a1a5a5
          name: 'Cluster - Nodes up'
          type: JMX
          key: 'jmx["org.apache.cassandra.net:type=FailureDetector","UpEndpointCount"]'
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
          tags:
            - tag: component
              value: cluster
      discovery_rules:
        - uuid: 504e40d04a024249bfd4ac67891f8a21
          name: Tables
          type: JMX
          key: 'jmx.discovery[beans,"org.apache.cassandra.metrics:type=Table,keyspace=*,scope=*,name=ReadLatency"]'
          delay: 1h
          username: '{$CASSANDRA.USER}'
          password: '{$CASSANDRA.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#JMXKEYSPACE}'
                value: '{$CASSANDRA.KEY_SPACE.MATCHES}'
              - macro: '{#JMXKEYSPACE}'
                value: '{$CASSANDRA.KEY_SPACE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Info about keyspaces and tables'
          item_prototypes:
            - uuid: 22c24ee8cfd34623b137c6cad5a2299d
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Bloom filter false ratio'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=BloomFilterFalseRatio","Value"]'
              value_type: FLOAT
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The ratio of Bloom filter false positives to total checks.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 417a27c1779a4d08b5673320b1542ad8
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Bytes flushed'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=BytesFlushed","Count"]'
              units: B
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The amount of data that was flushed since (re)start.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: b6623ca2ba0c4dd9ad2be5fa263896f5
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Col update time delta75 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=ColUpdateTimeDeltaHistogram","75thPercentile"]'
              value_type: FLOAT
              units: ms
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The column update time delta - p75.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 685e1bbe10044d9d9ae2b02357ba2934
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Col update time delta 95 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=ColUpdateTimeDeltaHistogram","95thPercentile"]'
              value_type: FLOAT
              units: ms
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The column update time delta - p95.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 71b3b14f8ce7414786fa0bcd471e8842
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Compaction bytes written'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=CompactionBytesWritten","Count"]'
              value_type: FLOAT
              units: B
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The amount of data that was compacted since (re)start.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 9721c8cd9d0f415d9d5ddfeb417cee01
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Compression ratio'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=CompressionRatio","Value"]'
              value_type: FLOAT
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The compression ratio for all SSTables.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: b43134f2d2a043f2a61919467619efe2
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: KeyCache hit rate'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=KeyCacheHitRate","Value"]'
              value_type: FLOAT
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The key cache hit rate.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: b69ac0bb285a4e8fa82a98f4de2645d2
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Live disk space used'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=LiveDiskSpaceUsed","Count"]'
              units: B
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The disk space used by "live" SSTables (only counts in use files).'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: bf733ba7ab2045d38a88c6f0650ba1f2
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Live SS Table'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=LiveSSTableCount","Value"]'
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'Number of "live" (in use) SSTables.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: c447d219390a48f2bbbe0d19211472c8
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Max partition size'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=MaxPartitionSize","Value"]'
              units: B
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The size of the largest compacted partition.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: bdf111fbca884f49a6cda263b8b07feb
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Mean partition size'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=MeanPartitionSize","Value"]'
              units: B
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The average size of compacted partition.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 1f44ed6c453d44fc811ae310701df4bf
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Pending compactions'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=PendingCompactions","Value"]'
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of pending compactions.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 7e287e5459644536b9420263b4096dd1
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Pending flushes'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=PendingFlushes","Count"]'
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of pending flushes.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 1d240e1fe4b245b0b1b2b30d42e5077e
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Read latency 75 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=ReadLatency","75thPercentile"]'
              value_type: FLOAT
              units: ms
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'Latency read from disk in milliseconds.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 38d31a8a16f04c39a64ee36940ae7eb8
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Read latency 95 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=ReadLatency","95thPercentile"]'
              value_type: FLOAT
              units: ms
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'Latency read from disk in milliseconds.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: fdec15a1f86b4943bbd72fb992dfce90
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Read per second'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=ReadLatency","Count"]'
              value_type: FLOAT
              units: rps
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of client requests per second.'
              preprocessing:
                - type: CHANGE_PER_SECOND
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: a73d2b8f38184698a3ab7a4bb3742b4a
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Row cache hits'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=RowCacheHit","Count"]'
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of row cache hits.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 213ecd18728a40ffbdbeac07daf0e26f
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Out of row cache hits'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=RowCacheHitOutOfRange","Count"]'
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of row cache hits that do not satisfy the query filter and went to disk.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 32df58c8fa3a4ad3ba2e70fc056895ad
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Row cache misses'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=RowCacheMiss","Count"]'
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of table row cache misses.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 529e7683300b4fe9bb46e3f9ed8a9552
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Snapshots size'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=SnapshotsSize","Value"]'
              units: B
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The disk space truly used by snapshots.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 53e4852850a74163ad797969d3366eb0
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: SS Tables per read 75 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=SSTablesPerReadHistogram","75thPercentile"]'
              value_type: FLOAT
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of SSTable data files accessed per read - p75.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 187487b9d35444da989f9e0e3814798a
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: SS Tables per read 95 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=SSTablesPerReadHistogram","95thPercentile"]'
              value_type: FLOAT
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of SSTable data files accessed per read - p95.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 592bde2f9eb24d7e80b45f3db965b2e0
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Tombstone scanned 75 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=TombstoneScannedHistogram","75thPercentile"]'
              value_type: FLOAT
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'Number of tombstones scanned per read - p75.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 70fedfc2310e4eb19195da72c9ada63d
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Tombstone scanned 95 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=TombstoneScannedHistogram","95thPercentile"]'
              value_type: FLOAT
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'Number of tombstones scanned per read - p95.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: a20ace3047bd4a238644dbc55d2f8fed
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Disk space used'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=TotalDiskSpaceUsed","Count"]'
              units: B
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'Disk space used.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: b599e354a5ee417cb056dea424a5792d
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Waiting on free memtable space 75 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=WaitingOnFreeMemtableSpace","75thPercentile"]'
              value_type: FLOAT
              units: ms
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The time spent waiting for free memtable space either on- or off-heap - p75.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: af19509867e54f19a64a4b66d054e0cf
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Waiting on free memtable space95 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=WaitingOnFreeMemtableSpace","95thPercentile"]'
              value_type: FLOAT
              units: ms
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The time spent waiting for free memtable space either on- or off-heap - p95.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 141b38b299e14068abc0c175ae4023e6
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Write latency 75 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=WriteLatency","75thPercentile"]'
              value_type: FLOAT
              units: ms
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'Latency write to disk in milliseconds.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: 8d79071ab7ad49c483efbb7503a4b308
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Write latency 95 percentile'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=WriteLatency","95thPercentile"]'
              value_type: FLOAT
              units: ms
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'Latency write to disk in milliseconds.'
              preprocessing:
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
            - uuid: c1a9748ab9824626b9a59c323aff9a3d
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Write per second'
              type: JMX
              key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=WriteLatency","Count"]'
              value_type: FLOAT
              units: rps
              username: '{$CASSANDRA.USER}'
              password: '{$CASSANDRA.PASSWORD}'
              description: 'The number of local write requests per second.'
              preprocessing:
                - type: CHANGE_PER_SECOND
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                - tag: component
                  value: tables
                - tag: keyspace
                  value: '{#JMXKEYSPACE}'
                - tag: table
                  value: '{#JMXSCOPE}'
          graph_prototypes:
            - uuid: 5e293f31be1e46e2ac406afda9ba4d95
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Read\Write latency'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Apache Cassandra by JMX'
                    key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=ReadLatency","75thPercentile"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Apache Cassandra by JMX'
                    key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=ReadLatency","95thPercentile"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Apache Cassandra by JMX'
                    key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=WriteLatency","75thPercentile"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'Apache Cassandra by JMX'
                    key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=WriteLatency","95thPercentile"]'
            - uuid: 1db58a329f9c4306921fbeb6a089cfcf
              name: '{#JMXKEYSPACE}.{#JMXSCOPE}: Requests rate'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Apache Cassandra by JMX'
                    key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=WriteLatency","Count"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Apache Cassandra by JMX'
                    key: 'jmx["org.apache.cassandra.metrics:type=Table,keyspace={#JMXKEYSPACE},scope={#JMXSCOPE},name=ReadLatency","Count"]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
      tags:
        - tag: class
          value: database
        - tag: subclass
          value: nosql
        - tag: target
          value: apache-cassandra
      macros:
        - macro: '{$CASSANDRA.KEY_SPACE.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable key spaces'
          config:
            type: TEXT
            priority: '3'
            section_name: Filters
            label: 'Key space filter (include)'
            description: 'Filter of discoverable key spaces'
        - macro: '{$CASSANDRA.KEY_SPACE.NOT_MATCHES}'
          value: (system|system_auth|system_distributed|system_schema)
          description: 'Filter to exclude discovered key spaces'
          config:
            type: TEXT
            priority: '4'
            section_name: Filters
            label: 'Key space filter (excldue)'
            description: 'Filter to exclude discovered key spaces'
        - macro: '{$CASSANDRA.PASSWORD}'
          value: zabbix
          config:
            type: TEXT
            priority: '2'
            label: Password
            required: 'YES'
        - macro: '{$CASSANDRA.PENDING_TASKS.MAX.HIGH}'
          value: '500'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Pending tasks high threshold'
        - macro: '{$CASSANDRA.PENDING_TASKS.MAX.WARN}'
          value: '350'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Pending tasks warning threshold'
        - macro: '{$CASSANDRA.USER}'
          value: zabbix
          config:
            type: TEXT
            priority: '1'
            label: Username
            required: 'YES'
      dashboards:
        - uuid: 5358e770431145fb8243033b44de8a72
          name: 'Apache Cassandra: Overview'
          pages:
            - name: General
              widgets:
                - type: graph
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache Cassandra by JMX'
                        name: 'Apache Cassandra: Nodes state'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache Cassandra by JMX'
                        name: 'Apache Cassandra: Dropped Messages'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache Cassandra by JMX'
                        name: 'Apache Cassandra: Client requests Read\Write latency'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  'y': '15'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache Cassandra by JMX'
                        name: 'Apache Cassandra: Client requests rate'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graph
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache Cassandra by JMX'
                        name: 'Apache Cassandra: Client connections'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache Cassandra by JMX'
                        name: 'Apache Cassandra: KeyCache Hit rate'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  x: '36'
                  'y': '10'
                  width: '36'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'Apache Cassandra by JMX'
                        name: 'Apache Cassandra: Tables Read\Write latency'
                    - type: STRING
                      name: reference
                      value: AAAAF
    - uuid: d38b271797bd41f2ad8c79d83b9d8d9c
      template: 'MongoDB cluster by Zabbix agent 2'
      name: 'MongoDB cluster by Zabbix agent 2'
      description: |
        Get MongoDB metrics from plugin for the zabbix-agent2.
          1. Setup and configure zabbix-agent2 compiled with the MongoDB monitoring plugin.
          2. Set the {$MONGODB.CONNSTRING} such as <protocol(host:port)> or named session.
          3. Set the user name and password in host macros ({$MONGODB.USER}, {$MONGODB.PASSWORD}) if you want to override parameters from the Zabbix agent configuration file.
        
          All sharded Mongodb nodes (mongod) will be discovered with attached template "MongoDB node".
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/420659-discussion-thread-for-official-zabbix-template-db-mongodb
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        The template to monitor MongoDB sharded cluster by Zabbix that work without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        `MongoDB cluster by Zabbix agent 2` — collects metrics from mongos proxy(router) by polling zabbix-agent2.
        
        ## Setup
        
        1. Setup and configure zabbix-agent2 compiled with the MongoDB monitoring plugin.
        2. Set the `Connection string` such as <protocol(host:port)> or named session of mongos proxy(router).
        3. Set the user name and password in host wizard configuration fields (`Username`, `Password`) if you want to override parameters from the Zabbix agent configuration file.
        
        **Note**, depending on the number of DBs and collections discovery operation may be expensive. Use filters with host wizard configuration fields `Databases filter (include)`, `Databases filter (exclude)`, `Collections filter (include)`, `Collections filter (exclude)`.
        
        All sharded Mongodb nodes (mongod) will be discovered with attached template "MongoDB node by Zabbix agent 2".
        
        
        Test availability: `zabbix_get -s mongos.node -k 'mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]"`
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Databases
      items:
        - uuid: 78db5504896649198605e140abb942be
          name: 'Configserver heartbeat'
          type: DEPENDENT
          key: mongodb.config_server_heartbeat
          units: s
          description: 'Difference between the latest optime of the CSRS primary that the mongos has seen and cluster time.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  data = JSON.parse(value);
                  return (data["$clusterTime"].clusterTime.T - data.sharding.lastSeenConfigServerOpTime.ts.T);
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: configserver
        - uuid: fccb23cdee01483cabe6ef14a532664b
          name: 'Connections, active'
          type: DEPENDENT
          key: mongodb.connections.active
          description: |
            The number of active client connections to the server.
            Active client connections refers to client connections that currently have operations in progress.
            Available starting in  4.0.7, 0 for older versions.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connections.active
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 1f881cbd515d462eb5839fe4e1e21ee1
          name: 'Connections, available'
          type: DEPENDENT
          key: mongodb.connections.available
          description: '"The number of unused incoming connections available."'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connections.available
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
          triggers:
            - uuid: eae86b6f98db49099259a466b78d1c59
              expression: 'max(/MongoDB cluster by Zabbix agent 2/mongodb.connections.available,5m)<{$MONGODB.CONNS.AVAILABLE.MIN.WARN}'
              name: 'MongoDB cluster: Available connections is low'
              event_name: 'MongoDB cluster: Available connections less then {$MONGODB.CONNS.AVAILABLE.MIN.WARN}'
              priority: WARNING
              description: |
                Too few available connections.
                Consider this value in combination with the value of connections current to understand the connection load on the database.
              tags:
                - tag: scope
                  value: capacity
        - uuid: 087d1a405b7a456692a52b0d20c43eb3
          name: 'Connections, current'
          type: DEPENDENT
          key: mongodb.connections.current
          description: |
            The number of incoming connections from clients to the database server.
            This number includes the current shell session.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connections.current
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 18ed07f0efb54f55970483d15613d320
          name: 'New connections, rate'
          type: DEPENDENT
          key: mongodb.connections.rate
          value_type: FLOAT
          description: '"Rate of all incoming connections created to the server."'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connections.totalCreated
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 281e5a1a19dc402a992331252b27ee63
          name: 'Connection pool: available'
          type: DEPENDENT
          key: mongodb.connection_pool.available
          description: 'The total number of available outgoing connections from the current mongos instance to other members of the sharded cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.totalAvailable
          master_item:
            key: 'mongodb.connpool.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 58522550e8bc4f479681d961ba789b92
          name: 'Connection pool: client connections'
          type: DEPENDENT
          key: mongodb.connection_pool.client
          description: 'The number of active and stored outgoing synchronous connections from the current mongos instance to other members of the sharded cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.numClientConnections
          master_item:
            key: 'mongodb.connpool.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 9b9d601d2d5c4d8da5d97c2785d8e0fa
          name: 'Connection pool: created, rate'
          type: DEPENDENT
          key: mongodb.connection_pool.created.rate
          value_type: FLOAT
          description: 'The total number of outgoing connections created per second by the current mongos instance to other members of the sharded cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.totalCreated
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.connpool.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 9394a15a25e342688335b7d83db25b2d
          name: 'Connection pool: in use'
          type: DEPENDENT
          key: mongodb.connection_pool.in_use
          description: 'Reports the total number of outgoing connections from the current mongos instance to other members of the sharded cluster set that are currently in use.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.totalInUse
          master_item:
            key: 'mongodb.connpool.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 22c66363ffae4ae2b436a26b8ecca3ab
          name: 'Connection pool: refreshing'
          type: DEPENDENT
          key: mongodb.connection_pool.refreshing
          description: 'Reports the total number of outgoing connections from the current mongos instance to other members of the sharded cluster that are currently being refreshed.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.totalRefreshing
          master_item:
            key: 'mongodb.connpool.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 55dbfe5d52c44954b9e5669a043f10b4
          name: 'Connection pool: scoped'
          type: DEPENDENT
          key: mongodb.connection_pool.scoped
          description: 'Number of active and stored outgoing scoped synchronous connections from the current mongos instance to other members of the sharded cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.numAScopedConnections
          master_item:
            key: 'mongodb.connpool.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: f34fcc3866b446748b7a8d11311edd82
          name: 'Get mongodb.connpool.stats'
          key: 'mongodb.connpool.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Returns current info about connpool.stats.'
          tags:
            - tag: component
              value: connections
            - tag: component
              value: raw
        - uuid: 22ca0c06006b49009f25fcd829f1b5bf
          name: 'Cursor: open pinned'
          type: DEPENDENT
          key: mongodb.cursor.open.pinned
          description: 'Number of pinned open cursors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.cursor.open.pinned
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: cursors
        - uuid: 45bfa997dab9498e8e3851de750e21a2
          name: 'Cursor: open total'
          type: DEPENDENT
          key: mongodb.cursor.open.total
          description: 'Number of cursors that MongoDB is maintaining for clients.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.cursor.open.total
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: cursors
          triggers:
            - uuid: 67db1f543818476ca0b07e2cc1709452
              expression: 'min(/MongoDB cluster by Zabbix agent 2/mongodb.cursor.open.total,5m)>{$MONGODB.CURSOR.OPEN.MAX.WARN}'
              name: 'MongoDB cluster: Too many cursors opened by MongoDB for clients'
              event_name: 'MongoDB cluster: Too many cursors opened by MongoDB for clients (over {$MONGODB.CURSOR.OPEN.MAX.WARN} in 5m)'
              priority: WARNING
              tags:
                - tag: scope
                  value: capacity
        - uuid: 5d3a3c724a6a45fb99a0af5330bf9cf2
          name: 'Cursor: timed out, rate'
          type: DEPENDENT
          key: mongodb.cursor.timed_out.rate
          value_type: FLOAT
          description: 'Number of cursors that time out, per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.cursor.timedOut
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: cursors
          triggers:
            - uuid: 5ea8cf9c955940a6a580cd6f4bb2cc78
              expression: 'min(/MongoDB cluster by Zabbix agent 2/mongodb.cursor.timed_out.rate,5m)>{$MONGODB.CURSOR.TIMEOUT.MAX.WARN}'
              name: 'MongoDB cluster: Too many cursors are timing out'
              event_name: 'MongoDB cluster: Too many cursors are timing out (over {$MONGODB.CURSOR.TIMEOUT.MAX.WARN} per second in 5m)'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 110685e463e141ca800b2638e3532d51
          name: 'Jumbo chunks'
          key: 'mongodb.jumbo_chunks.count["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          description: 'Total number of ''jumbo'' chunks in the mongo cluster.'
          tags:
            - tag: component
              value: application
        - uuid: fa28a98992e74cdf8c54b4faa01de89a
          name: 'Last seen configserver'
          type: DEPENDENT
          key: mongodb.last_seen_config_server
          units: unixtime
          description: 'The latest optime of the CSRS primary that the mongos has seen.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.sharding.lastSeenConfigServerOpTime.ts.T
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: configserver
        - uuid: df2423ff36e24357809c7a7211144898
          name: Architecture
          type: DEPENDENT
          key: mongodb.mem.bits
          units: bit
          description: 'A number, either 64 or 32, that indicates whether the MongoDB instance is compiled for 64-bit or 32-bit architecture.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.mem.bits
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: application
        - uuid: f6a06e0d7cf84cc1a40d8d2dcde7b01a
          name: 'Memory: resident'
          type: DEPENDENT
          key: mongodb.mem.resident
          units: B
          description: 'Amount of memory currently used by the database process.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.mem.resident
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: memory
        - uuid: 2c5548ae9c614efb81e58a2e4ec3d3e4
          name: 'Memory: virtual'
          type: DEPENDENT
          key: mongodb.mem.virtual
          units: B
          description: 'Amount of virtual memory used by the mongos process.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.mem.virtual
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: memory
        - uuid: 16925e0ca40747d1818e512962d31a83
          name: 'Cursor: open no timeout'
          type: DEPENDENT
          key: mongodb.metrics.cursor.open.no_timeout
          description: 'Number of open cursors with the option DBQuery.Option.noTimeout set to prevent timeout after a period of inactivity.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.cursor.open.noTimeout
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: cursors
        - uuid: 59481dcb9b5a487985297e2f41f72dd1
          name: 'Bytes in, rate'
          type: DEPENDENT
          key: mongodb.network.bytes_in.rate
          value_type: FLOAT
          description: 'The total number of bytes that the server has received over network connections initiated by clients or other mongod/mongos instances per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.network.bytesIn
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: network
        - uuid: 13cba18ba344440bba4371585fd8e4c0
          name: 'Bytes out, rate'
          type: DEPENDENT
          key: mongodb.network.bytes_out.rate
          value_type: FLOAT
          units: Bps
          description: 'The total number of bytes that the server has sent over network connections initiated by clients or other mongod/mongos instances per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.network.bytesOut
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: network
        - uuid: eb821875b59c4bf8bc98f9afec146e88
          name: 'Requests, rate'
          type: DEPENDENT
          key: mongodb.network.numRequests.rate
          value_type: FLOAT
          units: '!Rps'
          description: 'Number of distinct requests that the server has received per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.network.numRequests
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: network
        - uuid: b98fb6d98b9a4282ba0b2d9770722035
          name: 'Operations: command'
          type: DEPENDENT
          key: mongodb.opcounters.command.rate
          value_type: FLOAT
          description: |
            The number of commands issued to the database per second.
            Counts all commands except the write commands: insert, update, and delete.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.command
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: f4e917e9cdd3439abbe6ea7b9a9034b7
          name: 'Operations: delete'
          type: DEPENDENT
          key: mongodb.opcounters.delete.rate
          value_type: FLOAT
          description: 'The number of delete operations the mongos instance per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.delete
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 165d5a180ed541ba9a19916134962368
          name: 'Operations: getmore, rate'
          type: DEPENDENT
          key: mongodb.opcounters.getmore.rate
          value_type: FLOAT
          description: |
            The number of "getmore" operations the mongos per second. This counter can be high even if the query count is low.
            Secondary nodes send getMore operations as part of the replication process.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.getmore
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 021a00004efe434a9b2f316c0d25c175
          name: 'Operations: insert, rate'
          type: DEPENDENT
          key: mongodb.opcounters.insert.rate
          value_type: FLOAT
          description: 'The number of insert operations received the mongos instance per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.insert
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 0866b3b6bc1748a98e8bfd9308152304
          name: 'Operations: query, rate'
          type: DEPENDENT
          key: mongodb.opcounters.query.rate
          value_type: FLOAT
          description: 'The number of queries received the mongos instance per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.query
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 329e6d41de1c47dba8f3f9d287c93eda
          name: 'Operations: update, rate'
          type: DEPENDENT
          key: mongodb.opcounters.update.rate
          value_type: FLOAT
          description: 'The number of update operations the mongos instance per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.update
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: ff979eb9ba4a4420a753913df5431219
          name: Ping
          key: 'mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 30s
          description: 'Test if a connection is alive or not.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: cd74289970204ca281c5bc7d5c695e95
              expression: 'last(/MongoDB cluster by Zabbix agent 2/mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"])=0'
              name: 'MongoDB cluster: Connection to mongos proxy is unavailable'
              priority: HIGH
              description: 'Connection to mongos proxy instance is currently unavailable.'
              tags:
                - tag: scope
                  value: availability
        - uuid: b8c6dadff060447e9718b49fdc796d8d
          name: 'Get server status'
          key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'The mongos statistic'
          tags:
            - tag: component
              value: raw
        - uuid: e88da2ca6ccc4fdfa256fa51e050792d
          name: Uptime
          type: DEPENDENT
          key: mongodb.uptime
          units: s
          description: 'Number of seconds since the Mongos server start.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.uptime
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: ee70d6da232a4068b574c9c147c622c9
              expression: 'nodata(/MongoDB cluster by Zabbix agent 2/mongodb.uptime,10m)=1'
              name: 'MongoDB cluster: Failed to fetch info data'
              event_name: 'MongoDB cluster: Failed to fetch info data (or no data for 10m)'
              priority: WARNING
              description: 'Zabbix has not received data for items for the last 10 minutes'
              manual_close: 'YES'
              dependencies:
                - name: 'MongoDB cluster: Connection to mongos proxy is unavailable'
                  expression: 'last(/MongoDB cluster by Zabbix agent 2/mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"])=0'
              tags:
                - tag: scope
                  value: notice
            - uuid: 99ff438a7e3e4b0a8190b2ab9f41f076
              expression: 'last(/MongoDB cluster by Zabbix agent 2/mongodb.uptime)<10m'
              name: 'MongoDB cluster: Mongos server has been restarted'
              event_name: 'MongoDB cluster: Mongos server has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: dda1722d6e6b4189978fd44ace0f8f86
          name: 'Mongos version'
          type: DEPENDENT
          key: mongodb.version
          value_type: CHAR
          description: 'Version of the Mongos server'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 921ee489887943838d69558f103ad646
              expression: 'last(/MongoDB cluster by Zabbix agent 2/mongodb.version,#1)<>last(/MongoDB cluster by Zabbix agent 2/mongodb.version,#2) and length(last(/MongoDB cluster by Zabbix agent 2/mongodb.version))>0'
              name: 'MongoDB cluster: Version has changed'
              event_name: 'MongoDB cluster: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'MongoDB cluster version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: eb57a506cc5640a79e6df51179321ba0
          name: 'Config servers discovery'
          key: 'mongodb.cfg.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 30m
          description: 'Discovery shared cluster config servers.'
          host_prototypes:
            - uuid: 809db5d8d32a45898e8401f288a42fac
              host: '{#HOSTNAME}'
              name: '{#HOSTNAME}'
              group_links:
                - group:
                    name: Databases
              group_prototypes:
                - name: 'MongoDB sharded cluster/{#REPLICASET}'
              templates:
                - name: 'MongoDB node by Zabbix agent 2'
              macros:
                - macro: '{$MONGODB.CONNSTRING}'
                  value: '{#MONGOD_URI}'
                  description: 'Connection string in the URI format (password is not used).'
        - uuid: 61a19fbf4f9f4c2f9ad215b08d41e544
          name: 'Collection discovery'
          key: 'mongodb.collections.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 30m
          filter:
            evaltype: AND
            conditions:
              - macro: '{#COLLECTION}'
                value: '{$MONGODB.LLD.FILTER.COLLECTION.MATCHES}'
              - macro: '{#COLLECTION}'
                value: '{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#DBNAME}'
                value: '{$MONGODB.LLD.FILTER.DB.MATCHES}'
              - macro: '{#DBNAME}'
                value: '{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: |
            Collect collections metrics.
            Note, depending on the number of DBs and collections this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}.
          item_prototypes:
            - uuid: 253af5ef7858482fbeaa0c06c033b47a
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Objects, avg size'
              type: DEPENDENT
              key: 'mongodb.collection.avg_obj_size["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: B
              description: 'The size of the average object in the collection in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.avgObjSize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: objects
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 59465dc6e9384c7baf1a6239a6c66f0e
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Capped'
              type: DEPENDENT
              key: 'mongodb.collection.capped["{#DBNAME}","{#COLLECTION}"]'
              value_type: CHAR
              description: 'Whether or not the collection is capped.'
              valuemap:
                name: 'MongoDB flag'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capped
                - type: BOOL_TO_DECIMAL
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: application
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 03b8eb71502a4805902f7a5856e7c7b6
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Objects, count'
              type: DEPENDENT
              key: 'mongodb.collection.count["{#DBNAME}","{#COLLECTION}"]'
              description: 'Total number of objects in the collection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.count
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: objects
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 2a78fa441bef4523bd0fee4934fc7b55
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Capped, max number'
              type: DEPENDENT
              key: 'mongodb.collection.max["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'Maximum number of documents in a capped collection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.max
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: application
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 294985df777b42e0a56a229366bbac5d
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Capped, max size'
              type: DEPENDENT
              key: 'mongodb.collection.max_size["{#DBNAME}","{#COLLECTION}"]'
              units: B
              description: 'Maximum size of a capped collection in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.maxSize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 8da7cc960e8d42ccb3efe065fff5f0e9
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Indexes'
              type: DEPENDENT
              key: 'mongodb.collection.nindexes["{#DBNAME}","{#COLLECTION}"]'
              description: 'Total number of indices on the collection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.nindexes
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: application
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 191a21d9a1b94b238009e31433dbaa38
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Size'
              type: DEPENDENT
              key: 'mongodb.collection.size["{#DBNAME}","{#COLLECTION}"]'
              units: B
              description: 'The total size in bytes of the data in the collection plus the size of every indexes on the mongodb.collection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.size
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: aa964be0bc5c4318bc92c3192c269d8e
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Get collection stats {#DBNAME}.{#COLLECTION}'
              key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              history: '0'
              value_type: TEXT
              description: 'Returns a variety of storage statistics for a given collection.'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: raw
                - tag: database
                  value: '{#DBNAME}'
            - uuid: ef82b9f814cd4917b3714e73d7ac87ac
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Storage size'
              type: DEPENDENT
              key: 'mongodb.collection.storage_size["{#DBNAME}","{#COLLECTION}"]'
              units: B
              description: 'Total storage space allocated to this collection for document storage.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.storageSize
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
        - uuid: 25ece32c5f764461913f605ba3d7736a
          name: 'Database discovery'
          key: 'mongodb.db.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 30m
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DBNAME}'
                value: '{$MONGODB.LLD.FILTER.DB.MATCHES}'
              - macro: '{#DBNAME}'
                value: '{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: |
            Collect database metrics.
            Note, depending on the number of DBs this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}.
          item_prototypes:
            - uuid: 6dea9a371b94402aad9f8c6d7fcc5761
              name: 'MongoDB {#DBNAME}: Size, data'
              type: DEPENDENT
              key: 'mongodb.db.data_size["{#DBNAME}"]'
              units: B
              description: 'Total size of the data held in this database including the padding factor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.dataSize
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 98c9e25c24b146aeaec4953913bb720a
              name: 'MongoDB {#DBNAME}: Extents'
              type: DEPENDENT
              key: 'mongodb.db.extents["{#DBNAME}"]'
              description: 'Contains a count of the number of extents in the database across all collections.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.numExtents
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: collections
                - tag: database
                  value: '{#DBNAME}'
            - uuid: cfb3598af7f14911965d548ea815cb33
              name: 'MongoDB {#DBNAME}: Size, file'
              type: DEPENDENT
              key: 'mongodb.db.file_size["{#DBNAME}"]'
              units: B
              description: 'Total size of the data held in this database including the padding factor (only available with the mmapv1 storage engine).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.fileSize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 1716a51105f2415eb179a43022656e4a
              name: 'MongoDB {#DBNAME}: Size, index'
              type: DEPENDENT
              key: 'mongodb.db.index_size["{#DBNAME}"]'
              units: B
              description: 'Total size of all indexes created on this database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.indexSize
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: f28f2df7b1e64aea99b20ca8deda2a25
              name: 'MongoDB {#DBNAME}: Objects, count'
              type: DEPENDENT
              key: 'mongodb.db.objects["{#DBNAME}"]'
              description: 'Number of objects (documents) in the database across all collections.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.objects
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: objects
                - tag: database
                  value: '{#DBNAME}'
            - uuid: ed3076f82f494b6e953a9a5a3199df06
              name: 'MongoDB {#DBNAME}: Objects, avg size'
              type: DEPENDENT
              key: 'mongodb.db.size["{#DBNAME}"]'
              value_type: FLOAT
              units: B
              description: 'The average size of each document in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.avgObjSize
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: objects
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 7fbc424bca06451d9ed1fe689ea81bf9
              name: 'MongoDB {#DBNAME}: Get db stats {#DBNAME}'
              key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              history: '0'
              value_type: TEXT
              description: 'Returns statistics reflecting the database system''s state.'
              tags:
                - tag: component
                  value: database
                - tag: component
                  value: raw
                - tag: database
                  value: '{#DBNAME}'
            - uuid: ae54fbae851b4b5a949611420fbc8ce0
              name: 'MongoDB {#DBNAME}: Size, storage'
              type: DEPENDENT
              key: 'mongodb.db.storage_size["{#DBNAME}"]'
              units: B
              description: 'Total amount of space allocated to collections in this database for document storage.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.storageSize
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
          graph_prototypes:
            - uuid: 44e0e02d1e9a420b9dc917d8cf4bf983
              name: 'MongoDB {#DBNAME}: Disk usage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MongoDB cluster by Zabbix agent 2'
                    key: 'mongodb.db.index_size["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MongoDB cluster by Zabbix agent 2'
                    key: 'mongodb.db.storage_size["{#DBNAME}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'MongoDB cluster by Zabbix agent 2'
                    key: 'mongodb.db.file_size["{#DBNAME}"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'MongoDB cluster by Zabbix agent 2'
                    key: 'mongodb.db.data_size["{#DBNAME}"]'
        - uuid: a8bcea1509974c0f9d0051591e92cd5a
          name: 'Shards discovery'
          key: 'mongodb.sh.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 30m
          description: 'Discovery shared cluster hosts.'
          host_prototypes:
            - uuid: 3fcd3244b1234186bda9a35c8f61c850
              host: '{#HOSTNAME}'
              name: '{#HOSTNAME}'
              group_links:
                - group:
                    name: Databases
              group_prototypes:
                - name: 'MongoDB sharded cluster/{#ID}'
              templates:
                - name: 'MongoDB node by Zabbix agent 2'
              macros:
                - macro: '{$MONGODB.CONNSTRING}'
                  value: '{#MONGOD_URI}'
                  description: 'Connection string in the URI format (password is not used).'
      tags:
        - tag: class
          value: database
        - tag: subclass
          value: nosql
        - tag: target
          value: mongodb-cluster
      macros:
        - macro: '{$MONGODB.CONNS.AVAILABLE.MIN.WARN}'
          value: '1000'
          description: 'Minimum number of available connections'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Minimum available connections'
            description: 'Minimum number of available connections'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MONGODB.CONNSTRING}'
          value: 'tcp://localhost:27017'
          description: 'Connection string in the URI format (password is not used). This param overwrites a value configured in the "Server" option of the configuration file (if it''s set), otherwise, the plugin''s default value is used: "tcp://localhost:27017"'
          config:
            type: TEXT
            priority: '1'
            label: 'Connection string'
            description: 'Connection string in the URI format (password is not used). This param overwrites a value configured in the "Server" option of the configuration file (if it''s set), otherwise, the plugin''s default value is used: "tcp://localhost:27017"'
            required: 'YES'
        - macro: '{$MONGODB.CURSOR.OPEN.MAX.WARN}'
          value: '10000'
          description: 'Maximum number of open cursors'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Max open cursors'
            description: 'Maximum number of open cursors'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MONGODB.CURSOR.TIMEOUT.MAX.WARN}'
          value: '1'
          description: 'Maximum number of cursors timing out per second'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Max cursors timing out per second'
            description: 'Maximum number of cursors timing out per second'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MONGODB.LLD.FILTER.COLLECTION.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable collections'
          config:
            type: TEXT
            priority: '5'
            section_name: Filters
            label: 'Collections filter (include)'
            description: 'Filter of discoverable collections'
        - macro: '{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered collections'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Collections filter (exclude)'
            description: 'Filter to exclude discovered collections'
        - macro: '{$MONGODB.LLD.FILTER.DB.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable databases'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Databases filter (include)'
            description: 'Filter of discoverable databases'
        - macro: '{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}'
          value: (admin|config|local)
          description: 'Filter to exclude discovered databases'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Databases filter (exclude)'
            description: 'Filter to exclude discovered databases'
        - macro: '{$MONGODB.PASSWORD}'
          description: 'MongoDB user password'
          config:
            type: TEXT
            priority: '3'
            label: Password
            description: 'MongoDB user password'
            required: 'YES'
        - macro: '{$MONGODB.USER}'
          description: 'MongoDB username'
          config:
            type: TEXT
            priority: '2'
            label: Username
            description: 'MongoDB username'
            required: 'YES'
      dashboards:
        - uuid: b850d8e640bc4ce58a4aa4a2967c6ecf
          name: 'Cluster overview'
          pages:
            - name: General
              widgets:
                - type: graph
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB cluster by Zabbix agent 2'
                        name: 'MongoDB cluster: Connection pool'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB cluster by Zabbix agent 2'
                        name: 'MongoDB cluster: Connections'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB cluster by Zabbix agent 2'
                        name: 'MongoDB cluster: Cursors'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '15'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB cluster by Zabbix agent 2'
                        name: 'MongoDB cluster: Network'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  'y': '20'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB cluster by Zabbix agent 2'
                        name: 'MongoDB cluster: Operations rate'
                    - type: STRING
                      name: reference
                      value: AAAAE
            - name: Databases
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MongoDB cluster by Zabbix agent 2'
                        name: 'MongoDB {#DBNAME}: Disk usage'
                    - type: STRING
                      name: reference
                      value: AAAAF
      valuemaps:
        - uuid: 2014769595e34d4bb18dbcf4d9eaf112
          name: 'MongoDB flag'
          mappings:
            - value: '0'
              newvalue: 'False'
            - value: '1'
              newvalue: 'True'
        - uuid: 3cedce4712fa4a3eba63ccd7a790ecf6
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: 81aa8c5ab5594f77a2b26fb7f5094048
      template: 'MongoDB node by Zabbix agent 2'
      name: 'MongoDB node by Zabbix agent 2'
      description: |
        Get MongoDB metrics from plugin for the zabbix-agent2.
          1. Setup and configure zabbix-agent2 compiled with the MongoDB monitoring plugin.
          2. Set the {$MONGODB.CONNSTRING} such as <protocol(host:port)> or named session.
          3. Set the user name and password in host macros ({$MONGODB.USER}, {$MONGODB.PASSWORD}) if you want to override parameters from the Zabbix agent configuration file.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/420659-discussion-thread-for-official-zabbix-template-db-mongodb
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        The template to monitor single MongoDB server by Zabbix that work without any external scripts.
        Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
        
        `MongoDB node by Zabbix Agent 2` — collects metrics by polling zabbix-agent2.
        
        ## Setup
        
        1. Setup and configure zabbix-agent2 compiled with the MongoDB monitoring plugin.
        2. Set the `Connection string` such as <protocol(host:port)> or named session.
        3. Set the user name and password in host wizard configuration fields (`Username`, `Password`) if you want to override parameters from the Zabbix agent configuration file.
        
        **Note**, depending on the number of DBs and collections discovery operation may be expensive. Use filters with host wizard configuration fields `Databases filter (include)`, `Databases filter (exclude)`, `Collections filter (include)`, `Collections filter (exclude)`.
        
        Test availability: `zabbix_get -s mongodb.node -k 'mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]"`
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Databases
      items:
        - uuid: bfd58d9efaf54e038f96458f68fd48af
          name: 'Document: deleted, rate'
          type: DEPENDENT
          key: mongod.document.deleted.rate
          value_type: FLOAT
          description: 'Number of documents deleted per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.document.deleted
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: documents
        - uuid: 5ecc078aeda04e3ca34ed42d966cdf40
          name: 'Document: inserted, rate'
          type: DEPENDENT
          key: mongod.document.inserted.rate
          value_type: FLOAT
          description: 'Number of documents inserted per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.document.inserted
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: documents
        - uuid: 56fc9870503645069a9d937ac21ab7c2
          name: 'Document: returned, rate'
          type: DEPENDENT
          key: mongod.document.returned.rate
          value_type: FLOAT
          description: 'Number of documents returned by queries per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.document.returned
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: documents
        - uuid: d21a95f1862b4c17b5a4ed83a67ffb1b
          name: 'Document: updated, rate'
          type: DEPENDENT
          key: mongod.document.updated.rate
          value_type: FLOAT
          description: 'Number of documents updated per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.document.updated
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: documents
        - uuid: d5ec0427c5ca49119f6e94211b0297bf
          name: 'Active clients: readers'
          type: DEPENDENT
          key: mongodb.active_clients.readers
          description: 'The number of the active client connections performing read operations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.globalLock.activeClients.readers
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: clients
        - uuid: 1c2dc0b60eb44d259e02accf2531b389
          name: 'Active clients: total'
          type: DEPENDENT
          key: mongodb.active_clients.total
          description: 'The total number of internal client connections to the database including system threads as well as queued readers and writers.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.globalLock.activeClients.total
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: clients
        - uuid: 9c5512c83e1844c5b4fdb675336edbf6
          name: 'Active clients: writers'
          type: DEPENDENT
          key: mongodb.active_clients.writers
          description: 'The number of active client connections performing write operations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.globalLock.activeClients.writers
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: clients
        - uuid: 5e6fa5d1c9fc48ada6c0bc5c8d1d3ec4
          name: 'Asserts: message, rate'
          type: DEPENDENT
          key: mongodb.asserts.msg.rate
          value_type: FLOAT
          description: |
            The number of message assertions raised per second.
            Check the log file for more information about these messages.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.asserts.msg
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: asserts
        - uuid: 32d5177badac49eda8ce1f47c851ebf2
          name: 'Asserts: regular, rate'
          type: DEPENDENT
          key: mongodb.asserts.regular.rate
          value_type: FLOAT
          description: |
            The number of regular assertions raised per second.
            Check the log file for more information about these messages.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.asserts.regular
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: asserts
        - uuid: 67f2ef15386a47b6b88fc95dd7fe1be6
          name: 'Asserts: rollovers, rate'
          type: DEPENDENT
          key: mongodb.asserts.rollovers.rate
          value_type: FLOAT
          description: |
            Number of times that the rollover counters roll over per second.
            The counters rollover to zero every 2^30 assertions.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.asserts.rollovers
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: asserts
        - uuid: a7dfd56310d44d7dac1f3c02fa5fbc79
          name: 'Asserts: user, rate'
          type: DEPENDENT
          key: mongodb.asserts.user.rate
          value_type: FLOAT
          description: |
            The number of "user asserts" that have occurred per second.
            These are errors that user may generate, such as out of disk space or duplicate key.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.asserts.user
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: asserts
        - uuid: 41638aa2b3374e56ad00ef9113e1ea61
          name: 'Asserts: warning, rate'
          type: DEPENDENT
          key: mongodb.asserts.warning.rate
          value_type: FLOAT
          description: 'The number of warnings raised per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.asserts.warning
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: asserts
        - uuid: 46f0a53612de4448ab8e98098375656b
          name: 'Get collections usage stats'
          key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Returns usage statistics for each collection.'
          tags:
            - tag: component
              value: collections
            - tag: component
              value: raw
        - uuid: 6ce4b63c962646ef91e4a705a42f36de
          name: 'Connections, active'
          type: DEPENDENT
          key: mongodb.connections.active
          description: |
            The number of active client connections to the server.
            Active client connections refers to client connections that currently have operations in progress.
            Available starting in  4.0.7, 0 for older versions.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connections.active
              error_handler: DISCARD_VALUE
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 3b53fa8cf9cb4d1a9ff364cd5d8ae724
          name: 'Connections, available'
          type: DEPENDENT
          key: mongodb.connections.available
          description: 'The number of unused incoming connections available.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connections.available
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: c4d86707cd124d9db195ca6afd636e71
          name: 'Connections, current'
          type: DEPENDENT
          key: mongodb.connections.current
          description: |
            The number of incoming connections from clients to the database server.
            This number includes the current shell session.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connections.current
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 37fd836b53fa4db88aeb0faeeccc2856
          name: 'New connections, rate'
          type: DEPENDENT
          key: mongodb.connections.rate
          value_type: FLOAT
          units: Rps
          description: 'Rate of all incoming connections created to the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.connections.totalCreated
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: connections
        - uuid: 0f04a5b3b0e5415185e01ecf75f426ec
          name: 'Current queue: readers'
          type: DEPENDENT
          key: mongodb.current_queue.readers
          description: |
            The number of operations that are currently queued and waiting for the read lock.
            A consistently small read-queue, particularly of shorter operations, should cause no concern.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.globalLock.currentQueue.readers
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: global-lock
        - uuid: 47ecaffb9638429eb308572b7d7beb5a
          name: 'Current queue: total'
          type: DEPENDENT
          key: mongodb.current_queue.total
          description: 'The total number of operations queued waiting for the lock.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.globalLock.currentQueue.total
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: global-lock
        - uuid: e68ff1592a5648fc8b5475054c327ac6
          name: 'Current queue: writers'
          type: DEPENDENT
          key: mongodb.current_queue.writers
          description: |
            The number of operations that are currently queued and waiting for the write lock.
             A consistently small write-queue, particularly of shorter operations, is no cause for concern.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.globalLock.currentQueue.writers
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: global-lock
        - uuid: 1d2c068feba240d6b934b65249d1b5ea
          name: 'Cursor: open pinned'
          type: DEPENDENT
          key: mongodb.cursor.open.pinned
          description: 'Number of pinned open cursors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.cursor.open.pinned
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: cursors
        - uuid: f23bf716eced4ba5948b06c24c780904
          name: 'Cursor: open total'
          type: DEPENDENT
          key: mongodb.cursor.open.total
          description: 'Number of cursors that MongoDB is maintaining for clients.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.cursor.open.total
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: cursors
          triggers:
            - uuid: ed4a0c66c76d4ca699d0f2188cc8e71f
              expression: 'min(/MongoDB node by Zabbix agent 2/mongodb.cursor.open.total,5m)>{$MONGODB.CURSOR.OPEN.MAX.WARN}'
              name: 'MongoDB node: Too many cursors opened by MongoDB for clients'
              event_name: 'MongoDB node: Too many cursors opened by MongoDB for clients (over {$MONGODB.CURSOR.OPEN.MAX.WARN} in 5m)'
              priority: WARNING
              tags:
                - tag: scope
                  value: capacity
        - uuid: b30b4c7b6d88467bbde22db411660d6b
          name: 'Cursor: timed out, rate'
          type: DEPENDENT
          key: mongodb.cursor.timed_out.rate
          value_type: FLOAT
          description: 'Number of cursors that time out, per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.cursor.timedOut
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: cursors
          triggers:
            - uuid: 41d37791111b461d94da779e4b2c7e46
              expression: 'min(/MongoDB node by Zabbix agent 2/mongodb.cursor.timed_out.rate,5m)>{$MONGODB.CURSOR.TIMEOUT.MAX.WARN}'
              name: 'MongoDB node: Too many cursors are timing out'
              event_name: 'MongoDB node: Too many cursors are timing out (over {$MONGODB.CURSOR.TIMEOUT.MAX.WARN} per second in 5m)'
              priority: WARNING
              tags:
                - tag: scope
                  value: performance
        - uuid: 4d0b20f4eeca4418bb08e7e2905cc68c
          name: Architecture
          type: DEPENDENT
          key: mongodb.mem.bits
          units: bit
          description: 'A number, either 64 or 32, that indicates whether the MongoDB instance is compiled for 64-bit or 32-bit architecture.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.mem.bits
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: application
        - uuid: c88392536a334f9a9c907be28090424c
          name: 'Memory: mapped'
          type: DEPENDENT
          key: mongodb.mem.mapped
          units: B
          description: 'Amount of mapped memory by the database.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.mem.mapped
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: memory
        - uuid: 7a10ad84604246679104111e83fa762e
          name: 'Memory: mapped with journal'
          type: DEPENDENT
          key: mongodb.mem.mapped_with_journal
          units: B
          description: 'The amount of mapped memory, including the memory used for journaling.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.mem.mappedWithJournal
              error_handler: DISCARD_VALUE
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: memory
        - uuid: 2248b869cfca42bd95140451c0974f8c
          name: 'Memory: resident'
          type: DEPENDENT
          key: mongodb.mem.resident
          units: B
          description: 'Amount of memory currently used by the database process.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.mem.resident
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: memory
        - uuid: 561ea7508e44443cb692b7dfe8ed3bdc
          name: 'Memory: virtual'
          type: DEPENDENT
          key: mongodb.mem.virtual
          units: B
          description: 'Amount of virtual memory used by the mongod process.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.mem.virtual
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: memory
        - uuid: 9c79163da0b44e39a704969ab1d6280b
          name: 'Cursor: open no timeout'
          type: DEPENDENT
          key: mongodb.metrics.cursor.open.no_timeout
          description: 'Number of open cursors with the option DBQuery.Option.noTimeout set to prevent timeout after a period of inactivity.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.cursor.open.noTimeout
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: cursors
        - uuid: ba0502f80a044670993bdb63587cd282
          name: 'Bytes in, rate'
          type: DEPENDENT
          key: mongodb.network.bytes_in.rate
          value_type: FLOAT
          units: Bps
          description: 'The total number of bytes that the server has received over network connections initiated by clients or other mongod/mongos instances per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.network.bytesIn
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: network
        - uuid: 0545114b39a649ef9a4b75da500031fb
          name: 'Bytes out, rate'
          type: DEPENDENT
          key: mongodb.network.bytes_out.rate
          value_type: FLOAT
          units: Bps
          description: 'The total number of bytes that the server has sent over network connections initiated by clients or other mongod/mongos instances per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.network.bytesOut
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: network
        - uuid: 73aba89f9012437eb3ed843ccbe63c06
          name: 'Requests, rate'
          type: DEPENDENT
          key: mongodb.network.numRequests.rate
          value_type: FLOAT
          units: '!Rps'
          description: 'Number of distinct requests that the server has received per second'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.network.numRequests
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: network
        - uuid: 532a1f4a64624434986f54b9ac2d2e3a
          name: 'Operations: command, rate'
          type: DEPENDENT
          key: mongodb.opcounters.command.rate
          value_type: FLOAT
          description: |
            The number of commands issued to the database the mongod instance per second.
            Counts all commands except the write commands: insert, update, and delete.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.command
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 540f30705ced49da89a16f80828e8775
          name: 'Operations: delete, rate'
          type: DEPENDENT
          key: mongodb.opcounters.delete.rate
          value_type: FLOAT
          description: 'The number of delete operations the mongod instance per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.delete
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 229345df70c240b5ab113b358fb738d9
          name: 'Operations: getmore, rate'
          type: DEPENDENT
          key: mongodb.opcounters.getmore.rate
          value_type: FLOAT
          description: |
            The number of "getmore" operations since the mongod instance per second. This counter can be high even if the query count is low.
            Secondary nodes send getMore operations as part of the replication process.
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.getmore
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 4236ad60fcef48f793ac6da4cccdb029
          name: 'Operations: insert, rate'
          type: DEPENDENT
          key: mongodb.opcounters.insert.rate
          value_type: FLOAT
          description: 'The number of insert operations received since the mongod instance per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.insert
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: b0f7def2c62047bba0db77d18f1df920
          name: 'Operations: query, rate'
          type: DEPENDENT
          key: mongodb.opcounters.query.rate
          value_type: FLOAT
          description: 'The number of queries received the mongod instance per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.query
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 019ed179e4e1407db799e01920280e02
          name: 'Operations: update, rate'
          type: DEPENDENT
          key: mongodb.opcounters.update.rate
          value_type: FLOAT
          description: 'The number of update operations the mongod instance per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.opcounters.update
            - type: CHANGE_PER_SECOND
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: operations
        - uuid: 8e7406e64edd4fe5ba87d4018011c958
          name: 'Get oplog stats'
          key: 'mongodb.oplog.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Returns status of the replica set, using data polled from the oplog.'
          tags:
            - tag: component
              value: oplog
            - tag: component
              value: replicaset
        - uuid: 350da28ce7ab42f9b96728ec730d4bd6
          name: Ping
          key: 'mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 30s
          description: 'Test if a connection is alive or not.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 30m
          tags:
            - tag: component
              value: health
          triggers:
            - uuid: c4ab9bfdd6d14634870f8ebb44081655
              expression: 'last(/MongoDB node by Zabbix agent 2/mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"])=0'
              name: 'MongoDB node: Connection to MongoDB is unavailable'
              priority: HIGH
              description: 'Connection to MongoDB instance is currently unavailable.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 3b448eff509240faba344f7b325f3e28
          name: 'Get Replica Set status'
          key: 'mongodb.rs.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Returns the replica set status from the point of view of the member where the method is run.'
          tags:
            - tag: component
              value: raw
            - tag: component
              value: replicaset
        - uuid: fb0cc7d44559406cada9d90a51bc999c
          name: 'Get server status'
          key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          history: '0'
          value_type: TEXT
          description: 'Returns a database''s state.'
          tags:
            - tag: component
              value: raw
        - uuid: 2d1bf92792014ed8a3f8d8b13907fc7d
          name: Uptime
          type: DEPENDENT
          key: mongodb.uptime
          value_type: FLOAT
          units: s
          description: 'Number of seconds that the mongod process has been active.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.uptime
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 166444342def4adc954aa35f3dc22dba
              expression: 'nodata(/MongoDB node by Zabbix agent 2/mongodb.uptime,10m)=1'
              name: 'MongoDB node: Failed to fetch info data'
              event_name: 'MongoDB node: Failed to fetch info data (or no data for 10m)'
              priority: WARNING
              description: 'Zabbix has not received data for items for the last 10 minutes'
              manual_close: 'YES'
              dependencies:
                - name: 'MongoDB node: Connection to MongoDB is unavailable'
                  expression: 'last(/MongoDB node by Zabbix agent 2/mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"])=0'
              tags:
                - tag: scope
                  value: availability
            - uuid: 992590e47a7f42dda0e074c2f7a3e5ba
              expression: 'last(/MongoDB node by Zabbix agent 2/mongodb.uptime)<10m'
              name: 'MongoDB node: mongod process has been restarted'
              event_name: 'MongoDB node: mongod process has been restarted (uptime < 10m)'
              priority: INFO
              description: 'Uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: c5679875dc254ddd833ee40ef4a2b3cf
          name: 'MongoDB version'
          key: 'mongodb.version["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 15m
          value_type: CHAR
          description: 'Version of the MongoDB server.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 0856e13b7e7644c5b353fcfa577acb51
              expression: 'last(/MongoDB node by Zabbix agent 2/mongodb.version["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"],#1)<>last(/MongoDB node by Zabbix agent 2/mongodb.version["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"],#2) and length(last(/MongoDB node by Zabbix agent 2/mongodb.version["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]))>0'
              name: 'MongoDB node: Version has changed'
              event_name: 'MongoDB node: Version has changed (new version: {ITEM.VALUE})'
              priority: INFO
              description: 'MongoDB version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: a6398a8ae4fe4891a03bb6041bf71f53
          name: 'Collection discovery'
          key: 'mongodb.collections.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 30m
          filter:
            evaltype: AND
            conditions:
              - macro: '{#COLLECTION}'
                value: '{$MONGODB.LLD.FILTER.COLLECTION.MATCHES}'
              - macro: '{#COLLECTION}'
                value: '{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#DBNAME}'
                value: '{$MONGODB.LLD.FILTER.DB.MATCHES}'
              - macro: '{#DBNAME}'
                value: '{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: |
            Collect collections metrics.
            Note, depending on the number of DBs and collections this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}.
          item_prototypes:
            - uuid: fbcfeba93bce4f3fa965176b9b3208b0
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Objects, avg size'
              type: DEPENDENT
              key: 'mongodb.collection.avg_obj_size["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: B
              description: 'The size of the average object in the collection in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.avgObjSize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: objects
                - tag: database
                  value: '{#DBNAME}'
            - uuid: ee5d3cefe6584900b400a4f598c84c1b
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Capped'
              type: DEPENDENT
              key: 'mongodb.collection.capped["{#DBNAME}","{#COLLECTION}"]'
              description: 'Whether or not the collection is capped.'
              valuemap:
                name: 'MongoDB flag'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capped
                - type: BOOL_TO_DECIMAL
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: application
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 5fc5b90792054b09a651b5d41328ca56
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Objects, count'
              type: DEPENDENT
              key: 'mongodb.collection.count["{#DBNAME}","{#COLLECTION}"]'
              description: 'Total number of objects in the collection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.count
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: objects
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 0ab52dbdcb424d759f6f717d8197cb30
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Capped: max number'
              type: DEPENDENT
              key: 'mongodb.collection.max_number["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'Maximum number of documents that may be present in a capped collection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.max
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: application
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 8c0fe89cfa9f40e3bb04c92c417757df
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Capped: max size'
              type: DEPENDENT
              key: 'mongodb.collection.max_size["{#DBNAME}","{#COLLECTION}"]'
              units: B
              description: 'Maximum size of a capped collection in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.maxSize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: b8ebe075b01248179d93c5d174286d2f
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Indexes'
              type: DEPENDENT
              key: 'mongodb.collection.nindexes["{#DBNAME}","{#COLLECTION}"]'
              description: 'Total number of indices on the collection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.nindexes
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: application
                - tag: database
                  value: '{#DBNAME}'
            - uuid: a4d05a4ee48b4ce2aa4fbebd240b8c4c
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: commands, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.ops.commands.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].commands.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: b6d89c096fec4194bbe834e026f33178
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: commands, rate'
              type: DEPENDENT
              key: 'mongodb.collection.ops.commands.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].commands.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 6375b055efe84cdaa0a42c4b9981dde7
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: getmore, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.ops.getmore.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].getmore.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 760a0a70a2674ad7acd9d551865693ef
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: getmore, rate'
              type: DEPENDENT
              key: 'mongodb.collection.ops.getmore.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].getmore.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 812f76c720fe47ba9fd8764c349c4a36
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: insert, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.ops.insert.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].insert.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: c824a6a997ef4308b47cdc4118799f33
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: insert, rate'
              type: DEPENDENT
              key: 'mongodb.collection.ops.insert.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].insert.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 77de05da93b34432a7c2442fc01ca624
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: queries, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.ops.queries.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].queries.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 41b1f661ceab494f81e7a4b943a07020
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: queries, rate'
              type: DEPENDENT
              key: 'mongodb.collection.ops.queries.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].queries.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: a46f2c1c973d4eef8d9a7b1150702c74
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: remove, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.ops.remove.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].remove.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 89b74a8511b84f4bb8cab94fc5471632
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: remove, rate'
              type: DEPENDENT
              key: 'mongodb.collection.ops.remove.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].remove.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 67eaf64e851a45afbd69303ad0256077
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: total, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.ops.total.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].total.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 1ca4ae9dcf494efdbf85d635d49d4de8
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: total, rate'
              type: DEPENDENT
              key: 'mongodb.collection.ops.total.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].total.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 89b6f13894d64bdcbe0d0ec41568051a
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: update, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.ops.update.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].update.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 8d75aa686d0d4f3f93089b8b089f1d3c
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations: update, rate'
              type: DEPENDENT
              key: 'mongodb.collection.ops.update.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].update.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 4d575525f749436ea4ea9098c3b164ba
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Read lock, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.read_lock.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].readLock.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 9d2d62a252054e428d9b8863a2128ad8
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Read lock, rate'
              type: DEPENDENT
              key: 'mongodb.collection.read_lock.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].readLock.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: e5e471e100834da5a2e9dddaaa453227
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Size'
              type: DEPENDENT
              key: 'mongodb.collection.size["{#DBNAME}","{#COLLECTION}"]'
              units: B
              description: 'The total size in bytes of the data in the collection plus the size of every indexes on the mongodb.collection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.size
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: d43709c548b84ea9b2c3c1b159bf28a3
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Get collection stats {#DBNAME}.{#COLLECTION}'
              key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              history: '0'
              value_type: TEXT
              description: 'Returns a variety of storage statistics for a given collection.'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: raw
                - tag: database
                  value: '{#DBNAME}'
            - uuid: a2f095952fa44ed3a199b098c5fbee7a
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Storage size'
              type: DEPENDENT
              key: 'mongodb.collection.storage_size["{#DBNAME}","{#COLLECTION}"]'
              units: B
              description: 'Total storage space allocated to this collection for document storage.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.storageSize
              master_item:
                key: 'mongodb.collection.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}","{#COLLECTION}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: a4c46912b5e643be8565f2b0d32c62a9
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Write lock, ms/s'
              type: DEPENDENT
              key: 'mongodb.collection.write_lock.ms["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent to operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].writeLock.time'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
            - uuid: ef83d379681241eaadd8be8de755a2bd
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Write lock, rate'
              type: DEPENDENT
              key: 'mongodb.collection.write_lock.rate["{#DBNAME}","{#COLLECTION}"]'
              value_type: FLOAT
              description: 'The number of operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.totals["{#DBNAME}.{#COLLECTION}"].writeLock.count'
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.collections.usage["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: collection
                  value: '{#COLLECTION}'
                - tag: component
                  value: operations
                - tag: database
                  value: '{#DBNAME}'
          graph_prototypes:
            - uuid: 76e921eae63a49b99102d880d5844a46
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Locks'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.read_lock.rate["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.write_lock.rate["{#DBNAME}","{#COLLECTION}"]'
            - uuid: ab97504abcc844d5a408d4b7cf85e5a5
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Locks time'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.read_lock.ms["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.write_lock.ms["{#DBNAME}","{#COLLECTION}"]'
            - uuid: dcfc8fcc0b484c8baea14525aa212dc2
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.queries.rate["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.getmore.rate["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.insert.rate["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.update.rate["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.remove.rate["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.commands.rate["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '6'
                  drawtype: BOLD_LINE
                  color: C7A72D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.total.rate["{#DBNAME}","{#COLLECTION}"]'
            - uuid: 554ac3ac477c47cfbaaba3d6419109f0
              name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations time'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.queries.ms["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.getmore.ms["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.insert.ms["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.update.ms["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '4'
                  color: FC6EA3
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.remove.ms["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '5'
                  color: 6C59DC
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.commands.ms["{#DBNAME}","{#COLLECTION}"]'
                - sortorder: '6'
                  drawtype: BOLD_LINE
                  color: C7A72D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.collection.ops.total.ms["{#DBNAME}","{#COLLECTION}"]'
        - uuid: a2a57b40d12944ae8ee21c166706b132
          name: 'Database discovery'
          key: 'mongodb.db.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          delay: 30m
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DBNAME}'
                value: '{$MONGODB.LLD.FILTER.DB.MATCHES}'
              - macro: '{#DBNAME}'
                value: '{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: |
            Collect database metrics.
            Note, depending on the number of DBs this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}.
          item_prototypes:
            - uuid: cbb85c1a212a49a1bbdd9336f4a8fe68
              name: 'MongoDB {#DBNAME}: Collections'
              type: DEPENDENT
              key: 'mongodb.db.collections["{#DBNAME}"]'
              description: 'Contains a count of the number of collections in that database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.collections
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: collections
                - tag: database
                  value: '{#DBNAME}'
            - uuid: a9d502096d664f6da44a6ab82f8b7d36
              name: 'MongoDB {#DBNAME}: Size, data'
              type: DEPENDENT
              key: 'mongodb.db.data_size["{#DBNAME}"]'
              units: B
              description: 'Total size of the data held in this database including the padding factor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.dataSize
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: c5f4ae6a260e4c10aae0d51441fcbbf7
              name: 'MongoDB {#DBNAME}: Extents'
              type: DEPENDENT
              key: 'mongodb.db.extents["{#DBNAME}"]'
              description: 'Contains a count of the number of extents in the database across all collections.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.numExtents
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: collections
                - tag: database
                  value: '{#DBNAME}'
            - uuid: cecffb75221440ac957fda5d676d7714
              name: 'MongoDB {#DBNAME}: Size, file'
              type: DEPENDENT
              key: 'mongodb.db.file_size["{#DBNAME}"]'
              units: B
              description: 'Total size of the data held in this database including the padding factor (only available with the mmapv1 storage engine).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.fileSize
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 9567515baf7b46a0a685717839f4a48f
              name: 'MongoDB {#DBNAME}: Size, index'
              type: DEPENDENT
              key: 'mongodb.db.index_size["{#DBNAME}"]'
              units: B
              description: 'Total size of all indexes created on this database.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.indexSize
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
            - uuid: cd5ecd2eafc640319aa2f049db2cf582
              name: 'MongoDB {#DBNAME}: Objects, count'
              type: DEPENDENT
              key: 'mongodb.db.objects["{#DBNAME}"]'
              description: 'Number of objects (documents) in the database across all collections.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.objects
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: objects
                - tag: database
                  value: '{#DBNAME}'
            - uuid: cadce6df66ec4872bd6b517233f77bfc
              name: 'MongoDB {#DBNAME}: Objects, avg size'
              type: DEPENDENT
              key: 'mongodb.db.size["{#DBNAME}"]'
              value_type: FLOAT
              units: B
              description: 'The average size of each document in bytes.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.avgObjSize
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: objects
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 829536cb5dd448d8a05a30cf6eff8599
              name: 'MongoDB {#DBNAME}: Get db stats {#DBNAME}'
              key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              history: '0'
              value_type: TEXT
              description: 'Returns statistics reflecting the database system''s state.'
              tags:
                - tag: component
                  value: database
                - tag: component
                  value: raw
                - tag: database
                  value: '{#DBNAME}'
            - uuid: 197a1d1f5d14413da8fe6c93bfdcf4f3
              name: 'MongoDB {#DBNAME}: Size, storage'
              type: DEPENDENT
              key: 'mongodb.db.storage_size["{#DBNAME}"]'
              units: B
              description: 'Total amount of space allocated to collections in this database for document storage.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.storageSize
              master_item:
                key: 'mongodb.db.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}","{#DBNAME}"]'
              tags:
                - tag: component
                  value: disk
                - tag: database
                  value: '{#DBNAME}'
          graph_prototypes:
            - uuid: e65fcfed4eca4d518b5e6b5b6085ede8
              name: 'MongoDB {#DBNAME}: Collections stats'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.db.collections["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.db.objects["{#DBNAME}"]'
            - uuid: 5dc13b4aebf24a1b8448c26d93b42d7a
              name: 'MongoDB {#DBNAME}: Disk usage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.db.index_size["{#DBNAME}"]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.db.storage_size["{#DBNAME}"]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.db.file_size["{#DBNAME}"]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.db.data_size["{#DBNAME}"]'
        - uuid: eaa4b8fc535143f887673834987ce7be
          name: 'Replication discovery'
          type: DEPENDENT
          key: mongodb.rs.discovery
          description: 'Collect metrics by Zabbix agent if it exists.'
          item_prototypes:
            - uuid: aed5de1374ea427185d478e87b7f1449
              name: 'Apply batches, ms/s'
              type: DEPENDENT
              key: 'mongodb.rs.apply.batches.ms.rate[{#RS_NAME}]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) the mongod has spent applying operations from the oplog.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.apply.batches.totalMillis
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: a460d4356895439d9cf9143b38a18213
              name: 'Apply batches, rate'
              type: DEPENDENT
              key: 'mongodb.rs.apply.batches.rate[{#RS_NAME}]'
              value_type: FLOAT
              description: 'Number of batches applied across all databases per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.apply.batches.num
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 48970eb366f144b4b9ed3f72fbd983a7
              name: 'Apply ops, rate'
              type: DEPENDENT
              key: 'mongodb.rs.apply.rate[{#RS_NAME}]'
              value_type: FLOAT
              description: 'Number of oplog operations applied per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.apply.ops
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 8d8b0046f9fd409891d3d225f8a462ff
              name: Buffer
              type: DEPENDENT
              key: 'mongodb.rs.buffer.count[{#RS_NAME}]'
              description: 'Number of operations in the oplog buffer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.buffer.count
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 0a7522edb2a647989627de85f7e61319
              name: 'Buffer, max size'
              type: DEPENDENT
              key: 'mongodb.rs.buffer.max_size[{#RS_NAME}]'
              units: B
              description: 'Maximum size of the buffer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.buffer.maxSizeBytes
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: fd9b7ea20e1e4e91b7a3c75d5416efe8
              name: 'Buffer, size'
              type: DEPENDENT
              key: 'mongodb.rs.buffer.size[{#RS_NAME}]'
              units: B
              description: 'Current size of the contents of the oplog buffer.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.buffer.sizeBytes
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 6f07d080d01d45dfa5383640c76175c5
              name: 'Replication lag'
              type: DEPENDENT
              key: 'mongodb.rs.lag[{#RS_NAME}]'
              value_type: FLOAT
              units: s
              description: 'Delay between a write operation on the primary and its copy to a secondary.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.members[?(@.self == "true")].lag.first()'
              master_item:
                key: 'mongodb.rs.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
              trigger_prototypes:
                - uuid: 778d0b15affe4867b3e7f3e396c2a700
                  expression: 'min(/MongoDB node by Zabbix agent 2/mongodb.rs.lag[{#RS_NAME}],5m)>{$MONGODB.REPL.LAG.MAX.WARN}'
                  name: 'MongoDB node: Replication lag with primary is too high'
                  event_name: 'MongoDB node: Replication lag with primary is too high (over {$MONGODB.REPL.LAG.MAX.WARN} in 5m)'
                  priority: WARNING
                  tags:
                    - tag: scope
                      value: performance
            - uuid: be060c8d3fec46d5832f8047d3512903
              name: 'Network bytes, rate'
              type: DEPENDENT
              key: 'mongodb.rs.network.bytes.rate[{#RS_NAME}]'
              value_type: FLOAT
              units: Bps
              description: 'Amount of data read from the replication sync source per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.network.bytes
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 68b7ac3fee984352bab02b07e0823f51
              name: 'Network getmores, ms/s'
              type: DEPENDENT
              key: 'mongodb.rs.network.getmores.ms.rate[{#RS_NAME}]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) required to collect data from getmore operations.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.network.getmores.totalMillis
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: operations
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 86d9ddbfc35447c7889bef826bab016f
              name: 'Network getmores, rate'
              type: DEPENDENT
              key: 'mongodb.rs.network.getmores.rate[{#RS_NAME}]'
              value_type: FLOAT
              description: 'Number of getmore operations per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.network.getmores.num
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: operations
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: d2b3075c9728473a9dc8a0585ce43cfd
              name: 'Network ops, rate'
              type: DEPENDENT
              key: 'mongodb.rs.network.ops.rate[{#RS_NAME}]'
              value_type: FLOAT
              description: 'Number of operations read from the replication source per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.network.ops
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: operations
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 7f9d03a683764e32a35b9c1d4da5ddab
              name: 'Network readers created, rate'
              type: DEPENDENT
              key: 'mongodb.rs.network.readers.rate[{#RS_NAME}]'
              value_type: FLOAT
              description: 'Number of oplog query processes created per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.network.readersCreated
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 341410549bfd46058a9cb289b3254639
              name: 'MongoDB {#RS_NAME}: Oplog time diff'
              type: DEPENDENT
              key: 'mongodb.rs.oplog.timediff[{#RS_NAME}]'
              units: s
              description: 'Oplog window: difference between the first and last operation in the oplog. Only present if there are entries in the oplog.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.timediff
              master_item:
                key: 'mongodb.oplog.stats["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: f759273556f5427196c86e822dc7aa95
              name: 'Preload docs, ms/s'
              type: DEPENDENT
              key: 'mongodb.rs.preload.docs.ms.rate[{#RS_NAME}]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) spent loading documents as part of the pre-fetch stage of replication.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.preload.docs.totalMillis
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: a364941cb8da416a84c0ca897a04c8f9
              name: 'Preload docs, rate'
              type: DEPENDENT
              key: 'mongodb.rs.preload.docs.rate[{#RS_NAME}]'
              value_type: FLOAT
              description: 'Number of documents loaded per second during the pre-fetch stage of replication.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.preload.docs.num
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: c78b8e62a12b466ea6f1de84d0e9080a
              name: 'Preload indexes, ms/s'
              type: DEPENDENT
              key: 'mongodb.rs.preload.indexes.ms.rate[{#RS_NAME}]'
              value_type: FLOAT
              units: ms/s
              description: 'Fraction of time (ms/s) spent loading documents as part of the pre-fetch stage of replication.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.preload.indexes.totalMillis
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: ce37bf73939041ab869e4b2faaaedae3
              name: 'Preload indexes, rate'
              type: DEPENDENT
              key: 'mongodb.rs.preload.indexes.rate[{#RS_NAME}]'
              value_type: FLOAT
              description: 'Number of index entries loaded by members before updating documents as part of the pre-fetch stage of replication.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.repl.preload.indexes.num
                  error_handler: DISCARD_VALUE
                - type: CHANGE_PER_SECOND
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 49e786da687a4b36a17bf617026e3c83
              name: 'Node state'
              type: DEPENDENT
              key: 'mongodb.rs.state[{#RS_NAME}]'
              description: 'An integer between 0 and 10 that represents the replica state of the current member.'
              valuemap:
                name: 'ReplicaSet node state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.myState
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mongodb.rs.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
              trigger_prototypes:
                - uuid: f9f29647a3db426c9c303fc47cfc48eb
                  expression: 'last(/MongoDB node by Zabbix agent 2/mongodb.rs.state[{#RS_NAME}],#1)<>last(/MongoDB node by Zabbix agent 2/mongodb.rs.state[{#RS_NAME}],#2)'
                  recovery_mode: NONE
                  name: 'MongoDB node: Node in ReplicaSet changed the state'
                  event_name: 'MongoDB node: Node in ReplicaSet changed the state (new state: {ITEM.VALUE})'
                  priority: WARNING
                  description: 'Node in ReplicaSet  changed the state. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 211d5f6768c044f8ac959724160d3ddc
              name: 'Number of replicas'
              type: DEPENDENT
              key: 'mongodb.rs.total_nodes[{#RS_NAME}]'
              discover: NO_DISCOVER
              description: 'The number of replicated nodes in current ReplicaSet.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.members[?(@.self == "true")].totalNodes.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mongodb.rs.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: 4b81b6e4ce1644689e5d8a4490650e6b
              name: 'Unhealthy replicas'
              type: DEPENDENT
              key: 'mongodb.rs.unhealthy[{#RS_NAME}]'
              value_type: CHAR
              discover: NO_DISCOVER
              description: 'The replicated nodes in current ReplicaSet with member health value  = 0.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.members[?(@.self == "true")].unhealthyNodes.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      var value = JSON.parse(value);
                      return value.length ? JSON.stringify(value) : '';
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mongodb.rs.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
            - uuid: b8d4a32cfa9f4b4fb5177e3389d15a5a
              name: 'Number of unhealthy replicas'
              type: DEPENDENT
              key: 'mongodb.rs.unhealthy_count[{#RS_NAME}]'
              discover: NO_DISCOVER
              description: 'The number of replicated nodes with member health value  = 0.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.members[?(@.self == "true")].unhealthyCount.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'mongodb.rs.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: replication
                - tag: replicaset
                  value: '{#RS_NAME}'
          trigger_prototypes:
            - uuid: 975c5e5817b148ba8a8d551ac42053d0
              expression: 'last(/MongoDB node by Zabbix agent 2/mongodb.rs.unhealthy_count[{#RS_NAME}])>0 and length(last(/MongoDB node by Zabbix agent 2/mongodb.rs.unhealthy[{#RS_NAME}]))>0'
              name: 'MongoDB node: There are unhealthy replicas in ReplicaSet'
              priority: AVERAGE
              tags:
                - tag: scope
                  value: availability
          graph_prototypes:
            - uuid: 52724c49dd544470916eab1301be30da
              name: 'MongoDB: Replication lag time [{#RS_NAME}]'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  item:
                    host: 'MongoDB node by Zabbix agent 2'
                    key: 'mongodb.rs.lag[{#RS_NAME}]'
          master_item:
            key: 'mongodb.rs.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var status = JSON.parse(value)
                  return JSON.stringify(status.set
                  ? [{'{#RS_NAME}': status.set, '{#NODE_STATE}': status.myState}]
                  : []);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          overrides:
            - name: 'Primary metrics'
              step: '1'
              filter:
                conditions:
                  - macro: '{#NODE_STATE}'
                    value: '1'
              operations:
                - operator: LIKE
                  value: 'Number of replicas'
                  discover: DISCOVER
                  status: ENABLED
                - operator: LIKE
                  value: 'Number of unhealthy replicas'
                  discover: DISCOVER
                  status: ENABLED
                - operator: LIKE
                  value: 'Replication lag'
                  discover: NO_DISCOVER
                - operator: LIKE
                  value: 'Unhealthy replicas'
                  discover: DISCOVER
                  status: ENABLED
            - name: 'Arbiter metrics'
              step: '2'
              filter:
                conditions:
                  - macro: '{#NODE_STATE}'
                    value: '7'
              operations:
                - operator: LIKE
                  value: 'Replication lag'
                  discover: NO_DISCOVER
        - uuid: 9b37bb1d3e244a95ac5702bcf3ab19a9
          name: 'WiredTiger metrics'
          type: DEPENDENT
          key: mongodb.wired_tiger.discovery
          description: 'Collect metrics of WiredTiger Storage Engine if it exists.'
          item_prototypes:
            - uuid: 918e705019734ca7a200a7c4422c6bab
              name: 'WiredTiger cache: bytes'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.bytes_in_cache[{#SINGLETON}]'
              units: B
              description: 'Size of the data currently in cache.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache[''bytes currently in the cache'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 20edd994c8b04e35bea96e6eacd33611
              name: 'WiredTiger cache: bytes, max'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.maximum_bytes_configured[{#SINGLETON}]'
              units: B
              description: 'Maximum cache size.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache[''maximum bytes configured'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 4e07f3e517bf41c1b42661d3bbd5237e
              name: 'WiredTiger cache: max page size at eviction'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.max_page_size_eviction[{#SINGLETON}]'
              units: B
              description: 'Maximum page size at eviction.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache[''maximum page size at eviction'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 692685a9f3d9461daa88fdfcb0771e05
              name: 'WiredTiger cache: modified pages evicted'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.modified_pages_evicted[{#SINGLETON}]'
              description: 'Number of pages, that have been modified, evicted from the cache.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache[''modified pages evicted'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 634060250f474f269aed1df61f709ca7
              name: 'WiredTiger cache: pages evicted by application threads, rate'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.pages_evicted_threads.rate[{#SINGLETON}]'
              value_type: FLOAT
              description: 'Number of page evicted by application threads per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache.[''pages evicted by application threads'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 547ccf6f4c7f4629831e39f72cbcfb70
              name: 'WiredTiger cache: pages held in cache'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.pages_in_cache[{#SINGLETON}]'
              description: 'Number of pages currently held in the cache.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache[''pages currently held in the cache'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: c01890f434b14e998e2aea7d61d600e5
              name: 'WiredTiger cache: pages read into cache'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.pages_read[{#SINGLETON}]'
              description: 'Number of pages read into the cache.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache[''pages read into cache'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 0aa52db6d7684a2496fb0599139cd142
              name: 'WiredTiger cache: pages written from cache'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.pages_written[{#SINGLETON}]'
              description: 'Number of pages written from the cache.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache[''pages written from cache'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 851100dc722b4e74883fa469e062a2e2
              name: 'WiredTiger cache: in-memory page splits'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.splits[{#SINGLETON}]'
              description: 'In-memory page splits.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache[''in-memory page splits'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 85706ecdaa0e4c789a6542cbde35e80a
              name: 'WiredTiger cache: tracked dirty bytes in the cache'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.tracked_dirty_bytes[{#SINGLETON}]'
              units: B
              description: 'Size of the dirty data in the cache.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache.[''tracked dirty bytes in the cache'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: 7993e04be54b4dc0b663a105b7b9a3c4
              name: 'WiredTiger cache: unmodified pages evicted'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.cache.unmodified_pages_evicted[{#SINGLETON}]'
              description: 'Number of pages, that were not modified, evicted from the cache.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.wiredTiger.cache.[''unmodified pages evicted'']'
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: cache
                - tag: component
                  value: wired-tiger
            - uuid: b1a9800865db4ac8959bbdc4b2ab39ee
              name: 'WiredTiger concurrent transactions: read, available'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.concurrent_transactions.read.available[{#SINGLETON}]'
              description: 'Number of available read tickets (concurrent transactions) remaining.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wiredTiger.concurrentTransactions.read.available
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: transactions
                - tag: component
                  value: wired-tiger
              trigger_prototypes:
                - uuid: 967928b915f64623b4416ed0dbf6ba98
                  expression: 'max(/MongoDB node by Zabbix agent 2/mongodb.wired_tiger.concurrent_transactions.read.available[{#SINGLETON}],5m)<{$MONGODB.WIRED_TIGER.TICKETS.AVAILABLE.MIN.WARN}'
                  name: 'MongoDB node: Available WiredTiger read tickets is low'
                  event_name: 'MongoDB node: Available WiredTiger read tickets less than {$MONGODB.WIRED_TIGER.TICKETS.AVAILABLE.MIN.WARN}'
                  priority: WARNING
                  description: |
                    Too few available read tickets.
                    When the number of available read tickets remaining reaches zero, new read requests will be queued until a new read ticket is available.
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: b9415bf5203840209e149a6be4b110a1
              name: 'WiredTiger concurrent transactions: read, out'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.concurrent_transactions.read.out[{#SINGLETON}]'
              description: 'Number of read tickets (concurrent transactions) in use.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wiredTiger.concurrentTransactions.read.out
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: transactions
                - tag: component
                  value: wired-tiger
            - uuid: 46c67d017c5040f691695fcd7645c224
              name: 'WiredTiger concurrent transactions: read, total tickets'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.concurrent_transactions.read.totalTickets[{#SINGLETON}]'
              description: 'Total number of read tickets (concurrent transactions) available.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wiredTiger.concurrentTransactions.read.totalTickets
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: transactions
                - tag: component
                  value: wired-tiger
            - uuid: cb36bdd5ce0442cca03e46436f82c6a2
              name: 'WiredTiger concurrent transactions: write, available'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.concurrent_transactions.write.available[{#SINGLETON}]'
              description: 'Number of available write tickets (concurrent transactions) remaining.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wiredTiger.concurrentTransactions.write.available
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: transactions
                - tag: component
                  value: wired-tiger
              trigger_prototypes:
                - uuid: 485e6e846f274b528902b3ffd08f2fc4
                  expression: 'max(/MongoDB node by Zabbix agent 2/mongodb.wired_tiger.concurrent_transactions.write.available[{#SINGLETON}],5m)<{$MONGODB.WIRED_TIGER.TICKETS.AVAILABLE.MIN.WARN}'
                  name: 'MongoDB node: Available WiredTiger write tickets is low'
                  event_name: 'MongoDB node: Available WiredTiger write tickets less than {$MONGODB.WIRED_TIGER.TICKETS.AVAILABLE.MIN.WARN}'
                  priority: WARNING
                  description: |
                    Too few available write tickets.
                    When the number of available write tickets remaining reaches zero, new write requests will be queued until a new write ticket is available.
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: b997757256e441dca58758192126ac44
              name: 'WiredTiger concurrent transactions: write, out'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.concurrent_transactions.write.out[{#SINGLETON}]'
              description: 'Number of write tickets (concurrent transactions) in use.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wiredTiger.concurrentTransactions.write.out
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: transactions
                - tag: component
                  value: wired-tiger
            - uuid: e9eb61954ab6462d9dbcf9206467b076
              name: 'WiredTiger concurrent transactions: write, total tickets'
              type: DEPENDENT
              key: 'mongodb.wired_tiger.concurrent_transactions.write.totalTickets[{#SINGLETON}]'
              description: 'Total number of write tickets (concurrent transactions) available.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wiredTiger.concurrentTransactions.write.totalTickets
              master_item:
                key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
              tags:
                - tag: component
                  value: transactions
                - tag: component
                  value: wired-tiger
          master_item:
            key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  return JSON.stringify(JSON.parse(value).wiredTiger
                    ? [{'{#SINGLETON}': ''}] : []);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
      tags:
        - tag: class
          value: database
        - tag: subclass
          value: nosql
        - tag: target
          value: mongodb-node
      macros:
        - macro: '{$MONGODB.CONNS.PCT.USED.MAX.WARN}'
          value: '80'
          description: 'Maximum percentage of used connections'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Max used connections (%)'
            description: 'Maximum percentage of used connections In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MONGODB.CONNSTRING}'
          value: 'tcp://localhost:27017'
          description: 'Connection string in the URI format (password is not used). This param overwrites a value configured in the "Server" option of the configuration file (if it''s set), otherwise, the plugin''s default value is used: "tcp://localhost:27017"'
          config:
            type: TEXT
            priority: '1'
            label: 'Connection string'
            description: 'Connection string in the URI format (password is not used). This param overwrites a value configured in the "Server" option of the configuration file (if it''s set), otherwise, the plugin''s default value is used: "tcp://localhost:27017"'
            required: 'YES'
        - macro: '{$MONGODB.CURSOR.OPEN.MAX.WARN}'
          value: '10000'
          description: 'Maximum number of open cursors'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Max open cursors'
            description: 'Maximum number of open cursors'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$MONGODB.CURSOR.TIMEOUT.MAX.WARN}'
          value: '1'
          description: 'Maximum number of cursors timing out per second'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Max cursors timing out per second'
            description: 'Maximum number of cursors timing out per second'
        - macro: '{$MONGODB.LLD.FILTER.COLLECTION.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable collections'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Collections filter (include)'
            description: 'Filter of discoverable collections'
        - macro: '{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discovered collections'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Collections filter (exclude)'
            description: 'Filter to exclude discovered collections'
        - macro: '{$MONGODB.LLD.FILTER.DB.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable databases'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Databases filter (include)'
            description: 'Filter of discoverable databases'
        - macro: '{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}'
          value: (admin|config|local)
          description: 'Filter to exclude discovered databases'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Databases filter (exclude)'
            description: 'Filter to exclude discovered databases'
        - macro: '{$MONGODB.PASSWORD}'
          description: 'MongoDB user password'
          config:
            type: TEXT
            priority: '3'
            label: Password
            description: 'MongoDB user password'
            required: 'YES'
        - macro: '{$MONGODB.REPL.LAG.MAX.WARN}'
          value: 10s
          description: 'Maximum replication lag in seconds'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Max replication lag'
            description: 'Maximum replication lag in seconds'
        - macro: '{$MONGODB.USER}'
          description: 'MongoDB username'
          config:
            type: TEXT
            priority: '2'
            label: Username
            description: 'MongoDB username'
            required: 'YES'
        - macro: '{$MONGODB.WIRED_TIGER.TICKETS.AVAILABLE.MIN.WARN}'
          value: '5'
          description: 'Minimum number of available WiredTiger read or write tickets remaining'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'Min WiredTiger tickets available'
            description: 'Minimum number of available WiredTiger read or write tickets remaining'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
      dashboards:
        - uuid: 31fcc4b685ed401ca1d3164ee283d91c
          name: 'Node overview'
          pages:
            - name: General
              widgets:
                - type: graph
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Active clients'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: graph
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Activity'
                    - type: STRING
                      name: reference
                      value: AAAAB
                - type: graph
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Connections'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: graph
                  'y': '15'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Cursors'
                    - type: STRING
                      name: reference
                      value: AAAAD
                - type: graph
                  'y': '20'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Documents'
                    - type: STRING
                      name: reference
                      value: AAAAE
                - type: graph
                  'y': '25'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Memory usage'
                    - type: STRING
                      name: reference
                      value: AAAAF
                - type: graph
                  'y': '30'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Network'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graph
                  'y': '35'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Operations'
                    - type: STRING
                      name: reference
                      value: AAAAH
                - type: graph
                  'y': '40'
                  width: '72'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Queued operations'
                    - type: STRING
                      name: reference
                      value: AAAAI
            - name: Collections
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB {#DBNAME}.{#COLLECTION}: Locks'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                - type: graphprototype
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB {#DBNAME}.{#COLLECTION}: Locks time'
                    - type: STRING
                      name: reference
                      value: AAAAK
                - type: graphprototype
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations'
                    - type: STRING
                      name: reference
                      value: AAAAL
                - type: graphprototype
                  'y': '15'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB {#DBNAME}.{#COLLECTION}: Operations time'
                    - type: STRING
                      name: reference
                      value: AAAAM
            - name: Databases
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB {#DBNAME}: Collections stats'
                    - type: STRING
                      name: reference
                      value: AAAAN
                - type: graphprototype
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB {#DBNAME}: Disk usage'
                    - type: STRING
                      name: reference
                      value: AAAAO
            - name: Replication
              widgets:
                - type: graphprototype
                  width: '72'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'MongoDB node by Zabbix agent 2'
                        name: 'MongoDB: Replication lag time [{#RS_NAME}]'
                    - type: STRING
                      name: reference
                      value: AAAAP
      valuemaps:
        - uuid: 9f921e1503e74204b8f128966f9562bc
          name: 'MongoDB flag'
          mappings:
            - value: '0'
              newvalue: 'False'
            - value: '1'
              newvalue: 'True'
        - uuid: a99141555eff42ff8d367f10d9a7c569
          name: 'ReplicaSet node state'
          mappings:
            - value: '0'
              newvalue: STARTUP
            - value: '1'
              newvalue: PRIMARY
            - value: '2'
              newvalue: SECONDARY
            - value: '3'
              newvalue: RECOVERING
            - value: '5'
              newvalue: STARTUP2
            - value: '6'
              newvalue: UNKNOWN
            - value: '7'
              newvalue: ARBITER
            - value: '8'
              newvalue: DOWN
            - value: '9'
              newvalue: ROLLBACK
            - value: '10'
              newvalue: REMOVED
        - uuid: b37ba44823e34a13a119f86f3d58a65a
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
    - uuid: ae3ce7156aae4ae79a72742365c884ea
      template: 'Pure Storage FlashArray v1 by HTTP'
      name: 'Pure Storage FlashArray v1 by HTTP'
      description: |
        Setup:
        1. Create a host for the Pure Storage FlashArray device and assign to it the "Pure Storage FlashArray v1 by HTTP" template.
        2. Enter your API token from the Purity//FA web interface into the {$PURE.FLASHARRAY.API.TOKEN} macro.
        3. Set your Purity//FA web interface URL as the {$PURE.FLASHARRAY.API.URL} macro value.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        1. Create a host for the Pure Storage FlashArray device and assign to it the "Pure Storage FlashArray v1 by HTTP" template.
        2. Enter your API token from the FlashArray (Purity//FA) graphical user interface into the `API token` host wizard configuration field.
        3. It is possible to authenticate using username and password by entering them from the FlashArray (Purity//FA) graphical user interface into the `Username` and `Password` host wizard configuration fields.
        4. Set your FlashArray (Purity//FA) graphical user interface URL as the `Web interface URL` host wizard configuration field value.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/SAN
      items:
        - uuid: c51f66a1d1c749e0b48a9bebf21c7426
          name: 'Array capacity'
          type: DEPENDENT
          key: purestorage.flasharray.array.capacity
          units: B
          description: 'Total capacity of the array.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.capacity
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: fa0fbc8453ab4c2da3a0416e8f1244fa
          name: 'Array data reduction'
          type: DEPENDENT
          key: purestorage.flasharray.array.drr
          value_type: FLOAT
          description: 'The data reduction ratio (DRR) represents the efficiency of data reduction techniques such as compression and deduplication for the array volume.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.data_reduction
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: f769c0656f934f5c8d515c76ebf2f5ae
          name: 'Storage array item errors'
          type: DEPENDENT
          key: purestorage.flasharray.array.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from array data retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 99e1a8dbf600466d99d898806a0d020a
              expression: 'length(last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.array.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get storage array data'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get array data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 559fb36d7bb34145a2afcdc790951041
          name: 'Get array data'
          type: DEPENDENT
          key: purestorage.flasharray.array.get
          history: '0'
          value_type: TEXT
          description: 'Collects array data from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	storage_array = {},
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url, cookie) {
                  	request.addHeader('Cookie: ' + cookie);
                  	request.addHeader('Accept: application/json');
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response);
                  			if (Array.isArray(response) & response.length > 0) {
                  				response = response[0]
                  			}
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['cookie'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected cookie value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	storage_array = getHttpData(
                  		url + 'api/' + version + '/array',
                  		creds.cookie
                  	);
                  
                  	storage_array['space'] = getHttpData(
                  		url + 'api/' + version + '/array?space=true',
                  		creds.cookie
                  	);
                  
                  	storage_array['monitor'] = getHttpData(
                  		url + 'api/' + version + '/array?action=monitor',
                  		creds.cookie
                  	);
                  
                  	storage_array['remote_assist'] = getHttpData(
                  		url + 'api/' + version + '/array/remoteassist',
                  		creds.cookie, {}
                  	);
                  
                  	storage_array['phone_home'] = getHttpData(
                  		url + 'api/' + version + '/array/phonehome',
                  		creds.cookie, {}
                  	);
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'array': storage_array,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: f279b2482fb9422abe2d9f4e52937771
          name: 'Array hostname'
          type: DEPENDENT
          key: purestorage.flasharray.array.hostname
          value_type: CHAR
          description: 'Host name of the array.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.hostname
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 7fec71312a2841f2b5f615e2e8e061f4
          name: 'Array parity'
          type: DEPENDENT
          key: purestorage.flasharray.array.parity
          value_type: FLOAT
          units: '%'
          description: 'The percentage of data that is protected.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.parity
            - type: MULTIPLIER
              parameters:
                - '100'
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: ce48a3aee4fc44a386f28ccb26fe4744
          name: 'Array bytes read per second'
          type: DEPENDENT
          key: purestorage.flasharray.array.read_bytes.rate
          units: Bps
          description: 'Number of bytes read per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.monitor.output_per_sec
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 01e22e1c6fa548c68bbc04058497997e
          name: 'Array read requests per second'
          type: DEPENDENT
          key: purestorage.flasharray.array.read_requests.rate
          description: 'Number of read requests processed per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.monitor.reads_per_sec
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: ed65950573dc4f5caab6da2a114ad662
          name: 'Array shared space'
          type: DEPENDENT
          key: purestorage.flasharray.array.shared_space
          units: B
          description: 'The physical space occupied by deduplicated data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.shared_space
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 6bd825261ce64fa5849d8d4a71e24734
          name: 'Array snapshots size'
          type: DEPENDENT
          key: purestorage.flasharray.array.snapshots_size
          units: B
          description: 'The physical space occupied by snapshots.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.snapshots
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 6033bf992db44f1fa74057288fd1c32c
          name: 'Array system size'
          type: DEPENDENT
          key: purestorage.flasharray.array.system_size
          units: B
          description: 'The physical space occupied by internal array metadata.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.system
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 10cb260c3ca84e3ab244122123cdc64f
          name: 'Array thin provisioning'
          type: DEPENDENT
          key: purestorage.flasharray.array.thin_provisioning
          value_type: FLOAT
          units: '%'
          description: 'The percentage of volume sectors that do not contain host-written data because the hosts have not written data to them or the sectors have been explicitly trimmed.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.thin_provisioning
            - type: MULTIPLIER
              parameters:
                - '100'
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 0263b3ea58ce4488b7628fba3f0dac73
          name: 'Array total data reduction'
          type: DEPENDENT
          key: purestorage.flasharray.array.total_drr
          value_type: FLOAT
          description: 'The total reduction ratio of all data on the array volume that has been processed by the data deduplication and compression engines.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.total_reduction
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: d4b3cb4a9a7841f4bae08b75658d2309
          name: 'Array microseconds per operation'
          type: DEPENDENT
          key: purestorage.flasharray.array.usec_per_op
          units: µs
          description: 'Average local queue time in microseconds for both read and write operations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.monitor.local_queue_usec_per_op
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: bf22bf3ce9874cb5a6dbf89493ed8e0e
          name: 'Array microseconds per read'
          type: DEPENDENT
          key: purestorage.flasharray.array.usec_per_read
          units: µs
          description: 'Average time in microseconds required to process an I/O read request from the array. The average time does not include SAN time, queue time, or QoS rate limit time.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.monitor.usec_per_read_op
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 83fde7a6cfdd4215b181866e1a003be9
          name: 'Array microseconds per write'
          type: DEPENDENT
          key: purestorage.flasharray.array.usec_per_write
          units: µs
          description: 'Average time in microseconds required to process an I/O write request to the array. The average time does not include SAN time, queue time, or QoS rate limit time.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.monitor.usec_per_write_op
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: bffa5098018742eaadaf5454df230280
          name: 'Array used space'
          type: DEPENDENT
          key: purestorage.flasharray.array.used_space
          units: B
          description: 'The total physical space occupied by system, shared space, volume, and snapshot data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.total
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 1fc46ce2f857421a9a4f7c2b4cdcee97
          name: 'Array version'
          type: DEPENDENT
          key: purestorage.flasharray.array.version
          value_type: CHAR
          description: 'Version of the array.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 66e9074d811e4836a0d763b090a7c6ed
          name: 'Array volumes size'
          type: DEPENDENT
          key: purestorage.flasharray.array.volumes_size
          units: B
          description: 'The physical space occupied by volumes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.volumes
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 812c713f9237473398328d7316827ec8
          name: 'Array write requests per second'
          type: DEPENDENT
          key: purestorage.flasharray.array.write_requests.rate
          description: 'Number of write requests processed per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.monitor.writes_per_sec
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 2ae599ecbf43447d9b7d3c5956c435bd
          name: 'Array bytes written per second'
          type: DEPENDENT
          key: purestorage.flasharray.array.written_bytes.rate
          units: Bps
          description: 'Number of bytes written per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.monitor.input_per_sec
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 37b7fc4e8af740639a009049acdaf229
          name: Authentication
          type: SCRIPT
          key: purestorage.flasharray.auth
          history: '0'
          value_type: TEXT
          params: |
            var params = JSON.parse(value),
            	request = new HttpRequest(),
            	cookies = [],
            	error_msg = '';
            
            function getToken(url, data) {
            	var token = null;
            	var response = request.post(url, JSON.stringify(data));
            	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            	if (request.getStatus() !== 200) {
            		throw 'Failed to receive data: invalid response status code.';
            	}
            
            	if (response !== null) {
            		try {
            			token = JSON.parse(response).api_token;
            		}
            		catch (error) {
            			throw 'Failed to get the API token from Pure Storage API. Check debug log for more information.';
            		}
            	}
            
            	if (token === null || typeof token !== 'string') {
            		throw 'Something went wrong while getting the API token. Check debug log for more information.';
            	}
            
            	return token;
            };
            
            function createSession(url, data) {
            	var cookies = [];
            	response = request.post(url, JSON.stringify(data));
            	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            	if (request.getStatus() !== 200) {
            		throw 'Failed to receive data: invalid response status code.';
            	}
            
            	if (response !== null) {
            		try {
            			username = JSON.parse(response).username;
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
            		}
            	} else {
            		throw 'Authentication failed.';
            	}
            
            	var headers = request.getHeaders();
            	for (key in headers) {
            		if (key.toLowerCase() == 'set-cookie') {
            			var entries = headers[key].split(',');
            			for (idx in entries) {
            				var value = entries[idx].split(';')[0];
            				cookies.push(value);
            			}
            		}
            	}
            
            	return cookies;
            };
            
            try {
            
            	['url', 'token', 'username', 'password', 'version'].forEach(function (field) {
            		var macro = '{$PURE.FLASHARRAY.API.' + field.toUpperCase() + '}';
            		if (typeof params[field] === 'undefined' || params[field] === macro) {
            			throw 'Please set \'' + field + '\' script input parameter to the proper ' + macro + ' macro value.';
            		}
            	});
            	['url', 'version'].forEach(function (field) {
            		if (typeof params[field] == '') {
            			throw 'Please set \'' + field + '\' script input parameter to the proper value.';
            		}
            	});
            
            	if (params.token == '' & params.username == '' & params.password == '') {
            		throw 'To perform authentication, either a token or a username and password must be specified.';
            	}
            
            	if (params.url.indexOf('http://') === -1 && params.url.indexOf('https://') === -1) {
            		params.url = 'https://' + params.url + (!params.url.endsWith('/') ? '/' : '');;
            	}
            
            	if (typeof params.http_proxy !== 'undefined' && params.http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && params.http_proxy !== '') {
            		request.setProxy(params.http_proxy);
            	}
            
            	request.addHeader('Accept: application/json');
            	request.addHeader('Content-Type: application/json');
            	if (params.token === '') {
            		if (params.username === '' || params.password === '') {
            			throw 'Username or password is not specified.';
            		}
            		params.token = getToken(
            			params.url + 'api/' + params.version + '/auth/apitoken',
            			{'username': params.username,'password': params.password}
            		);
            	}
            	cookies = createSession(
            		params.url + 'api/' + params.version + '/auth/session',
            		{'api_token': params.token}
            	);
            
            } catch (err) {
            	error_msg = err;
            };
            
            return JSON.stringify({
            	'cookie': cookies.join('; '),
            	'error': error_msg.toString()
            });
          description: |
            Pure Storage FlashArray authentication with username and password or API token usage.
            Returns a session ID that is required only once and is used for all dependent script items.
            A session will expire after 30 minutes. Check the template documentation for details.
          timeout: '{$PURE.FLASHARRAY.DATA.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$PURE.FLASHARRAY.HTTP_PROXY}'
            - name: password
              value: '{$PURE.FLASHARRAY.API.PASSWORD}'
            - name: token
              value: '{$PURE.FLASHARRAY.API.TOKEN}'
            - name: url
              value: '{$PURE.FLASHARRAY.API.URL}'
            - name: username
              value: '{$PURE.FLASHARRAY.API.USERNAME}'
            - name: version
              value: '{$PURE.FLASHARRAY.API.VERSION}'
          tags:
            - tag: component
              value: raw
        - uuid: 254ba4d842a64dc19cdd42ac9436b0d7
          name: 'Authentication item errors'
          type: DEPENDENT
          key: purestorage.flasharray.auth.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from the authentication item.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 748fc12e196f429e8fe04a1ca27779f9
              expression: 'length(last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.auth.errors))>0'
              name: 'Pure Storage FlashArray: Authentication has failed'
              priority: AVERAGE
              description: 'An error occurred when trying to perform authentication in the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 0ac271e368184318838ed9f0dd7b77ba
          name: 'Certificates item errors'
          type: DEPENDENT
          key: purestorage.flasharray.certificates.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from certificate retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.certificates.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: dc6de5a835ac4e7e91c34f7b711957ce
              expression: 'length(last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.certificates.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get certificates'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get certificate data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: e27cd9105cc74c2fa401bfe1a35f5261
          name: 'Get certificates'
          type: DEPENDENT
          key: purestorage.flasharray.certificates.get
          history: '0'
          value_type: TEXT
          description: 'Collects all certificates from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	certs = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url, cookie) {
                  	request.addHeader('Cookie: ' + cookie);
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response);
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['cookie'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected cookie value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	certs = getHttpData(
                  		url + 'api/' + version + '/cert',
                  		creds.cookie
                  	);
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'certs': certs,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 4694be0d85664bc3976c6ff15ce10262
          name: 'Storage hardware item errors'
          type: DEPENDENT
          key: purestorage.flasharray.hardware.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from hardware retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.hardware.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 0ee01011e18b4304b3baff456fa62787
              expression: 'length(last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.hardware.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get hardware data'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get hardware data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 02d04959c00b4d8e861e205b863c0ece
          name: 'Get hardware data'
          type: DEPENDENT
          key: purestorage.flasharray.hardware.get
          history: '0'
          value_type: TEXT
          description: 'Collects hardware from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	drives = [],
                  	hardware = [],
                  	controllers = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url, cookie) {
                  	request.addHeader('Cookie: ' + cookie);
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response);
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['cookie'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected cookie value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	drives = getHttpData(
                  		url + 'api/' + version + '/drive',
                  		creds.cookie
                  	);
                  
                  	controllers = getHttpData(
                  		url + 'api/' + version + '/array?controllers=true',
                  		creds.cookie
                  	);
                  
                  	getHttpData(
                  		url + 'api/' + version + '/hardware',
                  		creds.cookie
                  	).forEach(function (item) {
                  		var applied = false;
                  		drives.forEach(function (drive, index) {
                  			if (drive['name'] && item['name'] && drive['name'] == item['name']) {
                  				drives[index]['hardware'] = item;
                  				applied = true;
                  			}
                  		});
                  		controllers.forEach(function (ctrl, index) {
                  			if (ctrl['name'] && item['name'] && ctrl['name'] == item['name']) {
                  				controllers[index]['hardware'] = item;
                  				applied = true;
                  			}
                  		});
                  		if (!applied) {
                  			var nameArray = item['name'].split('.');
                  			if (nameArray.length > 1) {
                  				item['parent'] = nameArray[0];
                  			}
                  			hardware.push(item);
                  		}
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'drives': drives,
                  	'hardware': hardware,
                  	'controllers': controllers,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: b867ded0bdca42e48b5d17cae7f00f17
          name: 'Storage hosts item errors'
          type: DEPENDENT
          key: purestorage.flasharray.hosts.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from host data retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.hosts.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: d72a25739d1d4a67947115fa1bad84a4
              expression: 'length(last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.hosts.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get hosts'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get host data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 7e483238579b40118674edf0c0f21250
          name: 'Get hosts'
          type: DEPENDENT
          key: purestorage.flasharray.hosts.get
          history: '0'
          value_type: TEXT
          description: 'Collects all hosts from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	hosts = {},
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url, cookie) {
                  	request.addHeader('Cookie: ' + cookie);
                  	request.addHeader('Accept: application/json');
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response);
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['cookie'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected cookie value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	hosts = getHttpData(
                  		url + 'api/' + version + '/host',
                  		creds.cookie
                  	);
                  
                  	getHttpData(
                  		url + 'api/' + version + '/host?space=true',
                  		creds.cookie
                  	).forEach(function (item) {
                  		hosts.forEach(function (host, index) {
                  			if (host['name'] && item['name'] && host['name'] == item['name']) {
                  				hosts[index]['space'] = item;
                  			}
                  		});
                  	});
                  
                  	getHttpData(
                  		url + 'api/' + version + '/host?action=monitor',
                  		creds.cookie
                  	).forEach(function (item) {
                  		hosts.forEach(function (host, index) {
                  			if (host['name'] && item['name'] && host['name'] == item['name']) {
                  				hosts[index]['monitor'] = item;
                  			}
                  		});
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'hosts': hosts,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 16b047e98a2f4aec87df0aa48d741843
          name: 'Storage network interfaces item errors'
          type: DEPENDENT
          key: purestorage.flasharray.net_ifs.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from network interface retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.net_ifs.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 577eaf4cb56345aca0a901da2fdaa7b1
              expression: 'length(last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.net_ifs.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get network interfaces'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get network interface data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: bcfa1e2b0bb34baf82b28fad87ba7688
          name: 'Get network interfaces'
          type: DEPENDENT
          key: purestorage.flasharray.net_ifs.get
          history: '0'
          value_type: TEXT
          description: 'Collects all network interfaces from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	interfaces = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url, cookie) {
                  	request.addHeader('Cookie: ' + cookie);
                  	request.addHeader('Accept: application/json');
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response);
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['cookie'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected cookie value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	interfaces = getHttpData(
                  		url + 'api/' + version + '/network',
                  		creds.cookie
                  	);
                  
                  	getHttpData(
                  		url + 'api/' + version + '/hardware',
                  		creds.cookie
                  	).forEach(function (item) {
                  		interfaces.forEach(function (netif, index) {
                  			if (netif['name'] && item['name'] && netif['name'].toLowerCase() == item['name'].toLowerCase()) {
                  				interfaces[index]['name'] = item['name'].toLowerCase();
                  				interfaces[index]['hardware'] = item;
                  			}
                  		});
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'interfaces': interfaces,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 1d5a1fa4d56e49fe9188f308babb12ad
          name: 'Phone home status'
          type: DEPENDENT
          key: purestorage.flasharray.phone_home.status
          trends: '0'
          description: 'Current status of a manually-initiated phonehome.'
          valuemap:
            name: 'Connection Status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.phone_home.status
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = [
                  	'disabled',
                  	'enabled'
                  ].indexOf(value);
                  return idx !== -1 ? idx : 2;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
          triggers:
            - uuid: 5a670b7f0c3e4dc9a5e2fff4cedf3810
              expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.phone_home.status)=0'
              name: 'Pure Storage FlashArray: Phone Home has been disabled'
              opdata: 'Current status: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Phone Home connects to the Pure1 service and uploads logs for continuous health monitoring.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 2a116c0e14c149949b5691ad42ccddb1
          name: 'Storage pods item errors'
          type: DEPENDENT
          key: purestorage.flasharray.pods.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from pod retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.pods.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 8eddd157ab93413cac5ba6a7cca2ce93
              expression: 'length(last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.pods.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get pods'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get pod data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: e6a4b00380a64f02a0209c2168d0191f
          name: 'Get pods'
          type: DEPENDENT
          key: purestorage.flasharray.pods.get
          history: '0'
          value_type: TEXT
          description: 'Collects all pods from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	pods = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url, cookie) {
                  	request.addHeader('Cookie: ' + cookie);
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response);
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['cookie'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected cookie value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	pods = getHttpData(
                  		url + 'api/' + version + '/pod',
                  		creds.cookie
                  	);
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'pods': pods,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 0182ae2fcd5f484685d1a0700ef15f8b
          name: 'Remote assist status'
          type: DEPENDENT
          key: purestorage.flasharray.remote_assist.status
          trends: '0'
          description: 'Status of the remote assist connection.'
          valuemap:
            name: 'Connection Status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.remote_assist.status
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = [
                  	'disconnected',
                  	'connected'
                  ].indexOf(value);
                  return idx !== -1 ? idx : 2;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
          triggers:
            - uuid: eb043244987b4124b07018e94d99cd21
              expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.remote_assist.status)=1'
              name: 'Pure Storage FlashArray: RemoteAssist has been enabled'
              opdata: 'Current status: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Purity''s administrator-controlled RemoteAssist feature enables a Technical Support Engineer to communicate directly with the FlashArray via a secure link, effectively establishing an additional administrative session for the duration of the diagnosis and service.'
              tags:
                - tag: scope
                  value: security
        - uuid: f36a091e06a84158bda3ba468343bf96
          name: 'Storage volumes item errors'
          type: DEPENDENT
          key: purestorage.flasharray.volumes.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from volume retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.volumes.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 1ffc3c34fe294c6caf0936169b836627
              expression: 'length(last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.volumes.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get volumes'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get volume data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: ece41bfbe0ba4037baae8305f5ce6a61
          name: 'Get volumes'
          type: DEPENDENT
          key: purestorage.flasharray.volumes.get
          history: '0'
          value_type: TEXT
          description: 'Collects all volumes from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	volumes = {},
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url, cookie) {
                  	request.addHeader('Cookie: ' + cookie);
                  	request.addHeader('Accept: application/json');
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response);
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['cookie'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected cookie value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	volumes = getHttpData(
                  		url + 'api/' + version + '/volume',
                  		creds.cookie, {}
                  	);
                  
                  	getHttpData(
                  		url + 'api/' + version + '/volume?space=true',
                  		creds.cookie
                  	).forEach(function (item) {
                  		volumes.forEach(function (volume, index) {
                  			if (volume['name'] && item['name'] && volume['name'] == item['name']) {
                  				volumes[index]['space'] = item;
                  			}
                  		});
                  	});
                  
                  	getHttpData(
                  		url + 'api/' + version + '/volume?action=monitor',
                  		creds.cookie
                  	).forEach(function (item) {
                  		volumes.forEach(function (volume, index) {
                  			if (volume['name'] && item['name'] && volume['name'] == item['name']) {
                  				volumes[index]['monitor'] = item;
                  			}
                  		});
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'volumes': volumes,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: 55f1042201c2411e854aea9e0c436c36
          name: 'Certificate discovery'
          type: DEPENDENT
          key: purestorage.flasharray.cert.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.CERT.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.CERT.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of certificates from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 6485116679eb47fbad1bb587da76314c
              name: 'Certificate [{#NAME}]: Common name'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.cn[{#NAME}]'
              value_type: CHAR
              description: 'The common name field listed in the {#NAME} certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.common_name
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
            - uuid: 23e5bc6dd2824c92bf4a2cb4c8c56449
              name: 'Certificate [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.certs[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.certificates.get
              tags:
                - tag: component
                  value: raw
                - tag: type
                  value: '{#TYPE}'
            - uuid: 47d355c8da7f46a69da89cb125a9097c
              name: 'Certificate [{#NAME}]: Issued by'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.issued_by[{#NAME}]'
              value_type: CHAR
              description: 'Indicates the authority or organization that issued the {#NAME} certificate, typically including information such as the name of the Certificate Authority (CA) and its digital signature.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.issued_by
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
            - uuid: 1d3825ea91324e36847187cb2c415120
              name: 'Certificate [{#NAME}]: Issued to'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.issued_to[{#NAME}]'
              value_type: CHAR
              description: 'Indicates the entity which holds the {#NAME} certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.issued_to
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
            - uuid: 9f90d24085614389a0e4d9c14139bf3b
              name: 'Certificate [{#NAME}]: Valid from'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.valid_from[{#NAME}]'
              units: unixtime
              description: 'Indicates the date and time when the {#NAME} certificate takes effect.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.valid_from
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
            - uuid: 9d898b8feff04af388deed0465745f50
              name: 'Certificate [{#NAME}]: Valid to'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.valid_to[{#NAME}]'
              units: unixtime
              description: 'Indicates the expiration date and time of the {#NAME} certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.valid_to
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: 1d5940586b7245908c4aa60f56458941
                  expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.cert.valid_to[{#NAME}]) > 0 and (last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.cert.valid_to[{#NAME}]) - now()) / 86400 < {$PURE.FLASHARRAY.CERT.EXPIRY.WARN}'
                  name: 'Pure Storage FlashArray: Certificate [{#NAME}]: SSL certificate expires soon'
                  event_name: 'Pure Storage FlashArray: Certificate [{#NAME}]: SSL certificate expires soon (less than {$PURE.FLASHARRAY.CERT.EXPIRY.WARN} days)'
                  opdata: 'Expiration date: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Consider reissuing and replacing the {#NAME} certificate.'
                  tags:
                    - tag: scope
                      value: notice
          master_item:
            key: purestorage.flasharray.certificates.get
          lld_macro_paths:
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.status
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.certs
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 3406d565b5274d4885d83a2185f25dfd
          name: 'Controller discovery'
          type: DEPENDENT
          key: purestorage.flasharray.ctrl.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.CTRL.LLD.FILTER.INDEX.MATCHES}'
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.CTRL.LLD.FILTER.INDEX.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#NAME}'
                value: '^CT[0-9]+$'
          description: 'Discovery of controllers from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: e2113791d4e4432a9a81f045a5411661
              name: 'Controller [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.controllers[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 441c03ccdad4446aabd0785431f20ce3
              name: 'Controller [{#NAME}]: Model'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.model[{#NAME}]'
              value_type: CHAR
              description: 'Model of the {#NAME} controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 2b0b25979941487092faa88bc072b0a6
              name: 'Controller [{#NAME}]: Mode'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.mode[{#NAME}]'
              trends: '0'
              description: 'The current mode of the {#NAME} controller.'
              valuemap:
                name: 'Controller Mode'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.mode
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'not present',
                      	'offline',
                      	'primary',
                      	'secondary',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 4;
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: a31d230425d448bbb5f4963f9478893b
                  expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.ctrl.mode[{#NAME}],#1)<>last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.ctrl.mode[{#NAME}],#2)'
                  name: 'Pure Storage FlashArray: Controller [{#NAME}]: Mode has been changed'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'The mode of the {#NAME} controller has changed.'
                  tags:
                    - tag: scope
                      value: health
            - uuid: ebee4ac2d44648ab999f18a1b7ee8b85
              name: 'Controller [{#NAME}]: Serial number'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.serial[{#NAME}]'
              value_type: CHAR
              description: 'Serial number of the {#NAME} controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.hardware.serial
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: e51fe80fdd604e47a0a7d0fd818f15f1
              name: 'Controller [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} controller.'
              valuemap:
                name: 'Controller Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'not ready',
                      	'ready',
                      	'updating',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 3;
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: 7dfab62da75440e0bed46d02133a0f8f
                  expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.ctrl.status[{#NAME}])<>1 and last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.ctrl.status[{#NAME}])<>2'
                  name: 'Pure Storage FlashArray: Controller [{#NAME}]: Controller is not ready'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Controller {#NAME} status is not "ready" or "updating".'
                  tags:
                    - tag: scope
                      value: health
            - uuid: dd63482ca18d48f8840b3db73b997999
              name: 'Controller [{#NAME}]: Version'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.version[{#NAME}]'
              value_type: CHAR
              description: 'Version of the {#NAME} controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.version
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#INDEX}'
              path: $.hardware.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.controllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: ad7ad0c1965f40c4aa64dbbdecd0bcbc
          name: 'Drive discovery'
          type: DEPENDENT
          key: purestorage.flasharray.drive.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.DRIVE.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.DRIVE.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#PROTOCOL}'
                value: ^null$
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: ^-$
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage drives from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 488202a55703418d91483c6ed575c427
              name: 'Drive [{#NAME}]: Capacity'
              type: DEPENDENT
              key: 'purestorage.flasharray.drive.capacity[{#NAME}]'
              units: B
              description: 'The capacity of the {#NAME} drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.drive.get[{#NAME}]'
              tags:
                - tag: component
                  value: drive
                - tag: drive
                  value: '{#TYPE}'
                - tag: protocol
                  value: '{#PROTOCOL}'
            - uuid: e0d18f21c935472d9505dad16b3dac74
              name: 'Drive [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.drive.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.drives[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
                - tag: drive
                  value: '{#TYPE}'
                - tag: protocol
                  value: '{#PROTOCOL}'
            - uuid: 26ed406b5fac46bb98ecccd975ffe8e3
              name: 'Drive [{#NAME}]: Serial number'
              type: DEPENDENT
              key: 'purestorage.flasharray.drive.serial[{#NAME}]'
              value_type: CHAR
              description: 'Serial number of the {#NAME} drive device.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.hardware.serial
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.drive.get[{#NAME}]'
              tags:
                - tag: component
                  value: drive
                - tag: drive
                  value: '{#TYPE}'
                - tag: protocol
                  value: '{#PROTOCOL}'
            - uuid: 272ec36f403e409c80f248e7d37ea4a9
              name: 'Drive [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.drive.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} drive.'
              valuemap:
                name: 'Drive Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'healthy',
                      	'empty',
                      	'updating',
                      	'unused',
                      	'evacuating',
                      	'identifying',
                      	'unhealthy',
                      	'recovering',
                      	'unrecognized',
                      	'failed'
                      ].indexOf(value);
                      return idx !== -1 ? idx : 10;
              master_item:
                key: 'purestorage.flasharray.drive.get[{#NAME}]'
              tags:
                - tag: component
                  value: drive
                - tag: drive
                  value: '{#TYPE}'
                - tag: protocol
                  value: '{#PROTOCOL}'
              trigger_prototypes:
                - uuid: f29ae0ee3d7444a98183590045d53aa1
                  expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.drive.status[{#NAME}])<>0 and last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.drive.status[{#NAME}])<>2 and last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.drive.status[{#NAME}])<>3'
                  name: 'Pure Storage FlashArray: Drive [{#NAME}]: Problem on the drive'
                  event_name: 'Pure Storage FlashArray: Drive [{#NAME}]: Drive is not healthy or is not ready for use'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Drive {#NAME} status is not "healthy", "updating", or "unused".'
                  tags:
                    - tag: scope
                      value: health
          graph_prototypes:
            - uuid: 1ef6267285804c4c8994ec197ad7eb54
              name: 'Drive [{#NAME}]: Capacity'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.drive.capacity[{#NAME}]'
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#INDEX}'
              path: $.hardware.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#PROTOCOL}'
              path: $.protocol
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.drives
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 3de3fa3b233d486690f58ebb6b40cf18
          name: 'Fan discovery'
          type: DEPENDENT
          key: purestorage.flasharray.fan.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.FAN.LLD.FILTER.INDEX.MATCHES}'
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.FAN.LLD.FILTER.INDEX.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#NAME}'
                value: '.*\.FAN[0-9]+$'
          description: 'Discovery of fans from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 7ad007338fdc40a2aaf589d5e492a97e
              name: 'Fan [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.fan.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} fan.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardware[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
                - tag: controller
                  value: '{#CTRL}'
            - uuid: 8e0821c8b7154bf596d54ba6917d45bc
              name: 'Fan [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.fan.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} fan.'
              valuemap:
                name: 'Hardware Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'ok',
                      	'critical',
                      	'degraded',
                      	'device_off',
                      	'identifying',
                      	'not_installed',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 6;
              master_item:
                key: 'purestorage.flasharray.fan.get[{#NAME}]'
              tags:
                - tag: component
                  value: fan
                - tag: controller
                  value: '{#CTRL}'
              trigger_prototypes:
                - uuid: c2ec7d246be44c60bc86338ddee9e377
                  expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.fan.status[{#NAME}])<>0'
                  name: 'Pure Storage FlashArray: Fan [{#NAME}]: Fan is not healthy'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Fan {#NAME} status is not "ok".'
                  tags:
                    - tag: scope
                      value: health
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#CTRL}'
              path: $.parent
            - lld_macro: '{#INDEX}'
              path: $.index
            - lld_macro: '{#NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.hardware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: dbcf02647ac84d67a8bc89cb6e61cb28
          name: 'Host discovery'
          type: DEPENDENT
          key: purestorage.flasharray.host.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GROUP}'
                value: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.GROUP.MATCHES}'
              - macro: '{#GROUP}'
                value: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.GROUP.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage hosts from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: cbc03265dea84c6886835ecdbba45559
              name: 'Host [{#NAME}]: Data reduction'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.drr[{#NAME}]'
              value_type: FLOAT
              description: 'The data reduction ratio (DRR) represents the efficiency of data reduction techniques such as compression and deduplication for the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.data_reduction
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: c96be731c08446b79bca3283a1547974
              name: 'Host [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} host.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hosts[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hosts.get
              tags:
                - tag: component
                  value: raw
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: a8c6bc9697424bd2a9908cdd9d86adc9
              name: 'Host [{#NAME}]: Bytes read per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.read_bytes.rate[{#NAME}]'
              units: Bps
              description: 'Number of bytes read from the {#NAME} host volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.output_per_sec
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 7433871757cc476e9deb0fac5325e173
              name: 'Host [{#NAME}]: Read requests per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.read_requests.rate[{#NAME}]'
              description: 'Number of read requests processed on the {#NAME} host volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.reads_per_sec
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 9b0c741b62704bb4926f2d0a9695655f
              name: 'Host [{#NAME}]: Size'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.size[{#NAME}]'
              units: B
              description: 'The physical space occupied on the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.size
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: d7ddc5432f7440eeaaf8ea629b8ed366
              name: 'Host [{#NAME}]: Snapshots size'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.snapshots_size[{#NAME}]'
              units: B
              description: 'The physical space occupied by snapshots on the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.snapshots
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 7744894a795c4a1d9aca45c7c02ba069
              name: 'Host [{#NAME}]: Thin provisioning'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.thin_provisioning[{#NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of sectors in the {#NAME} host volume that do not contain host-written data because the hosts have not written data to them or the sectors have been explicitly trimmed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.thin_provisioning
                - type: MULTIPLIER
                  parameters:
                    - '100'
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 5b53c068d79a4eb29b6e00b2501e6eae
              name: 'Host [{#NAME}]: Total data reduction'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.total_drr[{#NAME}]'
              value_type: FLOAT
              description: 'The total reduction ratio of all data on the {#NAME} host volume that has been processed by the data deduplication and compression engines.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total_reduction
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 4de2e3ef869a4c859da7bbed84844d2e
              name: 'Host [{#NAME}]: Microseconds per read'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.usec_per_read[{#NAME}]'
              units: µs
              description: 'Average time in microseconds required to process an I/O read request from the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.usec_per_read_op
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: da26e20fbd06499783569970242d5965
              name: 'Host [{#NAME}]: Microseconds per write'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.usec_per_write[{#NAME}]'
              units: µs
              description: 'Average time in microseconds required to process an I/O write request to the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.usec_per_write_op
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: d562ce2c6b814a52bb759ff13a115f55
              name: 'Host [{#NAME}]: Used space'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.used_space[{#NAME}]'
              units: B
              description: 'The total physical space occupied by all data on the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 754e824850d04560ab96ee9227823a2a
              name: 'Host [{#NAME}]: Write requests per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.write_requests.rate[{#NAME}]'
              description: 'Number of write requests processed on the {#NAME} host volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.writes_per_sec
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 25859db2b7a046c7b8993918aedf09d0
              name: 'Host [{#NAME}]: Bytes written per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.written_bytes.rate[{#NAME}]'
              units: Bps
              description: 'Number of bytes written to the {#NAME} host volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.input_per_sec
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
          graph_prototypes:
            - uuid: 077a05cbbbcf4b86a200235ef843b144
              name: 'Host [{#NAME}]: Operation latency'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.usec_per_read[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.usec_per_write[{#NAME}]'
            - uuid: 72253c19ec1441fd8474fcb2f8d59623
              name: 'Host [{#NAME}]: Read/write throughput'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.written_bytes.rate[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.read_bytes.rate[{#NAME}]'
            - uuid: 75b44e10db2c4652a3a4affeb9153c23
              name: 'Host [{#NAME}]: Requests per second'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.read_requests.rate[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.write_requests.rate[{#NAME}]'
            - uuid: 2b1554f56cae4cb0a71ac25af2443045
              name: 'Host [{#NAME}]: Space'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  yaxisside: RIGHT
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.size[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.used_space[{#NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.host.snapshots_size[{#NAME}]'
          master_item:
            key: purestorage.flasharray.hosts.get
          lld_macro_paths:
            - lld_macro: '{#GROUP}'
              path: $.hgroup
            - lld_macro: '{#NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.hosts
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 478e7c91f114410a818d94b82fd3088e
          name: 'Network interface discovery'
          type: DEPENDENT
          key: purestorage.flasharray.net_if.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#IFNAME}'
                value: '{$PURE.FLASHARRAY.NETIF.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#IFNAME}'
                value: '{$PURE.FLASHARRAY.NETIF.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage hosts from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 02c0c2d8c86b4346949e88496d451321
              name: 'Interface [{#IFNAME}]: Gateway'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.gateway[{#IFNAME}]'
              value_type: CHAR
              description: 'Represents the IP address of the gateway for the {#IFNAME} interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.gateway
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 3f1f5d598ff74ec8a99200f07a6ecefb
              name: 'Interface [{#IFNAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#IFNAME} network interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.interfaces[?(@.name == "{#IFNAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.net_ifs.get
              tags:
                - tag: component
                  value: raw
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: fd384edb08c140eaa3beddd95271339a
              name: 'Interface [{#IFNAME}]: IP address'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.ip[{#IFNAME}]'
              value_type: CHAR
              description: 'Represents the IP address of the {#IFNAME} interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.address
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 4de3a135121740d1aabc6505cca13a38
              name: 'Interface [{#IFNAME}]: MAC address'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.mac[{#IFNAME}]'
              value_type: CHAR
              description: 'Represents the MAC address of the {#IFNAME} interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.hwaddr
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
            - uuid: 414795590ee74d75bbbdab30e1d353d6
              name: 'Interface [{#IFNAME}]: Speed'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.speed[{#IFNAME}]'
              units: Bps
              description: 'Current bandwidth of the interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.speed
              master_item:
                key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
              trigger_prototypes:
                - uuid: d2655e4b69fb4c7194efe5020247cdc8
                  expression: 'change(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.net_if.speed[{#IFNAME}])<0 and last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.net_if.speed[{#IFNAME}])>0'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: '(change(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.net_if.speed[{#IFNAME}])>0 and last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.net_if.speed[{#IFNAME}],#2)>0)'
                  name: 'Pure Storage FlashArray: Interface [{#IFNAME}]: Ethernet has changed to lower speed than it was before'
                  opdata: 'Current reported speed: {ITEM.LASTVALUE1}'
                  priority: INFO
                  description: 'This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 8e3eb09b1c03460286381b8491be48c8
              name: 'Interface [{#IFNAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.net_if.speed[{#IFNAME}]'
          master_item:
            key: purestorage.flasharray.net_ifs.get
          lld_macro_paths:
            - lld_macro: '{#IFINDEX}'
              path: $.hardware.index
            - lld_macro: '{#IFNAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.interfaces
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 0abb8ee6fa884a389a20e105f6fa8709
          name: 'Pod discovery'
          type: DEPENDENT
          key: purestorage.flasharray.pod.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.POD.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.POD.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage pods from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 6149e63e598344e5a6d43e9ec8298e65
              name: 'Pod [{#NAME}]: Number of arrays'
              type: DEPENDENT
              key: 'purestorage.flasharray.pod.arrays[{#NAME}]'
              description: 'Number of arrays connected to the {#NAME} pod.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.arrays.length()
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'purestorage.flasharray.pod.get[{#NAME}]'
              tags:
                - tag: component
                  value: pod
                - tag: pod
                  value: '{#NAME}'
            - uuid: 9612332d9b2d4d0faddabe1c6bc423f8
              name: 'Pod [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.pod.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} pod.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.pods[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.pods.get
              tags:
                - tag: component
                  value: raw
                - tag: pod
                  value: '{#NAME}'
            - uuid: 59e1cdbd663b41c28544ad07d0bb6671
              name: 'Pod [{#NAME}]: Promotion status'
              type: DEPENDENT
              key: 'purestorage.flasharray.pod.status[{#NAME}]'
              trends: '0'
              description: 'The current promotion status of the {#NAME} pod.'
              valuemap:
                name: 'Pod Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.promotion_status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'demoted',
                      	'promoted'
                      ].indexOf(value);
                      return idx !== -1 ? idx : 2;
              master_item:
                key: 'purestorage.flasharray.pod.get[{#NAME}]'
              tags:
                - tag: component
                  value: pod
                - tag: pod
                  value: '{#NAME}'
          master_item:
            key: purestorage.flasharray.pods.get
          lld_macro_paths:
            - lld_macro: '{#NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pods
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 4750d6030dfc469996553ebe7133ca96
          name: 'Power supply discovery'
          type: DEPENDENT
          key: purestorage.flasharray.power.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.POWER.LLD.FILTER.INDEX.MATCHES}'
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.POWER.LLD.FILTER.INDEX.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#VOLT.VALUE}'
                value: ^null$
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of power supply components from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 4fc1747f0af84d6a88043ef3397a0599
              name: 'Power supply [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} power supply component.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardware[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
            - uuid: 392364b853c84209acf4fbbc4de2fa11
              name: 'Power supply [{#NAME}]: Model'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.model[{#NAME}]'
              value_type: CHAR
              description: 'Model of the {#NAME} power supply component.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.power.get[{#NAME}]'
              tags:
                - tag: component
                  value: power
            - uuid: 749a7f169b814078b60414c5573fb4ef
              name: 'Power supply [{#NAME}]: Serial number'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.serial[{#NAME}]'
              value_type: CHAR
              description: 'Serial number of the {#NAME} power supply component.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.serial
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.power.get[{#NAME}]'
              tags:
                - tag: component
                  value: power
            - uuid: 22c677efa3cc446fb679cb0299ed628b
              name: 'Power supply [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} power supply component.'
              valuemap:
                name: 'Hardware Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'ok',
                      	'critical',
                      	'degraded',
                      	'device_off',
                      	'identifying',
                      	'not_installed',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 6;
              master_item:
                key: 'purestorage.flasharray.power.get[{#NAME}]'
              tags:
                - tag: component
                  value: power
              trigger_prototypes:
                - uuid: 2b4700d8728f43f09f457bffc1f0f2f6
                  expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.power.status[{#NAME}])<>0'
                  name: 'Pure Storage FlashArray: Power supply [{#NAME}]: Power supply is not healthy'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Power supply component {#NAME} status is not "ok".'
                  tags:
                    - tag: scope
                      value: health
            - uuid: 5c6d37614d154bf2aaf0802063affe62
              name: 'Power supply [{#NAME}]: Voltage'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.value[{#NAME}]'
              units: V
              description: 'The current voltage value of the {#NAME} power supply component.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.power.get[{#NAME}]'
              tags:
                - tag: component
                  value: power
          graph_prototypes:
            - uuid: 1cf1118b11d84830804c6f97437877e5
              name: 'Power supply [{#NAME}]: Voltage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.power.value[{#NAME}]'
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#INDEX}'
              path: $.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#VOLT.VALUE}'
              path: $.voltage
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.hardware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: a8c19abbceee47a0a1f419e4fa3e258e
          name: 'Temperature sensor discovery'
          type: DEPENDENT
          key: purestorage.flasharray.temp.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.TEMP.LLD.FILTER.INDEX.MATCHES}'
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.TEMP.LLD.FILTER.INDEX.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TEMP.VALUE}'
                value: ^null$
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of temperature sensors from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 9870c41874014f4790febfa0a8c71ba6
              name: 'Sensor [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.temp.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} temperature sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardware[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
            - uuid: cc4880c2a9ec456abc20ed20049f2c6c
              name: 'Sensor [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.temp.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} temperature sensor.'
              valuemap:
                name: 'Hardware Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'ok',
                      	'critical',
                      	'degraded',
                      	'device_off',
                      	'identifying',
                      	'not_installed',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 6;
              master_item:
                key: 'purestorage.flasharray.temp.get[{#NAME}]'
              tags:
                - tag: component
                  value: sensor
              trigger_prototypes:
                - uuid: bdf2eaa567dc4c758f531d5d1126bbcd
                  expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.temp.status[{#NAME}])<>0'
                  name: 'Pure Storage FlashArray: Sensor [{#NAME}]: Sensor is not healthy'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Temperature sensor {#NAME} status is not "ok".'
                  tags:
                    - tag: scope
                      value: health
            - uuid: e8fb42ab04fb497c8349934b3c55f11f
              name: 'Sensor [{#NAME}]: Temperature'
              type: DEPENDENT
              key: 'purestorage.flasharray.temp.value[{#NAME}]'
              units: °C
              description: 'The current temperature value of the {#NAME} sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.temperature
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.temp.get[{#NAME}]'
              tags:
                - tag: component
                  value: sensor
          graph_prototypes:
            - uuid: e386829dbc6a4d98920100e8011cc11f
              name: 'Sensor [{#NAME}]: Temperature'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.temp.value[{#NAME}]'
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#CTRL}'
              path: $.parent
            - lld_macro: '{#INDEX}'
              path: $.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TEMP.VALUE}'
              path: $.temperature
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.hardware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          overrides:
            - name: 'Controller tag'
              step: '1'
              filter:
                conditions:
                  - macro: '{#CTRL}'
                    value: '^CT[0-9]+$'
              operations:
                - operator: REGEXP
                  value: '.*'
                  tags:
                    - tag: controller
                      value: '{#CTRL}'
            - name: 'Chassis tag'
              step: '2'
              filter:
                conditions:
                  - macro: '{#CTRL}'
                    value: '^CH[0-9]+$'
              operations:
                - operator: REGEXP
                  value: '.*'
                  tags:
                    - tag: chassis
                      value: '{#CTRL}'
        - uuid: 380cd5c61b1e4f8a97cc325b0409c98c
          name: 'Volume discovery'
          type: DEPENDENT
          key: purestorage.flasharray.volume.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.VOLUME.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.VOLUME.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage volumes from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 5b088eec81d2415687098ee9d32c0a16
              name: 'Volume [{#NAME}]: Data reduction'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.drr[{#SN}]'
              value_type: FLOAT
              description: 'The data reduction ratio (DRR) represents the efficiency of data reduction techniques such as compression and deduplication for the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.data_reduction
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 670ac91b3d124c17afc15f7bd8d58cd9
              name: 'Volume [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.get[{#SN}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.volumes[?(@.serial == "{#SN}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.volumes.get
              tags:
                - tag: component
                  value: raw
            - uuid: a1e03e0dcf544dfdbc9863d856c877de
              name: 'Volume [{#NAME}]: Bytes read per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.read_bytes.rate[{#SN}]'
              units: Bps
              description: 'Number of bytes read from the {#NAME} volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.output_per_sec
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 0d07b61e01bf483880c31592e242dfa3
              name: 'Volume [{#NAME}]: Read requests per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.read_requests.rate[{#SN}]'
              description: 'Number of read requests processed on the {#NAME} volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.reads_per_sec
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 9216a5ee2b1d4e1097a088da32b8a0fe
              name: 'Volume [{#NAME}]: Shared space'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.shared_space[{#SN}]'
              units: B
              description: 'The physical space occupied by deduplicated data on the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.shared_space
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: cb34a64b417c4c439ea412419eac764a
              name: 'Volume [{#NAME}]: Size'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.size[{#SN}]'
              units: B
              description: 'The physical space occupied by the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.size
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
              trigger_prototypes:
                - uuid: ef1f2b670134476386c847a817ea1eb2
                  expression: 'last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.volume.size[{#SN}],#1)<>last(/Pure Storage FlashArray v1 by HTTP/purestorage.flasharray.volume.size[{#SN}],#2)'
                  name: 'Pure Storage FlashArray: Volume [{#NAME}]: Volume size has been changed'
                  opdata: 'Current size: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Physical space occupied by the {#NAME} volume has been changed.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 61504507bf9a441e855d700cba0e30cc
              name: 'Volume [{#NAME}]: Snapshots size'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.snapshots_size[{#SN}]'
              units: B
              description: 'The physical space occupied by snapshots on the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.snapshots
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: fa48bfa1a9a74d548f9d366242884f34
              name: 'Volume [{#NAME}]: Thin provisioning'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.thin_provisioning[{#SN}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of sectors in the {#NAME} volume that do not contain host-written data because the hosts have not written data to them or the sectors have been explicitly trimmed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.thin_provisioning
                - type: MULTIPLIER
                  parameters:
                    - '100'
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 62a73c80f73d46e8b775bcf4aba136e3
              name: 'Volume [{#NAME}]: Total data reduction'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.total_drr[{#SN}]'
              value_type: FLOAT
              description: 'The total reduction ratio of all data on the {#NAME} volume that has been processed by the data deduplication and compression engines.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total_reduction
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: ece36fe874a54139a91e03c8ddb4dace
              name: 'Volume [{#NAME}]: Microseconds per read'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.usec_per_read[{#SN}]'
              units: µs
              description: 'Average time in microseconds required to process an I/O read request from the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.usec_per_read_op
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 8e2efef7df844077a6fa66234326af99
              name: 'Volume [{#NAME}]: Microseconds per write'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.usec_per_write[{#SN}]'
              units: µs
              description: 'Average time in microseconds required to process an I/O write request to the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.usec_per_write_op
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: ada1854c77a1455d89e82c4c551fe29d
              name: 'Volume [{#NAME}]: Used space'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.used_space[{#SN}]'
              units: B
              description: 'The total physical space occupied by all data on the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: df61b2bb9859455ab3eadee69249daf8
              name: 'Volume [{#NAME}]: Write requests per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.write_requests.rate[{#SN}]'
              description: 'Number of write requests processed on the {#NAME} volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.writes_per_sec
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 360462b1a04c4bd89296c2b5c1f951a9
              name: 'Volume [{#NAME}]: Bytes written per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.written_bytes.rate[{#SN}]'
              units: Bps
              description: 'Number of bytes written to the {#NAME} volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.monitor.input_per_sec
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
          graph_prototypes:
            - uuid: 47f783920c744bd7889e546b90082b4a
              name: 'Volume [{#NAME}]: Operation latency'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.usec_per_read[{#SN}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.usec_per_write[{#SN}]'
            - uuid: 5584b1764e1c442687e920659995f71b
              name: 'Volume [{#NAME}]: Read/write throughput'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.written_bytes.rate[{#SN}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.read_bytes.rate[{#SN}]'
            - uuid: 9fbcdb66f14f4111a987d1328d11f8a0
              name: 'Volume [{#NAME}]: Requests per second'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.read_requests.rate[{#SN}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.write_requests.rate[{#SN}]'
            - uuid: 26e566a88462416c8f0829d47c15128d
              name: 'Volume [{#NAME}]: Space'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  yaxisside: RIGHT
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.size[{#SN}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.shared_space[{#SN}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.used_space[{#SN}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'Pure Storage FlashArray v1 by HTTP'
                    key: 'purestorage.flasharray.volume.snapshots_size[{#SN}]'
          master_item:
            key: purestorage.flasharray.volumes.get
          lld_macro_paths:
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#SN}'
              path: $.serial
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.volumes
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
      tags:
        - tag: class
          value: storage
        - tag: subclass
          value: backup
        - tag: target
          value: flash-array
        - tag: target
          value: pure-storage
      macros:
        - macro: '{$PURE.FLASHARRAY.API.PASSWORD}'
          type: SECRET_TEXT
          description: 'Pure Storage FlashArray Web interface password.'
          config:
            type: TEXT
            priority: '4'
            label: Password
            description: 'Pure Storage FlashArray Web interface password.'
        - macro: '{$PURE.FLASHARRAY.API.TOKEN}'
          type: SECRET_TEXT
          description: 'Pure Storage FlashArray API token.'
          config:
            type: TEXT
            priority: '2'
            label: 'API token'
            description: 'Pure Storage FlashArray API token.'
        - macro: '{$PURE.FLASHARRAY.API.URL}'
          description: 'Pure Storage FlashArray Web interface URL.'
          config:
            type: TEXT
            priority: '1'
            label: 'Web interface URL'
            description: 'Pure Storage FlashArray Web interface URL.'
            required: 'YES'
        - macro: '{$PURE.FLASHARRAY.API.USERNAME}'
          type: SECRET_TEXT
          description: 'Pure Storage FlashArray Web interface username.'
          config:
            type: TEXT
            priority: '3'
            label: Username
            description: 'Pure Storage FlashArray Web interface username.'
        - macro: '{$PURE.FLASHARRAY.API.VERSION}'
          value: '1.19'
          description: 'Pure Storage FlashArray API version.'
          config:
            type: TEXT
            priority: '5'
            label: 'API version'
            description: 'Pure Storage FlashArray API version.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PURE.FLASHARRAY.CERT.EXPIRY.WARN}'
          value: '7'
          description: 'Number of days until the certificate expires.'
          config:
            type: TEXT
            priority: '6'
            section_name: Other
            label: 'Certificate expiration days'
            description: 'Number of days until the certificate expires.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PURE.FLASHARRAY.CERT.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable certificates by name.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Discoverable certificates by name (include)'
            description: 'Filter of discoverable certificates by name.'
        - macro: '{$PURE.FLASHARRAY.CERT.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable certificates by name.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Discoverable certificates by name (exclude)'
            description: 'Filter to exclude discoverable certificates by name.'
        - macro: '{$PURE.FLASHARRAY.CTRL.LLD.FILTER.INDEX.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable controllers by index.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Discoverable controllers by index (include)'
            description: 'Filter of discoverable controllers by index.'
        - macro: '{$PURE.FLASHARRAY.CTRL.LLD.FILTER.INDEX.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable controllers by index.'
          config:
            type: TEXT
            priority: '13'
            section_name: Filters
            label: 'Discoverable controllers by index (exclude)'
            description: 'Filter to exclude discoverable controllers by index.'
        - macro: '{$PURE.FLASHARRAY.DATA.TIMEOUT}'
          value: 15s
          description: 'Response timeout for the API.'
          config:
            type: TEXT
            priority: '7'
            section_name: Other
            label: 'API response timeout'
            description: 'Response timeout for the API.'
        - macro: '{$PURE.FLASHARRAY.DRIVE.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable storage drives by name.'
          config:
            type: TEXT
            priority: '20'
            section_name: Filters
            label: 'Discoverable storage drives by name (include)'
            description: 'Filter of discoverable storage drives by name.'
        - macro: '{$PURE.FLASHARRAY.DRIVE.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable storage drives by name.'
          config:
            type: TEXT
            priority: '21'
            section_name: Filters
            label: 'Discoverable storage drives by name (exclude)'
            description: 'Filter to exclude discoverable storage drives by name.'
        - macro: '{$PURE.FLASHARRAY.FAN.LLD.FILTER.INDEX.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable fans by index.'
          config:
            type: TEXT
            priority: '18'
            section_name: Filters
            label: 'Discoverable fans by index (include)'
            description: 'Filter of discoverable fans by index.'
        - macro: '{$PURE.FLASHARRAY.FAN.LLD.FILTER.INDEX.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable fans by index.'
          config:
            type: TEXT
            priority: '19'
            section_name: Filters
            label: 'Discoverable fans by index (exclude)'
            description: 'Filter to exclude discoverable fans by index.'
        - macro: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.GROUP.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable hosts by group.'
          config:
            type: TEXT
            priority: '24'
            section_name: Filters
            label: 'Discoverable hosts by group (include)'
            description: 'Filter of discoverable hosts by group.'
        - macro: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.GROUP.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable hosts by group.'
          config:
            type: TEXT
            priority: '25'
            section_name: Filters
            label: 'Discoverable hosts by group (exclude)'
            description: 'Filter to exclude discoverable hosts by group.'
        - macro: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable hosts by name.'
          config:
            type: TEXT
            priority: '22'
            section_name: Filters
            label: 'Discoverable hosts by name (include)'
            description: 'Filter of discoverable hosts by name.'
        - macro: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable hosts by name.'
          config:
            type: TEXT
            priority: '23'
            section_name: Filters
            label: 'Discoverable hosts by name (exclude)'
            description: 'Filter to exclude discoverable hosts by name.'
        - macro: '{$PURE.FLASHARRAY.HTTP_PROXY}'
          description: 'HTTP proxy for API requests. You can specify it using the format [protocol://][username[:password]@]proxy.example.com[:port]. For more details, see the documentation at https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/http'
          config:
            type: TEXT
            priority: '30'
            section_name: Other
            label: 'HTTP proxy'
            description: 'HTTP proxy for API requests. You can specify it using the format [protocol://][username[:password]@]proxy.example.com[:port]. For more details, see the documentation at https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/http'
        - macro: '{$PURE.FLASHARRAY.NETIF.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable network interfaces by name.'
          config:
            type: TEXT
            priority: '26'
            section_name: Filters
            label: 'Discoverable network interfaces by name (include)'
            description: 'Filter of discoverable network interfaces by name.'
        - macro: '{$PURE.FLASHARRAY.NETIF.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable network interfaces by name.'
          config:
            type: TEXT
            priority: '27'
            section_name: Filters
            label: 'Discoverable network interfaces by name (exclude)'
            description: 'Filter to exclude discoverable network interfaces by name.'
        - macro: '{$PURE.FLASHARRAY.POD.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable storage pods by name.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Discoverable storage pods by name (include)'
            description: 'Filter of discoverable storage pods by name.'
        - macro: '{$PURE.FLASHARRAY.POD.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable storage pods by name.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Discoverable storage pods by name (exclude)'
            description: 'Filter to exclude discoverable storage pods by name.'
        - macro: '{$PURE.FLASHARRAY.POWER.LLD.FILTER.INDEX.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable power supply components by index.'
          config:
            type: TEXT
            priority: '16'
            section_name: Filters
            label: 'Discoverable power supply components by index (include)'
            description: 'Filter of discoverable power supply components by index.'
        - macro: '{$PURE.FLASHARRAY.POWER.LLD.FILTER.INDEX.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable power supply components by index.'
          config:
            type: TEXT
            priority: '17'
            section_name: Filters
            label: 'Discoverable power supply components by index (exclude)'
            description: 'Filter to exclude discoverable power supply components by index.'
        - macro: '{$PURE.FLASHARRAY.TEMP.LLD.FILTER.INDEX.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable temperature sensors by index.'
          config:
            type: TEXT
            priority: '14'
            section_name: Filters
            label: 'Discoverable temperature sensors by index (include)'
            description: 'Filter of discoverable temperature sensors by index.'
        - macro: '{$PURE.FLASHARRAY.TEMP.LLD.FILTER.INDEX.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable temperature sensors by index.'
          config:
            type: TEXT
            priority: '15'
            section_name: Filters
            label: 'Discoverable temperature sensors by index (exclude)'
            description: 'Filter to exclude discoverable temperature sensors by index.'
        - macro: '{$PURE.FLASHARRAY.VOLUME.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable storage volumes by name.'
          config:
            type: TEXT
            priority: '28'
            section_name: Filters
            label: 'Discoverable storage volumes by name (include)'
            description: 'Filter of discoverable storage volumes by name.'
        - macro: '{$PURE.FLASHARRAY.VOLUME.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable storage volumes by name.'
          config:
            type: TEXT
            priority: '29'
            section_name: Filters
            label: 'Discoverable storage volumes by name (exclude)'
            description: 'Filter to exclude discoverable storage volumes by name.'
      dashboards:
        - uuid: b92fba854dba4f01a0aae16baadd25ec
          name: 'Pure Storage FlashArray: General'
          auto_start: 'NO'
          pages:
            - name: Array
              widgets:
                - type: item
                  name: Hostname
                  width: '24'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        key: purestorage.flasharray.array.hostname
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: svggraph
                  name: 'Array read/write throughput'
                  'y': '3'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Array bytes read per second'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Array bytes written per second'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_lines_mode
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: XGKYU
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Array operation latency'
                  'y': '8'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Array microseconds per read'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Array microseconds per write'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: ds.2.color
                      value: F44336
                    - type: INTEGER
                      name: ds.2.fill
                      value: '0'
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Array microseconds per operation'
                    - type: INTEGER
                      name: ds.2.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: INTEGER
                      name: legend_lines_mode
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: SSNAB
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: item
                  name: Version
                  x: '24'
                  width: '24'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        key: purestorage.flasharray.array.version
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: svggraph
                  name: 'Array requests per second'
                  x: '36'
                  'y': '3'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Array read requests per second'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Array write requests per second'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_lines_mode
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: NCUID
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Array space'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: ds.0.axisy
                      value: '1'
                    - type: STRING
                      name: ds.0.color
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Array capacity'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Array shared space'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: ds.2.color
                      value: F44336
                    - type: INTEGER
                      name: ds.2.fill
                      value: '0'
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Array snapshots size'
                    - type: INTEGER
                      name: ds.2.width
                      value: '2'
                    - type: STRING
                      name: ds.3.color
                      value: 0080FF
                    - type: INTEGER
                      name: ds.3.fill
                      value: '0'
                    - type: STRING
                      name: ds.3.items.0
                      value: 'Array volumes size'
                    - type: INTEGER
                      name: ds.3.width
                      value: '2'
                    - type: STRING
                      name: ds.4.color
                      value: 7E57C2
                    - type: INTEGER
                      name: ds.4.fill
                      value: '0'
                    - type: STRING
                      name: ds.4.items.0
                      value: 'Array system size'
                    - type: INTEGER
                      name: ds.4.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '5'
                    - type: INTEGER
                      name: legend_lines_mode
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: SFPXY
                - type: item
                  name: Capacity
                  x: '48'
                  width: '24'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        key: purestorage.flasharray.array.capacity
                    - type: INTEGER
                      name: show.0
                      value: '2'
            - name: 'Network interfaces'
              widgets:
                - type: honeycomb
                  name: 'Network interfaces'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 64B5F6
                    - type: STRING
                      name: items.0
                      value: '*Speed'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: interface
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: TZTHI
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: Speed
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: TZTHI._itemid
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: ABHBM
                    - type: INTEGER
                      name: righty
                      value: '0'
            - name: Drives
              widgets:
                - type: honeycomb
                  name: Drives
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 64B5F6
                    - type: STRING
                      name: items.0
                      value: '*Capacity'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: drive
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: YBMRB
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: Capacity
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: YBMRB._itemid
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IEDRA
                    - type: INTEGER
                      name: righty
                      value: '0'
            - name: Volumes
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        name: 'Volume [{#NAME}]: Operation latency'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                - type: graphprototype
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        name: 'Volume [{#NAME}]: Requests per second'
                    - type: STRING
                      name: reference
                      value: AAAAL
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        name: 'Volume [{#NAME}]: Read/write throughput'
                    - type: STRING
                      name: reference
                      value: AAAAK
                - type: graphprototype
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        name: 'Volume [{#NAME}]: Space'
                    - type: STRING
                      name: reference
                      value: AAAAM
            - name: Hosts
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        name: 'Host [{#NAME}]: Operation latency'
                    - type: STRING
                      name: reference
                      value: AAAAF
                - type: graphprototype
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        name: 'Host [{#NAME}]: Requests per second'
                    - type: STRING
                      name: reference
                      value: AAAAH
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        name: 'Host [{#NAME}]: Read/write throughput'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graphprototype
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v1 by HTTP'
                        name: 'Host [{#NAME}]: Space'
                    - type: STRING
                      name: reference
                      value: AAAAI
            - name: Sensors
              widgets:
                - type: honeycomb
                  name: Fans
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: items.0
                      value: '*Status'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: fan
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: YQLGC
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: STRING
                      name: thresholds.0.color
                      value: 26A69A
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: E65660
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: FCCB1D
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.3.color
                      value: 90A4AE
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '3'
                    - type: STRING
                      name: thresholds.4.color
                      value: 29B6F6
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.5.color
                      value: 546E7A
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '5'
                - type: honeycomb
                  name: 'Temperature sensors'
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: items.0
                      value: '*Temperature'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: sensor
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: EOKHA
                    - type: INTEGER
                      name: secondary_label_bold
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: 26A69A
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFCA28
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '50'
                    - type: STRING
                      name: thresholds.2.color
                      value: E65660
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '70'
                - type: svggraph
                  name: 'Temperature value'
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: EOKHA._itemid
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: FDGJA
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: honeycomb
                  name: 'Power supply'
                  'y': '15'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 64B5F6
                    - type: STRING
                      name: items.0
                      value: '*Voltage'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: power
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: MZNPS
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: Voltage
                  'y': '20'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: MZNPS._itemid
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: NGVAC
                    - type: INTEGER
                      name: righty
                      value: '0'
      valuemaps:
        - uuid: df8766d094be4b5aa569a20e9fc1e552
          name: 'Certificate Type'
          mappings:
            - value: '0'
              newvalue: self-signed
            - value: '1'
              newvalue: imported
            - value: '2'
              newvalue: other
        - uuid: 0e3d616a7682487997fcf4e756bd875a
          name: 'Connection Status'
          mappings:
            - value: '0'
              newvalue: disconnected
            - value: '1'
              newvalue: connected
            - value: '2'
              newvalue: unknown
        - uuid: 2f9f5ae3a2f14408b5fa8c0f82d3d5a6
          name: 'Controller Mode'
          mappings:
            - value: '0'
              newvalue: 'not present'
            - value: '1'
              newvalue: offline
            - value: '2'
              newvalue: primary
            - value: '3'
              newvalue: secondary
            - value: '4'
              newvalue: unknown
        - uuid: 05c72722f9f9460291f50d3663161716
          name: 'Controller Status'
          mappings:
            - value: '0'
              newvalue: 'not ready'
            - value: '1'
              newvalue: ready
            - value: '2'
              newvalue: updating
            - value: '3'
              newvalue: unknown
        - uuid: 00a977f4cb4d4962aeae7124e63f460e
          name: 'Drive Status'
          mappings:
            - value: '0'
              newvalue: healthy
            - value: '1'
              newvalue: empty
            - value: '2'
              newvalue: updating
            - value: '3'
              newvalue: unused
            - value: '4'
              newvalue: evacuating
            - value: '5'
              newvalue: identifying
            - value: '6'
              newvalue: unhealthy
            - value: '7'
              newvalue: recovering
            - value: '8'
              newvalue: unrecognized
            - value: '9'
              newvalue: failed
        - uuid: 788e2982fbd5478da2a4f94e46031439
          name: 'Hardware Status'
          mappings:
            - value: '0'
              newvalue: ok
            - value: '1'
              newvalue: critical
            - value: '2'
              newvalue: degraded
            - value: '3'
              newvalue: device_off
            - value: '4'
              newvalue: identifying
            - value: '5'
              newvalue: not_installed
            - value: '6'
              newvalue: unknown
        - uuid: 950c9c6b81e042938ca464a84a57b662
          name: 'Pod Status'
          mappings:
            - value: '0'
              newvalue: demoted
            - value: '1'
              newvalue: promoted
            - value: '2'
              newvalue: unknown
        - uuid: fe5ac2914b2f46fbbd0516e3ee0959bc
          name: 'Service Status'
          mappings:
            - value: '0'
              newvalue: disabled
            - value: '1'
              newvalue: enabled
            - value: '2'
              newvalue: unknown
    - uuid: 44990575121d4798b9e10520604c786c
      template: 'Pure Storage FlashArray v2 by HTTP'
      name: 'Pure Storage FlashArray v2 by HTTP'
      description: |
        Setup:
        1. Create a host for the Pure Storage FlashArray device and assign to it the "Pure Storage FlashArray v2 by HTTP" template.
        2. Enter your API token from the Purity//FA web interface into the {$PURE.FLASHARRAY.API.TOKEN} macro.
        3. Set your Purity//FA web interface URL as the {$PURE.FLASHARRAY.API.URL} macro value.
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        1. Create a host for the Pure Storage FlashArray device and assign to it the "Pure Storage FlashArray v1 by HTTP" template.
        2. Enter your API token from the FlashArray (Purity//FA) graphical user interface into the `API token` host wizard configuration field.
        3. It is possible to authenticate using username and password by entering them from the FlashArray (Purity//FA) graphical user interface into the `Username` and `Password` host wizard configuration fields.
        4. Set your FlashArray (Purity//FA) graphical user interface URL as the `Web interface URL` host wizard configuration field value.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/SAN
      items:
        - uuid: 84bba6c063984124925eaf8eea874ade
          name: 'Critical alerts'
          type: DEPENDENT
          key: purestorage.flasharray.alert.critical
          description: 'Number of active alerts in the web interface of Pure Storage FlashArray with a severity level of Critical.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$..[?(@.severity == "critical")].length()'
          master_item:
            key: purestorage.flasharray.alert.get
          tags:
            - tag: component
              value: alerts
          triggers:
            - uuid: a56746a2863b4615ab0ed53f9396533d
              expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.alert.critical)>0'
              name: 'Pure Storage FlashArray: Critical alerts have been detected'
              opdata: 'Alerts number: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Recommended to refer to the Pure Storage FlashArray web interface to check the alert details.'
              tags:
                - tag: scope
                  value: notice
        - uuid: 18eac68344f94746bccdce0a070f89fa
          name: 'Alerts data item errors'
          type: DEPENDENT
          key: purestorage.flasharray.alert.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from alert data retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.alert.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 35cfac4bfa9a41c9bf61129d212cee27
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.alert.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get alerts data'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get alert data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: e4487e51d7634eb49e8af75ed6536379
          name: 'Get alerts data'
          type: DEPENDENT
          key: purestorage.flasharray.alert.get
          history: '0'
          value_type: TEXT
          description: 'Collects alert data from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	alerts = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	alerts = getHttpData(
                  		url + 'api/' + version + '/alerts'
                  	).filter(function (item) {
                  		if (item['state'] == 'open') {
                  			return true;
                  		}
                  		return false;
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'alerts': alerts,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 8d64afad1936495283b3afe15d3f7071
          name: 'Warning alerts'
          type: DEPENDENT
          key: purestorage.flasharray.alert.warning
          description: 'Number of active alerts in the web interface of Pure Storage FlashArray with a severity level of Warning.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$..[?(@.severity == "warning")].length()'
          master_item:
            key: purestorage.flasharray.alert.get
          tags:
            - tag: component
              value: alerts
          triggers:
            - uuid: 0f53729b5ba1413b87b40a67c930db93
              expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.alert.warning)>0'
              name: 'Pure Storage FlashArray: Warning alerts have been detected'
              opdata: 'Alerts number: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Recommended to refer to the Pure Storage FlashArray web interface to check the alert details.'
              tags:
                - tag: scope
                  value: notice
        - uuid: c29f9b470c394c49abc347efb8eea82a
          name: 'Array capacity'
          type: DEPENDENT
          key: purestorage.flasharray.array.capacity
          units: B
          description: 'Total capacity of the array.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.capacity
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 72ddad3de47d4fbfbce481395e1f5d26
          name: 'Array data reduction'
          type: DEPENDENT
          key: purestorage.flasharray.array.drr
          value_type: FLOAT
          description: 'The data reduction ratio (DRR) represents the efficiency of data reduction techniques such as compression and deduplication for the array volume.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.data_reduction
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 751e355686e74d3eb7abbba1b6671c67
          name: 'Storage array item errors'
          type: DEPENDENT
          key: purestorage.flasharray.array.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from array data retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 4ca738840e004d2cb4f7e5839fe87d86
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.array.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get storage array data'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get array data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 2e93f80f7cdb44f29c6e4365d66ad6ca
          name: 'Get array data'
          type: DEPENDENT
          key: purestorage.flasharray.array.get
          history: '0'
          value_type: TEXT
          description: 'Collects array data from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	storage_array = {},
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  			if (Array.isArray(response) & response.length > 0) {
                  				response = response[0]
                  			}
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	storage_array = getHttpData(url + 'api/' + version + '/arrays');
                  
                  	storage_array['performance'] = getHttpData(url + 'api/' + version + '/arrays/performance');
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'array': storage_array,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: fbba015500794db09c3c145adb583177
          name: 'Array hostname'
          type: DEPENDENT
          key: purestorage.flasharray.array.hostname
          value_type: CHAR
          description: 'Host name of the array.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.name
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: ec77f6ae385b4048b24b2cb0bebd8478
          name: 'Array OS'
          type: DEPENDENT
          key: purestorage.flasharray.array.os
          value_type: CHAR
          description: 'Operating system of the array.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.os
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: b09195afc5d944208ee3159dd66052ce
          name: 'Array parity'
          type: DEPENDENT
          key: purestorage.flasharray.array.parity
          value_type: FLOAT
          units: '%'
          description: 'The percentage of data that is protected.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.parity
            - type: MULTIPLIER
              parameters:
                - '100'
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 802501778aa743919a29ea4b02a154c4
          name: 'Array physical size'
          type: DEPENDENT
          key: purestorage.flasharray.array.physical_size
          units: B
          description: 'The total physical space occupied by system, shared space, volume, and snapshot data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.total_physical
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 4330d213f2734eb991e030fad372fc69
          name: 'Array bytes read per second'
          type: DEPENDENT
          key: purestorage.flasharray.array.read_bytes.rate
          units: Bps
          description: 'Number of bytes read per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.performance.read_bytes_per_sec
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 2b4e83098096427398b780b57487731e
          name: 'Array read requests per second'
          type: DEPENDENT
          key: purestorage.flasharray.array.read_requests.rate
          description: 'Number of read requests processed per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.performance.reads_per_sec
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: da5cbeda60c74159bf8eed97073e2d95
          name: 'Array shared space'
          type: DEPENDENT
          key: purestorage.flasharray.array.shared_space
          units: B
          description: 'The physical space occupied by deduplicated data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.shared
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 480438f65c4848f88c2c5ce049843c97
          name: 'Array snapshots size'
          type: DEPENDENT
          key: purestorage.flasharray.array.snapshots_size
          units: B
          description: 'The physical space occupied by snapshots.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.snapshots
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 59ba324b06694ac3980b4ece65f3b8c3
          name: 'Array system size'
          type: DEPENDENT
          key: purestorage.flasharray.array.system_size
          units: B
          description: 'The physical space occupied by internal array metadata.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.system
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 03f32ba70ddd4aaf804c4c8d3020cf3d
          name: 'Array thin provisioning'
          type: DEPENDENT
          key: purestorage.flasharray.array.thin_provisioning
          value_type: FLOAT
          units: '%'
          description: 'The percentage of volume sectors that do not contain host-written data because the hosts have not written data to them or the sectors have been explicitly trimmed.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.thin_provisioning
            - type: MULTIPLIER
              parameters:
                - '100'
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 5c83ae6a3ff14f0fa2b470735afe7af0
          name: 'Array total data reduction'
          type: DEPENDENT
          key: purestorage.flasharray.array.total_drr
          value_type: FLOAT
          description: 'The total reduction ratio of all data on the array volume that has been processed by the data deduplication and compression engines.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.total_reduction
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 0131477d29fb48eebbcaf904d85025a9
          name: 'Array microseconds per operation'
          type: DEPENDENT
          key: purestorage.flasharray.array.usec_per_op
          units: µs
          description: 'Average local queue time in microseconds for both read and write operations.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.performance.local_queue_usec_per_op
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: a7b37f7e2d104adaa1b9234559b170de
          name: 'Array microseconds per read'
          type: DEPENDENT
          key: purestorage.flasharray.array.usec_per_read
          units: µs
          description: 'Average time in microseconds required to process an I/O read request from the array. The average time does not include SAN time, queue time, or QoS rate limit time.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.performance.usec_per_read_op
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: ed1b118a7262443fa7f4c9bc1f8ca41e
          name: 'Array microseconds per write'
          type: DEPENDENT
          key: purestorage.flasharray.array.usec_per_write
          units: µs
          description: 'Average time in microseconds required to process an I/O write request to the array. The average time does not include SAN time, queue time, or QoS rate limit time.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.performance.usec_per_write_op
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 7a825d5aaec141f79be52dedacd025b5
          name: 'Array used space'
          type: DEPENDENT
          key: purestorage.flasharray.array.used_space
          units: B
          description: 'The total space occupied by system, shared space, volume, and snapshot data.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.space.total_used
              error_handler: DISCARD_VALUE
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: a681549b875b4f56a6ecc985f1fe7752
          name: 'Array version'
          type: DEPENDENT
          key: purestorage.flasharray.array.version
          value_type: CHAR
          description: 'Version of the array.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: 9affcc3786c947fa9b7a2803740415d8
          name: 'Array write requests per second'
          type: DEPENDENT
          key: purestorage.flasharray.array.write_requests.rate
          description: 'Number of write requests processed per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.performance.writes_per_sec
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: a1b6902f99ee40278f30646fa5a27111
          name: 'Array bytes written per second'
          type: DEPENDENT
          key: purestorage.flasharray.array.written_bytes.rate
          units: Bps
          description: 'Number of bytes written per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.array.performance.write_bytes_per_sec
          master_item:
            key: purestorage.flasharray.array.get
          tags:
            - tag: component
              value: array
        - uuid: bf9a63ef87674ff4a3ec07f7637435cb
          name: Authentication
          type: SCRIPT
          key: purestorage.flasharray.auth
          history: '0'
          value_type: TEXT
          params: |
            var params = JSON.parse(value),
            	request = new HttpRequest(),
            	token = '',
            	error_msg = '';
            
            function login(url) {
            	var token = '';
            	response = request.post(url);
            	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            	if (request.getStatus() !== 200) {
            		throw 'Failed to receive data: invalid response status code.';
            	}
            
            	if (response !== null) {
            		try {
            			username = JSON.parse(response).username;
            		}
            		catch (error) {
            			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
            		}
            	} else {
            		throw 'Authentication failed.';
            	}
            
            	var headers = request.getHeaders();
            	for (key in headers) {
            		if (key.toLowerCase() == 'x-auth-token') {
            			token = headers[key];
            		}
            	}
            
            	return token;
            };
            
            try {
            
            	['url', 'token', 'version'].forEach(function (field) {
            		var macro = '{$PURE.FLASHARRAY.API.' + field.toUpperCase() + '}';
            		if (typeof params[field] === 'undefined' || params[field] === macro) {
            			throw 'Please set \'' + field + '\' script input parameter to the proper ' + macro + ' macro value.';
            		}
            	});
            	['url', 'version'].forEach(function (field) {
            		if (typeof params[field] == '') {
            			throw 'Please set \'' + field + '\' script input parameter to the proper value.';
            		}
            	});
            
            	if (params.url.indexOf('http://') === -1 && params.url.indexOf('https://') === -1) {
            		params.url = 'https://' + params.url + (!params.url.endsWith('/') ? '/' : '');;
            	}
            
            	if (typeof params.http_proxy !== 'undefined' && params.http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && params.http_proxy !== '') {
            		request.setProxy(params.http_proxy);
            	}
            
            	request.addHeader('Accept: application/json');
            	request.addHeader('Content-Type: application/json');
            	request.addHeader('api-token: ' + params.token);
            	token = login(
            		params.url + 'api/' + params.version + '/login'
            	);
            
            } catch (err) {
            	error_msg = err;
            };
            
            return JSON.stringify({
            	'token': token,
            	'error': error_msg.toString()
            });
          description: |
            Pure Storage FlashArray authentication with API token usage.
            Returns a session token; it is required only once and is used for all dependent script items.
            A session will expire after 30 minutes. Check the template documentation for the details.
          timeout: '{$PURE.FLASHARRAY.DATA.TIMEOUT}'
          parameters:
            - name: http_proxy
              value: '{$PURE.FLASHARRAY.HTTP_PROXY}'
            - name: token
              value: '{$PURE.FLASHARRAY.API.TOKEN}'
            - name: url
              value: '{$PURE.FLASHARRAY.API.URL}'
            - name: version
              value: '{$PURE.FLASHARRAY.API.VERSION}'
          tags:
            - tag: component
              value: raw
        - uuid: 9c81b77d59c54158954b57b0637962f2
          name: 'Authentication item errors'
          type: DEPENDENT
          key: purestorage.flasharray.auth.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from the authentication item.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: bf2b0cb907c64c01bdaf4c26daaba937
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.auth.errors))>0'
              name: 'Pure Storage FlashArray: Authentication has failed'
              priority: AVERAGE
              description: 'An error occurred when trying to perform authentication in the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 496de11b01214b499de770299ff60364
          name: 'Certificates item errors'
          type: DEPENDENT
          key: purestorage.flasharray.certificates.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from certificate retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.certificates.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 8f8183d63de847e28abc795e6f5ae1d0
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.certificates.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get certificates'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get certificate data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 2be77186be6d416db147131c13671e50
          name: 'Get certificates'
          type: DEPENDENT
          key: purestorage.flasharray.certificates.get
          history: '0'
          value_type: TEXT
          description: 'Collects all certificates from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	certs = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	certs = getHttpData(url + 'api/' + version + '/certificates');
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'certs': certs,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: ea659408346a436c9f273f517d9edcc5
          name: 'Storage hardware item errors'
          type: DEPENDENT
          key: purestorage.flasharray.hardware.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from hardware retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.hardware.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: c5afee5d034d4f78abe061d5f1774745
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.hardware.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get hardware data'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get hardware data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: e7b56f166f234fbfae58b8dade895abd
          name: 'Get hardware data'
          type: DEPENDENT
          key: purestorage.flasharray.hardware.get
          history: '0'
          value_type: TEXT
          description: 'Collects hardware from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	drives = [],
                  	hardware = [],
                  	controllers = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	drives = getHttpData(url + 'api/' + version + '/drives');
                  
                  	controllers = getHttpData(url + 'api/' + version + '/controllers');
                  
                  	getHttpData(
                  		url + 'api/' + version + '/hardware'
                  	).forEach(function (item) {
                  		var applied = false;
                  		drives.forEach(function (drive, index) {
                  			if (drive['name'] && item['name'] && drive['name'] == item['name']) {
                  				drives[index]['hardware'] = item;
                  				applied = true;
                  			}
                  		});
                  		controllers.forEach(function (ctrl, index) {
                  			if (ctrl['name'] && item['name'] && ctrl['name'] == item['name']) {
                  				controllers[index]['hardware'] = item;
                  				applied = true;
                  			}
                  		});
                  		if (!applied) {
                  			var nameArray = item['name'].split('.');
                  			if (nameArray.length > 1) {
                  				item['parent'] = nameArray[0];
                  			}
                  			hardware.push(item);
                  		}
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'drives': drives,
                  	'hardware': hardware,
                  	'controllers': controllers,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 7b6cc9ef29bc46cd80d2cac92f1ebe0f
          name: 'Storage hosts item errors'
          type: DEPENDENT
          key: purestorage.flasharray.hosts.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from host data retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.hosts.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 6263e31c79bd4c348e5f5474e142f425
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.hosts.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get hosts'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get host data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 1ab5da19e46642fd95e38713d54b446e
          name: 'Get hosts'
          type: DEPENDENT
          key: purestorage.flasharray.hosts.get
          history: '0'
          value_type: TEXT
          description: 'Collects all hosts from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	hosts = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	hosts = getHttpData(url + 'api/' + version + '/hosts');
                  
                  	getHttpData(
                  		url + 'api/' + version + '/hosts/performance'
                  	).forEach(function (item) {
                  		hosts.forEach(function (host, index) {
                  			if (host['name'] && item['name'] && host['name'] == item['name']) {
                  				hosts[index]['performance'] = item;
                  			}
                  		});
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'hosts': hosts,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 48cbf0770c82449796bb648c0b1b9a72
          name: 'Storage network interfaces item errors'
          type: DEPENDENT
          key: purestorage.flasharray.net_ifs.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from network interface retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.net_ifs.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 25743805dce04ccfa21f4714cb96ec31
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.net_ifs.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get network interfaces'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get network interface data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: d4b5f78ac0a24fe3ae06a4d1e46cc613
          name: 'Get network interfaces'
          type: DEPENDENT
          key: purestorage.flasharray.net_ifs.get
          history: '0'
          value_type: TEXT
          description: 'Collects all network interfaces from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	interfaces = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	interfaces = getHttpData(url + 'api/' + version + '/network-interfaces');
                  
                  	getHttpData(
                  		url + 'api/' + version + '/network-interfaces/performance'
                  	).forEach(function (item) {
                  		interfaces.forEach(function (netif, index) {
                  			if (netif['name'] && item['name'] && netif['name'] == item['name']) {
                  				interfaces[index]['performance'] = item['eth'];
                  			}
                  		});
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'interfaces': interfaces,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 3dfa393c4e704ed68322366ea80f09fa
          name: 'Phone home status'
          type: DEPENDENT
          key: purestorage.flasharray.phone_home.status
          trends: '0'
          description: 'Current status of a manually-initiated phone home.'
          valuemap:
            name: Boolean
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.support.phonehome_enabled
            - type: BOOL_TO_DECIMAL
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: purestorage.flasharray.support.get
          tags:
            - tag: component
              value: support
          triggers:
            - uuid: 9f233a1e8a96439c8e82b93e44d24219
              expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.phone_home.status)=0'
              name: 'Pure Storage FlashArray: Phone Home has been disabled'
              opdata: 'Current status: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Phone Home connects to the Pure1 service and uploads logs for continuous health monitoring.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 0cb3c68298984cffb61595a8b8a949cb
          name: 'Storage pods item errors'
          type: DEPENDENT
          key: purestorage.flasharray.pods.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from pod retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.pods.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: d0c9b57785a84604893b92e0bed0c7ec
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.pods.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get pods'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get pod data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: c45d966070b840e69bf07b6946f3404c
          name: 'Get pods'
          type: DEPENDENT
          key: purestorage.flasharray.pods.get
          history: '0'
          value_type: TEXT
          description: 'Collects all pods from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	pods = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	pods = getHttpData(url + 'api/' + version + '/pods');
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'pods': pods,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: a424b8b37edd4deb8bf745f78e00e2a9
          name: 'Remote assist status'
          type: DEPENDENT
          key: purestorage.flasharray.remote_assist.status
          trends: '0'
          description: 'Status of the remote assist connection.'
          valuemap:
            name: Boolean
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.support.remote_assist_active
            - type: BOOL_TO_DECIMAL
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 6h
          master_item:
            key: purestorage.flasharray.support.get
          tags:
            - tag: component
              value: support
          triggers:
            - uuid: 8991c7d3ca95466da03f4ac44fccb872
              expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.remote_assist.status)=1'
              name: 'Pure Storage FlashArray: RemoteAssist has been enabled'
              opdata: 'Current status: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'Purity''s administrator-controlled RemoteAssist feature enables a Technical Support Engineer to communicate directly with the FlashArray via a secure link, effectively establishing an additional administrative session for the duration of the diagnosis and service.'
              tags:
                - tag: scope
                  value: security
        - uuid: ef6ac77724b54851b0a9316ab3ef8209
          name: 'Support information item errors'
          type: DEPENDENT
          key: purestorage.flasharray.support.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from support information retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.support.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 7bd0f901efc14b43b11809e82b6c2324
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.support.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get support information'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get support information from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 644edca046a14dd283713e37ef7d3431
          name: 'Get support information'
          type: DEPENDENT
          key: purestorage.flasharray.support.get
          history: '0'
          value_type: TEXT
          description: 'Collects support information from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	support_data = {},
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  			if (Array.isArray(response) & response.length > 0) {
                  				response = response[0]
                  			}
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	support_data = getHttpData(url + 'api/' + version + '/support');
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'support': support_data,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
        - uuid: 8a7e90cd071247f78cf017769138d811
          name: 'Storage volumes item errors'
          type: DEPENDENT
          key: purestorage.flasharray.volumes.errors
          history: 1h
          value_type: TEXT
          description: 'Collects errors from volume retrieval.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: purestorage.flasharray.volumes.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: 86ba540265d04be4bd86103b2d67f65e
              expression: 'length(last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.volumes.errors))>0'
              name: 'Pure Storage FlashArray: There are errors in the ''Get volumes'' metric'
              priority: WARNING
              description: 'An error occurred when trying to get volume data from the Pure Storage FlashArray API.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 0e074762c4ad4cf3978b2bbc38a60d4a
          name: 'Get volumes'
          type: DEPENDENT
          key: purestorage.flasharray.volumes.get
          history: '0'
          value_type: TEXT
          description: 'Collects all volumes from the Pure Storage FlashArray API.'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  try {
                  	var creds = JSON.parse(value);
                  }
                  catch (error) {
                  	throw 'Failed to parse authentication data from input value.';
                  }
                  
                  var request = new HttpRequest(),
                  	volumes = [],
                  	error_msg = '',
                  	url = '{$PURE.FLASHARRAY.API.URL}',
                  	version = '{$PURE.FLASHARRAY.API.VERSION}',
                  	http_proxy = '{$PURE.FLASHARRAY.HTTP_PROXY}';
                  
                  function getHttpData(url) {
                  	response = request.get(url);
                  	Zabbix.log(4, '[ Pure Storage API ] [ ' + url + ' ] Received response with status code ' + request.getStatus() + ': ' + response);
                  
                  	if (request.getStatus() !== 200) {
                  		throw 'Failed to receive data: invalid response status code.';
                  	}
                  
                  	if (response !== null) {
                  		try {
                  			response = JSON.parse(response)['items'];
                  		}
                  		catch (error) {
                  			throw 'Failed to parse response received from Pure Storage API. Check debug log for more information.';
                  		}
                  	}
                  
                  	if (typeof response !== 'object' || response === null) {
                  		throw 'Cannot process response data: received data is not an object.';
                  	}
                  
                  	return response;
                  };
                  
                  try {
                  
                  	['token'].forEach(function (field) {
                  		if (creds[field] === null || creds[field] == '' || typeof creds[field] === 'undefined') {
                  			throw 'Unexpected session token value has been received'
                  			+ ((typeof creds.error !== 'undefined' && creds.error != '') ? ': ' + creds.error : '');
                  		}
                  	});
                  
                  	if (url === '{' + '$PURE.FLASHARRAY.API.URL}') {
                  		throw 'Please change {' + '$PURE.FLASHARRAY.API.URL} macro to the proper value.';
                  	}
                  
                  	if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1) {
                  		url = 'https://' + url + (!url.endsWith('/') ? '/' : '');
                  	}
                  
                  	if (http_proxy !== '{' + '$PURE.FLASHARRAY.HTTP_PROXY}' && http_proxy !== '') {
                  		request.setProxy(http_proxy);
                  	}
                  
                  	request.addHeader('x-auth-token: ' + creds.token);
                  	request.addHeader('Accept: application/json');
                  
                  	volumes = getHttpData(url + 'api/' + version + '/volumes');
                  
                  	getHttpData(
                  		url + 'api/' + version + '/volumes/performance'
                  	).forEach(function (item) {
                  		volumes.forEach(function (volume, index) {
                  			if (volume['name'] && item['name'] && volume['name'] == item['name']) {
                  				volumes[index]['performance'] = item;
                  			}
                  		});
                  	});
                  
                  } catch (err) {
                  	error_msg = err;
                  };
                  
                  return JSON.stringify({
                  	'volumes': volumes,
                  	'error': error_msg.toString()
                  });
          master_item:
            key: purestorage.flasharray.auth
          tags:
            - tag: component
              value: raw
      discovery_rules:
        - uuid: a277352827a8409888e29dcc3681fcf1
          name: 'Certificate discovery'
          type: DEPENDENT
          key: purestorage.flasharray.cert.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.CERT.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.CERT.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of certificates from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 05f7ad146f2e49c986dac2e53f334dcc
              name: 'Certificate [{#NAME}]: Common name'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.cn[{#NAME}]'
              value_type: CHAR
              description: 'The common name field listed in the {#NAME} certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.common_name
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
            - uuid: a0cc18565bd84d7ea0af61d655642d67
              name: 'Certificate [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.certs[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.certificates.get
              tags:
                - tag: component
                  value: raw
                - tag: type
                  value: '{#TYPE}'
            - uuid: 1094b7082f2a4a09911efe89f179ac72
              name: 'Certificate [{#NAME}]: Issued by'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.issued_by[{#NAME}]'
              value_type: CHAR
              description: 'Indicates the authority or organization that issued the {#NAME} certificate, typically including information such as the name of the Certificate Authority (CA) and its digital signature.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.issued_by
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
            - uuid: bed40f78214b4e33b285a863504a7685
              name: 'Certificate [{#NAME}]: Issued to'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.issued_to[{#NAME}]'
              value_type: CHAR
              description: 'Indicates the entity which holds the {#NAME} certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.issued_to
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
            - uuid: b9ed0b415de84ca6876814c64cac3b01
              name: 'Certificate [{#NAME}]: Valid from'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.valid_from[{#NAME}]'
              units: unixtime
              description: 'Indicates the date and time when the {#NAME} certificate takes effect.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.valid_from
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
            - uuid: 628acb8886f24ef8b016ab0b86e780ed
              name: 'Certificate [{#NAME}]: Valid to'
              type: DEPENDENT
              key: 'purestorage.flasharray.cert.valid_to[{#NAME}]'
              units: unixtime
              description: 'Indicates the expiration date and time of the {#NAME} certificate.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.valid_to
                - type: MULTIPLIER
                  parameters:
                    - '0.001'
              master_item:
                key: 'purestorage.flasharray.cert.get[{#NAME}]'
              tags:
                - tag: component
                  value: certificate
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: 85724fcc67f84a9a9634ac052e58062e
                  expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.cert.valid_to[{#NAME}]) > 0 and (last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.cert.valid_to[{#NAME}]) - now()) / 86400 < {$PURE.FLASHARRAY.CERT.EXPIRY.WARN}'
                  name: 'Pure Storage FlashArray: Certificate [{#NAME}]: SSL certificate expires soon'
                  event_name: 'Pure Storage FlashArray: Certificate [{#NAME}]: SSL certificate expires soon (less than {$PURE.FLASHARRAY.CERT.EXPIRY.WARN} days)'
                  opdata: 'Expiration date: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Consider reissuing and replacing the {#NAME} certificate.'
                  tags:
                    - tag: scope
                      value: notice
          master_item:
            key: purestorage.flasharray.certificates.get
          lld_macro_paths:
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.status
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.certs
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 10b6db10a6aa491c805bf404bb50e890
          name: 'Controller discovery'
          type: DEPENDENT
          key: purestorage.flasharray.ctrl.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.CTRL.LLD.FILTER.INDEX.MATCHES}'
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.CTRL.LLD.FILTER.INDEX.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: ^array_controller$
          description: 'Discovery of controllers from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 4689b7a160c6440aa2b8dc8be57e2552
              name: 'Controller [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.controllers[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: e60eb4842e8642e2ba64604ae762ffdd
              name: 'Controller [{#NAME}]: Model'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.model[{#NAME}]'
              value_type: CHAR
              description: 'Model of the {#NAME} controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: fd1b9afb97854beca2505e47e7fe8eda
              name: 'Controller [{#NAME}]: Mode'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.mode[{#NAME}]'
              trends: '0'
              description: 'The current mode of the {#NAME} controller.'
              valuemap:
                name: 'Controller Mode'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.mode
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'not present',
                      	'offline',
                      	'primary',
                      	'secondary',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 4;
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: 2c47ef8f79394ffdb0927de83b46d35d
                  expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.ctrl.mode[{#NAME}],#1)<>last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.ctrl.mode[{#NAME}],#2)'
                  name: 'Pure Storage FlashArray: Controller [{#NAME}]: Mode has been changed'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'The mode of the {#NAME} controller has changed.'
                  tags:
                    - tag: scope
                      value: health
            - uuid: c6f73ffb3b1d4cf1836d1428897b47d7
              name: 'Controller [{#NAME}]: Serial number'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.serial[{#NAME}]'
              value_type: CHAR
              description: 'Serial number of the {#NAME} controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.hardware.serial
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 05db5a7c7bd5451caca3d039122d6464
              name: 'Controller [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} controller.'
              valuemap:
                name: 'Controller Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'not ready',
                      	'ready',
                      	'updating',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 3;
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: 42a734f18ddb415d9417beeef8526d1d
                  expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.ctrl.status[{#NAME}])<>1 and last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.ctrl.status[{#NAME}])<>2'
                  name: 'Pure Storage FlashArray: Controller [{#NAME}]: Controller is not ready'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Controller {#NAME} status is not "ready" or "updating".'
                  tags:
                    - tag: scope
                      value: health
            - uuid: a61f7b45f4874f9e84287d88fadd1c64
              name: 'Controller [{#NAME}]: Version'
              type: DEPENDENT
              key: 'purestorage.flasharray.ctrl.version[{#NAME}]'
              value_type: CHAR
              description: 'Version of the {#NAME} controller.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.version
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.ctrl.get[{#NAME}]'
              tags:
                - tag: component
                  value: controller
                - tag: controller
                  value: '{#NAME}'
                - tag: type
                  value: '{#TYPE}'
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#INDEX}'
              path: $.hardware.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.controllers
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 08358b801db24ef8ab89bc14fed65ee1
          name: 'Drive discovery'
          type: DEPENDENT
          key: purestorage.flasharray.drive.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.DRIVE.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.DRIVE.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#PROTOCOL}'
                value: ^null$
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: ^-$
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage drives from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 00c66aeeacba4d0599986597734d8142
              name: 'Drive [{#NAME}]: Capacity'
              type: DEPENDENT
              key: 'purestorage.flasharray.drive.capacity[{#NAME}]'
              units: B
              description: 'The capacity of the {#NAME} drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.capacity
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.drive.get[{#NAME}]'
              tags:
                - tag: component
                  value: drive
                - tag: drive
                  value: '{#TYPE}'
                - tag: protocol
                  value: '{#PROTOCOL}'
            - uuid: 5857cfccc486417ab32f000f0bd68a65
              name: 'Drive [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.drive.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} drive.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.drives[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
                - tag: drive
                  value: '{#TYPE}'
                - tag: protocol
                  value: '{#PROTOCOL}'
            - uuid: a374a674bf8143b5b55b518765325755
              name: 'Drive [{#NAME}]: Serial number'
              type: DEPENDENT
              key: 'purestorage.flasharray.drive.serial[{#NAME}]'
              value_type: CHAR
              description: 'Serial number of the {#NAME} drive device.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.hardware.serial
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.drive.get[{#NAME}]'
              tags:
                - tag: component
                  value: drive
                - tag: drive
                  value: '{#TYPE}'
                - tag: protocol
                  value: '{#PROTOCOL}'
            - uuid: 6681fcb1153d41bd9868b8191c3b8c27
              name: 'Drive [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.drive.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} drive.'
              valuemap:
                name: 'Drive Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'healthy',
                      	'empty',
                      	'updating',
                      	'unused',
                      	'evacuating',
                      	'identifying',
                      	'unhealthy',
                      	'recovering',
                      	'unrecognized',
                      	'failed'
                      ].indexOf(value);
                      return idx !== -1 ? idx : 10;
              master_item:
                key: 'purestorage.flasharray.drive.get[{#NAME}]'
              tags:
                - tag: component
                  value: drive
                - tag: drive
                  value: '{#TYPE}'
                - tag: protocol
                  value: '{#PROTOCOL}'
              trigger_prototypes:
                - uuid: f635d481852d4c5e8ba12e7091048f11
                  expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.drive.status[{#NAME}])<>0 and last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.drive.status[{#NAME}])<>2 and last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.drive.status[{#NAME}])<>3'
                  name: 'Pure Storage FlashArray: Drive [{#NAME}]: Problem on the drive'
                  event_name: 'Pure Storage FlashArray: Drive [{#NAME}]: Drive is not healthy or is not ready for use'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Drive {#NAME} status is not "healthy", "updating", or "unused".'
                  tags:
                    - tag: scope
                      value: health
          graph_prototypes:
            - uuid: 9ebe1a25885a4cc2a09ce54e512bf9df
              name: 'Drive [{#NAME}]: Capacity'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.drive.capacity[{#NAME}]'
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#INDEX}'
              path: $.hardware.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#PROTOCOL}'
              path: $.protocol
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.drives
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: f712c0d8bfa84a4291db06c04d8d4232
          name: 'Fan discovery'
          type: DEPENDENT
          key: purestorage.flasharray.fan.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.FAN.LLD.FILTER.INDEX.MATCHES}'
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.FAN.LLD.FILTER.INDEX.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: ^cooling$
          description: 'Discovery of fans from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 132c553838074d6680daa792453508b6
              name: 'Fan [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.fan.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} fan.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardware[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
                - tag: controller
                  value: '{#CTRL}'
            - uuid: a4cf2e954a7d481a8fca45ac6c9798c9
              name: 'Fan [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.fan.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} fan.'
              valuemap:
                name: 'Hardware Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'ok',
                      	'critical',
                      	'degraded',
                      	'device_off',
                      	'identifying',
                      	'not_installed',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 6;
              master_item:
                key: 'purestorage.flasharray.fan.get[{#NAME}]'
              tags:
                - tag: component
                  value: fan
                - tag: controller
                  value: '{#CTRL}'
              trigger_prototypes:
                - uuid: 04a080d1563f4b50972fcb8f3bf92d66
                  expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.fan.status[{#NAME}])<>0'
                  name: 'Pure Storage FlashArray: Fan [{#NAME}]: Fan is not healthy'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Fan {#NAME} status is not "ok".'
                  tags:
                    - tag: scope
                      value: health
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#CTRL}'
              path: $.parent
            - lld_macro: '{#INDEX}'
              path: $.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.hardware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 350738d6dba64532a7b811efb1e14114
          name: 'Host discovery'
          type: DEPENDENT
          key: purestorage.flasharray.host.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#GROUP}'
                value: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.GROUP.MATCHES}'
              - macro: '{#GROUP}'
                value: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.GROUP.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage hosts from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: fb4db194933641339a733194b5e1f155
              name: 'Host [{#NAME}]: Data reduction'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.drr[{#NAME}]'
              value_type: FLOAT
              description: 'The data reduction ratio (DRR) represents the efficiency of data reduction techniques such as compression and deduplication for the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.data_reduction
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: f3411ac68df2450a9161ae19ed53fa74
              name: 'Host [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} host.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hosts[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hosts.get
              tags:
                - tag: component
                  value: raw
            - uuid: 392ba789536a49da97fa75a5773d2998
              name: 'Host [{#NAME}]: Bytes read per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.read_bytes.rate[{#NAME}]'
              units: Bps
              description: 'Number of bytes read from the {#NAME} host volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.read_bytes_per_sec
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: a6fa85593cf3461787391586023bf25d
              name: 'Host [{#NAME}]: Read requests per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.read_requests.rate[{#NAME}]'
              description: 'Number of read requests processed on the {#NAME} host volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.reads_per_sec
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 483e877a15e544cb934e3f9fa83a730e
              name: 'Host [{#NAME}]: Total space provisioned'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.size[{#NAME}]'
              units: B
              description: 'The total provisioned space on the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total_provisioned
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 81148bd701a2428b89ab01bd1cf2df5d
              name: 'Host [{#NAME}]: Snapshots size'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.snapshots_size[{#NAME}]'
              units: B
              description: 'The physical space occupied by snapshots on the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.snapshots
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 6a02fe11f65a4e518213619a943862a2
              name: 'Host [{#NAME}]: Thin provisioning'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.thin_provisioning[{#NAME}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of sectors in the {#NAME} host volume that do not contain host-written data because the hosts have not written data to them or the sectors have been explicitly trimmed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.thin_provisioning
                - type: MULTIPLIER
                  parameters:
                    - '100'
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: c93b4fae2b8944648cba49bddc19a90b
              name: 'Host [{#NAME}]: Total data reduction'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.total_drr[{#NAME}]'
              value_type: FLOAT
              description: 'The total reduction ratio of all data on the {#NAME} host volume that has been processed by the data deduplication and compression engines.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total_reduction
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: a801a47f6c024b149f9a7ec6219f0bb7
              name: 'Host [{#NAME}]: Microseconds per read'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.usec_per_read[{#NAME}]'
              units: µs
              description: 'Average time in microseconds required to process an I/O read request from the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.usec_per_read_op
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 087a2758e25349b38e2fb6bed5754ec1
              name: 'Host [{#NAME}]: Microseconds per write'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.usec_per_write[{#NAME}]'
              units: µs
              description: 'Average time in microseconds required to process an I/O write request to the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.usec_per_write_op
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 4d7cfbf60b374265aa5434af2292faf3
              name: 'Host [{#NAME}]: Used space provisioned'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.used_provisioned[{#NAME}]'
              units: B
              description: 'The provisioned space occupied on the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.used_provisioned
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: 1a03696ee45a42e8a47ae0dc93c5ef0c
              name: 'Host [{#NAME}]: Used space'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.used_space[{#NAME}]'
              units: B
              description: 'The total physical space occupied by all data on the {#NAME} host volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total_used
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: f49de03d39eb48968476a49f50aafd98
              name: 'Host [{#NAME}]: Write requests per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.write_requests.rate[{#NAME}]'
              description: 'Number of write requests processed on the {#NAME} host volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.writes_per_sec
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
            - uuid: a7d478d4eda84ed68a647f0dfe457133
              name: 'Host [{#NAME}]: Bytes written per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.host.written_bytes.rate[{#NAME}]'
              units: Bps
              description: 'Number of bytes written to the {#NAME} host volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.write_bytes_per_sec
              master_item:
                key: 'purestorage.flasharray.host.get[{#NAME}]'
              tags:
                - tag: component
                  value: host
                - tag: host
                  value: '{#NAME}'
                - tag: host_group
                  value: '{#GROUP}'
          graph_prototypes:
            - uuid: b6946844871941cfa2b29bb12ef27d7c
              name: 'Host [{#NAME}]: Operation latency'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.usec_per_read[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.usec_per_write[{#NAME}]'
            - uuid: 38aeb1f11b234829be5bc07572f52c9f
              name: 'Host [{#NAME}]: Read/write throughput'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.written_bytes.rate[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.read_bytes.rate[{#NAME}]'
            - uuid: 9ad04f712e1d4020bc217845142fef43
              name: 'Host [{#NAME}]: Requests per second'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.read_requests.rate[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.write_requests.rate[{#NAME}]'
            - uuid: f032b259f4e6471fa8381cdd8b7ba0d7
              name: 'Host [{#NAME}]: Space'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  yaxisside: RIGHT
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.size[{#NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.used_space[{#NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.host.snapshots_size[{#NAME}]'
          master_item:
            key: purestorage.flasharray.hosts.get
          lld_macro_paths:
            - lld_macro: '{#GROUP}'
              path: $.host_group.name
            - lld_macro: '{#NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.hosts
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 3876122f047c4299a08cc7b259c20245
          name: 'Network interface discovery'
          type: DEPENDENT
          key: purestorage.flasharray.net_if.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#IFNAME}'
                value: '{$PURE.FLASHARRAY.NETIF.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#IFNAME}'
                value: '{$PURE.FLASHARRAY.NETIF.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#IFSTATUS}'
                value: ^true$
          description: 'Discovery of storage hosts from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: ecda1262ed1d416a9a1b4f861aa2891b
              name: 'Interface [{#IFNAME}]: Gateway'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.gateway[{#IFNAME}]'
              value_type: CHAR
              description: 'Represents the IP address of the gateway for the {#IFNAME} interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.eth.gateway
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
                - tag: type
                  value: '{#IFTYPE}'
            - uuid: 81113ca1f6f34e51b8e1565f0e791e80
              name: 'Interface [{#IFNAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#IFNAME} network interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.interfaces[?(@.name == "{#IFNAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.net_ifs.get
              tags:
                - tag: component
                  value: raw
                - tag: interface
                  value: '{#IFNAME}'
                - tag: type
                  value: '{#IFTYPE}'
            - uuid: af414daaa51f426d975e609b93980f23
              name: 'Interface [{#IFNAME}]: IP address'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.ip[{#IFNAME}]'
              value_type: CHAR
              description: 'Represents the IP address of the {#IFNAME} interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.eth.address
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
                - tag: type
                  value: '{#IFTYPE}'
            - uuid: 952d14c340c64e518f663508195e26fd
              name: 'Interface [{#IFNAME}]: MAC address'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.mac[{#IFNAME}]'
              value_type: CHAR
              description: 'Represents the MAC address of the {#IFNAME} interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.eth.mac_address
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
                - tag: type
                  value: '{#IFTYPE}'
            - uuid: 6537197c7d384ea59515fb5c7b50ffca
              name: 'Interface [{#IFNAME}]: Speed'
              type: DEPENDENT
              key: 'purestorage.flasharray.net_if.speed[{#IFNAME}]'
              units: Bps
              description: 'Current bandwidth of the interface.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.speed
              master_item:
                key: 'purestorage.flasharray.net_if.get[{#IFNAME}]'
              tags:
                - tag: component
                  value: interface
                - tag: interface
                  value: '{#IFNAME}'
                - tag: type
                  value: '{#IFTYPE}'
              trigger_prototypes:
                - uuid: 88475f72064649679937d01421dabb1d
                  expression: 'change(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.net_if.speed[{#IFNAME}])<0 and last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.net_if.speed[{#IFNAME}])>0'
                  recovery_mode: RECOVERY_EXPRESSION
                  recovery_expression: '(change(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.net_if.speed[{#IFNAME}])>0 and last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.net_if.speed[{#IFNAME}],#2)>0)'
                  name: 'Pure Storage FlashArray: Interface [{#IFNAME}]: Ethernet has changed to lower speed than it was before'
                  opdata: 'Current reported speed: {ITEM.LASTVALUE1}'
                  priority: INFO
                  description: 'This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 803097c68d004c5c8f66bb32688239aa
              name: 'Interface [{#IFNAME}]: Speed'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.net_if.speed[{#IFNAME}]'
          master_item:
            key: purestorage.flasharray.net_ifs.get
          lld_macro_paths:
            - lld_macro: '{#IFNAME}'
              path: $.name
            - lld_macro: '{#IFSTATUS}'
              path: $.enabled
            - lld_macro: '{#IFTYPE}'
              path: $.interface_type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.interfaces
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 5cde7579e8514748bddfeb1f662e0012
          name: 'Pod discovery'
          type: DEPENDENT
          key: purestorage.flasharray.pod.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.POD.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.POD.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage pods from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: c5ba49fc925144b18696a91b21b731eb
              name: 'Pod [{#NAME}]: Number of arrays'
              type: DEPENDENT
              key: 'purestorage.flasharray.pod.arrays[{#NAME}]'
              description: 'Number of arrays connected to the {#NAME} pod.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.array_count
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'purestorage.flasharray.pod.get[{#NAME}]'
              tags:
                - tag: component
                  value: pod
                - tag: pod
                  value: '{#NAME}'
            - uuid: f22437a516bb4598aa2524318213ed46
              name: 'Pod [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.pod.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} pod.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.pods[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.pods.get
              tags:
                - tag: component
                  value: raw
                - tag: pod
                  value: '{#NAME}'
            - uuid: 3aa31165ce734f14b2e9c66eaf908262
              name: 'Pod [{#NAME}]: Quota'
              type: DEPENDENT
              key: 'purestorage.flasharray.pod.quota[{#NAME}]'
              units: B
              description: 'The quota limit of the {#NAME} pod.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.quota_limit
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.pod.get[{#NAME}]'
              tags:
                - tag: component
                  value: pod
                - tag: pod
                  value: '{#NAME}'
            - uuid: 2e8b1130f2814fda958e2793a25493b4
              name: 'Pod [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.pod.status[{#NAME}]'
              trends: '0'
              description: 'The current promotion status of the {#NAME} pod.'
              valuemap:
                name: 'Pod Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.promotion_status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'demoted',
                      	'promoted'
                      ].indexOf(value);
                      return idx !== -1 ? idx : 2;
              master_item:
                key: 'purestorage.flasharray.pod.get[{#NAME}]'
              tags:
                - tag: component
                  value: pod
                - tag: pod
                  value: '{#NAME}'
          graph_prototypes:
            - uuid: 10ce99eab47a425dbf4ffd7a11dec3a0
              name: 'Pod [{#NAME}]: Quota'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.pod.quota[{#NAME}]'
          master_item:
            key: purestorage.flasharray.pods.get
          lld_macro_paths:
            - lld_macro: '{#NAME}'
              path: $.name
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.pods
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: 9ad76b9853f940c6890745f2a0091ad0
          name: 'Power supply discovery'
          type: DEPENDENT
          key: purestorage.flasharray.power.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.POWER.LLD.FILTER.INDEX.MATCHES}'
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.POWER.LLD.FILTER.INDEX.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: ^power_supply$
          description: 'Discovery of power supply components from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 6e10b14864134657985453c78d07751d
              name: 'Power supply [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} power supply component.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardware[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
            - uuid: 0916fbffa25c4a3290bcf3f19eb1a42c
              name: 'Power supply [{#NAME}]: Model'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.model[{#NAME}]'
              value_type: CHAR
              description: 'Model of the {#NAME} power supply component.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.model
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.power.get[{#NAME}]'
              tags:
                - tag: component
                  value: power
            - uuid: 6d720dd96a014705a7f34fb595ccdece
              name: 'Power supply [{#NAME}]: Serial number'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.serial[{#NAME}]'
              value_type: CHAR
              description: 'Serial number of the {#NAME} power supply component.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.serial
                  error_handler: DISCARD_VALUE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'purestorage.flasharray.power.get[{#NAME}]'
              tags:
                - tag: component
                  value: power
            - uuid: a6364f40204545c1aeb9591b032632b5
              name: 'Power supply [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} power supply component.'
              valuemap:
                name: 'Hardware Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'ok',
                      	'critical',
                      	'degraded',
                      	'device_off',
                      	'identifying',
                      	'not_installed',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 6;
              master_item:
                key: 'purestorage.flasharray.power.get[{#NAME}]'
              tags:
                - tag: component
                  value: power
              trigger_prototypes:
                - uuid: 9288ebad9d474acdb26897ff197a5776
                  expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.power.status[{#NAME}])<>0'
                  name: 'Pure Storage FlashArray: Power supply [{#NAME}]: Power supply is not healthy'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Power supply component {#NAME} status is not "ok".'
                  tags:
                    - tag: scope
                      value: health
            - uuid: 4fc0212332e44824b15627e436eaba15
              name: 'Power supply [{#NAME}]: Voltage'
              type: DEPENDENT
              key: 'purestorage.flasharray.power.value[{#NAME}]'
              units: V
              description: 'The current voltage value of the {#NAME} power supply component.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.voltage
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'purestorage.flasharray.power.get[{#NAME}]'
              tags:
                - tag: component
                  value: power
          graph_prototypes:
            - uuid: e1610483759a41cea3b9c4adf3474399
              name: 'Power supply [{#NAME}]: Voltage'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.power.value[{#NAME}]'
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#INDEX}'
              path: $.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TYPE}'
              path: $.type
            - lld_macro: '{#VOLT.VALUE}'
              path: $.voltage
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.hardware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
        - uuid: d5378b0c37c446cdba79238ce8703044
          name: 'Temperature sensor discovery'
          type: DEPENDENT
          key: purestorage.flasharray.temp.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.TEMP.LLD.FILTER.INDEX.MATCHES}'
              - macro: '{#INDEX}'
                value: '{$PURE.FLASHARRAY.TEMP.LLD.FILTER.INDEX.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#TYPE}'
                value: ^temp_sensor$
          description: 'Discovery of temperature sensors from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: 030868b143d94729bc3e696cd40c8009
              name: 'Sensor [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.temp.get[{#NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} temperature sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardware[?(@.name == "{#NAME}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.hardware.get
              tags:
                - tag: component
                  value: raw
            - uuid: 1b57e227c3c64306903c23b989b0f844
              name: 'Sensor [{#NAME}]: Status'
              type: DEPENDENT
              key: 'purestorage.flasharray.temp.status[{#NAME}]'
              trends: '0'
              description: 'The current status of the {#NAME} temperature sensor.'
              valuemap:
                name: 'Hardware Status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.status
                  error_handler: DISCARD_VALUE
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'ok',
                      	'critical',
                      	'degraded',
                      	'device_off',
                      	'identifying',
                      	'not_installed',
                      ].indexOf(value);
                      return idx !== -1 ? idx : 6;
              master_item:
                key: 'purestorage.flasharray.temp.get[{#NAME}]'
              tags:
                - tag: component
                  value: sensor
              trigger_prototypes:
                - uuid: 04b761e9af01443ca2541828bb558431
                  expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.temp.status[{#NAME}])<>0'
                  name: 'Pure Storage FlashArray: Sensor [{#NAME}]: Sensor is not healthy'
                  opdata: 'Current status: {ITEM.LASTVALUE1}'
                  priority: AVERAGE
                  description: 'Temperature sensor {#NAME} status is not "ok".'
                  tags:
                    - tag: scope
                      value: health
            - uuid: 38030ba18a094d1e9a88ac2d3b0797ce
              name: 'Sensor [{#NAME}]: Temperature'
              type: DEPENDENT
              key: 'purestorage.flasharray.temp.value[{#NAME}]'
              units: °C
              description: 'The current temperature value of the {#NAME} sensor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.temperature
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'purestorage.flasharray.temp.get[{#NAME}]'
              tags:
                - tag: component
                  value: sensor
          graph_prototypes:
            - uuid: 9503fc3b89674c7185f162fe150ed2a1
              name: 'Sensor [{#NAME}]: Temperature'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.temp.value[{#NAME}]'
          master_item:
            key: purestorage.flasharray.hardware.get
          lld_macro_paths:
            - lld_macro: '{#CTRL}'
              path: $.parent
            - lld_macro: '{#INDEX}'
              path: $.index
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#TEMP.VALUE}'
              path: $.temperature
            - lld_macro: '{#TYPE}'
              path: $.type
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.hardware
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          overrides:
            - name: 'Controller tag'
              step: '1'
              filter:
                conditions:
                  - macro: '{#CTRL}'
                    value: '^CT[0-9]+$'
              operations:
                - operator: REGEXP
                  value: '.*'
                  tags:
                    - tag: controller
                      value: '{#CTRL}'
            - name: 'Chassis tag'
              step: '2'
              filter:
                conditions:
                  - macro: '{#CTRL}'
                    value: '^CH[0-9]+$'
              operations:
                - operator: REGEXP
                  value: '.*'
                  tags:
                    - tag: chassis
                      value: '{#CTRL}'
        - uuid: ba4d4650536142e3a810c33362117dd2
          name: 'Volume discovery'
          type: DEPENDENT
          key: purestorage.flasharray.volume.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.VOLUME.LLD.FILTER.NAME.MATCHES}'
              - macro: '{#NAME}'
                value: '{$PURE.FLASHARRAY.VOLUME.LLD.FILTER.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Discovery of storage volumes from the Pure Storage FlashArray API.'
          item_prototypes:
            - uuid: ba307ad50abc4edb8387a10bf10a216e
              name: 'Volume [{#NAME}]: Data reduction'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.drr[{#SN}]'
              value_type: FLOAT
              description: 'The data reduction ratio (DRR) represents the efficiency of data reduction techniques such as compression and deduplication for the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.data_reduction
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: d89e5ac32300482791f566ada1ba9640
              name: 'Volume [{#NAME}]: Get data'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.get[{#SN}]'
              history: '0'
              value_type: TEXT
              description: 'Collects data about the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.volumes[?(@.serial == "{#SN}")].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: purestorage.flasharray.volumes.get
              tags:
                - tag: component
                  value: raw
            - uuid: f19e37ab55b74659bf687de050a0d39e
              name: 'Volume [{#NAME}]: Provisioned space'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.provisioned[{#SN}]'
              units: B
              description: 'The total provisioned space on the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total_provisioned
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 950e7e53d9cc4edb88b64b5a2d2bb21c
              name: 'Volume [{#NAME}]: Bytes read per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.read_bytes.rate[{#SN}]'
              units: Bps
              description: 'Number of bytes read from the {#NAME} volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.read_bytes_per_sec
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: b17ffe15e5c64c8a974374fb3a92ded0
              name: 'Volume [{#NAME}]: Read requests per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.read_requests.rate[{#SN}]'
              description: 'Number of read requests processed on the {#NAME} volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.reads_per_sec
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: af4a7394ae2a4580863b5ebb21908a76
              name: 'Volume [{#NAME}]: Shared space'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.shared_space[{#SN}]'
              units: B
              description: 'The physical space occupied by deduplicated data on the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.shared
                - type: NOT_MATCHES_REGEX
                  parameters:
                    - ^null$
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '0'
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 06a10478a54b415198055ff1f07f3aaa
              name: 'Volume [{#NAME}]: Size'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.size[{#SN}]'
              units: B
              description: 'The physical space occupied by the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.provisioned
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
              trigger_prototypes:
                - uuid: df02c79ca98240408376ab80921e6a32
                  expression: 'last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.volume.size[{#SN}],#1)<>last(/Pure Storage FlashArray v2 by HTTP/purestorage.flasharray.volume.size[{#SN}],#2)'
                  name: 'Pure Storage FlashArray: Volume [{#NAME}]: Volume size has been changed'
                  opdata: 'Current size: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'Physical space occupied by the {#NAME} volume has been changed.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: f98e3831e39e47d489336d64d4c843c2
              name: 'Volume [{#NAME}]: Snapshots size'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.snapshots_size[{#SN}]'
              units: B
              description: 'The physical space occupied by snapshots on the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.snapshots
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 01588d46fa944fe8b9d12f1673a3cc1d
              name: 'Volume [{#NAME}]: Thin provisioning'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.thin_provisioning[{#SN}]'
              value_type: FLOAT
              units: '%'
              description: 'The percentage of sectors in the {#NAME} volume that do not contain host-written data because the hosts have not written data to them or the sectors have been explicitly trimmed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.thin_provisioning
                - type: MULTIPLIER
                  parameters:
                    - '100'
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: f5c9e9b3d3ef46d0a3ed9f2a27cb6c4b
              name: 'Volume [{#NAME}]: Total data reduction'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.total_drr[{#SN}]'
              value_type: FLOAT
              description: 'The total reduction ratio of all data on the {#NAME} volume that has been processed by the data deduplication and compression engines.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total_reduction
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: a94cf17619b147db8d4533dafe865eb0
              name: 'Volume [{#NAME}]: Microseconds per read'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.usec_per_read[{#SN}]'
              units: µs
              description: 'Average time in microseconds required to process an I/O read request from the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.usec_per_read_op
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 108613219eb748c388c3d1a1f59c073e
              name: 'Volume [{#NAME}]: Microseconds per write'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.usec_per_write[{#SN}]'
              units: µs
              description: 'Average time in microseconds required to process an I/O write request to the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.usec_per_write_op
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 714127b92f3f49ac9c91e2c8b34e7db1
              name: 'Volume [{#NAME}]: Used provisioned'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.used_provisioned[{#SN}]'
              units: B
              description: 'The total provisioned space occupied by all data on the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.used_provisioned
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: 68d0c19d00a147dd8f005e93c4d6deb0
              name: 'Volume [{#NAME}]: Used space'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.used_space[{#SN}]'
              units: B
              description: 'The total physical space occupied by all data on the {#NAME} volume.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.space.total_used
                  error_handler: DISCARD_VALUE
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: a1562e3e8fb7443cac236755ead8a811
              name: 'Volume [{#NAME}]: Write requests per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.write_requests.rate[{#SN}]'
              description: 'Number of write requests processed on the {#NAME} volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.writes_per_sec
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
            - uuid: d88ebbbf982c4d678bc4298c7bd445b1
              name: 'Volume [{#NAME}]: Bytes written per second'
              type: DEPENDENT
              key: 'purestorage.flasharray.volume.written_bytes.rate[{#SN}]'
              units: Bps
              description: 'Number of bytes written to the {#NAME} volume per second.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.performance.write_bytes_per_sec
              master_item:
                key: 'purestorage.flasharray.volume.get[{#SN}]'
              tags:
                - tag: component
                  value: volume
          graph_prototypes:
            - uuid: c1892f0a8bab42e58597788ea3c6571d
              name: 'Volume [{#NAME}]: Operation latency'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.usec_per_read[{#SN}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.usec_per_write[{#SN}]'
            - uuid: ee5830d4ac6b484fbc9e6f87b7a5e9b0
              name: 'Volume [{#NAME}]: Read/write throughput'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.written_bytes.rate[{#SN}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.read_bytes.rate[{#SN}]'
            - uuid: d15e0ade1de9422eaabe8356b67245d9
              name: 'Volume [{#NAME}]: Requests per second'
              graph_items:
                - color: 199C0D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.read_requests.rate[{#SN}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.write_requests.rate[{#SN}]'
            - uuid: 741b5ad72b354d83a3c60ac7e7b95a1d
              name: 'Volume [{#NAME}]: Space'
              graph_items:
                - drawtype: BOLD_LINE
                  color: 199C0D
                  yaxisside: RIGHT
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.size[{#SN}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.shared_space[{#SN}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.used_space[{#SN}]'
                - sortorder: '3'
                  color: F7941D
                  item:
                    host: 'Pure Storage FlashArray v2 by HTTP'
                    key: 'purestorage.flasharray.volume.snapshots_size[{#SN}]'
          master_item:
            key: purestorage.flasharray.volumes.get
          lld_macro_paths:
            - lld_macro: '{#NAME}'
              path: $.name
            - lld_macro: '{#SN}'
              path: $.serial
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.volumes
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
      tags:
        - tag: class
          value: storage
        - tag: subclass
          value: backup
        - tag: target
          value: flash-array
        - tag: target
          value: pure-storage
      macros:
        - macro: '{$PURE.FLASHARRAY.API.TOKEN}'
          type: SECRET_TEXT
          description: 'Pure Storage FlashArray API token.'
          config:
            type: TEXT
            priority: '2'
            label: 'API token'
            description: 'Pure Storage FlashArray API token.'
            required: 'YES'
        - macro: '{$PURE.FLASHARRAY.API.URL}'
          description: 'Pure Storage FlashArray Web interface URL.'
          config:
            type: TEXT
            priority: '1'
            label: 'Web interface URL'
            description: 'Pure Storage FlashArray Web interface URL.'
            required: 'YES'
        - macro: '{$PURE.FLASHARRAY.API.VERSION}'
          value: '2.36'
          description: 'Pure Storage FlashArray API version.'
          config:
            type: TEXT
            priority: '3'
            label: 'API version'
            description: 'Pure Storage FlashArray API version.'
            required: 'YES'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PURE.FLASHARRAY.CERT.EXPIRY.WARN}'
          value: '7'
          description: 'Number of days until the certificate expires.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'Certificate expiration days'
            description: 'Number of days until the certificate expires.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$PURE.FLASHARRAY.CERT.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable certificates by name.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Discoverable certificates by name (include)'
            description: 'Filter of discoverable certificates by name.'
        - macro: '{$PURE.FLASHARRAY.CERT.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable certificates by name.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Discoverable certificates by name (exclude)'
            description: 'Filter to exclude discoverable certificates by name.'
        - macro: '{$PURE.FLASHARRAY.CTRL.LLD.FILTER.INDEX.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable controllers by index.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Discoverable controllers by index (include)'
            description: 'Filter of discoverable controllers by index.'
        - macro: '{$PURE.FLASHARRAY.CTRL.LLD.FILTER.INDEX.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable controllers by index.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Discoverable controllers by index (exclude)'
            description: 'Filter to exclude discoverable controllers by index.'
        - macro: '{$PURE.FLASHARRAY.DATA.TIMEOUT}'
          value: 15s
          description: 'Response timeout for the API.'
          config:
            type: TEXT
            priority: '5'
            section_name: Other
            label: 'API response timeout'
            description: 'Response timeout for the API.'
        - macro: '{$PURE.FLASHARRAY.DRIVE.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable storage drives by name.'
          config:
            type: TEXT
            priority: '18'
            section_name: Filters
            label: 'Discoverable storage drives by name (include)'
            description: 'Filter of discoverable storage drives by name.'
        - macro: '{$PURE.FLASHARRAY.DRIVE.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable storage drives by name.'
          config:
            type: TEXT
            priority: '19'
            section_name: Filters
            label: 'Discoverable storage drives by name (exclude)'
            description: 'Filter to exclude discoverable storage drives by name.'
        - macro: '{$PURE.FLASHARRAY.FAN.LLD.FILTER.INDEX.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable fans by index.'
          config:
            type: TEXT
            priority: '16'
            section_name: Filters
            label: 'Discoverable fans by index (include)'
            description: 'Filter of discoverable fans by index.'
        - macro: '{$PURE.FLASHARRAY.FAN.LLD.FILTER.INDEX.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable fans by index.'
          config:
            type: TEXT
            priority: '17'
            section_name: Filters
            label: 'Discoverable fans by index (exclude)'
            description: 'Filter to exclude discoverable fans by index.'
        - macro: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.GROUP.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable hosts by group.'
          config:
            type: TEXT
            priority: '22'
            section_name: Filters
            label: 'Discoverable hosts by group (include)'
            description: 'Filter of discoverable hosts by group.'
        - macro: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.GROUP.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable hosts by group.'
          config:
            type: TEXT
            priority: '23'
            section_name: Filters
            label: 'Discoverable hosts by group (exclude)'
            description: 'Filter to exclude discoverable hosts by group.'
        - macro: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable hosts by name.'
          config:
            type: TEXT
            priority: '20'
            section_name: Filters
            label: 'Discoverable hosts by name (include)'
            description: 'Filter of discoverable hosts by name.'
        - macro: '{$PURE.FLASHARRAY.HOST.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable hosts by name.'
          config:
            type: TEXT
            priority: '21'
            section_name: Filters
            label: 'Discoverable hosts by name (exclude)'
            description: 'Filter to exclude discoverable hosts by name.'
        - macro: '{$PURE.FLASHARRAY.HTTP_PROXY}'
          description: 'HTTP proxy for API requests. You can specify it using the format [protocol://][username[:password]@]proxy.example.com[:port]. For more details, see the documentation at https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/http'
          config:
            type: TEXT
            priority: '28'
            section_name: Other
            label: 'HTTP proxy'
            description: 'HTTP proxy for API requests. You can specify it using the format [protocol://][username[:password]@]proxy.example.com[:port]. For more details, see the documentation at https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/http'
        - macro: '{$PURE.FLASHARRAY.NETIF.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable network interfaces by name.'
          config:
            type: TEXT
            priority: '24'
            section_name: Filters
            label: 'Discoverable network interfaces by name (include)'
            description: 'Filter of discoverable network interfaces by name.'
        - macro: '{$PURE.FLASHARRAY.NETIF.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable network interfaces by name.'
          config:
            type: TEXT
            priority: '25'
            section_name: Filters
            label: 'Discoverable network interfaces by name (exclude)'
            description: 'Filter to exclude discoverable network interfaces by name.'
        - macro: '{$PURE.FLASHARRAY.POD.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable storage pods by name.'
          config:
            type: TEXT
            priority: '6'
            section_name: Filters
            label: 'Discoverable storage pods by name (include)'
            description: 'Filter of discoverable storage pods by name.'
        - macro: '{$PURE.FLASHARRAY.POD.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable storage pods by name.'
          config:
            type: TEXT
            priority: '7'
            section_name: Filters
            label: 'Discoverable storage pods by name (exclude)'
            description: 'Filter to exclude discoverable storage pods by name.'
        - macro: '{$PURE.FLASHARRAY.POWER.LLD.FILTER.INDEX.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable power supply components by index.'
          config:
            type: TEXT
            priority: '14'
            section_name: Filters
            label: 'Discoverable power supply components by index (include)'
            description: 'Filter of discoverable power supply components by index.'
        - macro: '{$PURE.FLASHARRAY.POWER.LLD.FILTER.INDEX.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable power supply components by index.'
          config:
            type: TEXT
            priority: '15'
            section_name: Filters
            label: 'Discoverable power supply components by index (exclude)'
            description: 'Filter to exclude discoverable power supply components by index.'
        - macro: '{$PURE.FLASHARRAY.TEMP.LLD.FILTER.INDEX.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable temperature sensors by index.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Discoverable temperature sensors by index (include)'
            description: 'Filter of discoverable temperature sensors by index.'
        - macro: '{$PURE.FLASHARRAY.TEMP.LLD.FILTER.INDEX.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable temperature sensors by index.'
          config:
            type: TEXT
            priority: '13'
            section_name: Filters
            label: 'Discoverable temperature sensors by index (exclude)'
            description: 'Filter to exclude discoverable temperature sensors by index.'
        - macro: '{$PURE.FLASHARRAY.VOLUME.LLD.FILTER.NAME.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable storage volumes by name.'
          config:
            type: TEXT
            priority: '26'
            section_name: Filters
            label: 'Discoverable storage volumes by name (include)'
            description: 'Filter of discoverable storage volumes by name.'
        - macro: '{$PURE.FLASHARRAY.VOLUME.LLD.FILTER.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Filter to exclude discoverable storage volumes by name.'
          config:
            type: TEXT
            priority: '27'
            section_name: Filters
            label: 'Discoverable storage volumes by name (exclude)'
            description: 'Filter to exclude discoverable storage volumes by name.'
      dashboards:
        - uuid: 186b571696774e6ab4ba5a8a38dc9c8d
          name: 'Pure Storage FlashArray: General'
          auto_start: 'NO'
          pages:
            - name: Array
              widgets:
                - type: item
                  name: Hostname
                  width: '24'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        key: purestorage.flasharray.array.hostname
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: svggraph
                  name: 'Array read/write throughput'
                  'y': '3'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Array bytes read per second'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Array bytes written per second'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_lines_mode
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: XGKYU
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Array operation latency'
                  'y': '8'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Array microseconds per read'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Array microseconds per write'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: ds.2.color
                      value: F44336
                    - type: INTEGER
                      name: ds.2.fill
                      value: '0'
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Array microseconds per operation'
                    - type: INTEGER
                      name: ds.2.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: INTEGER
                      name: legend_lines_mode
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: SSNAB
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: item
                  name: Version
                  x: '24'
                  width: '24'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        key: purestorage.flasharray.array.version
                    - type: INTEGER
                      name: show.0
                      value: '2'
                - type: svggraph
                  name: 'Array requests per second'
                  x: '36'
                  'y': '3'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Array read requests per second'
                    - type: INTEGER
                      name: ds.0.width
                      value: '2'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Array write requests per second'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_lines_mode
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: NCUID
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: 'Array space'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: ds.0.axisy
                      value: '1'
                    - type: STRING
                      name: ds.0.color
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '0'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Array capacity'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: STRING
                      name: ds.1.color
                      value: FFD54F
                    - type: INTEGER
                      name: ds.1.fill
                      value: '0'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Array shared space'
                    - type: INTEGER
                      name: ds.1.width
                      value: '2'
                    - type: STRING
                      name: ds.2.color
                      value: F44336
                    - type: INTEGER
                      name: ds.2.fill
                      value: '0'
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Array snapshots size'
                    - type: INTEGER
                      name: ds.2.width
                      value: '2'
                    - type: STRING
                      name: ds.3.color
                      value: 0080FF
                    - type: INTEGER
                      name: ds.3.fill
                      value: '0'
                    - type: STRING
                      name: ds.3.items.0
                      value: 'Array volumes size'
                    - type: INTEGER
                      name: ds.3.width
                      value: '2'
                    - type: STRING
                      name: ds.4.color
                      value: 7E57C2
                    - type: INTEGER
                      name: ds.4.fill
                      value: '0'
                    - type: STRING
                      name: ds.4.items.0
                      value: 'Array system size'
                    - type: INTEGER
                      name: ds.4.width
                      value: '2'
                    - type: INTEGER
                      name: legend_lines
                      value: '5'
                    - type: INTEGER
                      name: legend_lines_mode
                      value: '1'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: SFPXY
                - type: item
                  name: Capacity
                  x: '48'
                  width: '24'
                  height: '3'
                  fields:
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        key: purestorage.flasharray.array.capacity
                    - type: INTEGER
                      name: show.0
                      value: '2'
            - name: 'Network interfaces'
              widgets:
                - type: honeycomb
                  name: 'Network interfaces'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 64B5F6
                    - type: STRING
                      name: items.0
                      value: '*Speed'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: interface
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: TZTHI
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: Speed
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: TZTHI._itemid
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: ABHBM
                    - type: INTEGER
                      name: righty
                      value: '0'
            - name: Drives
              widgets:
                - type: honeycomb
                  name: Drives
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 64B5F6
                    - type: STRING
                      name: items.0
                      value: '*Capacity'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: drive
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: YBMRB
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: Capacity
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: YBMRB._itemid
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: IEDRA
                    - type: INTEGER
                      name: righty
                      value: '0'
            - name: Volumes
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        name: 'Volume [{#NAME}]: Operation latency'
                    - type: STRING
                      name: reference
                      value: AAAAJ
                - type: graphprototype
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        name: 'Volume [{#NAME}]: Requests per second'
                    - type: STRING
                      name: reference
                      value: AAAAL
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        name: 'Volume [{#NAME}]: Read/write throughput'
                    - type: STRING
                      name: reference
                      value: AAAAK
                - type: graphprototype
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        name: 'Volume [{#NAME}]: Space'
                    - type: STRING
                      name: reference
                      value: AAAAM
            - name: Hosts
              widgets:
                - type: graphprototype
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        name: 'Host [{#NAME}]: Operation latency'
                    - type: STRING
                      name: reference
                      value: AAAAF
                - type: graphprototype
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        name: 'Host [{#NAME}]: Requests per second'
                    - type: STRING
                      name: reference
                      value: AAAAH
                - type: graphprototype
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        name: 'Host [{#NAME}]: Read/write throughput'
                    - type: STRING
                      name: reference
                      value: AAAAG
                - type: graphprototype
                  x: '36'
                  'y': '5'
                  width: '36'
                  height: '5'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'Pure Storage FlashArray v2 by HTTP'
                        name: 'Host [{#NAME}]: Space'
                    - type: STRING
                      name: reference
                      value: AAAAI
            - name: Sensors
              widgets:
                - type: honeycomb
                  name: Fans
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: items.0
                      value: '*Status'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: fan
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: YQLGC
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: STRING
                      name: thresholds.0.color
                      value: 26A69A
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: E65660
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: FCCB1D
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.3.color
                      value: 90A4AE
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '3'
                    - type: STRING
                      name: thresholds.4.color
                      value: 29B6F6
                    - type: STRING
                      name: thresholds.4.threshold
                      value: '4'
                    - type: STRING
                      name: thresholds.5.color
                      value: 546E7A
                    - type: STRING
                      name: thresholds.5.threshold
                      value: '5'
                - type: honeycomb
                  name: 'Temperature sensors'
                  'y': '5'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: items.0
                      value: '*Temperature'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: sensor
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: EOKHA
                    - type: INTEGER
                      name: secondary_label_bold
                      value: '0'
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: 26A69A
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFCA28
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '50'
                    - type: STRING
                      name: thresholds.2.color
                      value: E65660
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '70'
                - type: svggraph
                  name: 'Temperature value'
                  'y': '10'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: EOKHA._itemid
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: FDGJA
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: honeycomb
                  name: 'Power supply'
                  'y': '15'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 64B5F6
                    - type: STRING
                      name: items.0
                      value: '*Voltage'
                    - type: INTEGER
                      name: item_tags.0.operator
                      value: '1'
                    - type: STRING
                      name: item_tags.0.tag
                      value: component
                    - type: STRING
                      name: item_tags.0.value
                      value: power
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("^.+?\[(.*)\]", \1)}'
                    - type: STRING
                      name: reference
                      value: MZNPS
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: Voltage
                  'y': '20'
                  width: '72'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: '009688'
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: STRING
                      name: ds.0.itemids.0._reference
                      value: MZNPS._itemid
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: NGVAC
                    - type: INTEGER
                      name: righty
                      value: '0'
      valuemaps:
        - uuid: d2c0016639b2413c85a000746ee56109
          name: Boolean
          mappings:
            - value: '0'
              newvalue: 'false'
            - value: '1'
              newvalue: 'true'
        - uuid: a6f5e4bef3114c4cb08eb4c9e449dfa8
          name: 'Certificate Type'
          mappings:
            - value: '0'
              newvalue: self-signed
            - value: '1'
              newvalue: imported
            - value: '2'
              newvalue: other
        - uuid: b6aed58a52b742c680173452935c2bca
          name: 'Controller Mode'
          mappings:
            - value: '0'
              newvalue: 'not present'
            - value: '1'
              newvalue: offline
            - value: '2'
              newvalue: primary
            - value: '3'
              newvalue: secondary
            - value: '4'
              newvalue: unknown
        - uuid: f315c5769cbd4eb4ac4721751070d247
          name: 'Controller Status'
          mappings:
            - value: '0'
              newvalue: 'not ready'
            - value: '1'
              newvalue: ready
            - value: '2'
              newvalue: updating
            - value: '3'
              newvalue: unknown
        - uuid: ed60650d00594c5c9778501ee06fb648
          name: 'Drive Status'
          mappings:
            - value: '0'
              newvalue: healthy
            - value: '1'
              newvalue: empty
            - value: '2'
              newvalue: updating
            - value: '3'
              newvalue: unused
            - value: '4'
              newvalue: evacuating
            - value: '5'
              newvalue: identifying
            - value: '6'
              newvalue: unhealthy
            - value: '7'
              newvalue: recovering
            - value: '8'
              newvalue: unrecognized
            - value: '9'
              newvalue: failed
        - uuid: 92c4cbd25c9f45408aa335aac5bec52a
          name: 'Hardware Status'
          mappings:
            - value: '0'
              newvalue: ok
            - value: '1'
              newvalue: critical
            - value: '2'
              newvalue: degraded
            - value: '3'
              newvalue: device_off
            - value: '4'
              newvalue: identifying
            - value: '5'
              newvalue: not_installed
            - value: '6'
              newvalue: unknown
        - uuid: 0142212de71f42bc9f7521447d89ff0c
          name: 'Pod Status'
          mappings:
            - value: '0'
              newvalue: demoted
            - value: '1'
              newvalue: promoted
            - value: '2'
              newvalue: unknown
        - uuid: 59047ec19a5c4229bce4450f134ac5cc
          name: 'Service Status'
          mappings:
            - value: '0'
              newvalue: disabled
            - value: '1'
              newvalue: enabled
            - value: '2'
              newvalue: unknown
    - uuid: 682ac14a5d294f4790ac8411ab6c33bf
      template: 'Ribbon SBC SWe CE by HTTP'
      name: 'Ribbon SBC SWe CE by HTTP'
      description: |
        The Ribbon SBC Software Edition (SBC SWe) provides the same feature set as the award-winning SBC 5400 and SBC 7000 appliance, without requiring dedicated hardware.
        This gives enterprises the flexibility to deploy SBC functionality in a variety of environments – in their own data centers, on private cloud infrastructure, or in a public cloud.
        
        This template is designed for the effortless deployment of Ribbon SBC SWe Core monitoring and doesn't require any external scripts.
        
        The template can be used in discovery as well as manually linked to a host. To use this template manually linked to a host, attach it to the host and manually set the value of the `{$RIBBON.CE.NAME}` macro.
        
        More details can be found in the official documentation:
          - REST API Reference: https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/360972436/RESTCONF+API+Reference+Guide
          - REST API User Guide: https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/444760643/RESTCONF+API+User+Guide
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Ribbon’s SBC Software Edition (SBC SWe), offers identical feature software to its award-winning SBC 5400 and SBC 7000 appliances – only without an appliance. This means enterprises have the flexibility to deploy in their SBCs multiple environments - their own data center, on their own private cloud, or utilize a public cloud.
        
        This template is designed for the effortless deployment of Ribbon SBC SWe core monitoring and doesn't require any external scripts.
        
        More details can be found in the official documentation:
            - [REST API Reference](https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/360972436/RESTCONF+API+Reference+Guide)
            - [REST API User's Guide](https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/444760643/RESTCONF+API+User+Guide)
        
        ## Setup
        
        1. Create a new user according [REST API - Requirements](https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/444760644/RESTCONF+API+Requirements).
        2. Create a new host.
        3. Link the template to the host created earlier.
        4. Set the host wizard configuration field `Ribbon SBC URL` required for getting data.
        5. Set the host wizard configuration fields `Ribbon SBC user` and `Ribbon SBC password` with the login and password of the user created earlier.
        6. Set the host wizard configuration fields `Ribbon SBC CE name` and `Ribbon SBC password` with the name of CE.
      vendor:
        name: Zabbix
        version: 8.0-0
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: 53fe44969b1f46c0a5e42e781faa755c
          name: 'Application uptime'
          type: DEPENDENT
          key: ribbon.server.application.uptime
          units: uptime
          description: 'Indicates the application uptime on the server in days/hours/minutes/seconds.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].applicationUpTime'
            - type: JAVASCRIPT
              parameters:
                - |
                  const data = value;
                  var days = 0, hours = 0, minutes = 0, seconds = 0;
                  
                  const daysMatch = data.match(/(\d+)\s+Days?/i);
                  
                  if (daysMatch) {
                  	days = parseInt(daysMatch[1], 10);
                  	data = data.replace(daysMatch[0], "").trim();
                  }
                  
                  const timeMatch = data.match(/(\d+):(\d+):(\d+)/);
                  
                  if (!timeMatch) {
                  	throw "Unknown uptime format";
                  }
                  
                  hours = parseInt(timeMatch[1], 10);
                  minutes = parseInt(timeMatch[2], 10);
                  seconds = parseInt(timeMatch[3], 10);
                  
                  return days * 86400 + hours * 3600 + minutes * 60 + seconds;
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 3bca39ea0896453481f881b98d792ca0
              expression: 'last(/Ribbon SBC SWe CE by HTTP/ribbon.server.application.uptime)<10m'
              name: 'Ribbon: Application has been restarted'
              event_name: 'Ribbon: Application has been restarted (uptime < 10m)'
              opdata: 'Current uptime: {ITEM.LASTVALUE}'
              priority: INFO
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: d4e375f01fe24ee0aeeb6befc8485fc7
          name: 'Application version'
          type: DEPENDENT
          key: ribbon.server.application.version
          value_type: CHAR
          description: 'Indicates the application version currently running on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].applicationVersion'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: application
        - uuid: 8d0ee4b3eb0046baaa87d3658b2bdecd
          name: 'CPU utilization'
          type: DEPENDENT
          key: ribbon.server.cpu.util
          value_type: FLOAT
          units: '!%'
          description: 'The average CPU utilization for this interval (in percent).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.cpuUtilCurrentStatistics
            - type: JAVASCRIPT
              parameters:
                - |
                  const data = JSON.parse(value);
                  
                  var sum = 0,
                  	count = 0;
                  
                  for (var key in data) {
                  	if (data.hasOwnProperty(key)) {
                  		sum += data[key].average;
                  		count++;
                  	}
                  }
                  
                  if (count == 0) {
                  	return 0;
                  }
                  
                  return sum / count;
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: cpu
          triggers:
            - uuid: afaba0a2b0264838a790b6c98ec1b28e
              expression: 'min(/Ribbon SBC SWe CE by HTTP/ribbon.server.cpu.util,5m) > {$RIBBON.CPU.UTIL.CRIT}'
              name: 'Ribbon: High cpu utilization'
              event_name: 'Ribbon: High cpu utilization (>{$RIBBON.CPU.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'CPU utilization is too high. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: f5edd11ffb28493cad8010c009ce873c
          name: 'Get data'
          type: SCRIPT
          key: ribbon.server.data.get
          history: '0'
          value_type: TEXT
          params: |
            
            var Ribbon = {
            	params: {},
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response, request = new HttpRequest();
            
            		if (typeof Ribbon.params.http_proxy !== 'undefined' && Ribbon.params.http_proxy !== '') {
            			request.setProxy(Ribbon.params.http_proxy);
            		};
            
            		request.addHeader('Content-Type: application/yang-data+json');
            		request.addHeader('Authorization: Basic ' + btoa(Ribbon.params.username + ':' + Ribbon.params.password));
            
            		Zabbix.log(4, '[ Ribbon SBC SWe core ] Sending request: ' + url);
            
            		response = request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC SWe core ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API. Check debug log for more information.';
            		}
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	filterByServerName: function (data, param_name, key_field) {
            		var result = {};
            
            		for (var key in data) {
            			if (typeof data[key] === 'object' && data[key] !== null && typeof data[key][param_name] !== 'undefined') {
            				if (data[key][param_name] === Ribbon.params.server_name) {
            					result[data[key][key_field]] = data[key];
            				};
            			}
            		};
            
            		return result;
            	},
            
            	getMetricsData: function (endpoints) {
            		var data = {};
            
            		Object.keys(endpoints).forEach(function (key) {
            			data[key] = Ribbon.getField(Ribbon.getRequest(endpoints[key]['url']), endpoints[key]['path']);
            		});
            
            		return data;
            	}
            };
            
            
            
            try {
            	var result = {};
            
            	Ribbon.setParams(JSON.parse(value));
            
            	var endpoints = {
            		'serverStatus': {
            			'url': '/restconf/data/sonusSystem:system/serverStatus=' + Ribbon.params.server_name,
            			'path': 'sonusSystem:serverStatus'},
            		'memoryUtilCurrentStatistics': {
            			'url': '/restconf/data/sonusSystem:system/memoryUtilCurrentStatistics=' + Ribbon.params.server_name,
            			'path': 'sonusSystem:memoryUtilCurrentStatistics'},
            		'cpuUtilCurrentStatistics': {
            			'url': '/restconf/data/sonusSystem:system/cpuUtilCurrentStatistics',
            			'path': 'sonusSystem:cpuUtilCurrentStatistics'},
            		'hardDiskUsage': {
            			'url': '/restconf/data/sonusSystem:system/hardDiskUsage',
            			'path': 'sonusSystem:hardDiskUsage'},
            		'ethernetPort': {
            			'url': '/restconf/data/sonusSystem:system/sonusOrcaSystem:ethernetPort',
            			'path': 'sonusOrcaSystem:ethernetPort'},
            	};
            
            	result = Ribbon.getMetricsData(endpoints);
            
            	var ethernet_fields = [
            		'packetPortStatus',
            		'mgmtPortStatus',
            		'portRedundancyGroupStatus',
            		'portMonitorStatus'
            	]
            	
            	for (var key in ethernet_fields) {
            		var item = ethernet_fields[key];
            		if (typeof result[item] === 'object' || typeof result[item] !== null) {
            			result[item] = Ribbon.filterByServerName(result['ethernetPort'][item], 'ceName', 'portName');
            		};
            	};
            
            	result['cpuUtilCurrentStatistics'] = Ribbon.filterByServerName(result['cpuUtilCurrentStatistics'], 'ceName', 'cpu');
            	result['hardDiskUsage'] = Ribbon.filterByServerName(result['hardDiskUsage'], 'serverName', 'partition');
            	delete result['ethernetPort'];
            
            	return JSON.stringify(result);
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC SWe core ] ERROR: ' + error);
            	error_msg = 'Failed to get data from API:' + error;
            
            	return JSON.stringify({ 'error':  error_msg });
            }
          description: 'Gets the server information.'
          timeout: '30'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: server_name
              value: '{$RIBBON.CE.NAME}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: 48536769afc946aca214d49e7f2bebda
          name: 'Get data check'
          type: DEPENDENT
          key: ribbon.server.data.get.check
          value_type: CHAR
          description: 'Checks that the Ribbon metric data has been received correctly.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: b71110508de943589a1576596d3927ac
              expression: 'length(last(/Ribbon SBC SWe CE by HTTP/ribbon.server.data.get.check))>0'
              name: 'Ribbon: Failed to get metric data'
              event_name: 'Ribbon: Failed to get API metrics for the Ribbon SBC'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Failed to get API metrics from the Ribbon SBC.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 92ceb828307d4c7998ecf2840eee9fb4
          name: 'Server hardware sub type'
          type: DEPENDENT
          key: ribbon.server.hw.sub.type
          value_type: CHAR
          description: 'Identifies the type of server module the indexed slot has been configured to accept. Server modules other than this type are rejected by the System Manager.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].hwSubType'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: system
        - uuid: 7688b74edba64cc6a85a153fd9aad473
          name: 'Server hardware type'
          type: DEPENDENT
          key: ribbon.server.hw.type
          value_type: CHAR
          description: 'Identifies the type of server module the indexed slot has been configured to accept. Server modules other than this type are rejected by the System Manager.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].hwType'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: system
        - uuid: 04ed02cc396c4cad82712d9aab24a6fc
          name: 'Memory utilization'
          type: DEPENDENT
          key: ribbon.server.memory.util
          units: '!%'
          description: 'The average memory utilization for this interval (in percent).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.memoryUtilCurrentStatistics[0].average'
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 60da0d3d45a3463aace6239ccf0ed3bf
              expression: 'min(/Ribbon SBC SWe CE by HTTP/ribbon.server.memory.util,5m) > {$RIBBON.MEMORY.UTIL.CRIT}'
              name: 'Ribbon: High memory utilization'
              event_name: 'Ribbon: High memory utilization (>{$RIBBON.MEMORY.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 232bfd9f0553416da0569cd1978fc7a2
          name: 'Server name'
          type: DEPENDENT
          key: ribbon.server.name
          value_type: CHAR
          description: 'Identifies the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].name'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: system
        - uuid: ae5da694c3c24639aa0605fe93e5efdf
          name: 'Platform version'
          type: DEPENDENT
          key: ribbon.server.platform.version
          value_type: CHAR
          description: 'Indicates the platform version currently running on the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].platformVersion'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: application
        - uuid: fb6cde6215d1496c94bd9be990527529
          name: Role
          type: DEPENDENT
          key: ribbon.server.role
          value_type: CHAR
          description: 'Indicates the redundancy role of the server (for management entities).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].mgmtRedundancyRole'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 943cab49e4bc4f4e96f82e8264fa49ac
              expression: 'last(/Ribbon SBC SWe CE by HTTP/ribbon.server.role)<>last(/Ribbon SBC SWe CE by HTTP/ribbon.server.role,#2)'
              name: 'Ribbon: Role has been changed'
              event_name: 'Ribbon: Role has been changed'
              opdata: 'Current role: {ITEM.LASTVALUE}'
              priority: INFO
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 31ee06ce57e8451fa5c98f7185ee6b3d
          name: 'Serial number'
          type: DEPENDENT
          key: ribbon.server.serial.number
          value_type: CHAR
          description: 'Identifies the serial number of the server module. This is the serial number assigned to the server module during manufacturing.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].serialNum'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: system
        - uuid: 6279c6ef1262473494342fde1c10e444
          name: 'Swap utilization'
          type: DEPENDENT
          key: ribbon.server.swap.util
          units: '!%'
          description: 'The average swap utilization for this interval (in percent).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.memoryUtilCurrentStatistics[0].averageSwap'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 637a10aaa46e454abf78a8841efb75cf
              expression: 'min(/Ribbon SBC SWe CE by HTTP/ribbon.server.swap.util,5m) > {$RIBBON.SWAP.UTIL.CRIT}'
              name: 'Ribbon: High swap utilization'
              event_name: 'Ribbon: High swap utilization (>{$RIBBON.SWAP.UTIL.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE}'
              priority: AVERAGE
              description: 'The system is running out of free memory.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 2a2a30ae5d744bf19d2b2104062b8fe6
          name: 'Sync status'
          type: DEPENDENT
          key: ribbon.server.sync.status
          value_type: CHAR
          description: 'Indicates the inter-CE data synchronization state.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].syncStatus'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: 58c3e53e7b3c4f61ab33c8230681589c
              expression: 'last(/Ribbon SBC SWe CE by HTTP/ribbon.server.sync.status)<>"syncCompleted"'
              name: 'Ribbon: Synchronization status in not complete'
              event_name: 'Ribbon: Sync status is not "syncCompleted"'
              opdata: 'Current status: {ITEM.LASTVALUE}'
              priority: WARNING
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: availability
        - uuid: e714e798cf4e4301b55525ba50f2e363
          name: Uptime
          type: DEPENDENT
          key: ribbon.server.uptime
          units: uptime
          description: 'Indicates the server module uptime in days/hours/minutes/seconds.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.serverStatus[0].upTime'
            - type: JAVASCRIPT
              parameters:
                - |
                  const data = value;
                  var days = 0, hours = 0, minutes = 0, seconds = 0;
                  
                  const daysMatch = data.match(/(\d+)\s+Days?/i);
                  
                  if (daysMatch) {
                  	days = parseInt(daysMatch[1], 10);
                  	data = data.replace(daysMatch[0], "").trim();
                  }
                  
                  const timeMatch = data.match(/(\d+):(\d+):(\d+)/);
                  
                  if (!timeMatch) {
                  	throw "Unknown uptime format";
                  }
                  
                  hours = parseInt(timeMatch[1], 10);
                  minutes = parseInt(timeMatch[2], 10);
                  seconds = parseInt(timeMatch[3], 10);
                  
                  return days * 86400 + hours * 3600 + minutes * 60 + seconds;
          master_item:
            key: ribbon.server.data.get
          tags:
            - tag: component
              value: system
          triggers:
            - uuid: f8efa94e91304890bdbf6bc25637efca
              expression: 'last(/Ribbon SBC SWe CE by HTTP/ribbon.server.uptime)<10m'
              name: 'Ribbon: Server has been restarted'
              event_name: 'Ribbon: Server has been restarted (uptime < 10m)'
              opdata: 'Current uptime: {ITEM.LASTVALUE}'
              priority: INFO
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
      discovery_rules:
        - uuid: d886ff2a43f34450bc88de7d4956a226
          name: 'CPU discovery'
          type: DEPENDENT
          key: ribbon.cpu.discovery
          description: 'Used for the discovery of CPU.'
          item_prototypes:
            - uuid: 539d896b890e40fc80140e485c66c9e7
              name: 'CPU [{#CPU.NUM}]: Utilization'
              type: DEPENDENT
              key: 'ribbon.sync.cpu.util[{#CPU.NUM}]'
              units: '!%'
              description: 'The average CPU utilization for this interval (in percent).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.cpuUtilCurrentStatistics.["{#CPU.NUM}"].average'
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: cpu
                - tag: cpu
                  value: '{#CPU.NUM}'
          master_item:
            key: ribbon.server.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)["cpuUtilCurrentStatistics"];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#CPU.NUM}": json_data[entity]["cpu"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 7237f40c48c34b7f99d9e4af7e59f06c
          name: 'FS discovery'
          type: DEPENDENT
          key: ribbon.fs.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#FS}'
                value: '{$RIBBON.FS.DISCOVERY.NAME.MATCHES}'
              - macro: '{#FS}'
                value: '{$RIBBON.FS.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of disks.'
          item_prototypes:
            - uuid: 63e10a5cfd714ef4889a19b9bd009160
              name: 'FS [{#FS}]: Free'
              type: DEPENDENT
              key: 'ribbon.fs.free[{#FS}]'
              units: B
              description: 'Indicates free hard disk space.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardDiskUsage.["{#FS}"].freeDiskSpace'
                - type: TRIM
                  parameters:
                    - KBytes
                - type: MULTIPLIER
                  parameters:
                    - '1024'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: storage
                - tag: fs
                  value: '{#FS}'
            - uuid: ae352dc364764946ba31c76e76ebb659
              name: 'FS [{#FS}]: Role'
              type: DEPENDENT
              key: 'ribbon.fs.role[{#FS}]'
              value_type: CHAR
              description: 'Role of the server for the indicated partition.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardDiskUsage.["{#FS}"].role'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: storage
                - tag: fs
                  value: '{#FS}'
            - uuid: 3b2f0c9499e9457a9198fa04c757c8ba
              name: 'FS [{#FS}]: Sync status'
              type: DEPENDENT
              key: 'ribbon.fs.sync.status[{#FS}]'
              value_type: CHAR
              description: 'Partition''s synchronization status with the peer server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardDiskUsage.["{#FS}"].syncStatus'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: storage
                - tag: fs
                  value: '{#FS}'
            - uuid: 3b67f185d6e446868178259a0d5a5168
              name: 'FS [{#FS}]: Total size'
              type: DEPENDENT
              key: 'ribbon.fs.total[{#FS}]'
              units: B
              description: 'Capacity of the disk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardDiskUsage.["{#FS}"].totalDiskSpace'
                - type: TRIM
                  parameters:
                    - KBytes
                - type: MULTIPLIER
                  parameters:
                    - '1024'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: storage
                - tag: fs
                  value: '{#FS}'
            - uuid: 0ed4aa224e4b4182ac0c5383b7d583d9
              name: 'FS [{#FS}]: Utilization'
              type: DEPENDENT
              key: 'ribbon.fs.util[{#FS}]'
              units: '!%'
              description: 'Indicates used hard disk space.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.hardDiskUsage.["{#FS}"].usedDiskSpace'
                - type: TRIM
                  parameters:
                    - '%'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: storage
                - tag: fs
                  value: '{#FS}'
              trigger_prototypes:
                - uuid: ac708d850c12469da39cd8765d1277de
                  expression: 'min(/Ribbon SBC SWe CE by HTTP/ribbon.fs.util[{#FS}],5m) > {$RIBBON.DISK.UTIL.CRIT}'
                  name: 'Ribbon: FS [{#FS}]: High disk space utilization'
                  event_name: 'Ribbon: FS [{#FS}]: High disk space utilization (>{$RIBBON.DISK.UTIL.CRIT}% for 5m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'Disk space utilization exceeds the critical threshold.'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 796eb031342a4fd88fb1a5d08d9018ec
              name: 'FS [{#FS}]: Utilization'
              ymax_type_1: FIXED
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 81C784
                  item:
                    host: 'Ribbon SBC SWe CE by HTTP'
                    key: 'ribbon.fs.util[{#FS}]'
          master_item:
            key: ribbon.server.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)["hardDiskUsage"];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#FS}": json_data[entity]["partition"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 76524552160645cc83eb8d238d2dbb7b
          name: 'Management port discovery'
          type: DEPENDENT
          key: ribbon.mgmt.port.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#PORT}'
                value: '{$RIBBON.MANAGEMENT.PORT.DISCOVERY.NAME.MATCHES}'
              - macro: '{#PORT}'
                value: '{$RIBBON.MANAGEMENT.PORT.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of management ports.'
          item_prototypes:
            - uuid: a46e3f7fb43b499189cdac13701c6203
              name: 'Management port [{#PORT}]: Duplex mode'
              type: DEPENDENT
              key: 'ribbon.mgmt.port.duplex.mode[{#PORT}]'
              value_type: CHAR
              description: 'The negotiated interface duplex mode.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.mgmtPortStatus.["{#PORT}"].duplexMode'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: mgmt-port
                - tag: component
                  value: network
                - tag: mgmt-port
                  value: '{#PORT}'
            - uuid: aab28dc7b149479ca4061527a3ae580a
              name: 'Management port [{#PORT}]: Link state'
              type: DEPENDENT
              key: 'ribbon.mgmt.port.link.state[{#PORT}]'
              description: |
                The state of the interface.
                Possible values:
                0 - null
                1 - admnDisabled
                2 - admnEnabledPortDown
                3 - admnEnabledPortUp
                4 - admnDisabledNoLicense
                5 - admnEnabledPortDownInvalidSfpWrongSpeed
                6 - admnEnabledPortDownInvalidSfpNonSonus
                7 - unknown
              valuemap:
                name: 'Ribbon: Port link state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.mgmtPortStatus.["{#PORT}"].linkState'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                        'null',
                        'admnDisabled',
                        'admnEnabledPortDown',
                        'admnEnabledPortUp',
                        'admnDisabledNoLicense',
                        'admnEnabledPortDownInvalidSfpWrongSpeed',
                        'admnEnabledPortDownInvalidSfpNonSonus'
                      ].indexOf(value);
                      
                      return idx !== -1 ? idx : 7;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: mgmt-port
                - tag: component
                  value: network
                - tag: mgmt-port
                  value: '{#PORT}'
              trigger_prototypes:
                - uuid: 6722ff0530a2403baf02a64ce197e86d
                  expression: 'last(/Ribbon SBC SWe CE by HTTP/ribbon.mgmt.port.link.state[{#PORT}])=2 or last(/Ribbon SBC SWe CE by HTTP/ribbon.mgmt.port.link.state[{#PORT}])=5 or last(/Ribbon SBC SWe CE by HTTP/ribbon.mgmt.port.link.state[{#PORT}])=6'
                  name: 'Ribbon: Management port [{#PORT}]: Link state is down'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'The management port link state is `down`.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: e8859ed1e9a04b46b7a646d0a9111366
              name: 'Management port [{#PORT}]: RX bandwidth'
              type: DEPENDENT
              key: 'ribbon.mgmt.port.rx.bandwidth[{#PORT}]'
              units: bps
              description: 'Actual Rx bandwidth in use on this port, bytes/sec.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.mgmtPortStatus.["{#PORT}"].rxActualBandwidth'
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: mgmt-port
                - tag: component
                  value: network
                - tag: mgmt-port
                  value: '{#PORT}'
            - uuid: d530914bee3645e8b26a85703a78c22d
              name: 'Management port [{#PORT}]: Negotiated speed'
              type: DEPENDENT
              key: 'ribbon.mgmt.port.speed[{#PORT}]'
              description: |
                The negotiated interface speed. When statistics are generated for EMS, `negotiatedSpeed` will be displayed as an integer value.
                Possible values:
                0 - speed10Mbps
                1 - speed100Mbps
                2 - speed1000Mbps
                3 - speed10000Mbps
                4 - unknown
              valuemap:
                name: 'Ribbon: Port negotiated speed'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.mgmtPortStatus.["{#PORT}"].negotiatedSpeed'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                        'speed10Mbps',
                        'speed100Mbps',
                        'speed1000Mbps',
                        'speed10000Mbps',
                        'unknown'
                      ].indexOf(value);
                      
                      return idx !== -1 ? idx : 4;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: mgmt-port
                - tag: component
                  value: network
                - tag: mgmt-port
                  value: '{#PORT}'
            - uuid: f20e8343c3234ae8b0a5334e3b19329f
              name: 'Management port [{#PORT}]: TX bandwidth'
              type: DEPENDENT
              key: 'ribbon.mgmt.port.tx.bandwidth[{#PORT}]'
              units: bps
              description: 'Actual Tx bandwidth in use on this port, bytes/sec.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.mgmtPortStatus.["{#PORT}"].txActualBandwidth'
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: mgmt-port
                - tag: component
                  value: network
                - tag: mgmt-port
                  value: '{#PORT}'
          graph_prototypes:
            - uuid: c5e51691c6664520812ab3019ed51a68
              name: 'Management port [{#PORT}]: Usage'
              ymax_type_1: FIXED
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 81C784
                  item:
                    host: 'Ribbon SBC SWe CE by HTTP'
                    key: 'ribbon.mgmt.port.rx.bandwidth[{#PORT}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: FFD54F
                  yaxisside: RIGHT
                  item:
                    host: 'Ribbon SBC SWe CE by HTTP'
                    key: 'ribbon.mgmt.port.tx.bandwidth[{#PORT}]'
          master_item:
            key: ribbon.server.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)['mgmtPortStatus'];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#PORT}": json_data[entity]["portName"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 17140ceb74cb41179e4162a3d630b877
          name: 'Port monitor discovery'
          type: DEPENDENT
          key: ribbon.monitor.port.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#PORT}'
                value: '{$RIBBON.MONITOR.PORT.DISCOVERY.NAME.MATCHES}'
              - macro: '{#PORT}'
                value: '{$RIBBON.MONITOR.PORT.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of port monitors.'
          item_prototypes:
            - uuid: a58d013e850f43b6b3b17f996028ce2b
              name: 'Port monitor [{#PORT}]: Failures'
              type: DEPENDENT
              key: 'ribbon.monitor.port.failures[{#PORT}]'
              description: 'The current number of failures on this port monitor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portMonitorStatus.["{#PORT}"].failures'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-monitor
                - tag: port-monitor
                  value: '{#PORT}'
            - uuid: cfdab9b29ee14646adeeff87544bfa3d
              name: 'Port monitor [{#PORT}]: Fault state'
              type: DEPENDENT
              key: 'ribbon.monitor.port.fault.state[{#PORT}]'
              value_type: CHAR
              description: 'The fault state of the physical port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portMonitorStatus.["{#PORT}"].faultState'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-monitor
                - tag: port-monitor
                  value: '{#PORT}'
            - uuid: d5b86019dfa34f4083b172396e422d56
              name: 'Port monitor [{#PORT}]: Group name'
              type: DEPENDENT
              key: 'ribbon.monitor.port.group.name[{#PORT}]'
              value_type: CHAR
              description: 'The name of this port group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portMonitorStatus.["{#PORT}"].prgName'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-monitor
                - tag: port-monitor
                  value: '{#PORT}'
            - uuid: 0dcb5ae132b746ff9a4aeb65db577841
              name: 'Port monitor [{#PORT}]: Link failures'
              type: DEPENDENT
              key: 'ribbon.monitor.port.link.failures[{#PORT}]'
              description: 'The current number of link failures on this port monitor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portMonitorStatus.["{#PORT}"].linkFailures'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-monitor
                - tag: port-monitor
                  value: '{#PORT}'
            - uuid: e184efcae96748678a67135000dd51e1
              name: 'Port monitor [{#PORT}]: Name'
              type: DEPENDENT
              key: 'ribbon.monitor.port.name[{#PORT}]'
              value_type: CHAR
              description: 'The name of this port monitor.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portMonitorStatus.["{#PORT}"].pmName'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-monitor
                - tag: port-monitor
                  value: '{#PORT}'
            - uuid: 77f9fab4056546aa912ec7fadd80cb5e
              name: 'Port monitor [{#PORT}]: Physical name'
              type: DEPENDENT
              key: 'ribbon.monitor.port.physical.name[{#PORT}]'
              value_type: CHAR
              description: 'The name of the physical port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portMonitorStatus.["{#PORT}"].portName'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-monitor
                - tag: port-monitor
                  value: '{#PORT}'
            - uuid: 556ac689e8294d449a1694f131654406
              name: 'Port monitor [{#PORT}]: Role'
              type: DEPENDENT
              key: 'ribbon.monitor.port.role[{#PORT}]'
              value_type: CHAR
              description: 'The role of the physical port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portMonitorStatus.["{#PORT}"].role'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-monitor
                - tag: port-monitor
                  value: '{#PORT}'
            - uuid: 803fc65d7a134ef1ba577eec3f6a4373
              name: 'Port monitor [{#PORT}]: State'
              type: DEPENDENT
              key: 'ribbon.monitor.port.state[{#PORT}]'
              value_type: CHAR
              description: 'The link state of the physical port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portMonitorStatus.["{#PORT}"].state'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-monitor
                - tag: port-monitor
                  value: '{#PORT}'
              trigger_prototypes:
                - uuid: 155d1f5ee1af400e8ba07cc03eb49e4a
                  expression: 'last(/Ribbon SBC SWe CE by HTTP/ribbon.monitor.port.state[{#PORT}])<>"up"'
                  name: 'Ribbon: Port monitor [{#PORT}]: State is not "up"'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'The port monitor state is not `up`.'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: ribbon.server.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)['portMonitorStatus'];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#PORT}": json_data[entity]["pmName"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 541e87264085447da3c82118f81a257a
          name: 'Packet port discovery'
          type: DEPENDENT
          key: ribbon.packet.port.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#PORT}'
                value: '{$RIBBON.PACKET.PORT.DISCOVERY.NAME.MATCHES}'
              - macro: '{#PORT}'
                value: '{$RIBBON.PACKET.PORT.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of packet ports.'
          item_prototypes:
            - uuid: 71872e6ceec74c1e8b88882a16ff5501
              name: 'Packet port [{#PORT}]: Link state'
              type: DEPENDENT
              key: 'ribbon.packet.port.link.state[{#PORT}]'
              description: |
                The state of the interface. When statistics are generated for EMS, `linkState` will be displayed as an integer value.
                Possible values:
                0 - null
                1 - admnDisabled
                2 - admnEnabledPortDown
                3 - admnEnabledPortUp
                4 - admnDisabledNoLicense
                5 - admnEnabledPortDownInvalidSfpWrongSpeed
                6 - admnEnabledPortDownInvalidSfpNonSonus
                7 - unknown
              valuemap:
                name: 'Ribbon: Port link state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.packetPortStatus.["{#PORT}"].linkState'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                        'null',
                        'admnDisabled',
                        'admnEnabledPortDown',
                        'admnEnabledPortUp',
                        'admnDisabledNoLicense',
                        'admnEnabledPortDownInvalidSfpWrongSpeed',
                        'admnEnabledPortDownInvalidSfpNonSonus'
                      ].indexOf(value);
                      
                      return idx !== -1 ? idx : 7;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: packet-port
                - tag: packet-port
                  value: '{#PORT}'
              trigger_prototypes:
                - uuid: c43c708c4709464ca16b5e8840e0ebab
                  expression: 'last(/Ribbon SBC SWe CE by HTTP/ribbon.packet.port.link.state[{#PORT}])=2 or last(/Ribbon SBC SWe CE by HTTP/ribbon.packet.port.link.state[{#PORT}])=5 or last(/Ribbon SBC SWe CE by HTTP/ribbon.packet.port.link.state[{#PORT}])=6'
                  name: 'Ribbon: Packet port [{#PORT}]: Link state is down'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'The packet port link state is `down`.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 8ccfc427d4d64aef886cb1e05c30ce8c
              name: 'Packet port [{#PORT}]: RX bandwidth'
              type: DEPENDENT
              key: 'ribbon.packet.port.rx.bandwidth[{#PORT}]'
              units: bps
              description: 'Actual Rx bandwidth in use on this port, bytes/sec.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.packetPortStatus.["{#PORT}"].rxActualBandwidth'
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: packet-port
                - tag: packet-port
                  value: '{#PORT}'
            - uuid: b5e0ec12b3d24e53a416efcd00f5820f
              name: 'Packet port [{#PORT}]: Negotiated speed'
              type: DEPENDENT
              key: 'ribbon.packet.port.speed[{#PORT}]'
              description: |
                The interface speed. Packet port speed is not negotiable. When statistics are generated for EMS, `negotiatedSpeed` will be displayed as an integer value.
                Possible values:
                0 - speed10Mbps
                1 - speed100Mbps
                2 - speed1000Mbps
                3 - speed10000Mbps
                4 - unknown
              valuemap:
                name: 'Ribbon: Port negotiated speed'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.packetPortStatus.["{#PORT}"].negotiatedSpeed'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                        'speed10Mbps',
                        'speed100Mbps',
                        'speed1000Mbps',
                        'speed10000Mbps',
                        'unknown'
                      ].indexOf(value);
                      
                      return idx !== -1 ? idx : 4;
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: packet-port
                - tag: packet-port
                  value: '{#PORT}'
            - uuid: 9b01ae59d2c94386ba69bdcb42aa959e
              name: 'Packet port [{#PORT}]: TX bandwidth'
              type: DEPENDENT
              key: 'ribbon.packet.port.tx.bandwidth[{#PORT}]'
              units: bps
              description: 'Actual Tx bandwidth in use on this port, bytes/sec.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.packetPortStatus.["{#PORT}"].txActualBandwidth'
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: packet-port
                - tag: packet-port
                  value: '{#PORT}'
            - uuid: 058cbca2f7264418a627a373b9388ccf
              name: 'Packet port [{#PORT}]: Utilization'
              type: DEPENDENT
              key: 'ribbon.packet.port.util[{#PORT}]'
              units: '!%'
              description: 'Percentage of maximum bandwidth allocated on this port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.packetPortStatus.["{#PORT}"].bandwidthUsage'
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: packet-port
                - tag: packet-port
                  value: '{#PORT}'
              trigger_prototypes:
                - uuid: 75a8459f83074875bf9221ed1f1b2d31
                  expression: 'min(/Ribbon SBC SWe CE by HTTP/ribbon.packet.port.util[{#PORT}],5m) > {$RIBBON.PORT.UTIL.CRIT}'
                  name: 'Ribbon: Packet port [{#PORT}]: High port utilization'
                  event_name: 'Ribbon: Packet port [{#PORT}]: High port utilization (>{$RIBBON.PORT.UTIL.CRIT}% for 5m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'Packet port utilization exceeds the critical threshold.'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 7dea3cb8675a4f0b9afe14c80d2aa7b7
              name: 'Packet port [{#PORT}]: usage'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 81C784
                  item:
                    host: 'Ribbon SBC SWe CE by HTTP'
                    key: 'ribbon.packet.port.rx.bandwidth[{#PORT}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: FFD54F
                  yaxisside: RIGHT
                  item:
                    host: 'Ribbon SBC SWe CE by HTTP'
                    key: 'ribbon.packet.port.tx.bandwidth[{#PORT}]'
            - uuid: 0e0e6ad3b7f34a4fbab81f268c24c54f
              name: 'Packet port [{#PORT}]: Utilization'
              ymax_type_1: FIXED
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 81C784
                  item:
                    host: 'Ribbon SBC SWe CE by HTTP'
                    key: 'ribbon.packet.port.util[{#PORT}]'
          master_item:
            key: ribbon.server.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)['packetPortStatus'];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#PORT}": json_data[entity]["portName"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 5ab71e8e5c62406d8bdba0aa378884fd
          name: 'Port redundancy group discovery'
          type: DEPENDENT
          key: ribbon.redundancy.port.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#PORT}'
                value: '{$RIBBON.REDUNDANCY.PORT.DISCOVERY.NAME.MATCHES}'
              - macro: '{#PORT}'
                value: '{$RIBBON.REDUNDANCY.PORT.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of port redundancy groups.'
          item_prototypes:
            - uuid: 2977345b2dea4b7e9ab7a3ad6a8dfcfa
              name: 'Port redundancy group [{#PORT}]: Failure count'
              type: DEPENDENT
              key: 'ribbon.redundancy.port.failure.count[{#PORT}]'
              description: 'The current number of port monitors within this port redundancy group that have declared themselves failed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portRedundancyGroupStatus.["{#PORT}"].failureCount'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-redundancy-group
                - tag: port-redundancy-group
                  value: '{#PORT}'
            - uuid: 584cd50cb78e4e8095b6bc9ddf0a2261
              name: 'Port redundancy group [{#PORT}]: Group name'
              type: DEPENDENT
              key: 'ribbon.redundancy.port.group.name[{#PORT}]'
              value_type: CHAR
              description: 'The name of this port redundancy group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portRedundancyGroupStatus.["{#PORT}"].prgName'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-redundancy-group
                - tag: port-redundancy-group
                  value: '{#PORT}'
            - uuid: f270fe8558044b56aa9720519163d3cb
              name: 'Port redundancy group [{#PORT}]: Redundancy mode'
              type: DEPENDENT
              key: 'ribbon.redundancy.port.mode[{#PORT}]'
              value_type: CHAR
              description: 'The VM redundancy mode of the CE.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portRedundancyGroupStatus.["{#PORT}"].vmRedundancyMode'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-redundancy-group
                - tag: port-redundancy-group
                  value: '{#PORT}'
            - uuid: 83c514742beb4fe3a49ab1f6f743d267
              name: 'Port redundancy group [{#PORT}]: Port name'
              type: DEPENDENT
              key: 'ribbon.redundancy.port.name[{#PORT}]'
              value_type: CHAR
              description: 'The name of the physical/logical port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portRedundancyGroupStatus.["{#PORT}"].portName'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-redundancy-group
                - tag: port-redundancy-group
                  value: '{#PORT}'
            - uuid: d99e6938b3a04771b68d14f7e976bfbb
              name: 'Port redundancy group [{#PORT}]: State'
              type: DEPENDENT
              key: 'ribbon.redundancy.port.state[{#PORT}]'
              value_type: CHAR
              description: 'The state of the logical port.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portRedundancyGroupStatus.["{#PORT}"].state'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-redundancy-group
                - tag: port-redundancy-group
                  value: '{#PORT}'
              trigger_prototypes:
                - uuid: 2c00a80067284cb8a961e566248e5e81
                  expression: 'last(/Ribbon SBC SWe CE by HTTP/ribbon.redundancy.port.state[{#PORT}])<>"up"'
                  name: 'Ribbon: Port redundancy group [{#PORT}]: State is not "up"'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'The port redundancy group state is not `up`.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: d64a16c2a12f4819a2fc66ff6cbe24f6
              name: 'Port redundancy group [{#PORT}]: Type'
              type: DEPENDENT
              key: 'ribbon.redundancy.port.type[{#PORT}]'
              value_type: CHAR
              description: 'Interface type of this port redundancy group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.portRedundancyGroupStatus.["{#PORT}"].interfaceType'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.server.data.get
              tags:
                - tag: component
                  value: network
                - tag: component
                  value: port-redundancy-group
                - tag: port-redundancy-group
                  value: '{#PORT}'
          master_item:
            key: ribbon.server.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)['portRedundancyGroupStatus'];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#PORT}": json_data[entity]["portName"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: communication
        - tag: target
          value: ribbon
        - tag: target
          value: ribbon-swe-ce
      macros:
        - macro: '{$RIBBON.CE.NAME}'
          description: 'Ribbon SBC CE name.'
          config:
            type: TEXT
            priority: '5'
            label: 'Ribbon SBC CE name'
            description: 'Set the Ribbon SBC CE name here.'
        - macro: '{$RIBBON.CPU.UTIL.CRIT}'
          value: '90'
          description: 'The threshold of CPU usage in percent.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Warning CPU usage threshold'
            description: 'Set the CPU usage threshold in percent. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.DISK.UTIL.CRIT}'
          value: '90'
          description: 'The threshold of disk usage in percent.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'Warning disk usage threshold'
            description: 'Set the disk usage threshold in percent. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.FS.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of file system names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Include file system name filter'
            description: 'Regex string to include file system by names.'
        - macro: '{$RIBBON.FS.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of file system names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Exclude file system name filter'
            description: 'Regex string to exclude file system by names.'
        - macro: '{$RIBBON.MANAGEMENT.PORT.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of management port names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '15'
            section_name: Filters
            label: 'Include management port name filter'
            description: 'Regex string to include management port by names.'
        - macro: '{$RIBBON.MANAGEMENT.PORT.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of management port names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '16'
            section_name: Filters
            label: 'Exclude management port name filter'
            description: 'Regex string to exclude management port by names.'
        - macro: '{$RIBBON.MEMORY.UTIL.CRIT}'
          value: '90'
          description: 'The threshold of memory usage in percent.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Warning memory usage threshold'
            description: 'Set the memory usage threshold in percent. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.MONITOR.PORT.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of monitor port names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '19'
            section_name: Filters
            label: 'Include monitor port name filter'
            description: 'Regex string to include monitor port by names.'
        - macro: '{$RIBBON.MONITOR.PORT.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of monitor port names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '20'
            section_name: Filters
            label: 'Exclude monitor port name filter'
            description: 'Regex string to exclude monitor port by names.'
        - macro: '{$RIBBON.PACKET.PORT.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of packet port names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '13'
            section_name: Filters
            label: 'Include packet port name filter'
            description: 'Regex string to include packet port by names.'
        - macro: '{$RIBBON.PACKET.PORT.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of packet port names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '14'
            section_name: Filters
            label: 'Exclude packet port name filter'
            description: 'Regex string to exclude packet port by names.'
        - macro: '{$RIBBON.PASSWORD}'
          type: SECRET_TEXT
          description: 'Ribbon SBC user password.'
          config:
            type: TEXT
            priority: '2'
            label: 'Ribbon SBC password'
            description: 'Set the Ribbon SBC password here.'
        - macro: '{$RIBBON.PORT.UTIL.CRIT}'
          value: '90'
          description: 'The threshold of packet port usage in percent.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'Warning packet port usage threshold'
            description: 'Set the packet port usage threshold in percent. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.PROXY}'
          description: 'Sets the HTTP proxy value. If this macro is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '4'
            label: 'Proxy address'
            description: 'Set the proxy IP here.'
        - macro: '{$RIBBON.REDUNDANCY.PORT.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of port redundancy group names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '17'
            section_name: Filters
            label: 'Include port redundancy group name filter'
            description: 'Regex string to include port redundancy group by names.'
        - macro: '{$RIBBON.REDUNDANCY.PORT.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of port redundancy group names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '18'
            section_name: Filters
            label: 'Exclude port redundancy group name filter'
            description: 'Regex string to exclude port redundancy group by names.'
        - macro: '{$RIBBON.SWAP.UTIL.CRIT}'
          value: '90'
          description: 'The threshold of swap usage in percent.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Warning swap usage threshold'
            description: 'Set the swap usage threshold in percent. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.URL}'
          description: 'Ribbon SBC API IP.'
          config:
            type: TEXT
            priority: '3'
            label: 'Ribbon SBC URL'
            description: 'Set the Ribbon SBC URL here.'
        - macro: '{$RIBBON.USERNAME}'
          description: 'Ribbon SBC username.'
          config:
            type: TEXT
            priority: '1'
            label: 'Ribbon SBC user'
            description: 'Set the Ribbon SBC user here.'
      dashboards:
        - uuid: 35c2fd2886fe4c2889d2cc25ff577d45
          name: 'Ribbon SWe CE overview'
          pages:
            - name: 'Ribbon: Overview'
              widgets:
                - type: gauge
                  name: 'CPU utilization'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'CPU utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.cpu.util
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 81C784
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: honeycomb
                  name: 'Filesystem util'
                  'y': '4'
                  width: '36'
                  height: '8'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'FS*Utilization'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("FS.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                    - type: STRING
                      name: thresholds.0.color
                      value: 81C784
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: 8BC34A
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF8F00
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '80'
                    - type: STRING
                      name: thresholds.3.color
                      value: E65660
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '90'
                - type: gauge
                  name: 'Memory utilization'
                  x: '18'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Memory utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.memory.util
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 81C784
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: gauge
                  name: 'Swap utilization'
                  x: '36'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Swap utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.swap.util
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 81C784
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: item
                  name: 'Server name'
                  x: '36'
                  'y': '4'
                  width: '36'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.name
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Serial number'
                  x: '36'
                  'y': '6'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.serial.number
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Platform version'
                  x: '36'
                  'y': '8'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.platform.version
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Application version'
                  x: '36'
                  'y': '10'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.application.version
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: Role
                  x: '54'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.role
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Application uptime'
                  x: '54'
                  'y': '2'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.application.uptime
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Server hardware type'
                  x: '54'
                  'y': '6'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.hw.type
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Server hardware sub type'
                  x: '54'
                  'y': '8'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.hw.sub.type
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
                - type: item
                  name: 'Sync status'
                  x: '54'
                  'y': '10'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe CE by HTTP'
                        key: ribbon.server.sync.status
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                    - type: INTEGER
                      name: value_size
                      value: '35'
            - name: 'Ribbon: Ports'
              widgets:
                - type: honeycomb
                  name: 'Packet port link state'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'Packet port*Link state'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("Packet port.\[(.*)\]", \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: honeycomb
                  name: 'Management port link state'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'Management port*Link state'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("Management port.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAABC
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
                - type: svggraph
                  name: 'Packet port utilization'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Packet port*Utilization'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '3'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAABB
                - type: honeycomb
                  name: 'Port redundancy group state'
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'Port redundancy group*State'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("Port redundancy group.\[(.*)\]", \1)}'
                    - type: INTEGER
                      name: primary_label_size_type
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAABD
                    - type: INTEGER
                      name: secondary_label_decimal_places
                      value: '0'
      valuemaps:
        - uuid: 6925e3c1ff3c43409e744cd05b6a813c
          name: 'Ribbon: Port link state'
          mappings:
            - value: '0'
              newvalue: 'null'
            - value: '1'
              newvalue: admnDisabled
            - value: '2'
              newvalue: admnEnabledPortDown
            - value: '3'
              newvalue: admnEnabledPortUp
            - value: '4'
              newvalue: admnDisabledNoLicense
            - value: '5'
              newvalue: admnEnabledPortDownInvalidSfpWrongSpeed
            - value: '6'
              newvalue: admnEnabledPortDownInvalidSfpNonSonus
            - value: '7'
              newvalue: unknown
        - uuid: 8ea3cb267eb645168aee7d6706a65007
          name: 'Ribbon: Port negotiated speed'
          mappings:
            - value: '0'
              newvalue: speed10Mbps
            - value: '1'
              newvalue: speed100Mbps
            - value: '2'
              newvalue: speed1000Mbps
            - value: '3'
              newvalue: speed10000Mbps
            - value: '4'
              newvalue: unknown
    - uuid: b917e122785c4bd4bd004e69badc93de
      template: 'Ribbon SBC SWe Core by HTTP'
      name: 'Ribbon SBC SWe Core by HTTP'
      description: |
        The Ribbon SBC Software Edition (SBC SWe) provides the same feature set as the award-winning SBC 5400 and SBC 7000 appliances, without requiring dedicated hardware.
        This gives enterprises the flexibility to deploy SBC functionality in a variety of environments – in their own data centers, on private cloud infrastructure, or in a public cloud.
        
        This template is designed for the effortless deployment of Ribbon SBC SWe Core monitoring and doesn't require any external scripts.
        
        More details can be found in the official documentation:
          - REST API Reference Guide: https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/360972436/RESTCONF+API+Reference+Guide
          - REST API User Guide: https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/444760643/RESTCONF+API+User+Guide
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        Ribbon’s SBC Software Edition (SBC SWe), offers identical feature software to its award-winning SBC 5400 and SBC 7000 appliances – only without an appliance. This means enterprises have the flexibility to deploy in their SBCs multiple environments - their own data center, on their own private cloud, or utilize a public cloud.
        
        This template is designed for the effortless deployment of Ribbon SBC SWe core monitoring and doesn't require any external scripts.
        
        More details can be found in the official documentation:
            - [REST API Reference](https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/360972436/RESTCONF+API+Reference+Guide)
            - [REST API User's Guide](https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/444760643/RESTCONF+API+User+Guide)
        
        ## Setup
        
        1. Create a new user according [REST API - Requirements](https://publicdoc.rbbn.com/spaces/SBXCONFAPIDOC/pages/444760644/RESTCONF+API+Requirements).
        2. Create a new host.
        3. Link the template to the host created earlier.
        4. Set the host wizard configuration field `Ribbon SBC URL` required for getting data.
        5. Set the host wizard configuration fields `Ribbon SBC user` and `Ribbon SBC password` with the login and password of the user created earlier.
      vendor:
        name: Zabbix
        version: 8.0-0
      groups:
        - name: 'Templates/Network devices'
      items:
        - uuid: f1058597a3b6411f93893076e454bda6
          name: 'Call status: Active'
          type: DEPENDENT
          key: ribbon.system.call.active
          description: 'Current number of active managed calls on this server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].activeCalls'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 5ed0bad322164073aaf5db9b1791a3d8
          name: 'Call status: Attempts'
          type: DEPENDENT
          key: ribbon.system.call.attempts
          description: 'Number of call attempts on this server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].callAttempts'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 6e5ec53168d14b3d951e48f7c0e28c2c
          name: 'Call status: Completions'
          type: DEPENDENT
          key: ribbon.system.call.completions
          description: 'Total number of completed call attempts on this server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].callCompletions'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: e3855ac0b82b4af6990b704eff03afbd
          name: 'Call statistics: Concurrent calls'
          type: DEPENDENT
          key: ribbon.system.call.concurrent
          description: 'The current high water mark of the total number of active calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].callCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: d1ff4e8e50fc44ebb52414e2c872c4ec
          name: 'Call statistics: Encrypt calls'
          type: DEPENDENT
          key: ribbon.system.call.encrypt
          description: 'The current high water mark of the total number of encrypt calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].callCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: a6b366b5cdad4e41bdd4aacdfbf006c9
          name: 'Call statistics: NICE recorded calls'
          type: DEPENDENT
          key: ribbon.system.call.nice.rec
          description: 'The current high water mark of the total number of NICE recording calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].niceRecCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: c32af5bd2a62410eb15963aa81bbd0a9
          name: 'Call rate congestion level'
          type: DEPENDENT
          key: ribbon.system.call.rate.level
          description: 'The current call rate congestion level.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.CongestionStatus[0].systemCongestionCallRateLevel'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 9e1836504f604cc2a96ae8354d245376
          name: 'Call statistics: SIP recorded calls'
          type: DEPENDENT
          key: ribbon.system.call.sip.rec
          description: 'The current high water mark of the total number of SIP recording calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].sipRecCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 52684c20d4134677b946d2c901e0e1fd
          name: 'Call statistics: SRTP calls'
          type: DEPENDENT
          key: ribbon.system.call.srtp
          description: 'The current high water mark of the total number of active SRTP calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].srtpCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: a6909ad4316642b6ba038de1dd678f56
          name: 'Call status: Stable'
          type: DEPENDENT
          key: ribbon.system.call.stable
          description: 'Current number of stable managed calls on this server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].stableCalls'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 2be5c70ea19744159c89e3bec6975f37
          name: 'Call status: Total'
          type: DEPENDENT
          key: ribbon.system.call.total
          description: 'Total number of calls on this server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].totalCalls'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 1645dc510644472180fbd4bd49765cb7
          name: 'Call statistics: Transcoded calls'
          type: DEPENDENT
          key: ribbon.system.call.transcode.rec
          description: 'The current high water mark of the total number of transcoded sessions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].transcodeCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 9ff0738420f94ef19f633f2216813c77
          name: 'Call status: Updates'
          type: DEPENDENT
          key: ribbon.system.call.updates
          description: 'Number of call updates (modifications) on this server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].callUpdates'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: a639e7401f4e440ebc48495d1ed276b7
          name: 'Call statistics: Video calls'
          type: DEPENDENT
          key: ribbon.system.call.video
          description: 'The current high water mark of the total number of active enhanced video calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].enhancedVideoCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 55cd46b62b16462d97200cac6dee8e3d
          name: 'System congestion level'
          type: DEPENDENT
          key: ribbon.system.congestion.level
          description: 'The current system congestion level.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.CongestionStatus[0].systemCongestionMCLevel'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: system
        - uuid: 4e84c38990724c91848046cfafd877a3
          name: 'CPU congestion level'
          type: DEPENDENT
          key: ribbon.system.cpu.level
          description: 'The current CPU congestion level.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.CongestionStatus[0].systemCongestionCPULevel'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: system
        - uuid: 210a0b4b387d4b32a4c6eac6ae014201
          name: 'Get data'
          type: SCRIPT
          key: ribbon.system.data.get
          history: '0'
          value_type: TEXT
          params: |
            
            var Ribbon = {
            	params: {},
            
            	setParams: function (params) {
            		['url', 'username', 'password'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		Ribbon.params = params;
            
            		if (typeof Ribbon.params.url === 'string') {
            			if (Ribbon.params.url.endsWith('/')) {
            				Ribbon.params.url = Ribbon.params.url.slice(0,-1);
            			}
            		}
            
            	},
            
            	getRequest: function (url) {
            		var response, request = new HttpRequest();
            
            		if (typeof Ribbon.params.http_proxy !== 'undefined' && Ribbon.params.http_proxy !== '') {
            			request.setProxy(Ribbon.params.http_proxy);
            		};
            
            		request.addHeader('Content-Type: application/yang-data+json');
            		request.addHeader('Authorization: Basic ' + btoa(Ribbon.params.username + ':' + Ribbon.params.password));
            
            		Zabbix.log(4, '[ Ribbon SBC SWe core ] Sending request: ' + url);
            
            		response = request.get(Ribbon.params.url + url);
            
            		Zabbix.log(4, '[ Ribbon SBC SWe core ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API. Check debug log for more information.';
            		}
            	},
            
            	getField: function (data, path) {
            		const steps = path.split('.');
            
            		for (var i = 0; i < steps.length; i++) {
            			var step = steps[i];
            			if (typeof data !== 'object' || typeof data[step] === 'undefined') {
            				throw 'Required field was not found: ' + path;
            			}
            			data = data[step];
            		}
            
            		return data;
            	},
            
            	filterByServerName: function (data, param_name, key_field) {
            		var result = {};
            
            		for (var key in data) {
            			if (typeof data[key] === 'object' && data[key] !== null && typeof data[key][param_name] !== 'undefined') {
            				if (data[key][param_name] === Ribbon.params.server_name) {
            					result[data[key][key_field]] = data[key];
            				};
            			}
            		};
            
            		return result;
            	},
            
            	getMetricsData: function (endpoints) {
            		var data = {};
            
            		Object.keys(endpoints).forEach(function (key) {
            			data[key] = Ribbon.getField(Ribbon.getRequest(endpoints[key]['url']), endpoints[key]['path']);
            		});
            
            		return data;
            	}
            };
            
            
            
            try {
            	Ribbon.setParams(JSON.parse(value));
            
            	endpoints = {
            		'serverAdmin': { 'url': '/restconf/data/sonusSystem:system/serverAdmin', 'path': 'sonusSystem:serverAdmin' },
            		'admin': { 'url': '/restconf/data/sonusSystem:system/admin', 'path': 'sonusSystem:admin' },
            		'syncStatus': { 'url': '/restconf/data/sonusSystem:system/syncStatus', 'path': 'sonusSystem:syncStatus' },
            		'CongestionStatistics': {
            			'url': '/restconf/data/sonusSystem:system/sonusOrcaSystem:systemCongestionCurrentStatistics',
            			'path': 'sonusOrcaSystem:systemCongestionCurrentStatistics'
            		},
            		'CongestionStatus': { 'url': '/restconf/data/sonusSystem:system/sonusOrcaSystem:systemCongestionStatus', 'path': 'sonusOrcaSystem:systemCongestionStatus' },
            		'callCountStatus': { 'url': '/restconf/data/sonusGlobal:global/sonusActiveCall:callCountStatus', 'path': 'sonusActiveCall:callCountStatus' },
            		'callCountCurrentStatistics': { 'url': '/restconf/data/sonusGlobal:global/callCountCurrentStatistics', 'path': 'sonusGlobal:callCountCurrentStatistics' },
            		'licenseInfo': { 'url': '/restconf/data/sonusSystem:system/licenseInfo', 'path': 'sonusSystem:licenseInfo' },
            		'dnsGroup': { 'url': '/restconf/data/sonusAddressContext:addressContext=default/sonusDns:dnsGroup=', 'path': 'sonusDns:dnsGroup' },
            		'globalTrunkGroupStatus': { 'url': '/restconf/data/sonusGlobal:global/sonusGlobalTrunkGroup:globalTrunkGroupStatus=', 'path': 'sonusGlobalTrunkGroup:globalTrunkGroupStatus' }
            	};
            
            
            	return JSON.stringify(Ribbon.getMetricsData(endpoints));
            
            }
            catch (error) {
            	Zabbix.log(3, '[ Ribbon SBC SWe core ] ERROR: ' + error);
            	error_msg = 'Failed to get data from API:' + error;
            
            	return JSON.stringify({ 'error': error_msg });
            }
          description: 'Gets the system information.'
          timeout: '30'
          parameters:
            - name: password
              value: '{$RIBBON.PASSWORD}'
            - name: proxy
              value: '{$RIBBON.PROXY}'
            - name: url
              value: '{$RIBBON.URL}'
            - name: username
              value: '{$RIBBON.USERNAME}'
          tags:
            - tag: component
              value: raw
        - uuid: f3d28176e1234b99aadb19c81b83850a
          name: 'Get data check'
          type: DEPENDENT
          key: ribbon.system.data.get.check
          value_type: CHAR
          description: 'Checks that the Ribbon metric data has been received correctly.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: CUSTOM_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 3h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: status
          triggers:
            - uuid: 50ed5b65a1b048c99c9f5f5101630fe6
              expression: 'length(last(/Ribbon SBC SWe Core by HTTP/ribbon.system.data.get.check))>0'
              name: 'Ribbon: Failed to get metric data'
              event_name: 'Ribbon: Failed to get API metrics for the Ribbon'
              opdata: 'Current value: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'Failed to get API metrics for the Ribbon.'
              tags:
                - tag: scope
                  value: availability
        - uuid: ea77f9d8f1ba4a9fbe40549ce0d17091
          name: 'DSP congestion level'
          type: DEPENDENT
          key: ribbon.system.dsp.rate.level
          description: 'The current DSP congestion level.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.CongestionStatus[0].systemCongestionDSPLevel'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: system
        - uuid: 93d7698912ce4805aa9dafe927699233
          name: 'Call status: Emergency establishing'
          type: DEPENDENT
          key: ribbon.system.emergency.call.establishing
          description: 'Number of establishing emergency calls (i.e. not yet stable).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].totalCallsEmergEstablishing'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: eb174749ba8e4f74abdd4fb60627f761
          name: 'Call status: Emergency stable'
          type: DEPENDENT
          key: ribbon.system.emergency.call.stable
          description: 'Number of stable emergency calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].totalCallsEmergStable'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 0209ccef35384da29d1bb002788a3fa8
          name: 'Management mode'
          type: DEPENDENT
          key: ribbon.system.haMode
          value_type: CHAR
          description: |
            Management mode of the system. Possible values:
              - haMode1to1
              - haModeNto1
          valuemap:
            name: 'Ribbon: System HA status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.admin[0].haMode'
            - type: JAVASCRIPT
              parameters:
                - |
                  const idx = [
                  	'haMode1to1',
                  	'haModeNto1',
                  	'unknown'
                  ].indexOf(value);
                  
                  return idx !== -1 ? idx : 2;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: system
        - uuid: fafaaff0021e4ae8bfd53d55a0e83bc2
          name: 'Call statistics: HPC queue abandons'
          type: DEPENDENT
          key: ribbon.system.hpc.queue.abandons
          description: 'The current number of HPC calls that were placed in HPC Call Queuing queues, but were subsequently abandoned before they could be completed.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].hpcQueueAbandons'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 220d681a8be3491aa96c0d4bcb90c101
          name: 'Call statistics: HPC queue attempts'
          type: DEPENDENT
          key: ribbon.system.hpc.queue.attempts
          description: 'The current number of HPC calls that were successfully placed on HPC Call Queuing queues.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].hpcQueueAttempts'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: e1ef92e48d6a4f048624f9ad26f06fa8
          name: 'Call statistics: HPC queue overflows'
          type: DEPENDENT
          key: ribbon.system.hpc.queue.overflows
          description: 'The current number of HPC calls for which HPC call queuing attempts were unsuccessful because queues were full.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].hpcQueueOverflows'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 4f2b31343898463d847d3ddefcadb3ee
          name: 'Call statistics: HPC queue timeouts'
          type: DEPENDENT
          key: ribbon.system.hpc.queue.timeouts
          description: 'The current number of HPC calls removed from HPC Call Queuing queues due to expiration of the queue timeout timer.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].hpcQueueTimeouts'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: a5cf7bc5ff094df69ecae1c97c627171
          name: 'IRTT congestion level'
          type: DEPENDENT
          key: ribbon.system.irtt.rate.level
          description: 'The current IRTT congestion level.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.CongestionStatus[0].systemCongestionIRTTLevel'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: system
        - uuid: f91884e60fcb407c9163678620f3f8aa
          name: 'System name'
          type: DEPENDENT
          key: ribbon.system.name
          value_type: CHAR
          description: 'Name of the system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.admin[0].actualSystemName'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: system
        - uuid: 7172b4e5f9da4e5ebd8afe5e553457f5
          name: 'Call status: Signalling active'
          type: DEPENDENT
          key: ribbon.system.non.call.active
          description: 'Current number of active non-call associated signalling channels in the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].activeCallsNonUser'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 7e8c3eaf11124075aa9ecfdf08c4a2cd
          name: 'Call status: Signalling stable'
          type: DEPENDENT
          key: ribbon.system.non.call.stable
          description: 'Current number of stable non-call associated signalling channels in the server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].stableCallsNonUser'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: cb23fde59fb34988aba1132eaace6df6
          name: 'Call status: Signalling total'
          type: DEPENDENT
          key: ribbon.system.non.call.total
          description: 'Total number of non-user calls on this server.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountStatus[0].totalCallsNonUser'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: acb2541b36294604b5c6bb260cccdd09
          name: 'Call statistics: MRF sessions'
          type: DEPENDENT
          key: ribbon.system.session.mrf
          description: 'The current high water mark of the total number of MRF calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].mrfSessionsCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 5856ac0adb1d4d7fb2aee5c3f41af29a
          name: 'Call statistics: SLB sessions'
          type: DEPENDENT
          key: ribbon.system.session.slb
          description: 'The current high water mark of the total number of SLB calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].slbSessionsCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: d546591b91314e35b4823af140a25c52
          name: 'Call statistics: SOSBC sessions'
          type: DEPENDENT
          key: ribbon.system.session.sosbc
          description: 'The current high water mark of the total number of SOSBC calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].sosbcSessionsCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
        - uuid: 3f72e3c4ad8c44398a70975456b27b25
          name: 'Call statistics: WebSocket sessions'
          type: DEPENDENT
          key: ribbon.system.session.websocket
          description: 'The current high water mark of the total number of WebSocket calls.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$.callCountCurrentStatistics[0].webSocketSessionsCount'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: ribbon.system.data.get
          tags:
            - tag: component
              value: calls
            - tag: component
              value: system
      discovery_rules:
        - uuid: 1feaa9fc301f4bc7be3b18c73ba0562e
          name: 'Call engine discovery'
          type: DEPENDENT
          key: ribbon.ce.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#CE.HW.TYPE}'
                value: '{$RIBBON.CE.DISCOVERY.HW.TYPE.MATCHES}'
              - macro: '{#CE.HW.TYPE}'
                value: '{$RIBBON.CE.DISCOVERY.HW.TYPE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#CE.NAME}'
                value: '{$RIBBON.CE.DISCOVERY.NAME.MATCHES}'
              - macro: '{#CE.NAME}'
                value: '{$RIBBON.CE.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#CE.ROLE}'
                value: '{$RIBBON.CE.DISCOVERY.ROLE.MATCHES}'
              - macro: '{#CE.ROLE}'
                value: '{$RIBBON.CE.DISCOVERY.ROLE.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of call engines.'
          item_prototypes:
            - uuid: 6dc847b33a0744da9f9830b1b4359f96
              name: 'Call engine [{#CE.NAME}]: HW sub-type'
              type: DEPENDENT
              key: 'ribbon.ce.hw.sub.type[{#CE.NAME}]'
              value_type: CHAR
              description: 'HW sub-type of the server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.serverAdmin.[?(@.name == "{#CE.NAME}")].hwSubType.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: call-engine-name
                  value: '{#CE.NAME}'
                - tag: component
                  value: call-engine
            - uuid: f324e184bb244bd3b03065401d851efb
              name: 'Call engine [{#CE.NAME}]: HW type'
              type: DEPENDENT
              key: 'ribbon.ce.hw.type[{#CE.NAME}]'
              value_type: CHAR
              description: 'HW type of the server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.serverAdmin.[?(@.name == "{#CE.NAME}")].hwType.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: call-engine-name
                  value: '{#CE.NAME}'
                - tag: component
                  value: call-engine
            - uuid: d239b5defa964c719a93814a94d7f1b2
              name: 'Call engine [{#CE.NAME}]: Name'
              type: DEPENDENT
              key: 'ribbon.ce.name[{#CE.NAME}]'
              value_type: CHAR
              description: 'Name of the CE instance provided by the user.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.serverAdmin.[?(@.name == "{#CE.NAME}")].actualCeName.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: call-engine-name
                  value: '{#CE.NAME}'
                - tag: component
                  value: call-engine
            - uuid: 10c202d6dd844e1aa3fbe8433d3fee2d
              name: 'Call engine [{#CE.NAME}]: Role'
              type: DEPENDENT
              key: 'ribbon.ce.role[{#CE.NAME}]'
              description: 'Server admin role. When set to primary, the role designates a server for internal processing.'
              valuemap:
                name: 'Ribbon: Call engine role'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.serverAdmin.[?(@.name == "{#CE.NAME}")].role.first()'
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'primary',
                      	'secondary'
                      ].indexOf(value);
                      
                      return idx !== -1 ? idx : 2;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: call-engine-name
                  value: '{#CE.NAME}'
                - tag: component
                  value: call-engine
          host_prototypes:
            - uuid: df47e752f85d4c22a519b4f9e6e04ab9
              host: '{#CE.NAME}'
              name: '{#CE.NAME}'
              group_links:
                - group:
                    name: Applications
              templates:
                - name: 'Ribbon SBC SWe CE by HTTP'
              macros:
                - macro: '{$RIBBON.CE.NAME}'
                  value: '{#CE.NAME}'
                  description: 'Name of call engine.'
          master_item:
            key: ribbon.system.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)["serverAdmin"];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#CE.NAME}": json_data[entity]["name"],
                  		"{#CE.ROLE}": json_data[entity]["role"],
                  		"{#CE.HW.TYPE}": json_data[entity]["hwType"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 1dc609eea19f4c56a055d6ecd0ca3c1f
          name: 'DNS discovery'
          type: DEPENDENT
          key: ribbon.dns.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DNS.GROUP}'
                value: '{$RIBBON.DNS.GROUP.DISCOVERY.NAME.MATCHES}'
              - macro: '{#DNS.GROUP}'
                value: '{$RIBBON.DNS.GROUP.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
              - macro: '{#DNS.STATE}'
                value: enabled
          description: 'Used for the discovery of DNS statistics.'
          item_prototypes:
            - uuid: aeb501d0b80847868e80c796912f4bd1
              name: 'DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: TCP connection failed'
              type: DEPENDENT
              key: 'ribbon.dns.connection.failed[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              description: 'Total number of DNS TCP connection failed.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.tcpConnectionFailed
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dns.get.stats.data[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              tags:
                - tag: component
                  value: dns
                - tag: dns-group
                  value: '{#DNS.GROUP}'
                - tag: dns-ip
                  value: '{#DNS.IP}'
                - tag: dns-server
                  value: '{#DNS.SERVER}'
                - tag: dns-type
                  value: '{#DNS.TYPE}'
            - uuid: 3426b7302ef449b38e2ea49047569329
              name: 'DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: TCP connection torn down'
              type: DEPENDENT
              key: 'ribbon.dns.connection.torn.down[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              description: 'Total number of DNS TCP connection torn down.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.tcpConnectiontorndown
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dns.get.stats.data[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              tags:
                - tag: component
                  value: dns
                - tag: dns-group
                  value: '{#DNS.GROUP}'
                - tag: dns-ip
                  value: '{#DNS.IP}'
                - tag: dns-server
                  value: '{#DNS.SERVER}'
                - tag: dns-type
                  value: '{#DNS.TYPE}'
            - uuid: 036858d6e02a482a87da5c66c2bb3a4f
              name: 'DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: TCP connection'
              type: DEPENDENT
              key: 'ribbon.dns.connection[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              description: 'Total number of DNS TCP connection.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.totalTcpConnection
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dns.get.stats.data[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              tags:
                - tag: component
                  value: dns
                - tag: dns-group
                  value: '{#DNS.GROUP}'
                - tag: dns-ip
                  value: '{#DNS.IP}'
                - tag: dns-server
                  value: '{#DNS.SERVER}'
                - tag: dns-type
                  value: '{#DNS.TYPE}'
            - uuid: 8981ce984a194bfbbe535753a81a9099
              name: 'DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: Errors'
              type: DEPENDENT
              key: 'ribbon.dns.errors[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              description: 'Total number of DNS errors.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.errors
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dns.get.stats.data[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              tags:
                - tag: component
                  value: dns
                - tag: dns-group
                  value: '{#DNS.GROUP}'
                - tag: dns-ip
                  value: '{#DNS.IP}'
                - tag: dns-server
                  value: '{#DNS.SERVER}'
                - tag: dns-type
                  value: '{#DNS.TYPE}'
              trigger_prototypes:
                - uuid: e1bc3be5563147c3a38ee20f99f9330c
                  expression: 'last(/Ribbon SBC SWe Core by HTTP/ribbon.dns.errors[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]) >= {$RIBBON.DNS.ERRORS.TRIGGER.THRESHOLD}'
                  name: 'Ribbon: DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: High number of errors'
                  opdata: 'Current number of errors: {ITEM.LASTVALUE}'
                  priority: WARNING
                  description: 'The number of DNS errors is high.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: d34426bc96e44b77a85b65f433bb0f27
              name: 'DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.dns.get.stats.data[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data of the DNS statistics.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.dnsGroup[?(@.name=="{#DNS.GROUP}")].dnsServerStatistics[?(@.ipAddress=="{#DNS.IP}")].first()'
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: component
                  value: dns
                - tag: component
                  value: raw
                - tag: dns-group
                  value: '{#DNS.GROUP}'
                - tag: dns-ip
                  value: '{#DNS.IP}'
                - tag: dns-server
                  value: '{#DNS.SERVER}'
                - tag: dns-type
                  value: '{#DNS.TYPE}'
            - uuid: 02a9cf1f50e3466b9a100e5dc108d16e
              name: 'DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: Query'
              type: DEPENDENT
              key: 'ribbon.dns.query[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              description: 'Total number of DNS queries received by the server.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.queries
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dns.get.stats.data[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              tags:
                - tag: component
                  value: dns
                - tag: dns-group
                  value: '{#DNS.GROUP}'
                - tag: dns-ip
                  value: '{#DNS.IP}'
                - tag: dns-server
                  value: '{#DNS.SERVER}'
                - tag: dns-type
                  value: '{#DNS.TYPE}'
            - uuid: 67a79aebf33046f397ecc565d3e95695
              name: 'DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: Referrals'
              type: DEPENDENT
              key: 'ribbon.dns.referrals[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              description: 'Total number of DNS referrals.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.referrals
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dns.get.stats.data[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              tags:
                - tag: component
                  value: dns
                - tag: dns-group
                  value: '{#DNS.GROUP}'
                - tag: dns-ip
                  value: '{#DNS.IP}'
                - tag: dns-server
                  value: '{#DNS.SERVER}'
                - tag: dns-type
                  value: '{#DNS.TYPE}'
            - uuid: 2729f041ee1b451da2af1676acab928f
              name: 'DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: Timeouts'
              type: DEPENDENT
              key: 'ribbon.dns.timeouts[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              description: 'Total number of DNS timeouts.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.timeouts
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.dns.get.stats.data[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}]'
              tags:
                - tag: component
                  value: dns
                - tag: dns-group
                  value: '{#DNS.GROUP}'
                - tag: dns-ip
                  value: '{#DNS.IP}'
                - tag: dns-server
                  value: '{#DNS.SERVER}'
                - tag: dns-type
                  value: '{#DNS.TYPE}'
          trigger_prototypes:
            - uuid: bc7d79451e4340f9b1c8417236fd1433
              expression: 'last(/Ribbon SBC SWe Core by HTTP/ribbon.dns.errors[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}])/last(/Ribbon SBC SWe Core by HTTP/ribbon.dns.query[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}])*100>{$RIBBON.DNS.ERRORS.PERCENT.TRIGGER.THRESHOLD}'
              name: 'Ribbon: DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: High percentage of errors'
              opdata: 'Current error: {ITEM.LASTVALUE1} of {ITEM.LASTVALUE2} queries'
              priority: WARNING
              description: 'The percentage of DNS errors is high.'
              tags:
                - tag: scope
                  value: availability
            - uuid: c3f4e1d5b1e14f2fa9f3e6d3e8b7a6c1
              expression: 'last(/Ribbon SBC SWe Core by HTTP/ribbon.dns.timeouts[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}])/last(/Ribbon SBC SWe Core by HTTP/ribbon.dns.query[{#DNS.GROUP}/{#DNS.SERVER}/{#DNS.IP}])*100>{$RIBBON.DNS.TIMEOUTS.PERCENT.TRIGGER.THRESHOLD}'
              name: 'Ribbon: DNS [{#DNS.GROUP}][{#DNS.SERVER}][{#DNS.IP}]: High percentage of timeouts'
              opdata: 'Current timeouts: {ITEM.LASTVALUE1} of {ITEM.LASTVALUE2} queries'
              priority: WARNING
              description: 'The percentage of DNS timeouts is high.'
              tags:
                - tag: scope
                  value: availability
          master_item:
            key: ribbon.system.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var data = JSON.parse(value),
                  	dns = getField(data, 'dnsGroup'),
                  	dns_servers = [];
                  
                  function getField(data, path, defaultValue) {
                  	var steps = path.split('.'),
                  		step = steps.shift();
                  
                  	while (typeof step !== 'undefined') {
                  		if (typeof data === 'undefined' || typeof data[step] === 'undefined') {
                  			return defaultValue;
                  		}
                  
                  		data = data[step];
                  		step = steps.shift();
                  	}
                  	return data;
                  };
                  
                  dns.forEach(function (item) {
                  
                  	var group = getField(item, "name"),
                  		type = getField(item, "type"),
                  		servers = getField(item, "server", {}),
                  		servers = Array.isArray(servers) ? servers : [servers];
                  
                  	servers.forEach(function (server) {
                  		dns_servers.push({
                  			"{#DNS.GROUP}": group,
                  			"{#DNS.TYPE}": type,
                  			"{#DNS.SERVER}": getField(server, "name", ''),
                  			"{#DNS.IP}": getField(server, "ipAddress", ''),
                  			"{#DNS.STATE}": getField(server, "state", '')
                  		});
                  	});
                  });
                  
                  return JSON.stringify(dns_servers);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: 1e3d38f447114daab812c98af635dc30
          name: 'License discovery'
          type: DEPENDENT
          key: ribbon.license.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#LICENSE.NAME}'
                value: '{$RIBBON.LICENSE.DISCOVERY.NAME.MATCHES}'
              - macro: '{#LICENSE.NAME}'
                value: '{$RIBBON.LICENSE.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of license info.'
          item_prototypes:
            - uuid: 4d378c397f214642aa2348bf60719805
              name: 'License [{#LICENSE.NAME}]: Expiry date'
              type: DEPENDENT
              key: 'ribbon.license.expiry.date[{#LICENSE.NAME}/{#LICENSE.SOURCE}]'
              value_type: CHAR
              description: 'Expiry date of the license.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.licenseInfo.[?(@.featureName == "{#LICENSE.NAME}" && @.source == "{#LICENSE.SOURCE}")].expirationDate.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: component
                  value: license
                - tag: license-name
                  value: '{#LICENSE.NAME}'
            - uuid: 76038b1448e54068a32195e88b96578f
              name: 'License [{#LICENSE.NAME}]: Current usage'
              type: DEPENDENT
              key: 'ribbon.license.usage.current[{#LICENSE.NAME}/{#LICENSE.SOURCE}]'
              description: 'Current usage of the license.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.licenseInfo.[?(@.featureName == "{#LICENSE.NAME}" && @.source == "{#LICENSE.SOURCE}")].inUse.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: component
                  value: license
                - tag: license-name
                  value: '{#LICENSE.NAME}'
            - uuid: 0e9b831e5d75425fa8f71ea23a21826a
              name: 'License [{#LICENSE.NAME}]: Usage limit'
              type: DEPENDENT
              key: 'ribbon.license.usage.limit[{#LICENSE.NAME}/{#LICENSE.SOURCE}]'
              description: 'Usage limit of the license.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.licenseInfo.[?(@.featureName == "{#LICENSE.NAME}" && @.source == "{#LICENSE.SOURCE}")].usageLimit.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: component
                  value: license
                - tag: license-name
                  value: '{#LICENSE.NAME}'
          master_item:
            key: ribbon.system.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)["licenseInfo"];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#LICENSE.NAME}": json_data[entity]["featureName"],
                  		"{#LICENSE.SOURCE}": json_data[entity]["source"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: f10278da819b4ba5b76f505e4289f63a
          name: 'Sync module discovery'
          type: DEPENDENT
          key: ribbon.sync.module.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#SYNC.MODULE}'
                value: '{$RIBBON.SYNC.MODULE.DISCOVERY.NAME.MATCHES}'
              - macro: '{#SYNC.MODULE}'
                value: '{$RIBBON.SYNC.MODULE.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of sync modules.'
          item_prototypes:
            - uuid: 9478b97203694c498e8a88b2d2cd7c35
              name: 'Module [{#SYNC.MODULE}]: Sync status'
              type: DEPENDENT
              key: 'ribbon.sync.module.status[{#SYNC.MODULE}]'
              value_type: CHAR
              description: 'Indicates the inter-CE data synchronization state.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.syncStatus.[?(@.syncModule == "{#SYNC.MODULE}")].status.first()'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: component
                  value: sync-module
                - tag: module
                  value: '{#SYNC.MODULE}'
              trigger_prototypes:
                - uuid: 851d014e5d454d29a38ec4754ce1d6ac
                  expression: 'last(/Ribbon SBC SWe Core by HTTP/ribbon.sync.module.status[{#SYNC.MODULE}])<>"syncCompleted"'
                  name: 'Ribbon: Module [{#SYNC.MODULE}]: Sync status is not "Completed"'
                  opdata: 'Current status: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'The module sync status is not "Completed".'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: ribbon.system.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)['syncStatus'];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#SYNC.MODULE}": json_data[entity]["syncModule"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
        - uuid: cde1b0d0f05e4cdea40c15756057e3ef
          name: 'Trunk group discovery'
          type: DEPENDENT
          key: ribbon.trunk.group.discovery
          filter:
            evaltype: AND
            conditions:
              - macro: '{#TRUNK.GROUP}'
                value: '{$RIBBON.TRUNK.GROUP.DISCOVERY.NAME.MATCHES}'
              - macro: '{#TRUNK.GROUP}'
                value: '{$RIBBON.TRUNK.GROUP.DISCOVERY.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
          description: 'Used for the discovery of trunk group statistics.'
          item_prototypes:
            - uuid: 3dc2bc687ac34b56b6baeebee2eee175
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Total available calls'
              type: DEPENDENT
              key: 'ribbon.trunk.available.calls[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: FLOAT
              description: 'The sum of all available or unblocked calls for this trunk group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.totalCallsAvailable
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: calls
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: a80bd3155466423e962d93833c29a7d7
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Bandwidth available'
              type: DEPENDENT
              key: 'ribbon.trunk.bw.available[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: FLOAT
              units: '!kbit/s'
              description: 'Available bandwidth for allocation (in Kbits/sec).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bwAvailable
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: bandwidth
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: 59f4808a47dc498085febaf9a6346ea3
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Bandwidth current limit'
              type: DEPENDENT
              key: 'ribbon.trunk.bw.current.limit[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: FLOAT
              units: '!kbit/s'
              description: 'The current bandwidth limit for this IP trunk group. It is initially set to the configured bandwidth limit, but may be reduced due to packet outage detection events (in Kbits/sec).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bwCurrentLimit
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: bandwidth
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: 2a94701789934237a306d4cee56a6931
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Bandwidth inbound usage'
              type: DEPENDENT
              key: 'ribbon.trunk.bw.inbound.usage[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: FLOAT
              units: '!kbit/s'
              description: 'Bandwidth in use for inbound traffic (in Kbits/sec).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bwInboundUsage
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: bandwidth
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: 2218ec6ed3e7470d98a42153f4fe5bb7
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Bandwidth outbound usage'
              type: DEPENDENT
              key: 'ribbon.trunk.bw.outbound.usage[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: FLOAT
              units: '!kbit/s'
              description: 'Bandwidth in use for outbound traffic (in Kbits/sec).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.bwOutboundUsage
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: bandwidth
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: 320d5534056742589e120c743f3c7a99
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Raw data'
              type: DEPENDENT
              key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              history: '0'
              value_type: TEXT
              description: 'Raw data of trunk group statistics.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.globalTrunkGroupStatus[?(@.name=="{#TRUNK.GROUP}" && @.zone == "{#TRUNK.ZONE}")].first()'
              master_item:
                key: ribbon.system.data.get
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: 769834a24caa42c4b4dbd223142eed68
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Inbound call usage'
              type: DEPENDENT
              key: 'ribbon.trunk.inbound.usage.calls[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: FLOAT
              description: 'Relevant only for IP trunk groups configured for inbound or both directions. Reflects the current inbound or incoming usage count of the IP trunk group (in number of calls).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.inboundCallsUsage
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: calls
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: 89721a0f5621478f9ed6b76258e7f690
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Outbound call usage'
              type: DEPENDENT
              key: 'ribbon.trunk.outbound.usage.calls[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: FLOAT
              description: 'This reflects the current outbound, non-priority usage count of this IP trunk group (in number of calls).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.outboundCallsUsage
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: calls
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: fbb82a63eed74bf781ac725bcf68ce4f
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Packet out detect state'
              type: DEPENDENT
              key: 'ribbon.trunk.packet.out.detect.state[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              description: 'Indicates the packet outage detection state of the trunk. `normal` - No packet outage declared. `packetOutageState` - Packet outage declared. The current bandwidth limit may be reduced according to the outage detection policy.'
              valuemap:
                name: 'Ribbon: Trunk packet out detect state'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.packetOutDetectState
                - type: JAVASCRIPT
                  parameters:
                    - |
                      const idx = [
                      	'packetOutageState',
                      	'normal'
                      ].indexOf(value);
                      
                      return idx !== -1 ? idx : 2;
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
              trigger_prototypes:
                - uuid: d18a4f15d3134cdcb8ce70556bfbcbee
                  expression: 'last(/Ribbon SBC SWe Core by HTTP/ribbon.trunk.packet.out.detect.state[{#TRUNK.GROUP}/{#TRUNK.ZONE}])<>1'
                  name: 'Ribbon: Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Packet out detect state is not "normal"'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: AVERAGE
                  description: 'Indicates that a packet outage has been declared on this trunk.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: ff1e154269e647b5add00b88dd3b3891
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: Priority call usage'
              type: DEPENDENT
              key: 'ribbon.trunk.priority.usage.calls[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: FLOAT
              description: 'Relevant only for IP trunk groups that are configured with priority call reservation enabled. Reflects the current priority usage count of the IP trunk group (in number of calls).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.priorityCallUsage
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: calls
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
            - uuid: bdbe03787d544f41bdbcbb8e3eb6c621
              name: 'Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: State'
              type: DEPENDENT
              key: 'ribbon.trunk.state[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              value_type: CHAR
              description: 'Current operational state of the IP trunk group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.state
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'ribbon.trunk.get.stats.data[{#TRUNK.GROUP}/{#TRUNK.ZONE}]'
              tags:
                - tag: component
                  value: trunk
                - tag: trunk-group
                  value: '{#TRUNK.GROUP}'
                - tag: trunk-zone
                  value: '{#TRUNK.ZONE}'
              trigger_prototypes:
                - uuid: 4caad3b7c12d4ac897a7534babf1a9a2
                  expression: 'last(/Ribbon SBC SWe Core by HTTP/ribbon.trunk.state[{#TRUNK.GROUP}/{#TRUNK.ZONE}])<>"inService"'
                  name: 'Ribbon: Trunk [{#TRUNK.GROUP}][{#TRUNK.ZONE}]: State is not "inService"'
                  opdata: 'Current state: {ITEM.LASTVALUE}'
                  priority: WARNING
                  description: 'Indicates that the trunk is not in service.'
                  tags:
                    - tag: scope
                      value: availability
          master_item:
            key: ribbon.system.data.get
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  const json_data = JSON.parse(value)["globalTrunkGroupStatus"];
                  var output_data = [];
                  
                  for (var entity in json_data) {
                  	output_data.push({
                  		"{#TRUNK.GROUP}": json_data[entity]["name"],
                  		"{#TRUNK.ZONE}": json_data[entity]["zone"]
                  	});
                  };
                  
                  return JSON.stringify(output_data);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
      tags:
        - tag: class
          value: software
        - tag: subclass
          value: communication
        - tag: target
          value: ribbon
        - tag: target
          value: ribbon-swe-core
      macros:
        - macro: '{$RIBBON.CE.DISCOVERY.HW.TYPE.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of call engine hardware types to be allowed in discovery.'
          config:
            type: TEXT
            priority: '12'
            section_name: Filters
            label: 'Include call engine hardware type filter'
            description: 'Regex string to include call engine by hardware types.'
        - macro: '{$RIBBON.CE.DISCOVERY.HW.TYPE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of call engine hardware types to be ignored in discovery.'
          config:
            type: TEXT
            priority: '13'
            section_name: Filters
            label: 'Exclude call engine hardware type filter'
            description: 'Regex string to exclude call engine by hardware types.'
        - macro: '{$RIBBON.CE.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of call engine names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '8'
            section_name: Filters
            label: 'Include call engine name filter'
            description: 'Regex string to include call engine by names.'
        - macro: '{$RIBBON.CE.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of call engine names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '9'
            section_name: Filters
            label: 'Exclude call engine name filter'
            description: 'Regex string to exclude call engine by names.'
        - macro: '{$RIBBON.CE.DISCOVERY.ROLE.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of call engine roles to be allowed in discovery.'
          config:
            type: TEXT
            priority: '10'
            section_name: Filters
            label: 'Include call engine role type filter'
            description: 'Regex string to include call engine by roles.'
        - macro: '{$RIBBON.CE.DISCOVERY.ROLE.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of call engine roles to be ignored in discovery.'
          config:
            type: TEXT
            priority: '11'
            section_name: Filters
            label: 'Exclude call engine role type filter'
            description: 'Regex string to exclude call engine by roles.'
        - macro: '{$RIBBON.DNS.ERRORS.PERCENT.TRIGGER.THRESHOLD}'
          value: '70'
          description: 'The threshold of DNS errors in percent.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Warning DNS errors percentage threshold'
            description: 'Threshold of DNS errors in percent to trigger warning. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.DNS.ERRORS.TRIGGER.THRESHOLD}'
          value: '1000'
          description: 'The threshold of DNS errors.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Warning DNS errors threshold'
            description: 'Threshold of DNS errors to trigger warning. No less than 0.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.DNS.GROUP.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of DNS group names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '18'
            section_name: Filters
            label: 'Include DNS group name filter'
            description: 'Regex string to include DNS group by names.'
        - macro: '{$RIBBON.DNS.GROUP.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of DNS group names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '19'
            section_name: Filters
            label: 'Exclude DNS group name filter'
            description: 'Regex string to exclude DNS group by names.'
        - macro: '{$RIBBON.DNS.TIMEOUTS.PERCENT.TRIGGER.THRESHOLD}'
          value: '70'
          description: 'The threshold of DNS timeouts in percent.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Warning DNS timeouts percentage threshold'
            description: 'Threshold of DNS timeouts in percent to trigger warning. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$RIBBON.LICENSE.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of license names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '16'
            section_name: Filters
            label: 'Include license name filter'
            description: 'Regex string to include license by names.'
        - macro: '{$RIBBON.LICENSE.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of license names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '17'
            section_name: Filters
            label: 'Exclude license name filter'
            description: 'Regex string to exclude license by names.'
        - macro: '{$RIBBON.PASSWORD}'
          type: SECRET_TEXT
          description: 'Ribbon SBC user password.'
          config:
            type: TEXT
            priority: '2'
            label: 'Ribbon SBC password'
            description: 'Set the Ribbon SBC password here.'
        - macro: '{$RIBBON.PROXY}'
          description: 'Sets the HTTP proxy value. If this macro is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '4'
            label: 'Proxy address'
            description: 'Set the proxy IP here.'
        - macro: '{$RIBBON.SYNC.MODULE.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of sync module names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '14'
            section_name: Filters
            label: 'Include sync module name filter'
            description: 'Regex string to include sync module by names.'
        - macro: '{$RIBBON.SYNC.MODULE.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of sync module names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '15'
            section_name: Filters
            label: 'Exclude sync module name filter'
            description: 'Regex string to exclude sync module by names.'
        - macro: '{$RIBBON.TRUNK.GROUP.DISCOVERY.NAME.MATCHES}'
          value: '.*'
          description: 'Sets the regex string of trunk group names to be allowed in discovery.'
          config:
            type: TEXT
            priority: '20'
            section_name: Filters
            label: 'Include Trunk group name filter'
            description: 'Regex string to include trunk group by names.'
        - macro: '{$RIBBON.TRUNK.GROUP.DISCOVERY.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'Sets the regex string of trunk group names to be ignored in discovery.'
          config:
            type: TEXT
            priority: '21'
            section_name: Filters
            label: 'Exclude Trunk group name filter'
            description: 'Regex string to exclude trunk group by names.'
        - macro: '{$RIBBON.URL}'
          description: 'Ribbon SBC API IP.'
          config:
            type: TEXT
            priority: '3'
            label: 'Ribbon SBC URL'
            description: 'Set the Ribbon SBC URL here.'
        - macro: '{$RIBBON.USERNAME}'
          description: 'Ribbon SBC username.'
          config:
            type: TEXT
            priority: '1'
            label: 'Ribbon SBC user'
            description: 'Set the Ribbon SBC user here.'
      dashboards:
        - uuid: 02584a811ff84a01ab69ac2640d8ea1d
          name: 'Ribbon SWe core overview'
          pages:
            - name: 'Ribbon: Overview'
              widgets:
                - type: item
                  name: 'System name'
                  width: '36'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.name
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: svggraph
                  name: 'Call statistic'
                  'y': '2'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FFD54F
                    - type: STRING
                      name: ds.0.color.1
                      value: 0EC9AC
                    - type: STRING
                      name: ds.0.color.2
                      value: 524BBC
                    - type: STRING
                      name: ds.0.color.3
                      value: ED1248
                    - type: STRING
                      name: ds.0.color.4
                      value: D1E754
                    - type: STRING
                      name: ds.0.color.5
                      value: 2AB5FF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.concurrent
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.encrypt
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.nice.rec
                    - type: ITEM
                      name: ds.0.itemids.3
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.sip.rec
                    - type: ITEM
                      name: ds.0.itemids.4
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.srtp
                    - type: ITEM
                      name: ds.0.itemids.5
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.video
                    - type: INTEGER
                      name: ds.0.missingdatafunc
                      value: '3'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAA
                - type: svggraph
                  name: 'HPC queue'
                  'y': '8'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FFD54F
                    - type: STRING
                      name: ds.0.color.1
                      value: 0EC9AC
                    - type: STRING
                      name: ds.0.color.2
                      value: 524BBC
                    - type: STRING
                      name: ds.0.color.3
                      value: ED1248
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.hpc.queue.abandons
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.hpc.queue.attempts
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.hpc.queue.overflows
                    - type: ITEM
                      name: ds.0.itemids.3
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.hpc.queue.timeouts
                    - type: INTEGER
                      name: ds.0.missingdatafunc
                      value: '3'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '4'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAC
                - type: item
                  name: 'Management mode'
                  x: '36'
                  width: '36'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.haMode
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: value_bold
                      value: '0'
                - type: honeycomb
                  name: 'Congestion level'
                  x: '36'
                  'y': '2'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: bg_color
                      value: 81D4FA
                    - type: STRING
                      name: items.0
                      value: 'Call rate congestion level'
                    - type: STRING
                      name: items.1
                      value: 'CPU congestion level'
                    - type: STRING
                      name: items.2
                      value: 'DSP congestion level'
                    - type: STRING
                      name: items.3
                      value: 'IRTT congestion level'
                    - type: STRING
                      name: items.4
                      value: 'System congestion level'
                    - type: STRING
                      name: primary_label
                      value: '{{ITEM.NAME}.regsub("(.*)congestion level", \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: STRING
                      name: thresholds.0.color
                      value: 81C784
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: CDDC39
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF8F00
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '2'
                    - type: STRING
                      name: thresholds.3.color
                      value: E65660
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '3'
                - type: svggraph
                  name: 'Call status'
                  x: '36'
                  'y': '8'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FFD54F
                    - type: STRING
                      name: ds.0.color.1
                      value: 0EC9AC
                    - type: STRING
                      name: ds.0.color.2
                      value: 524BBC
                    - type: STRING
                      name: ds.0.color.3
                      value: ED1248
                    - type: STRING
                      name: ds.0.color.4
                      value: D1E754
                    - type: STRING
                      name: ds.0.color.5
                      value: 2AB5FF
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: INTEGER
                      name: ds.0.fill
                      value: '5'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.active
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.attempts
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.stable
                    - type: ITEM
                      name: ds.0.itemids.3
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.completions
                    - type: ITEM
                      name: ds.0.itemids.4
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.total
                    - type: ITEM
                      name: ds.0.itemids.5
                      value:
                        host: 'Ribbon SBC SWe Core by HTTP'
                        key: ribbon.system.call.updates
                    - type: INTEGER
                      name: ds.0.missingdatafunc
                      value: '3'
                    - type: INTEGER
                      name: ds.0.width
                      value: '3'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
            - name: 'Ribbon: DNS'
              widgets:
                - type: svggraph
                  name: Query
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: A1887F
                    - type: STRING
                      name: ds.0.items.0
                      value: '''DNS *: Query'''
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: ECVDV
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: Timeouts
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 1565C0
                    - type: STRING
                      name: ds.0.items.0
                      value: 'DNS *: Timeouts'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: OZIZA
                    - type: INTEGER
                      name: righty
                      value: '0'
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                - type: svggraph
                  name: Errors
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: FF5722
                    - type: STRING
                      name: ds.0.items.0
                      value: 'DNS *: Errors'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: MPGLZ
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: Connections
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 7E57C2
                    - type: STRING
                      name: ds.0.items.0
                      value: 'DNS *: TCP connection'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'DNS *: TCP connection failed'
                    - type: STRING
                      name: ds.2.color
                      value: FFD54F
                    - type: STRING
                      name: ds.2.items.0
                      value: 'DNS *: TCP connection torn down'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: EAGUY
                    - type: INTEGER
                      name: righty
                      value: '0'
            - name: 'Ribbon: Trunk'
              widgets:
                - type: svggraph
                  name: Calls
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 3949AB
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Trunk *: Total available calls'
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Trunk *: Inbound calls usage'
                    - type: STRING
                      name: ds.2.color
                      value: FFD54F
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Trunk *: Outbound calls usage'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: NOKXU
                    - type: INTEGER
                      name: righty
                      value: '0'
                - type: svggraph
                  name: Bandwidth
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color
                      value: 7CB342
                    - type: STRING
                      name: ds.0.items.0
                      value: 'Trunk *: Bandwidth available'
                    - type: STRING
                      name: ds.1.color
                      value: CC6600
                    - type: STRING
                      name: ds.1.items.0
                      value: 'Trunk *: Bandwidth inbound usage'
                    - type: STRING
                      name: ds.2.items.0
                      value: 'Trunk *: Bandwidth outbound usage'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: ZETRZ
                    - type: INTEGER
                      name: righty
                      value: '0'
      valuemaps:
        - uuid: 4d1dd88f5c48462fa55ba7bd73476cb7
          name: 'Ribbon: Call engine role'
          mappings:
            - value: '0'
              newvalue: primary
            - value: '1'
              newvalue: secondary
            - value: '2'
              newvalue: unknown
        - uuid: bed1403dbaf0419987856c5c33a061b6
          name: 'Ribbon: System HA status'
          mappings:
            - value: '0'
              newvalue: haMode1to1
            - value: '1'
              newvalue: haModeNto1
            - value: '2'
              newvalue: unknown
        - uuid: 1262d32d602344e49fae29f64f6c2eb7
          name: 'Ribbon: Trunk packet out detect state'
          mappings:
            - value: '0'
              newvalue: packetOutageState
            - value: '1'
              newvalue: normal
            - value: '2'
              newvalue: unknown
    - uuid: bc056b1724e748bba50928f8cc605f8e
      template: 'YugabyteDB by HTTP'
      name: 'YugabyteDB by HTTP'
      description: |
        This template is designed for the deployment of YugabyteDB monitoring by Zabbix via HTTP and doesn't require any external scripts.
        
        To set up the template:
        
        1. Set your account ID as a value of the {$YUGABYTEDB.ACCOUNT.ID} macro. The account ID is the unique identifier for your customer account in YugabyteDB Managed. You can access the account ID from your profile in the YugabyteDB Managed user interface. To get your account ID, log in to YugabyteDB Managed and click the user profile icon. 
        See YugabyteDB documentation for instructions:
        https://yugabyte.stoplight.io/docs/managed-apis/tvsjh28t5ivmw-getting-started#account-id
        
        2. Set your project ID as a value of the {$YUGABYTEDB.PROJECT.ID} macro. The project ID is the unique identifier for a YugabyteDB Managed project. You can access the project ID from your profile in the YugabyteDB Managed user interface (along with the account ID). 
        See YugabyteDB documentation for instructions:
        https://yugabyte.stoplight.io/docs/managed-apis/tvsjh28t5ivmw-getting-started#project-id
        
        3. Generate the API access token and specify it as a value of the {$YUGABYTEDB.ACCESS.TOKEN} macro. 
        See YugabyteDB documentation for instructions:
        https://docs.yugabyte.com/preview/yugabyte-cloud/managed-automation/managed-apikeys/#create-an-api-key
        
        NOTE: If needed, you can specify a HTTP proxy for the template to use by changing the value of the {$YUGABYTEDB.PROXY} user macro.
        
        IMPORTANT! The value of the {$YUGABYTEDB.ACCESS.TOKEN} macro is stored as plain (not secret) text by default.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Overview
        
        This template is designed for the deployment of YugabyteDB monitoring by Zabbix via HTTP and doesn't require any external scripts.
        
        ## Setup
        
        1. Set your account ID as a value of the `Account ID` host wizard configuration field. The account ID is the unique identifier for your customer account in YugabyteDB Managed. You can access the account ID from your profile in the YugabyteDB Managed user interface. To get your account ID, log in to YugabyteDB Managed and click the user profile icon. See [YugabyteDB documentation](https://yugabyte.stoplight.io/docs/managed-apis/tvsjh28t5ivmw-getting-started#account-id) for instructions.
        
        2. Set your project ID as a value of the `Project ID` host wizard configuration field. The project ID is the unique identifier for a YugabyteDB Managed project. You can access the project ID from your profile in the YugabyteDB Managed user interface (along with the account ID). See [YugabyteDB documentation](https://yugabyte.stoplight.io/docs/managed-apis/tvsjh28t5ivmw-getting-started#project-id) for instructions.
        
        3. Generate the API access token and specify it as a value of the `API token` host wizard configuration field. See [YugabyteDB documentation](https://docs.yugabyte.com/preview/yugabyte-cloud/managed-automation/managed-apikeys/#create-an-api-key) for instructions.
        
        *NOTE* If needed, you can specify a HTTP proxy for the template to use by changing the value of the `HTTP proxy` host wizard configuration field.
        
        **IMPORTANT**
        
          The value of the `{$YUGABYTEDB.ACCESS.TOKEN}` macro is stored as plain (not secret) text by default.
      vendor:
        name: Zabbix
        version: 8.0-1
      groups:
        - name: Templates/Databases
      items:
        - uuid: 25196b29de6c45c18485f2aefe306818
          name: 'Get cluster'
          type: SCRIPT
          key: yugabytedb.clusters.get
          delay: 1h
          history: '0'
          value_type: TEXT
          params: |
            var YugabyteDB = {
            	params: {},
            	clusters: [],
            	error_msg: '',
            
            	setParams: function (params) {
            		['account_id', 'project_id', 'token'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		YugabyteDB.params = params;
            	},
            
            
            	request: function (url, data) {
            		if (typeof data === 'undefined' || data === null) {
            			data = '';
            		}
            
            		var response, request = new HttpRequest();
            		if (typeof YugabyteDB.params.proxy !== 'undefined' && YugabyteDB.params.proxy !== '') {
            			request.setProxy(YugabyteDB.params.proxy);
            		}
            		if (YugabyteDB.params.token) {
            			request.addHeader('Accept: application/json');
            			request.addHeader('Authorization: Bearer ' + YugabyteDB.params.token);
            		}
            
            		Zabbix.log(4, '[ YugabyteDB ] Sending request: ' + url);
            
            		response = request.get(url);
            
            		Zabbix.log(4, '[ YugabyteDB ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API:' + error;
            		}
            	}
            
            };
            
            try {
            	YugabyteDB.setParams(JSON.parse(value));
            
            	clusters = YugabyteDB.request(
            		'https://cloud.yugabyte.com/api/public/v1/accounts/' + YugabyteDB.params.account_id + '/projects/' + YugabyteDB.params.project_id + '/clusters'
            	)
            
            	YugabyteDB.clusters = clusters.data;
            }
            catch (error) {
            	Zabbix.log(3, '[ YugabyteDB ] ERROR: ' + error);
            	YugabyteDB.error_msg = 'Failed to get data from API:' + error;
            }
            
            return JSON.stringify({'clusters': YugabyteDB.clusters, 'error': YugabyteDB.error_msg});
          description: 'Get raw data about clusters.'
          timeout: 10s
          parameters:
            - name: account_id
              value: '{$YUGABYTEDB.ACCOUNT.ID}'
            - name: project_id
              value: '{$YUGABYTEDB.PROJECT.ID}'
            - name: proxy
              value: '{$YUGABYTEDB.PROXY}'
            - name: token
              value: '{$YUGABYTEDB.ACCESS.TOKEN}'
          tags:
            - tag: component
              value: raw
        - uuid: f5a43644d4d341658b8818077e24ccb3
          name: 'Get clusters item error'
          type: DEPENDENT
          key: yugabytedb.clusters.get.errors
          value_type: TEXT
          description: 'Item for gathering all the cluster item errors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.clusters.get
          tags:
            - tag: component
              value: error
          triggers:
            - uuid: add4067f699f401887d259ee35b4d654
              expression: 'length(last(/YugabyteDB by HTTP/yugabytedb.clusters.get.errors)) > 0'
              name: 'YugabyteDB: Failed to fetch data'
              priority: WARNING
              description: 'Failed to fetch data about cluster.'
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: b882ad93a75046b09794c7f229482006
          name: 'Cluster discovery'
          type: DEPENDENT
          key: yugabytedb.cluster.discovery
          description: 'Discovery of the available clusters.'
          host_prototypes:
            - uuid: 1a7ec22ad5ad41e0bcb04c01c2c45e4e
              host: '{#CLUSTER.ID}'
              name: 'YugabyteDB Cluster [{#CLUSTER.NAME}]'
              group_links:
                - group:
                    name: Databases
              templates:
                - name: 'YugabyteDB Cluster by HTTP'
              macros:
                - macro: '{$YUGABYTEDB.CLUSTER.ID}'
                  value: '{#CLUSTER.ID}'
                  description: 'ID of cluster.'
                - macro: '{$YUGABYTEDB.CLUSTER.NAME}'
                  value: '{#CLUSTER.NAME}'
                  description: 'Name of cluster.'
              tags:
                - tag: cluster
                  value: '{#CLUSTER.NAME}'
          master_item:
            key: yugabytedb.clusters.get
          lld_macro_paths:
            - lld_macro: '{#CLUSTER.ID}'
              path: $.cluster_id
            - lld_macro: '{#CLUSTER.NAME}'
              path: $.cluster_name
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var result = [];
                  var clusters = JSON.parse(value);
                  
                  for (var cluster in clusters['clusters']) {
                  	result.push({
                  		"cluster_id": clusters['clusters'][cluster]['info']['id'],
                  		"cluster_name": clusters['clusters'][cluster]['spec']['name']
                  	});
                  };
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
      tags:
        - tag: class
          value: cloud
        - tag: class
          value: database
        - tag: subclass
          value: sql
        - tag: target
          value: yugabytedb
      macros:
        - macro: '{$YUGABYTEDB.ACCESS.TOKEN}'
          description: 'Access token for the YugabyteDB API.'
          config:
            type: TEXT
            priority: '3'
            label: 'API token'
            description: 'Access token for the YugabyteDB API.'
            required: 'YES'
        - macro: '{$YUGABYTEDB.ACCOUNT.ID}'
          description: 'YugabyteDB account ID.'
          config:
            type: TEXT
            priority: '1'
            label: 'Account ID'
            description: 'YugabyteDB account ID.'
            required: 'YES'
        - macro: '{$YUGABYTEDB.PROJECT.ID}'
          description: 'YugabyteDB project ID.'
          config:
            type: TEXT
            priority: '2'
            label: 'Project ID'
            description: 'YugabyteDB project ID.'
            required: 'YES'
        - macro: '{$YUGABYTEDB.PROXY}'
          description: 'Sets the HTTP proxy value. If this macro is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '4'
            section_name: Other
            label: 'HTTP proxy'
            description: 'Sets the HTTP proxy value. If this macro is empty, then no proxy is used.'
    - uuid: f5fff9a83f774f4688692ad58aa35d45
      template: 'YugabyteDB Cluster by HTTP'
      name: 'YugabyteDB Cluster by HTTP'
      description: |
        This template is designed for the deployment of YugabyteDB clusters monitoring by Zabbix via HTTP and doesn't require any external scripts. This template will be automatically connected to discovered entities with all required parameters pre-defined.
        
        Generated by official Zabbix template tool "Templator"
      wizard_ready: 'YES'
      readme: |
        ## Setup
        
        This template is used in low-level discovery and will be auto-assigned to host prototypes. Additional configuration is not required.
      vendor:
        name: Zabbix
        version: 8.0-2
      groups:
        - name: Templates/Databases
      items:
        - uuid: 4872cb50f8284ff6aa07c530156f324e
          name: 'YSQL connections average used'
          type: DEPENDENT
          key: yugabytedb.cluster.connection.count
          description: 'Cumulative number of connections to the YSQL backend for all nodes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.AVERAGE_YSQL_CONNECTION_COUNT
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: connection
        - uuid: 5bfd7adb38334116a5a54e2a0e2847f9
          name: 'YSQL connections limit'
          type: DEPENDENT
          key: yugabytedb.cluster.connection.limit
          description: 'The limit of the number of connections to the YSQL backend for all nodes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_CONNECTION_LIMIT
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: connection
        - uuid: 187e373dd49a4214b1862393538ff209
          name: 'YSQL connections maximum used'
          type: DEPENDENT
          key: yugabytedb.cluster.connection.max
          description: 'Maximum of used connections to the YSQL backend for all nodes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_MAX_CONNECTION_COUNT
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: connection
        - uuid: a7c388d2e66b48469e47a55cbb6ec614
          name: 'YSQL connections utilization'
          type: CALCULATED
          key: yugabytedb.cluster.connection.utilization
          value_type: FLOAT
          units: '%'
          params: '(last(//yugabytedb.cluster.connection.count)/last(//yugabytedb.cluster.connection.limit))*100'
          description: 'Cumulative number of connections to the YSQL backend for all nodes, expressed in percent.'
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: connection
          triggers:
            - uuid: 5caf42a5309a4f0f834b6058f4741a44
              expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.connection.utilization,5m) > {$YUGABYTEDB.CONNECTION.UTILIZATION.WARN}'
              name: 'YugabyteDB Cluster: Average utilization of connections is high'
              event_name: 'YugabyteDB Cluster: Average utilization of connections is high (over {$YUGABYTEDB.CONNECTION.UTILIZATION.WARN}% for 5m)'
              opdata: 'Current connections utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'YugabyteDB Cluster uses more than {$YUGABYTEDB.CONNECTION.UTILIZATION.WARN}% of the connection limit.'
              dependencies:
                - name: 'YugabyteDB Cluster: Average utilization of connections is too high'
                  expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.connection.utilization,5m) > {$YUGABYTEDB.CONNECTION.UTILIZATION.CRIT}'
              tags:
                - tag: scope
                  value: performance
            - uuid: 68d2710963394afe8218178c98e88c62
              expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.connection.utilization,5m) > {$YUGABYTEDB.CONNECTION.UTILIZATION.CRIT}'
              name: 'YugabyteDB Cluster: Average utilization of connections is too high'
              event_name: 'YugabyteDB Cluster: Average utilization of connections is too high (over {$YUGABYTEDB.CONNECTION.UTILIZATION.CRIT}% for 5m)'
              opdata: 'Current connections utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'YugabyteDB Cluster uses more than {$YUGABYTEDB.CONNECTION.UTILIZATION.CRIT}% of the connection limit.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 8065a31bd61b494a9edf94692c4846ff
          name: 'CPU utilization'
          type: DEPENDENT
          key: yugabytedb.cluster.cpu.utilization
          value_type: FLOAT
          units: '%'
          description: 'The percentage of CPU use being consumed by the tablet or master server Yugabyte processes, as well as other processes, if any.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.CPU_USAGE
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: cpu
          triggers:
            - uuid: 22340ce9ea2e457fa4270498bfc53666
              expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.cpu.utilization,5m) > {$YUGABYTEDB.CPU.UTILIZATION.WARN}'
              name: 'YugabyteDB Cluster: CPU utilization is high'
              event_name: 'YugabyteDB Cluster: CPU utilization is high (over {$YUGABYTEDB.CPU.UTILIZATION.WARN}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'YugabyteDB Cluster CPU utilization is more than {$YUGABYTEDB.CPU.UTILIZATION.WARN}%. The system might be slow to respond.'
              dependencies:
                - name: 'YugabyteDB Cluster: CPU utilization is too high'
                  expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.cpu.utilization,5m) > {$YUGABYTEDB.CPU.UTILIZATION.CRIT}'
              tags:
                - tag: scope
                  value: performance
            - uuid: ed88478e0a784c8dbbe95c20b08c167e
              expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.cpu.utilization,5m) > {$YUGABYTEDB.CPU.UTILIZATION.CRIT}'
              name: 'YugabyteDB Cluster: CPU utilization is too high'
              event_name: 'YugabyteDB Cluster: CPU utilization is too high (over {$YUGABYTEDB.CPU.UTILIZATION.CRIT}% for 5m)'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'YugabyteDB Cluster CPU utilization is more than {$YUGABYTEDB.CPU.UTILIZATION.CRIT}%. The system might be slow to respond.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 03b2e6e400334c0eb6e6b2c7efe8ddcf
          name: 'Disk space provisioned'
          type: DEPENDENT
          key: yugabytedb.cluster.disk.provisioned
          value_type: FLOAT
          units: B
          description: 'Shows the amount of disk space provisioned for the cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.PROVISIONED_DISK_SPACE_GB
            - type: MULTIPLIER
              parameters:
                - '1073741824'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1h
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: storage
        - uuid: 2e59d947823e4e6b8a3eb9cd28cb8602
          name: 'Disk read, Bps'
          type: DEPENDENT
          key: yugabytedb.cluster.disk.read.bps
          value_type: FLOAT
          units: Bps
          description: 'The number of bytes being read from disk per second, averaged over each node.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.DISK_BYTES_READ_MB_PER_SEC
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: storage
        - uuid: 7a7c47740d01462f82ccb8649de19a23
          name: 'Disk read OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.disk.read.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The number of read operations per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.READ_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: performance
        - uuid: 03cd79b37aa543d4ba3ce9fb154513f2
          name: 'Disk space usage'
          type: DEPENDENT
          key: yugabytedb.cluster.disk.usage
          value_type: FLOAT
          units: B
          description: 'Shows the amount of disk space used by the cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.DISK_USAGE_GB
            - type: MULTIPLIER
              parameters:
                - '1073741824'
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: storage
        - uuid: b2de999838914ca2bfc2c4fdfd22db74
          name: 'Disk space utilization'
          type: CALCULATED
          key: yugabytedb.cluster.disk.utilization
          value_type: FLOAT
          units: '%'
          params: '(last(//yugabytedb.cluster.disk.usage)/last(//yugabytedb.cluster.disk.provisioned))*100'
          description: 'Shows the percentage of disk space used by the cluster.'
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: storage
          triggers:
            - uuid: 3571704c29e040b198a6e72d7526c98a
              expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.disk.utilization,5m) > {$YUGABYTEDB.DISK.UTILIZATION.CRIT}'
              name: 'YugabyteDB Cluster: Storage space is critically low'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'YugabyteDB Cluster uses more than {$YUGABYTEDB.DISK.UTILIZATION.CRIT}% of disk space.'
              tags:
                - tag: scope
                  value: capacity
            - uuid: 21623809368a43b0bdfb127f2fdea22c
              expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.disk.utilization,5m) > {$YUGABYTEDB.DISK.UTILIZATION.WARN}'
              name: 'YugabyteDB Cluster: Storage space is low'
              opdata: 'Current utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'YugabyteDB Cluster uses more than {$YUGABYTEDB.DISK.UTILIZATION.WARN}% of disk space.'
              dependencies:
                - name: 'YugabyteDB Cluster: Storage space is critically low'
                  expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.disk.utilization,5m) > {$YUGABYTEDB.DISK.UTILIZATION.CRIT}'
              tags:
                - tag: scope
                  value: capacity
        - uuid: c528c1692fe84e7c85ec99f5802dea15
          name: 'Disk write, Bps'
          type: DEPENDENT
          key: yugabytedb.cluster.disk.write.bps
          value_type: FLOAT
          units: Bps
          description: 'The number of bytes being written to disk per second, averaged over each node.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.DISK_BYTES_WRITTEN_MB_PER_SEC
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: storage
        - uuid: 0badafcd38d34e4faa70f95ba501658a
          name: 'Disk write OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.disk.write.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The number of write operations per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.WRITE_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: performance
        - uuid: d8f71197e0e147fea4de2a17d4b1ad81
          name: 'Get cluster'
          type: SCRIPT
          key: yugabytedb.cluster.get
          delay: 10m
          history: '0'
          value_type: TEXT
          params: |
            var YugabyteDB = {
            	params: {},
            	clusters: [],
            	error_msg: '',
            
            	setParams: function (params) {
            		['account_id', 'project_id', 'token', 'cluster_id'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		YugabyteDB.params = params;
            	},
            
            
            	request: function (url, data) {
            		if (typeof data === 'undefined' || data === null) {
            			data = '';
            		}
            
            		var response, request = new HttpRequest();
            		if (typeof YugabyteDB.params.proxy !== 'undefined' && YugabyteDB.params.proxy !== '') {
            			request.setProxy(YugabyteDB.params.proxy);
            		}
            		if (YugabyteDB.params.token) {
            			request.addHeader('Accept: application/json');
            			request.addHeader('Authorization: Bearer ' + YugabyteDB.params.token);
            		}
            
            		Zabbix.log(4, '[ YugabyteDB ] Sending request: ' + url);
            
            		response = request.get(url);
            
            		Zabbix.log(4, '[ YugabyteDB ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API:' + error;
            		}
            	}
            
            };
            
            try {
            	YugabyteDB.setParams(JSON.parse(value));
            
            	cluster = YugabyteDB.request(
            		'https://cloud.yugabyte.com/api/public/v1/accounts/' + YugabyteDB.params.account_id + '/projects/' + YugabyteDB.params.project_id + '/clusters/' + YugabyteDB.params.cluster_id
            	)
            
            	YugabyteDB.clusters = cluster.data;
            }
            catch (error) {
            	Zabbix.log(3, '[ YugabyteDB ] ERROR: ' + error);
            	YugabyteDB.error_msg = 'Failed to get data from API:' + error;
            }
            
            return JSON.stringify({'data': YugabyteDB.clusters, 'error': YugabyteDB.error_msg});
          description: 'Get raw data about clusters.'
          timeout: 10s
          parameters:
            - name: account_id
              value: '{$YUGABYTEDB.ACCOUNT.ID}'
            - name: cluster_id
              value: '{$YUGABYTEDB.CLUSTER.ID}'
            - name: project_id
              value: '{$YUGABYTEDB.PROJECT.ID}'
            - name: proxy
              value: '{$YUGABYTEDB.PROXY}'
            - name: token
              value: '{$YUGABYTEDB.ACCESS.TOKEN}'
          tags:
            - tag: component
              value: raw
        - uuid: fe9960991a4540e795a0a113cd251271
          name: 'Get cluster item error'
          type: DEPENDENT
          key: yugabytedb.cluster.get.errors
          value_type: TEXT
          description: 'Item for gathering all the cluster item errors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.get
          tags:
            - tag: component
              value: error
        - uuid: e5415e8c03ac4a61aa10a6b35a18b084
          name: 'Health state'
          type: DEPENDENT
          key: yugabytedb.cluster.health.state
          description: |
            Current state regarding the health of the cluster:
             - HEALTHY
             - NEEDS_ATTENTION
             - UNHEALTHY
             - UNKNOWN
          valuemap:
            name: 'YugabyteDB Health state'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var cluster = JSON.parse(value);
                  
                  const idx = [
                  	'HEALTHY',
                  	'NEEDS_ATTENTION',
                  	'UNHEALTHY',
                  	'UNKNOWN',
                  ].indexOf(cluster.data.info.health_info.state);
                  return idx !== -1 ? idx : 3;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.get
          tags:
            - tag: component
              value: cluster
          triggers:
            - uuid: e111a563fb9947eda48a56ad5ef59891
              expression: 'last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.health.state,#1) <> 0'
              name: 'YugabyteDB Cluster: Cluster is not healthy'
              opdata: 'Current state: {ITEM.LASTVALUE1}'
              priority: AVERAGE
              description: 'YugabyteDB Cluster is not healthy.'
              tags:
                - tag: scope
                  value: availability
        - uuid: 955291127a4e483693c1db6690a1beab
          name: 'Memory total'
          type: DEPENDENT
          key: yugabytedb.cluster.memory.total
          value_type: FLOAT
          units: B
          description: 'Shows the amount of RAM provisioned to the cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.MEMORY_TOTAL_GB
            - type: MULTIPLIER
              parameters:
                - '1073741824'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: memory
        - uuid: 682d46a939cf4ec186d4081e7a8eee42
          name: 'Memory usage'
          type: DEPENDENT
          key: yugabytedb.cluster.memory.usage
          value_type: FLOAT
          units: B
          description: 'Shows the amount of RAM used on the cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.MEMORY_USAGE_GB
            - type: MULTIPLIER
              parameters:
                - '1073741824'
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: memory
        - uuid: 18e6de024a7a4ae48901f455dbd0a373
          name: 'Memory utilization'
          type: CALCULATED
          key: yugabytedb.cluster.memory.utilization
          value_type: FLOAT
          units: '%'
          params: '(last(//yugabytedb.cluster.memory.usage)/last(//yugabytedb.cluster.memory.total))*100'
          description: 'Shows the amount of RAM used on the cluster, expressed in percent.'
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: memory
          triggers:
            - uuid: 5614204dbeca4b799989a13717824f07
              expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.memory.utilization,5m) > {$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.WARN}'
              name: 'YugabyteDB Cluster: Memory utilization is high'
              event_name: 'YugabyteDB Cluster: Memory utilization is high (>{$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.WARN} for 5m)'
              opdata: 'Current memory utilization: {ITEM.LASTVALUE1}'
              priority: WARNING
              description: 'YugabyteDB Cluster uses more than {$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.WARN}% of memory.'
              dependencies:
                - name: 'YugabyteDB Cluster: Memory utilization is too high'
                  expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.memory.utilization,5m) > {$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.CRIT}'
              tags:
                - tag: scope
                  value: performance
            - uuid: 27a8c6b07e474581be53f5d896387f45
              expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.memory.utilization,5m) > {$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.CRIT}'
              name: 'YugabyteDB Cluster: Memory utilization is too high'
              event_name: 'YugabyteDB Cluster: Memory utilization is too high (>{$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.CRIT} for 5m)'
              opdata: 'Current memory utilization: {ITEM.LASTVALUE1}'
              priority: HIGH
              description: 'YugabyteDB Cluster uses more than {$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.CRIT}% of memory.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 9c51b3d15ac448388e23c74d4e5bba3a
          name: 'Get cluster metrics'
          type: SCRIPT
          key: yugabytedb.cluster.metric.get
          history: '0'
          value_type: TEXT
          params: |
            var YugabyteDB = {
            	params: {},
            	metrics: {},
            	error_msg: '',
            
            	setParams: function (params) {
            		['account_id', 'project_id', 'token', 'cluster_id'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		YugabyteDB.params = params;
            	},
            
            
            	request: function (url, data) {
            		if (typeof data === 'undefined' || data === null) {
            			data = '';
            		}
            
            		var response, request = new HttpRequest();
            		if (typeof YugabyteDB.params.proxy !== 'undefined' && YugabyteDB.params.proxy !== '') {
            			request.setProxy(YugabyteDB.params.proxy);
            		}
            		if (YugabyteDB.params.token) {
            			request.addHeader('Accept: application/json');
            			request.addHeader('Authorization: Bearer ' + YugabyteDB.params.token);
            		}
            
            		Zabbix.log(4, '[ YugabyteDB ] Sending request: ' + url);
            
            		response = request.get(url);
            
            		Zabbix.log(4, '[ YugabyteDB ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API:' + error;
            		}
            	},
            
            
            	get_last_values: function (values) {
            		var max_timestamp = 0;
            		var last_value = 0;
            		for (e in values) {
            			if (values[e][0] > max_timestamp) {
            				max_timestamp = values[e][0];
            				last_value = values[e][1];
            			};
            		};
            		return last_value;
            	},
            
            
            	get_start_time: function() {
            		return Math.floor(Date.now() / 1000 - 300);
            	}
            
            };
            
            metrics = [
            	"CPU_USAGE",
            	"DISK_USAGE_GB",
            	"PROVISIONED_DISK_SPACE_GB",
            	"READ_OPS_PER_SEC",
            	"WRITE_OPS_PER_SEC",
            	"AVERAGE_READ_LATENCY_MS",
            	"AVERAGE_WRITE_LATENCY_MS",
            	"YSQL_CONNECTION_LIMIT",
            	"AVERAGE_YSQL_CONNECTION_COUNT",
            	"NODE_CLOCK_SKEW",
            	"DISK_BYTES_READ_MB_PER_SEC",
            	"DISK_BYTES_WRITTEN_MB_PER_SEC",
            	"FOLLOWER_LAG_MS",
            	"MEMORY_TOTAL_GB",
            	"MEMORY_USAGE_GB",
            	"NETWORK_RECEIVE_BYTES_MB_PER_SEC",
            	"NETWORK_TRANSMIT_BYTES_MB_PER_SEC",
            	"NETWORK_RECEIVE_ERRORS_PER_SEC",
            	"NETWORK_TRANSMIT_ERRORS_PER_SEC",
            	"MASTER_UP_STATUS",
            	"TSERVER_UP_STATUS",
            	"YSQL_MAX_CONNECTION_COUNT"
            ]
            
            try {
            	YugabyteDB.setParams(JSON.parse(value));
            
            	var size = 6
            
            	for (var i = 0; i < Math.ceil(metrics.length/size); i++)  {
            		var values = YugabyteDB.request(
            			'https://cloud.yugabyte.com/api/public/v1/accounts/' + YugabyteDB.params.account_id + '/projects/' + YugabyteDB.params.project_id + '/clusters/' + YugabyteDB.params.cluster_id + '/metrics?metrics=' + metrics.slice((i * size), (i * size) + size).join('%2C') + '&start_time=' + YugabyteDB.get_start_time()
            		);
            
            		values.data.forEach(function (e) {
            			YugabyteDB.metrics[e.name] = YugabyteDB.get_last_values(e.values)
            		});
            	};
            }
            catch (error) {
            	Zabbix.log(3, '[ YugabyteDB ] ERROR: ' + error);
            	error_msg = 'Failed to get data from API:' + error;
            }
            
            return JSON.stringify({'metrics': YugabyteDB.metrics, 'error': YugabyteDB.error_msg});
          description: 'Getting metrics for the cluster.'
          timeout: 5s
          parameters:
            - name: account_id
              value: '{$YUGABYTEDB.ACCOUNT.ID}'
            - name: cluster_id
              value: '{$YUGABYTEDB.CLUSTER.ID}'
            - name: project_id
              value: '{$YUGABYTEDB.PROJECT.ID}'
            - name: proxy
              value: '{$YUGABYTEDB.PROXY}'
            - name: token
              value: '{$YUGABYTEDB.ACCESS.TOKEN}'
          tags:
            - tag: component
              value: raw
        - uuid: 58b766758f7644369d3a1d125e012c07
          name: 'Get cluster metrics item error'
          type: DEPENDENT
          key: yugabytedb.cluster.metric.get.errors
          value_type: TEXT
          description: 'Item for gathering all the cluster item errors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: error
        - uuid: 91ace5e3a9a3428eb209e539c25f43b4
          name: 'Network receive, Bps'
          type: DEPENDENT
          key: yugabytedb.cluster.network.receive.bps
          value_type: FLOAT
          units: Bps
          description: 'The size of network packets received per second, averaged over nodes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.NETWORK_RECEIVE_BYTES_MB_PER_SEC
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: network
        - uuid: 3503d33b5c35433093565aac0890c717
          name: 'Network receive error, rate'
          type: DEPENDENT
          key: yugabytedb.cluster.network.receive.error.rate
          value_type: FLOAT
          description: 'The number of errors related to network packets received per second, averaged over nodes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.NETWORK_RECEIVE_ERRORS_PER_SEC
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: network
        - uuid: 51e7acc58c824737af2b48475ede228d
          name: 'Network transmit, Bps'
          type: DEPENDENT
          key: yugabytedb.cluster.network.transmit.bps
          value_type: FLOAT
          units: Bps
          description: 'The size of network packets transmitted per second, averaged over nodes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.NETWORK_TRANSMIT_BYTES_MB_PER_SEC
            - type: MULTIPLIER
              parameters:
                - '1048576'
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: network
        - uuid: 86c23bbe2d29444b85a6435508c53e28
          name: 'Network transmit error, rate'
          type: DEPENDENT
          key: yugabytedb.cluster.network.transmit.error.rate
          value_type: FLOAT
          description: 'The number of errors related to network packets transmitted per second, averaged over nodes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.NETWORK_TRANSMIT_ERRORS_PER_SEC
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: network
        - uuid: a64c4ba3b34045aba315dbb500aa86c4
          name: 'Number of nodes'
          type: DEPENDENT
          key: yugabytedb.cluster.node.number
          description: 'How many nodes are in the cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.spec.cluster_info.num_nodes
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.get
          tags:
            - tag: component
              value: cluster
        - uuid: c04d594c1a39437f8e5f47b42ccf9fba
          name: 'Clock skew'
          type: DEPENDENT
          key: yugabytedb.cluster.node.skew
          units: s
          description: 'The clock drift and skew across different nodes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.NODE_CLOCK_SKEW
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: DISCARD_VALUE
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: performance
        - uuid: 5497290f85d44d2c95ca0be3d2b030a3
          name: 'Get cluster query statistic'
          type: SCRIPT
          key: yugabytedb.cluster.query.statistic.get
          history: '0'
          value_type: TEXT
          params: |
            var YugabyteDB = {
            	params: {},
            	metrics: {},
            	error_msg: '',
            
            	setParams: function (params) {
            		['account_id', 'project_id', 'token', 'cluster_id'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		YugabyteDB.params = params;
            	},
            
            
            	request: function (url, data) {
            		if (typeof data === 'undefined' || data === null) {
            			data = '';
            		}
            
            		var response, request = new HttpRequest();
            		if (typeof YugabyteDB.params.proxy !== 'undefined' && YugabyteDB.params.proxy !== '') {
            			request.setProxy(YugabyteDB.params.proxy);
            		}
            		if (YugabyteDB.params.token) {
            			request.addHeader('Accept: application/json');
            			request.addHeader('Authorization: Bearer ' + YugabyteDB.params.token);
            		}
            
            		Zabbix.log(4, '[ YugabyteDB ] Sending request: ' + url);
            
            		response = request.get(url);
            
            		Zabbix.log(4, '[ YugabyteDB ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API:' + error;
            		}
            	},
            
            
            	get_last_values: function (values) {
            		var max_timestamp = 0;
            		var last_value = 0;
            		for (e in values) {
            			if (values[e][0] > max_timestamp) {
            				max_timestamp = values[e][0];
            				last_value = values[e][1];
            			};
            		};
            		return last_value;
            	},
            
            
            	get_start_time: function() {
            		return Math.floor(Date.now() / 1000 - 300);
            	}
            
            };
            
            metrics = [
            	"YSQL_SELECT_OPS_PER_SEC",
            	"YSQL_DELETE_OPS_PER_SEC",
            	"YSQL_INSERT_OPS_PER_SEC",
            	"YSQL_UPDATE_OPS_PER_SEC",
            	"YSQL_OTHER_OPS_PER_SEC",
            	"YSQL_TRANSACTION_OPS_PER_SEC",
            	"YSQL_SELECT_LATENCY_MS",
            	"YSQL_DELETE_LATENCY_MS",
            	"YSQL_INSERT_LATENCY_MS",
            	"YSQL_UPDATE_LATENCY_MS",
            	"YSQL_OTHER_LATENCY_MS",
            	"YSQL_TRANSACTION_LATENCY_MS",
            	"YCQL_SELECT_OPS_PER_SEC",
            	"YCQL_DELETE_OPS_PER_SEC",
            	"YCQL_INSERT_OPS_PER_SEC",
            	"YCQL_OTHER_OPS_PER_SEC",
            	"YCQL_UPDATE_OPS_PER_SEC",
            	"YCQL_TRANSACTION_OPS_PER_SEC",
            	"YCQL_SELECT_LATENCY_MS",
            	"YCQL_DELETE_LATENCY_MS",
            	"YCQL_INSERT_LATENCY_MS",
            	"YCQL_OTHER_LATENCY_MS",
            	"YCQL_UPDATE_LATENCY_MS",
            	"YCQL_TRANSACTION_LATENCY_MS"
            ]
            
            try {
            	YugabyteDB.setParams(JSON.parse(value));
            
            	var size = 6
            
            	for (var i = 0; i < Math.ceil(metrics.length/size); i++)  {
            		var values = YugabyteDB.request(
            			'https://cloud.yugabyte.com/api/public/v1/accounts/' + YugabyteDB.params.account_id + '/projects/' + YugabyteDB.params.project_id + '/clusters/' + YugabyteDB.params.cluster_id + '/metrics?metrics=' + metrics.slice((i * size), (i * size) + size).join('%2C') + '&start_time=' + YugabyteDB.get_start_time()
            		);
            
            		values.data.forEach(function (e) {
            			YugabyteDB.metrics[e.name] = YugabyteDB.get_last_values(e.values)
            		});
            	};
            }
            catch (error) {
            	Zabbix.log(3, '[ YugabyteDB ] ERROR: ' + error);
            	error_msg = 'Failed to get data from API:' + error;
            	return JSON.stringify({'error': error_msg});
            }
            
            return JSON.stringify({'metrics': YugabyteDB.metrics, 'error': YugabyteDB.error_msg});
          description: 'Getting SQL statistics for the cluster.'
          timeout: 5s
          parameters:
            - name: account_id
              value: '{$YUGABYTEDB.ACCOUNT.ID}'
            - name: cluster_id
              value: '{$YUGABYTEDB.CLUSTER.ID}'
            - name: project_id
              value: '{$YUGABYTEDB.PROJECT.ID}'
            - name: proxy
              value: '{$YUGABYTEDB.PROXY}'
            - name: token
              value: '{$YUGABYTEDB.ACCESS.TOKEN}'
          tags:
            - tag: component
              value: raw
        - uuid: 0d9d39db84de4879b6c0fac044537e55
          name: 'Get cluster query statistic item error'
          type: DEPENDENT
          key: yugabytedb.cluster.query.statistic.get.errors
          value_type: TEXT
          description: 'Item for gathering all the cluster query statistics item errors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: error
        - uuid: e116d1dfe5c94a64b47c66b0898e2c5a
          name: 'Average read latency'
          type: DEPENDENT
          key: yugabytedb.cluster.read.latency
          value_type: FLOAT
          units: s
          description: 'The average latency of read operations at the tablet level.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.AVERAGE_READ_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: performance
        - uuid: 4fd495d88f824bd2b18a3c885dc45d28
          name: 'Software version'
          type: DEPENDENT
          key: yugabytedb.cluster.software.version
          value_type: CHAR
          description: 'The current version of YugabyteDB installed on the cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.info.software_version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.get
          tags:
            - tag: component
              value: cluster
          triggers:
            - uuid: 27fdbe72229343029ede51c7705c28c4
              expression: 'last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.software.version,#1) <> last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.software.version,#2) and length(last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.software.version)) > 0'
              name: 'YugabyteDB Cluster: Cluster software version has changed'
              event_name: 'YugabyteDB Cluster: Cluster software version has changed (new version: {ITEM.VALUE})'
              opdata: 'Current version: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'YugabyteDB Cluster software version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 70e1cee9adc149afb7f1765384b587e2
          name: State
          type: DEPENDENT
          key: yugabytedb.cluster.state
          description: |
            The current state of the cluster. One of the following:
            - INVALID
            - QUEUED
            - INIT
            - BOOTSTRAPPING
            - VPC_PEERING
            - NETWORK_CREATING
            - PROVISIONING
            - CONFIGURING
            - CREATING_LB
            - UPDATING_LB
            - ACTIVE
            - PAUSING
            - PAUSED
            - RESUMING
            - UPDATING
            - MAINTENANCE
            - RESTORE
            - FAILED
            - CREATE_FAILED
            - DELETING
            - STARTING_NODE
            - STOPPING_NODE
            - REBOOTING_NODE
            - CREATE_READ_REPLICA_FAILED
            - DELETE_READ_REPLICA_FAILED
            - DELETE_CLUSTER_FAILED
            - EDIT_CLUSTER_FAILED
            - EDIT_READ_REPLICA_FAILED
            - PAUSE_CLUSTER_FAILED
            - RESUME_CLUSTER_FAILED
            - RESTORE_BACKUP_FAILED
            - CERTIFICATE_ROTATION_FAILED
            - UPGRADE_CLUSTER_FAILED
            - UPGRADE_CLUSTER_GFLAGS_FAILED
            - UPGRADE_CLUSTER_OS_FAILED
            - UPGRADE_CLUSTER_SOFTWARE_FAILED
            - START_NODE_FAILED
            - STOP_NODE_FAILED
            - REBOOT_NODE_FAILED
            - CONFIGURE_CMK
            - ENABLING_CMK
            - DISABLING_CMK
            - UPDATING_CMK
            - ROTATING_CMK
            - STOPPING_METRICS_EXPORTER
            - STARTING_METRICS_EXPORTER
            - CONFIGURING_METRICS_EXPORTER
            - STOP_METRICS_EXPORTER_FAILED
            - START_METRICS_EXPORTER_FAILED
            - CONFIGURE_METRICS_EXPORTER_FAILED
            - REMOVING_METRICS_EXPORTER
            - REMOVE_METRICS_EXPORTER_FAILED
          valuemap:
            name: 'YugabyteDB Cluster state'
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var cluster = JSON.parse(value);
                  
                  const idx = [
                  	'INVALID',
                  	'QUEUED',
                  	'INIT',
                  	'BOOTSTRAPPING',
                  	'VPC_PEERING',
                  	'NETWORK_CREATING',
                  	'PROVISIONING',
                  	'CONFIGURING',
                  	'CREATING_LB',
                  	'UPDATING_LB',
                  	'ACTIVE',
                  	'PAUSING',
                  	'PAUSED',
                  	'RESUMING',
                  	'UPDATING',
                  	'MAINTENANCE',
                  	'RESTORE',
                  	'FAILED',
                  	'CREATE_FAILED',
                  	'DELETING',
                  	'STARTING_NODE',
                  	'STOPPING_NODE',
                  	'REBOOTING_NODE',
                  	'CREATE_READ_REPLICA_FAILED',
                  	'DELETE_READ_REPLICA_FAILED',
                  	'DELETE_CLUSTER_FAILED',
                  	'EDIT_CLUSTER_FAILED',
                  	'EDIT_READ_REPLICA_FAILED',
                  	'PAUSE_CLUSTER_FAILED',
                  	'RESUME_CLUSTER_FAILED',
                  	'RESTORE_BACKUP_FAILED',
                  	'CERTIFICATE_ROTATION_FAILED',
                  	'UPGRADE_CLUSTER_FAILED',
                  	'UPGRADE_CLUSTER_GFLAGS_FAILED',
                  	'UPGRADE_CLUSTER_OS_FAILED',
                  	'UPGRADE_CLUSTER_SOFTWARE_FAILED',
                  	'START_NODE_FAILED',
                  	'STOP_NODE_FAILED',
                  	'REBOOT_NODE_FAILED',
                  	'CONFIGURE_CMK',
                  	'ENABLING_CMK',
                  	'DISABLING_CMK',
                  	'UPDATING_CMK',
                  	'ROTATING_CMK',
                  	'STOPPING_METRICS_EXPORTER',
                  	'STARTING_METRICS_EXPORTER',
                  	'CONFIGURING_METRICS_EXPORTER',
                  	'STOP_METRICS_EXPORTER_FAILED',
                  	'START_METRICS_EXPORTER_FAILED',
                  	'CONFIGURE_METRICS_EXPORTER_FAILED',
                  	'REMOVING_METRICS_EXPORTER',
                  	'REMOVE_METRICS_EXPORTER_FAILED'
                  ].indexOf(cluster.data.info.state);
                  return idx !== -1 ? idx : 60;
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.get
          tags:
            - tag: component
              value: cluster
        - uuid: a9b902783af24e5f8d56139e803d85aa
          name: Type
          type: DEPENDENT
          key: yugabytedb.cluster.type
          description: 'The kind of cluster deployment: SYNCHRONOUS or GEO_PARTITIONED.'
          valuemap:
            name: 'YugabyteDB Cluster type'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.spec.cluster_info.cluster_type
            - type: STR_REPLACE
              parameters:
                - SYNCHRONOUS
                - '0'
            - type: STR_REPLACE
              parameters:
                - GEO_PARTITIONED
                - '1'
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: yugabytedb.cluster.get
          tags:
            - tag: component
              value: cluster
        - uuid: fde822561b0c4a9196e52006c6ae459f
          name: 'Average write latency'
          type: DEPENDENT
          key: yugabytedb.cluster.write.latency
          value_type: FLOAT
          units: s
          description: 'The average latency of write operations at the tablet level.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.AVERAGE_WRITE_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.metric.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: performance
        - uuid: 6e303d8bbd3540dcba8e6336e395df01
          name: 'YB controller version'
          type: DEPENDENT
          key: yugabytedb.cluster.ybc.version
          value_type: CHAR
          description: 'The current version of the YB controller installed on the cluster.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.data.info.ybc_version
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.cluster.get
          tags:
            - tag: component
              value: cluster
          triggers:
            - uuid: d927b0d668fc413db697a2360ac806a6
              expression: 'last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.ybc.version,#1) <> last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.ybc.version,#2) and length(last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.ybc.version)) > 0'
              name: 'YugabyteDB Cluster: YB controller version has changed'
              event_name: 'YugabyteDB Cluster: YB controller version has changed (new version: {ITEM.VALUE})'
              opdata: 'Current version: {ITEM.LASTVALUE1}'
              priority: INFO
              description: 'YugabyteDB Cluster YB controller version has changed. Acknowledge to close the problem manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 9034de71bb9a4d5babb77f4433deb9a1
          name: 'YCQL DELETE average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.delete.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing DELETE statements through the YCQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_DELETE_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 31473b597b274acc894bde4415efc1df
          name: 'YCQL DELETE OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.delete.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of DELETE statements executed through the YCQL API per second. This does not include index writes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_DELETE_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 02b74ef8873a464786ff68b80fa2bc72
          name: 'YCQL INSERT average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.insert.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing INSERT statements through the YCQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_INSERT_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: bc9776051ac5494da1450837ce2541f0
          name: 'YCQL INSERT OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.insert.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of INSERT statements executed through the YCQL API per second. This does not include index writes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_INSERT_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 267399592fef42c58b5885d1fc4e821d
          name: 'YCQL OTHER average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.other.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing OTHER statements through the YCQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_OTHER_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 8e6f1197d23e4398a40c08232ecbaf88
          name: 'YCQL OTHER OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.other.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of OTHER statements executed through the YCQL API per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_OTHER_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 438badfcc37c437f94988a211fc1ca1d
          name: 'YCQL SELECT average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.select.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing SELECT statements through the YCQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_SELECT_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: e663d79a6b404c9fb369c213f51a2f62
          name: 'YCQL SELECT OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.select.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of SELECT statements executed through the YCQL API per second. This does not include index writes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_SELECT_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: e0a86eaf9be4426c9ae8948980cf9855
          name: 'YCQL transaction average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.transaction.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing transactions through the YCQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_TRANSACTION_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 4b81ff96ce054cd480073217281eedf7
          name: 'YCQL transaction OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.transaction.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of transactions executed through the YCQL API per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_TRANSACTION_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: c5af4d0a6cb44292882071bcfb39f689
          name: 'YCQL UPDATE average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.update.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing UPDATE statements through the YCQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_UPDATE_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 6120fea6606f4a98ac417559e80aad13
          name: 'YCQL UPDATE OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ycql.update.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of UPDATE statements executed through the YCQL API per second. This does not include index writes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YCQL_UPDATE_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 662f390c33154db199f13a065f68eebf
          name: 'YSQL DELETE average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.delete.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing DELETE statements through the YSQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_DELETE_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 3a6e9b4837c44babb020fe1e579db573
          name: 'YSQL DELETE OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.delete.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of DELETE statements executed through the YSQL API per second. This does not include index writes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_DELETE_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: e0dda63d599041a8b9781da7c4b52433
          name: 'YSQL INSERT average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.insert.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing INSERT statements through the YSQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_INSERT_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 8074080c8e7244eaaf4353a92a80a82a
          name: 'YSQL INSERT OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.insert.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of INSERT statements executed through the YSQL API per second. This does not include index writes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_INSERT_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: e007bb3d98fd4442ab84a2227be63e8b
          name: 'YSQL OTHER average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.other.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing OTHER statements through the YSQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_OTHER_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 502162acb66941d19b567a5172a56600
          name: 'YSQL OTHER OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.other.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of OTHER statements executed through the YSQL API per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_OTHER_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 9d6bea98b3a54bdbbe2b141417148927
          name: 'YSQL SELECT average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.select.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing SELECT statements through the YSQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_SELECT_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 03053740519b4756886897b45ed3f73c
          name: 'YSQL SELECT OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.select.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of SELECT statements executed through the YSQL API per second. This does not include index writes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_SELECT_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 57a5c002be714c8da7afc0d30d9a891d
          name: 'YSQL transaction average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.transaction.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing transactions through the YSQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_TRANSACTION_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: bd63dbe655734d66bbf9409500cc4a3f
          name: 'YSQL transaction OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.transaction.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of transactions executed through the YSQL API per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_TRANSACTION_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 02b4d8b704754dab83188bced7f5d98e
          name: 'YSQL UPDATE average latency'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.update.latency
          value_type: FLOAT
          units: s
          description: 'Average time of executing UPDATE statements through the YSQL API.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_UPDATE_LATENCY_MS
            - type: MULTIPLIER
              parameters:
                - '0.001'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 2557d7cf5f0d429886999d6eba2d9182
          name: 'YSQL UPDATE OPS'
          type: DEPENDENT
          key: yugabytedb.cluster.ysql.update.ops
          value_type: FLOAT
          units: '!OPS'
          description: 'The count of UPDATE statements executed through the YSQL API per second. This does not include index writes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.metrics.YSQL_UPDATE_OPS_PER_SEC
          master_item:
            key: yugabytedb.cluster.query.statistic.get
          tags:
            - tag: component
              value: cluster
            - tag: component
              value: statistic
        - uuid: 88c3b743cbe24ea9a0046dc0854a36be
          name: 'Get keyspace'
          type: SCRIPT
          key: yugabytedb.keyspace.get
          delay: 10m
          history: '0'
          value_type: TEXT
          params: |
            var YugabyteDB = {
            	params: {},
            	keyspaces: {},
            	error_msg: '',
            
            	setParams: function (params) {
            		['account_id', 'project_id', 'token'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		YugabyteDB.params = params;
            	},
            
            
            	request: function (url, data) {
            		if (typeof data === 'undefined' || data === null) {
            			data = '';
            		}
            
            		var response, request = new HttpRequest();
            		if (typeof YugabyteDB.params.proxy !== 'undefined' && YugabyteDB.params.proxy !== '') {
            			request.setProxy(YugabyteDB.params.proxy);
            		}
            		if (YugabyteDB.params.token) {
            			request.addHeader('Accept: application/json');
            			request.addHeader('Authorization: Bearer ' + YugabyteDB.params.token);
            		}
            
            		Zabbix.log(4, '[ YugabyteDB ] Sending request: ' + url);
            
            		response = request.get(url);
            
            		Zabbix.log(4, '[ YugabyteDB ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API:' + error;
            		}
            	},
            
            
            	get_keyspace: function (tables) {
            		var table_info = {};
            		var result = [];
            		for (var table in tables['data']) {
            			var table_name = tables['data'][table]['keyspace'];
            			if (typeof table_info[table_name] !== 'undefined') {
            				table_info[table_name]['size_bytes'] += tables['data'][table]['size_bytes']
            				table_info[table_name]['wal_size_bytes'] += tables['data'][table]['wal_size_bytes']
            			}
            			else {
            				table_info[table_name] = {
            					'keyspace_name': table_name,
            					'size_bytes': tables['data'][table]['size_bytes'],
            					'wal_size_bytes': tables['data'][table]['wal_size_bytes'],
            					'type': tables['data'][table]['type']}
            			}
            		}
            		for (keyspace in table_info) {
            			result.push(table_info[keyspace])
            		}
            		return result;
            	}
            
            };
            
            try {
            	YugabyteDB.setParams(JSON.parse(value));
            
            	var tables = YugabyteDB.request(
            		'https://cloud.yugabyte.com/api/public/v1/accounts/' + YugabyteDB.params.account_id + '/projects/' + YugabyteDB.params.project_id + '/clusters/' + YugabyteDB.params.cluster_id + '/tables'
            	)
            	
            	YugabyteDB.keyspaces = YugabyteDB.get_keyspace(tables);
            }
            catch (error) {
            	Zabbix.log(3, '[ YugabyteDB ] ERROR: ' + error);
            	error_msg = 'Failed to get data from API:' + error;
            }
            
            return JSON.stringify({'keyspaces': YugabyteDB.keyspaces, 'error': YugabyteDB.error_msg});
          description: 'Get raw data about keyspaces.'
          timeout: 10s
          parameters:
            - name: account_id
              value: '{$YUGABYTEDB.ACCOUNT.ID}'
            - name: cluster_id
              value: '{$YUGABYTEDB.CLUSTER.ID}'
            - name: project_id
              value: '{$YUGABYTEDB.PROJECT.ID}'
            - name: proxy
              value: '{$YUGABYTEDB.PROXY}'
            - name: token
              value: '{$YUGABYTEDB.ACCESS.TOKEN}'
          tags:
            - tag: component
              value: raw
        - uuid: 59f34be153c049ecac1c4e08487a18c0
          name: 'Get keyspace item error'
          type: DEPENDENT
          key: yugabytedb.keyspace.get.errors
          value_type: TEXT
          description: 'Item for gathering all the keyspace item errors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.keyspace.get
          tags:
            - tag: component
              value: error
        - uuid: 734486b27ba64138bae356c7b14c8dbc
          name: 'Get node'
          type: SCRIPT
          key: yugabytedb.node.get
          delay: 10m
          history: '0'
          value_type: TEXT
          params: |
            var YugabyteDB = {
            	params: {},
            	nodes: {},
            	error_msg: '',
            
            	setParams: function (params) {
            		['account_id', 'project_id', 'token'].forEach(function (field) {
            			if (typeof params !== 'object' || typeof params[field] === 'undefined' || params[field] === '') {
            				throw 'Required param is not set: ' + field + '.';
            			}
            		});
            
            		YugabyteDB.params = params;
            	},
            
            
            	request: function (url, data) {
            		if (typeof data === 'undefined' || data === null) {
            			data = '';
            		}
            
            		var response, request = new HttpRequest();
            		if (typeof YugabyteDB.params.proxy !== 'undefined' && YugabyteDB.params.proxy !== '') {
            			request.setProxy(YugabyteDB.params.proxy);
            		}
            		if (YugabyteDB.params.token) {
            			request.addHeader('Accept: application/json');
            			request.addHeader('Authorization: Bearer ' + YugabyteDB.params.token);
            		}
            
            		Zabbix.log(4, '[ YugabyteDB ] Sending request: ' + url);
            
            		response = request.get(url);
            
            		Zabbix.log(4, '[ YugabyteDB ] Received response with status code ' + request.getStatus() + ': ' + response);
            
            		if (request.getStatus() !== 200 || response === null) {
            			throw 'Request failed with status code ' + request.getStatus() + ': ' + response;
            		}
            
            		try {
            			return JSON.parse(response);
            		}
            		catch (error) {
            			throw 'Failed to parse response received from API:' + error;
            		}
            	}
            
            };
            
            try {
            	YugabyteDB.setParams(JSON.parse(value));
            
            	var node = YugabyteDB.request(
            		'https://cloud.yugabyte.com/api/public/v1/accounts/' + YugabyteDB.params.account_id + '/projects/' + YugabyteDB.params.project_id + '/clusters/' + YugabyteDB.params.cluster_id + '/nodes'
            	)
            	YugabyteDB.nodes = node.data;
            }
            catch (error) {
            	Zabbix.log(3, '[ YugabyteDB ] ERROR: ' + error);
            	error_msg = 'Failed to get data from API:' + error;
            }
            
            return JSON.stringify({'nodes': YugabyteDB.nodes, 'error': YugabyteDB.error_msg});
          description: 'Get raw data about nodes.'
          timeout: 10s
          parameters:
            - name: account_id
              value: '{$YUGABYTEDB.ACCOUNT.ID}'
            - name: cluster_id
              value: '{$YUGABYTEDB.CLUSTER.ID}'
            - name: project_id
              value: '{$YUGABYTEDB.PROJECT.ID}'
            - name: proxy
              value: '{$YUGABYTEDB.PROXY}'
            - name: token
              value: '{$YUGABYTEDB.ACCESS.TOKEN}'
          tags:
            - tag: component
              value: raw
        - uuid: 401d87f7dace497699df56f749bf821e
          name: 'Get node item error'
          type: DEPENDENT
          key: yugabytedb.node.get.errors
          value_type: TEXT
          description: 'Item for gathering all the node item errors.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $.error
              error_handler: DISCARD_VALUE
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 12h
          master_item:
            key: yugabytedb.node.get
          tags:
            - tag: component
              value: error
      discovery_rules:
        - uuid: 71d2f03d4657413fa8eabe5d411bed25
          name: 'Keyspace discovery'
          type: DEPENDENT
          key: yugabytedb.keyspace.discovery
          description: 'Discovery of the available keyspaces.'
          item_prototypes:
            - uuid: c1e48062d9ee4bbebd170370216d477a
              name: 'YugabyteDB Keyspace [{#KEYSPACE.NAME}]: Get keyspace info'
              type: DEPENDENT
              key: 'yugabytedb.keyspace.get[{#KEYSPACE.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Get raw data about the keyspace [{#KEYSPACE.NAME}].'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.keyspaces.[?(@.keyspace_name==''{#KEYSPACE.NAME}'')].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: yugabytedb.keyspace.get
              tags:
                - tag: component
                  value: raw
                - tag: keyspace
                  value: '{#KEYSPACE.NAME}'
            - uuid: 18ca22e5976741c595854de8fbf12d1e
              name: 'YugabyteDB Keyspace [{#KEYSPACE.NAME}]: SST size'
              type: DEPENDENT
              key: 'yugabytedb.keyspace.sst.size[{#KEYSPACE.NAME}]'
              units: B
              description: 'The size of the table''s SST.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.size_bytes
              master_item:
                key: 'yugabytedb.keyspace.get[{#KEYSPACE.NAME}]'
              tags:
                - tag: component
                  value: keyspace
                - tag: keyspace
                  value: '{#KEYSPACE.NAME}'
            - uuid: 8dbbdc125336426d9c8fcb7909a7ab89
              name: 'YugabyteDB Keyspace [{#KEYSPACE.NAME}]: Type'
              type: DEPENDENT
              key: 'yugabytedb.keyspace.type[{#KEYSPACE.NAME}]'
              description: 'The type of keyspace: YSQL or YCQL.'
              valuemap:
                name: 'YugabyteDB Keyspace type'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.type
                - type: STR_REPLACE
                  parameters:
                    - YSQL
                    - '0'
                - type: STR_REPLACE
                  parameters:
                    - YCQL
                    - '1'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'yugabytedb.keyspace.get[{#KEYSPACE.NAME}]'
              tags:
                - tag: component
                  value: keyspace
                - tag: keyspace
                  value: '{#KEYSPACE.NAME}'
            - uuid: 9c23b2c7fe4b4aad8ab32ead6af179e7
              name: 'YugabyteDB Keyspace [{#KEYSPACE.NAME}]: Wal size'
              type: DEPENDENT
              key: 'yugabytedb.keyspace.wal.size[{#KEYSPACE.NAME}]'
              units: B
              description: 'The size of the table''s WAL.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.wal_size_bytes
              master_item:
                key: 'yugabytedb.keyspace.get[{#KEYSPACE.NAME}]'
              tags:
                - tag: component
                  value: keyspace
                - tag: keyspace
                  value: '{#KEYSPACE.NAME}'
          graph_prototypes:
            - uuid: 193792ab844947e88ca58c20292d6666
              name: 'YugabyteDB Keyspace [{#KEYSPACE.NAME}]: Keyspace size'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'YugabyteDB Cluster by HTTP'
                    key: 'yugabytedb.keyspace.wal.size[{#KEYSPACE.NAME}]'
                - sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'YugabyteDB Cluster by HTTP'
                    key: 'yugabytedb.keyspace.sst.size[{#KEYSPACE.NAME}]'
          master_item:
            key: yugabytedb.keyspace.get
          lld_macro_paths:
            - lld_macro: '{#KEYSPACE.NAME}'
              path: $.keyspace_name
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var result = [];
                  var keyspaces = JSON.parse(value);
                  
                  for (var keyspace in keyspaces.keyspaces) {
                  	result.push({
                  		"keyspace_name": keyspaces.keyspaces[keyspace]['keyspace_name']
                  	});
                  };
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
        - uuid: dc4c32c8868e4dd0b02c2fec843b5dac
          name: 'Node discovery'
          type: DEPENDENT
          key: yugabytedb.node.discovery
          description: 'Discovery of the nodes for all clusters.'
          item_prototypes:
            - uuid: a7b100dd55e6406cb481762f2fb7c421
              name: 'YugabyteDB Node [{#NODE.NAME}]: Total CPU cores'
              type: DEPENDENT
              key: 'yugabytedb.node.cpu.num.cores[{#NODE.NAME}]'
              units: Cores
              description: 'The number of cores for the node [{#NODE.NAME}].'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.spec.cluster_info.node_info.num_cores
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: yugabytedb.cluster.get
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 0a540fa45f33410fb93fd750717ae431
              name: 'YugabyteDB Node [{#NODE.NAME}]: Total disk size'
              type: DEPENDENT
              key: 'yugabytedb.node.disk.size.total[{#NODE.NAME}]'
              units: '!GB'
              description: 'The disk size (GB) for the node [{#NODE.NAME}].'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.spec.cluster_info.node_info.disk_size_gb
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: yugabytedb.cluster.get
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: f2c813fba0394826abcb35a50b773a41
              name: 'YugabyteDB Node [{#NODE.NAME}]: Get node info'
              type: DEPENDENT
              key: 'yugabytedb.node.get[{#NODE.NAME}]'
              history: '0'
              value_type: TEXT
              description: 'Get raw data about the node [{#NODE.NAME}].'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - '$.nodes.[?(@.name==''{#NODE.NAME}'')].first()'
                  error_handler: DISCARD_VALUE
              master_item:
                key: yugabytedb.node.get
              tags:
                - tag: component
                  value: raw
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 9fa8a6a8476e485c8eebeeaa5763c3c5
              name: 'YugabyteDB Node [{#NODE.NAME}]: Disk IOPS limit'
              type: DEPENDENT
              key: 'yugabytedb.node.iops.limit[{#NODE.NAME}]'
              units: '!IOPS'
              description: 'The IOPS to provision for the node [{#NODE.NAME}] for each disk.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.spec.cluster_info.node_info.disk_iops
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: yugabytedb.cluster.get
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 27e087e59b0f425584f57fda13398ea0
              name: 'YugabyteDB Node [{#NODE.NAME}]: Disk IOPS utilization'
              type: CALCULATED
              key: 'yugabytedb.node.iops.utilization[{#NODE.NAME}]'
              value_type: FLOAT
              units: '%'
              params: '((last(//yugabytedb.node.read.ops[{#NODE.NAME}]) + last(//yugabytedb.node.write.ops[{#NODE.NAME}]))/last(//yugabytedb.node.iops.limit[{#NODE.NAME}]))*100'
              description: 'Shows the utilization of provisioned IOPS.'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: c19790737c854c8e8848781b5ccf5b1f
                  expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.node.iops.utilization[{#NODE.NAME}],5m) > {$YUGABYTEDB.IOPS.UTILIZATION.WARN}'
                  name: 'YugabyteDB Cluster: YugabyteDB Node [{#NODE.NAME}]: Node disk IOPS utilization is high'
                  event_name: 'YugabyteDB Cluster: YugabyteDB Node [{#NODE.NAME}]: Node disk IOPS utilization is high (over {$YUGABYTEDB.IOPS.UTILIZATION.WARN} for 5m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE1}'
                  priority: WARNING
                  description: 'IOPS utilization on the node [{#NODE.NAME}] is more than {$YUGABYTEDB.IOPS.UTILIZATION.WARN}% of the provisioned IOPS.'
                  dependencies:
                    - name: 'YugabyteDB Cluster: YugabyteDB Node [{#NODE.NAME}]: Node disk IOPS utilization is too high'
                      expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.node.iops.utilization[{#NODE.NAME}],5m) > {$YUGABYTEDB.IOPS.UTILIZATION.CRIT}'
                  tags:
                    - tag: scope
                      value: performance
                - uuid: 27f43e701e4e47c4aad2fa6c9a118fb1
                  expression: 'min(/YugabyteDB Cluster by HTTP/yugabytedb.node.iops.utilization[{#NODE.NAME}],5m) > {$YUGABYTEDB.IOPS.UTILIZATION.CRIT}'
                  name: 'YugabyteDB Cluster: YugabyteDB Node [{#NODE.NAME}]: Node disk IOPS utilization is too high'
                  event_name: 'YugabyteDB Cluster: YugabyteDB Node [{#NODE.NAME}]: Node disk IOPS utilization is too high (over {$YUGABYTEDB.IOPS.UTILIZATION.CRIT} for 5m)'
                  opdata: 'Current utilization: {ITEM.LASTVALUE1}'
                  priority: HIGH
                  description: 'IOPS utilization on the node [{#NODE.NAME}] is more than {$YUGABYTEDB.IOPS.UTILIZATION.CRIT}% of the provisioned IOPS.'
                  tags:
                    - tag: scope
                      value: performance
            - uuid: cec0b919572a4dc8bec57f7da073b18f
              name: 'YugabyteDB Node [{#NODE.NAME}]: Node is master'
              type: DEPENDENT
              key: 'yugabytedb.node.master[{#NODE.NAME}]'
              description: |
                The current role of the node [{#NODE.NAME}]:
                0 = False
                1 = True
              valuemap:
                name: 'YugabyteDB Bool status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.is_master
                - type: STR_REPLACE
                  parameters:
                    - 'true'
                    - '1'
                - type: STR_REPLACE
                  parameters:
                    - 'false'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: a75c7247ac654dc6b62ea88c9f609804
              name: 'YugabyteDB Node [{#NODE.NAME}]: Total memory, bytes'
              type: DEPENDENT
              key: 'yugabytedb.node.memory.total[{#NODE.NAME}]'
              units: B
              description: 'The amount of RAM for the node [{#NODE.NAME}].'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.data.spec.cluster_info.node_info.memory_mb
                - type: MULTIPLIER
                  parameters:
                    - '1048576'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 12h
              master_item:
                key: yugabytedb.cluster.get
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 03a684fb8e824ae2a21af206f03c06e3
              name: 'YugabyteDB Node [{#NODE.NAME}]: Read OPS'
              type: DEPENDENT
              key: 'yugabytedb.node.read.ops[{#NODE.NAME}]'
              value_type: FLOAT
              units: '!OPS'
              description: 'The amount of read operations per second for the node [{#NODE.NAME}].'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.read_ops_per_sec
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: fc64e30fea8349b2b4d4de3c23ea8fd7
              name: 'YugabyteDB Node [{#NODE.NAME}]: Node is read replica'
              type: DEPENDENT
              key: 'yugabytedb.node.read.replica[{#NODE.NAME}]'
              description: |
                This item indicates if the node [{#NODE.NAME}] is a read replica:
                0 = False
                1 = True
              valuemap:
                name: 'YugabyteDB Bool status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.is_read_replica
                - type: STR_REPLACE
                  parameters:
                    - 'true'
                    - '1'
                - type: STR_REPLACE
                  parameters:
                    - 'false'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: d77f37a386514286ac3fd4a37ad0e21e
              name: 'YugabyteDB Node [{#NODE.NAME}]: Region'
              type: DEPENDENT
              key: 'yugabytedb.node.region[{#NODE.NAME}]'
              value_type: CHAR
              description: 'The cloud information for the node [{#NODE.NAME}] about the region.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.cloud_info.region
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 71b0a67ae775473eaaed77349b781ace
              name: 'YugabyteDB Node [{#NODE.NAME}]: Total SST file size'
              type: DEPENDENT
              key: 'yugabytedb.node.sst.file.size.total[{#NODE.NAME}]'
              units: B
              description: 'The size of all SST files.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.total_sst_file_size_bytes
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: ec3598775f434cc88c0880fd2f944a14
              name: 'YugabyteDB Node [{#NODE.NAME}]: Uncompressed SST file size'
              type: DEPENDENT
              key: 'yugabytedb.node.sst.file.size.uncompressed[{#NODE.NAME}]'
              units: B
              description: 'The size of uncompressed SST files.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.uncompressed_sst_file_size_bytes
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: bfc6070e65d041ca83ab1290aa0654aa
              name: 'YugabyteDB Node [{#NODE.NAME}]: Node status'
              type: DEPENDENT
              key: 'yugabytedb.node.status[{#NODE.NAME}]'
              description: |
                The current status of the node [{#NODE.NAME}]:
                0 = Down
                1 = Up
              valuemap:
                name: 'YugabyteDB Node status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.is_node_up
                - type: STR_REPLACE
                  parameters:
                    - 'true'
                    - '1'
                - type: STR_REPLACE
                  parameters:
                    - 'false'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
              trigger_prototypes:
                - uuid: 3bdaff0934564a809dc565357c50486d
                  expression: 'max(/YugabyteDB Cluster by HTTP/yugabytedb.node.status[{#NODE.NAME}],3m) = 0'
                  name: 'YugabyteDB Cluster: YugabyteDB Node [{#NODE.NAME}]: Node is down'
                  priority: AVERAGE
                  description: 'The node [{#NODE.NAME}] is down.'
                  tags:
                    - tag: scope
                      value: availability
            - uuid: 488ef7da37704fc690109350dfb04f06
              name: 'YugabyteDB Node [{#NODE.NAME}]: Node is TServer'
              type: DEPENDENT
              key: 'yugabytedb.node.tserver[{#NODE.NAME}]'
              description: |
                This item indicates if the node [{#NODE.NAME}] is a TServer node:
                0 = False
                1 = True
              valuemap:
                name: 'YugabyteDB Bool status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.is_tserver
                - type: STR_REPLACE
                  parameters:
                    - 'true'
                    - '1'
                - type: STR_REPLACE
                  parameters:
                    - 'false'
                    - '0'
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: f11fcb4fd9184a74bfd1081c10124735
              name: 'YugabyteDB Node [{#NODE.NAME}]: Write OPS'
              type: DEPENDENT
              key: 'yugabytedb.node.write.ops[{#NODE.NAME}]'
              value_type: FLOAT
              units: '!OPS'
              description: 'The amount of write operations per second for the node [{#NODE.NAME}].'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.metrics.write_ops_per_sec
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
            - uuid: 899786037cb24cd3a0378592e3096131
              name: 'YugabyteDB Node [{#NODE.NAME}]: Zone'
              type: DEPENDENT
              key: 'yugabytedb.node.zone[{#NODE.NAME}]'
              value_type: CHAR
              description: 'The cloud information for the node [{#NODE.NAME}] about the zone.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.cloud_info.zone
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1d
              master_item:
                key: 'yugabytedb.node.get[{#NODE.NAME}]'
              tags:
                - tag: component
                  value: node
                - tag: node
                  value: '{#NODE.NAME}'
          graph_prototypes:
            - uuid: d8c91639bca24d709bcdd8d788ba940c
              name: 'YugabyteDB Node [{#NODE.NAME}]: Node disk IOPS number'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  yaxisside: RIGHT
                  item:
                    host: 'YugabyteDB Cluster by HTTP'
                    key: 'yugabytedb.node.iops.utilization[{#NODE.NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'YugabyteDB Cluster by HTTP'
                    key: 'yugabytedb.node.read.ops[{#NODE.NAME}]'
                - sortorder: '2'
                  color: 00611C
                  item:
                    host: 'YugabyteDB Cluster by HTTP'
                    key: 'yugabytedb.node.write.ops[{#NODE.NAME}]'
            - uuid: e8020fae71e54c98bc3c5ed9b585fead
              name: 'YugabyteDB Node [{#NODE.NAME}]: SST size'
              graph_items:
                - drawtype: GRADIENT_LINE
                  color: 199C0D
                  item:
                    host: 'YugabyteDB Cluster by HTTP'
                    key: 'yugabytedb.node.sst.file.size.uncompressed[{#NODE.NAME}]'
                - sortorder: '1'
                  color: F63100
                  item:
                    host: 'YugabyteDB Cluster by HTTP'
                    key: 'yugabytedb.node.sst.file.size.total[{#NODE.NAME}]'
          master_item:
            key: yugabytedb.node.get
          lld_macro_paths:
            - lld_macro: '{#NODE.NAME}'
              path: $.node_name
          preprocessing:
            - type: JAVASCRIPT
              parameters:
                - |
                  var result = [];
                  var nodes = JSON.parse(value);
                  
                  for (var node in nodes.nodes) {
                  	result.push({
                  		"node_name": nodes.nodes[node]['name']
                  	});
                  };
                  
                  return JSON.stringify(result);
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
      tags:
        - tag: class
          value: cloud
        - tag: class
          value: database
        - tag: subclass
          value: sql
        - tag: target
          value: yugabytedb
      macros:
        - macro: '{$YUGABYTEDB.CLUSTER.ID}'
          description: 'ID of cluster.'
          config:
            type: TEXT
            priority: '2'
            label: 'Cluster ID'
            description: 'ID of cluster.'
            required: 'YES'
        - macro: '{$YUGABYTEDB.CLUSTER.NAME}'
          description: 'Name of cluster.'
          config:
            type: TEXT
            priority: '1'
            label: 'Cluster name'
            description: 'Name of cluster.'
            required: 'YES'
        - macro: '{$YUGABYTEDB.CONNECTION.UTILIZATION.CRIT}'
          value: '90'
          description: 'The percentage of connections in the cluster - for the High trigger expression.'
          config:
            type: TEXT
            priority: '8'
            section_name: Thresholds
            label: 'Cluster connections high (%)'
            description: 'The percentage of connections in the cluster - for the High trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.CONNECTION.UTILIZATION.WARN}'
          value: '75'
          description: 'The percentage of connections in the cluster - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '7'
            section_name: Thresholds
            label: 'Cluster connections warning (%)'
            description: 'The percentage of connections in the cluster - for the Warning trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.CPU.UTILIZATION.CRIT}'
          value: '90'
          description: 'The threshold of CPU utilization for the High trigger expression, expressed in percent.'
          config:
            type: TEXT
            priority: '9'
            section_name: Thresholds
            label: 'CPU utilization high threshold (%)'
            description: 'The threshold of CPU utilization for the High trigger expression, expressed in percent. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.CPU.UTILIZATION.WARN}'
          value: '75'
          description: 'The threshold of CPU utilization for the Warning trigger expression, expressed in percent.'
          config:
            type: TEXT
            priority: '10'
            section_name: Thresholds
            label: 'CPU utilization warning threshold (%)'
            description: 'The threshold of CPU utilization for the Warning trigger expression, expressed in percent. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.DISK.UTILIZATION.CRIT}'
          value: '90'
          description: 'The percentage of disk use in the cluster - for the High trigger expression.'
          config:
            type: TEXT
            priority: '6'
            section_name: Thresholds
            label: 'Cluster disk use high (%)'
            description: 'The percentage of disk use in the cluster - for the High trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.DISK.UTILIZATION.WARN}'
          value: '75'
          description: 'The percentage of disk use in the cluster - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '5'
            section_name: Thresholds
            label: 'Cluster disk use warning (%)'
            description: 'The percentage of disk use in the cluster - for the Warning trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.IOPS.UTILIZATION.CRIT}'
          value: '90'
          description: 'The percentage of IOPS use on the node - for the High trigger expression.'
          config:
            type: TEXT
            priority: '12'
            section_name: Thresholds
            label: 'Node IOPS use high (%)'
            description: 'The percentage of IOPS use on the node - for the High trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.IOPS.UTILIZATION.WARN}'
          value: '75'
          description: 'The percentage of IOPS use on the node - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '11'
            section_name: Thresholds
            label: 'Node IOPS use warning (%)'
            description: 'The percentage of IOPS use on the node - for the Warning trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.CRIT}'
          value: '90'
          description: 'The percentage of memory use on the cluster - for the High trigger expression.'
          config:
            type: TEXT
            priority: '4'
            section_name: Thresholds
            label: 'Cluster memory use high (%)'
            description: 'The percentage of memory use on the cluster - for the High trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.MEMORY.CLUSTER.UTILIZATION.WARN}'
          value: '70'
          description: 'The percentage of memory use on the cluster - for the Warning trigger expression.'
          config:
            type: TEXT
            priority: '3'
            section_name: Thresholds
            label: 'Cluster memory use warning (%)'
            description: 'The percentage of memory use on the cluster - for the Warning trigger expression. In the range from 0 to 100 inclusive.'
            regex: '^-?([0-9]+|(([0-9]+)\.([0-9]+)))$'
        - macro: '{$YUGABYTEDB.PROXY}'
          description: 'Sets the HTTP proxy value. If this macro is empty, then no proxy is used.'
          config:
            type: TEXT
            priority: '13'
            section_name: Other
            label: 'HTTP proxy'
            description: 'Sets the HTTP proxy value. If this macro is empty, then no proxy is used.'
      dashboards:
        - uuid: c1ea734dbfc245afa17afe478982c09d
          name: 'YugabyteDB Cluster: Overview'
          pages:
            - name: 'YugabyteDB Cluster: Overview'
              widgets:
                - type: gauge
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'CPU utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.cpu.utilization
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 66BB6A
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '80'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF0000
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: svggraph
                  name: 'YugabyteDB Cluster: Average latency'
                  'y': '4'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.read.latency
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.write.latency
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAD
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                - type: gauge
                  x: '18'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Memory utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.memory.utilization
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 66BB6A
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF0000
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: gauge
                  x: '36'
                  width: '18'
                  height: '4'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Disk space utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.utilization
                    - type: INTEGER
                      name: scale_size
                      value: '10'
                    - type: STRING
                      name: thresholds.0.color
                      value: 66BB6A
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFD54F
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '70'
                    - type: STRING
                      name: thresholds.2.color
                      value: FF0000
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '90'
                    - type: INTEGER
                      name: th_show_arc
                      value: '1'
                    - type: INTEGER
                      name: th_show_labels
                      value: '1'
                    - type: STRING
                      name: units
                      value: '%'
                - type: item
                  x: '36'
                  'y': '4'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: 'Number of nodes'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.node.number
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: item
                  x: '36'
                  'y': '6'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: STRING
                      name: description
                      value: 'YSQL connection average used'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.connection.count
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                - type: item
                  x: '36'
                  'y': '8'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: STRING
                      name: description
                      value: 'YSQL transaction OPS'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.transaction.ops
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: STRING
                      name: units
                      value: OPS
                    - type: INTEGER
                      name: units_size
                      value: '20'
                - type: item
                  x: '54'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Health state'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.health.state
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: STRING
                      name: thresholds.0.color
                      value: 81C784
                    - type: STRING
                      name: thresholds.0.threshold
                      value: '0'
                    - type: STRING
                      name: thresholds.1.color
                      value: FFF59D
                    - type: STRING
                      name: thresholds.1.threshold
                      value: '1'
                    - type: STRING
                      name: thresholds.2.color
                      value: A5A5A5
                    - type: STRING
                      name: thresholds.2.threshold
                      value: '3'
                    - type: STRING
                      name: thresholds.3.color
                      value: FF465C
                    - type: STRING
                      name: thresholds.3.threshold
                      value: '2'
                - type: item
                  x: '54'
                  'y': '2'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Cluster state'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.state
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: item
                  x: '54'
                  'y': '4'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'Software version'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.software.version
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: item
                  x: '54'
                  'y': '6'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: STRING
                      name: description
                      value: 'YB controller version'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ybc.version
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: item
                  x: '54'
                  'y': '8'
                  width: '18'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: STRING
                      name: description
                      value: 'YCQL transaction OPS'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.transaction.ops
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: STRING
                      name: units
                      value: OPS
                    - type: INTEGER
                      name: units_size
                      value: '20'
            - name: 'YugabyteDB Cluster: Cluster'
              widgets:
                - type: svggraph
                  name: 'YugabyteDB Cluster: Memory utilization'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.memory.utilization
                    - type: STRING
                      name: lefty_max
                      value: '100'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAE
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                - type: item
                  'y': '6'
                  width: '36'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: STRING
                      name: description
                      value: 'Memory total'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.memory.total
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: STRING
                      name: units
                      value: B
                - type: svggraph
                  name: 'YugabyteDB Cluster: CPU utilization'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.cpu.utilization
                    - type: STRING
                      name: lefty_max
                      value: '100'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAF
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                - type: item
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '45'
                    - type: STRING
                      name: description
                      value: 'Memory usage'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.memory.usage
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: STRING
                      name: units
                      value: B
            - name: 'YugabyteDB Cluster: Disk'
              widgets:
                - type: svggraph
                  name: 'YugabyteDB Cluster: Disk r\w usage, Bps'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.read.bps
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.write.bps
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAG
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                - type: svggraph
                  name: 'YugabyteDB Cluster: Disk space usage, bytes'
                  'y': '5'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: B0AF07
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.usage
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAH
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                - type: svggraph
                  name: 'YugabyteDB Cluster: Disk r\w OPS'
                  x: '36'
                  width: '36'
                  height: '5'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.read.ops
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.write.ops
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAI
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                - type: item
                  name: 'Disk space utilization'
                  x: '36'
                  'y': '5'
                  width: '12'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '40'
                    - type: STRING
                      name: description
                      value: 'Disk space utilization'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.utilization
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                    - type: INTEGER
                      name: value_size
                      value: '40'
                - type: item
                  name: 'Disk space provisioned'
                  x: '36'
                  'y': '8'
                  width: '12'
                  height: '3'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_size
                      value: '40'
                    - type: STRING
                      name: description
                      value: 'Disk space provisioned'
                    - type: INTEGER
                      name: desc_size
                      value: '10'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.provisioned
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: STRING
                      name: units
                      value: B
                    - type: INTEGER
                      name: units_size
                      value: '25'
                    - type: INTEGER
                      name: value_size
                      value: '40'
                - type: piechart
                  name: 'YugabyteDB Cluster: Disk space'
                  x: '48'
                  'y': '5'
                  width: '24'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: 388E3C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.usage
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.disk.provisioned
                    - type: INTEGER
                      name: ds.0.type.0
                      value: '0'
                    - type: INTEGER
                      name: ds.0.type.1
                      value: '1'
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: space
                      value: '3'
            - name: 'YugabyteDB Cluster: Network'
              widgets:
                - type: svggraph
                  name: 'YugabyteDB Cluster: Received/Transmit, Bps'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.network.receive.bps
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.network.transmit.bps
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAK
                - type: svggraph
                  name: 'YugabyteDB Cluster: Connections utilization'
                  'y': '6'
                  width: '48'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.connection.utilization
                    - type: STRING
                      name: lefty_max
                      value: '100'
                    - type: STRING
                      name: lefty_min
                      value: '0'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAL
                    - type: INTEGER
                      name: simple_triggers
                      value: '1'
                - type: svggraph
                  name: 'YugabyteDB Cluster: Received/Transmit, error/sec'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.network.receive.error.rate
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.network.transmit.error.rate
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '2'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAM
                - type: item
                  x: '48'
                  'y': '6'
                  width: '24'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: 'YSQL connection limit'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.connection.limit
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                - type: item
                  x: '48'
                  'y': '8'
                  width: '24'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: 'YSQL connection maximum used'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.connection.max
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
                - type: item
                  x: '48'
                  'y': '10'
                  width: '24'
                  hide_header: 'YES'
                  fields:
                    - type: INTEGER
                      name: decimal_places
                      value: '0'
                    - type: STRING
                      name: description
                      value: 'YSQL connection average used'
                    - type: INTEGER
                      name: desc_v_pos
                      value: '0'
                    - type: ITEM
                      name: itemid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.connection.count
                    - type: INTEGER
                      name: show.0
                      value: '1'
                    - type: INTEGER
                      name: show.1
                      value: '2'
                    - type: INTEGER
                      name: show.2
                      value: '4'
            - name: 'YugabyteDB Cluster: Query statistic'
              widgets:
                - type: svggraph
                  name: 'YugabyteDB Cluster: YCQL OPS'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: STRING
                      name: ds.0.color.2
                      value: 0EC9AC
                    - type: STRING
                      name: ds.0.color.3
                      value: 524BBC
                    - type: STRING
                      name: ds.0.color.4
                      value: ED1248
                    - type: STRING
                      name: ds.0.color.5
                      value: D1E754
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.select.ops
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.update.ops
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.delete.ops
                    - type: ITEM
                      name: ds.0.itemids.3
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.insert.ops
                    - type: ITEM
                      name: ds.0.itemids.4
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.other.ops
                    - type: ITEM
                      name: ds.0.itemids.5
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.transaction.ops
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAN
                - type: svggraph
                  name: 'YugabyteDB Cluster: YSQL OPS'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: STRING
                      name: ds.0.color.2
                      value: 0EC9AC
                    - type: STRING
                      name: ds.0.color.3
                      value: 524BBC
                    - type: STRING
                      name: ds.0.color.4
                      value: ED1248
                    - type: STRING
                      name: ds.0.color.5
                      value: D1E754
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.select.ops
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.update.ops
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.delete.ops
                    - type: ITEM
                      name: ds.0.itemids.3
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.insert.ops
                    - type: ITEM
                      name: ds.0.itemids.4
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.other.ops
                    - type: ITEM
                      name: ds.0.itemids.5
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.transaction.ops
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAO
                - type: svggraph
                  name: 'YugabyteDB Cluster: YCQL latency'
                  x: '36'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: STRING
                      name: ds.0.color.2
                      value: 0EC9AC
                    - type: STRING
                      name: ds.0.color.3
                      value: 524BBC
                    - type: STRING
                      name: ds.0.color.4
                      value: ED1248
                    - type: STRING
                      name: ds.0.color.5
                      value: D1E754
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.select.latency
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.update.latency
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.delete.latency
                    - type: ITEM
                      name: ds.0.itemids.3
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.insert.latency
                    - type: ITEM
                      name: ds.0.itemids.4
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.other.latency
                    - type: ITEM
                      name: ds.0.itemids.5
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ycql.transaction.latency
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAP
                - type: svggraph
                  name: 'YugabyteDB Cluster: YSQL latency'
                  x: '36'
                  'y': '6'
                  width: '36'
                  height: '6'
                  fields:
                    - type: STRING
                      name: ds.0.color.0
                      value: FF465C
                    - type: STRING
                      name: ds.0.color.1
                      value: B0AF07
                    - type: STRING
                      name: ds.0.color.2
                      value: 0EC9AC
                    - type: STRING
                      name: ds.0.color.3
                      value: 524BBC
                    - type: STRING
                      name: ds.0.color.4
                      value: ED1248
                    - type: STRING
                      name: ds.0.color.5
                      value: D1E754
                    - type: INTEGER
                      name: ds.0.dataset_type
                      value: '0'
                    - type: ITEM
                      name: ds.0.itemids.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.select.latency
                    - type: ITEM
                      name: ds.0.itemids.1
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.update.latency
                    - type: ITEM
                      name: ds.0.itemids.2
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.delete.latency
                    - type: ITEM
                      name: ds.0.itemids.3
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.insert.latency
                    - type: ITEM
                      name: ds.0.itemids.4
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.other.latency
                    - type: ITEM
                      name: ds.0.itemids.5
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        key: yugabytedb.cluster.ysql.transaction.latency
                    - type: INTEGER
                      name: legend_columns
                      value: '1'
                    - type: INTEGER
                      name: legend_lines
                      value: '6'
                    - type: INTEGER
                      name: legend_statistic
                      value: '1'
                    - type: STRING
                      name: reference
                      value: AAAAQ
            - name: 'YugabyteDB Cluster: Node'
              widgets:
                - type: graphprototype
                  name: 'YugabyteDB Cluster: Node Disk IOPS'
                  width: '36'
                  height: '10'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        name: 'YugabyteDB Node [{#NODE.NAME}]: Node disk IOPS number'
                    - type: STRING
                      name: reference
                      value: AAAAR
                    - type: INTEGER
                      name: rows
                      value: '2'
                - type: graphprototype
                  name: 'YugabyteDB Cluster: Node SST size'
                  x: '36'
                  width: '36'
                  height: '10'
                  fields:
                    - type: INTEGER
                      name: columns
                      value: '1'
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        name: 'YugabyteDB Node [{#NODE.NAME}]: SST size'
                    - type: STRING
                      name: reference
                      value: AAAAS
                    - type: INTEGER
                      name: rows
                      value: '2'
            - name: 'YugabyteDB Cluster: Keyspace'
              widgets:
                - type: graphprototype
                  name: 'YugabyteDB Cluster: Keyspace size'
                  width: '72'
                  height: '10'
                  fields:
                    - type: GRAPH_PROTOTYPE
                      name: graphid.0
                      value:
                        host: 'YugabyteDB Cluster by HTTP'
                        name: 'YugabyteDB Keyspace [{#KEYSPACE.NAME}]: Keyspace size'
                    - type: STRING
                      name: reference
                      value: AAAAT
                    - type: INTEGER
                      name: rows
                      value: '2'
      valuemaps:
        - uuid: 8bac0bddc0f144aa901cd15d9cfd0825
          name: 'YugabyteDB Bool status'
          mappings:
            - value: '0'
              newvalue: 'False'
            - value: '1'
              newvalue: 'True'
        - uuid: 7d6fa95c4346489fae2cdefa436bc9b6
          name: 'YugabyteDB Cluster state'
          mappings:
            - value: '0'
              newvalue: INVALID
            - value: '1'
              newvalue: QUEUED
            - value: '2'
              newvalue: INIT
            - value: '3'
              newvalue: BOOTSTRAPPING
            - value: '4'
              newvalue: 'VPC PEERING'
            - value: '5'
              newvalue: 'NETWORK CREATING'
            - value: '6'
              newvalue: PROVISIONING
            - value: '7'
              newvalue: CONFIGURING
            - value: '8'
              newvalue: 'CREATING LB'
            - value: '9'
              newvalue: 'UPDATING LB'
            - value: '10'
              newvalue: ACTIVE
            - value: '11'
              newvalue: PAUSING
            - value: '12'
              newvalue: PAUSED
            - value: '13'
              newvalue: RESUMING
            - value: '14'
              newvalue: UPDATING
            - value: '15'
              newvalue: MAINTENANCE
            - value: '16'
              newvalue: RESTORE
            - value: '17'
              newvalue: FAILED
            - value: '18'
              newvalue: 'CREATE FAILED'
            - value: '19'
              newvalue: DELETING
            - value: '20'
              newvalue: 'STARTING NODE'
            - value: '21'
              newvalue: 'STOPPING NODE'
            - value: '22'
              newvalue: 'REBOOTING NODE'
            - value: '23'
              newvalue: 'CREATE READ REPLICA FAILED'
            - value: '24'
              newvalue: 'DELETE READ REPLICA FAILED'
            - value: '25'
              newvalue: 'DELETE CLUSTER FAILED'
            - value: '26'
              newvalue: 'EDIT CLUSTER FAILED'
            - value: '27'
              newvalue: 'EDIT READ REPLICA FAILED'
            - value: '28'
              newvalue: 'PAUSE CLUSTER FAILED'
            - value: '29'
              newvalue: 'RESUME CLUSTER FAILED'
            - value: '30'
              newvalue: 'RESTORE BACKUP FAILED'
            - value: '31'
              newvalue: 'CERTIFICATE ROTATION FAILED'
            - value: '32'
              newvalue: 'UPGRADE CLUSTER FAILED'
            - value: '33'
              newvalue: 'UPGRADE CLUSTER GFLAGS FAILED'
            - value: '34'
              newvalue: 'UPGRADE CLUSTER OS FAILED'
            - value: '35'
              newvalue: 'UPGRADE CLUSTER SOFTWARE FAILED'
            - value: '36'
              newvalue: 'START NODE FAILED'
            - value: '37'
              newvalue: 'STOP NODE FAILED'
            - value: '38'
              newvalue: 'REBOOT NODE FAILED'
            - value: '39'
              newvalue: 'CONFIGURE CMK'
            - value: '40'
              newvalue: 'ENABLING CMK'
            - value: '41'
              newvalue: 'DISABLING CMK'
            - value: '42'
              newvalue: 'UPDATING CMK'
            - value: '43'
              newvalue: 'ROTATING CMK'
            - value: '44'
              newvalue: 'STOPPING METRICS EXPORTER'
            - value: '45'
              newvalue: 'STARTING METRICS EXPORTER'
            - value: '46'
              newvalue: 'CONFIGURING METRICS EXPORTER'
            - value: '47'
              newvalue: 'STOP METRICS EXPORTER FAILED'
            - value: '48'
              newvalue: 'START METRICS EXPORTER FAILED'
            - value: '49'
              newvalue: 'CONFIGURE METRICS EXPORTER FAILED'
            - value: '50'
              newvalue: 'REMOVING METRICS EXPORTER'
            - value: '51'
              newvalue: 'REMOVE METRICS EXPORTER FAILED'
            - value: '60'
              newvalue: UNKNOWN
        - uuid: 10b748dae0334399a004e0e412682ccb
          name: 'YugabyteDB Cluster type'
          mappings:
            - value: '0'
              newvalue: SYNCHRONOUS
            - value: '1'
              newvalue: GEO_PARTITIONED
        - uuid: 73aa9e520a2d491c883f7e65b6187fd2
          name: 'YugabyteDB Health state'
          mappings:
            - value: '0'
              newvalue: HEALTHY
            - value: '1'
              newvalue: 'NEEDS ATTENTION'
            - value: '2'
              newvalue: UNHEALTHY
            - value: '3'
              newvalue: UNKNOWN
        - uuid: 8d5264a7981d4e39bab56d4241dda9f3
          name: 'YugabyteDB Keyspace type'
          mappings:
            - value: '0'
              newvalue: YSQL
            - value: '1'
              newvalue: YCQL
        - uuid: 63244be33897496d8f9599aca76e34e1
          name: 'YugabyteDB Node status'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
  triggers:
    - uuid: 58142b2a76114e69af259ea1b5c19bbc
      expression: 'min(/MongoDB node by Zabbix agent 2/mongodb.connections.current,5m)/(last(/MongoDB node by Zabbix agent 2/mongodb.connections.available)+last(/MongoDB node by Zabbix agent 2/mongodb.connections.current))*100>{$MONGODB.CONNS.PCT.USED.MAX.WARN}'
      name: 'MongoDB node: Total number of open connections is too high'
      event_name: 'MongoDB node: Total number of open connections is too high (over {$MONGODB.CONNS.PCT.USED.MAX.WARN%} in 5m)'
      priority: WARNING
      description: |
        Too few available connections.
        If MongoDB runs low on connections, in may not be able to handle incoming requests in a timely manner.
      tags:
        - tag: scope
          value: capacity
    - uuid: 12afa59565304d648e7a0165ea367a2a
      expression: 'length(last(/YugabyteDB Cluster by HTTP/yugabytedb.node.get.errors)) > 0 or length(last(/YugabyteDB Cluster by HTTP/yugabytedb.keyspace.get.errors)) > 0 or length(last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.get.errors)) > 0'
      name: 'YugabyteDB Cluster: Failed to fetch data'
      priority: WARNING
      description: 'Failed to fetch data from the YugabyteDB API.'
      tags:
        - tag: scope
          value: availability
    - uuid: 93ea4576b31f44ca8ceef6db0ff12e2d
      expression: 'length(last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.query.statistic.get.errors)) > 0 or length(last(/YugabyteDB Cluster by HTTP/yugabytedb.cluster.metric.get.errors)) > 0'
      name: 'YugabyteDB Cluster: Failed to fetch metric data'
      priority: WARNING
      description: 'Failed to fetch cluster metrics or cluster statistics.'
      tags:
        - tag: scope
          value: availability
  graphs:
    - uuid: 445735b15ac84e42b21dbe7c44dce812
      name: 'Apache Cassandra: Client connections'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=Client,name=connectedNativeClients","Value"]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=Client,name=connectedThriftClients","Value"]'
    - uuid: 2ce1833420ba4abc9bdea906d2c1238b
      name: 'Apache Cassandra: Client requests rate'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency","Count"]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency","Count"]'
    - uuid: c30ffc0f46304bf6aab699d39d8d6d4c
      name: 'Apache Cassandra: Client requests Read\Write latency'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency","50thPercentile"]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency","50thPercentile"]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency","75thPercentile"]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency","95thPercentile"]'
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency","75thPercentile"]'
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency","95thPercentile"]'
    - uuid: 5397e6b2349f45169b155e9a99b2b295
      name: 'Apache Cassandra: Dropped Messages'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=DroppedMessage,scope=READ,name=Dropped","Count"]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=DroppedMessage,scope=MUTATION,name=Dropped","Count"]'
    - uuid: f82e4d8e2f84434e90baff030d46d10e
      name: 'Apache Cassandra: KeyCache Hit rate'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Hits","Count"]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:type=Cache,scope=KeyCache,name=Requests","Count"]'
    - uuid: 0f0f2544748d460b9d526573f7b11d70
      name: 'Apache Cassandra: Nodes state'
      graph_items:
        - color: 199C0D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.net:type=FailureDetector","UpEndpointCount"]'
        - sortorder: '1'
          color: F63100
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.net:type=FailureDetector","DownEndpointCount"]'
    - uuid: f499150da9ad4376ba528cd4be3af89a
      name: 'Apache Cassandra: Tables Read\Write latency'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:name=ReadLatency,type=Table","50thPercentile"]'
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:name=WriteLatency,type=Table","50thPercentile"]'
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:name=ReadLatency,type=Table","75thPercentile"]'
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:name=ReadLatency,type=Table","95thPercentile"]'
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:name=WriteLatency,type=Table","75thPercentile"]'
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'Apache Cassandra by JMX'
            key: 'jmx["org.apache.cassandra.metrics:name=WriteLatency,type=Table","95thPercentile"]'
    - uuid: 8beedac73b0d4f1d99d070e833387014
      name: 'Array operation latency'
      graph_items:
        - color: 199C0D
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.usec_per_read
        - sortorder: '1'
          color: F63100
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.usec_per_write
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.usec_per_op
    - uuid: abcd6ce5245c48b689fdbc37dbe9c277
      name: 'Array operation latency'
      graph_items:
        - color: 199C0D
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.usec_per_read
        - sortorder: '1'
          color: F63100
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.usec_per_write
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.usec_per_op
    - uuid: 00bd33322bd248708c836557a93fbefa
      name: 'Array read/write throughput'
      graph_items:
        - color: 199C0D
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.written_bytes.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.read_bytes.rate
    - uuid: a15810fcd5dc4131a9263bd1c8dd66e3
      name: 'Array read/write throughput'
      graph_items:
        - color: 199C0D
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.written_bytes.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.read_bytes.rate
    - uuid: e5777cd6a0e844a8a3203114a8761eef
      name: 'Array requests per second'
      graph_items:
        - color: 199C0D
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.read_requests.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.write_requests.rate
    - uuid: 2af7200064f04041871c8883ebed3305
      name: 'Array requests per second'
      graph_items:
        - color: 199C0D
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.read_requests.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.write_requests.rate
    - uuid: f7fd269311624609940f9b8c803291db
      name: 'Array space'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          yaxisside: RIGHT
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.capacity
        - sortorder: '1'
          color: F63100
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.shared_space
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.snapshots_size
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.volumes_size
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Pure Storage FlashArray v1 by HTTP'
            key: purestorage.flasharray.array.system_size
    - uuid: 81354a0ede2a43ecbee5805128a1f856
      name: 'Array space'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          yaxisside: RIGHT
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.capacity
        - sortorder: '1'
          color: F63100
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.shared_space
        - sortorder: '2'
          color: 00611C
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.snapshots_size
        - sortorder: '3'
          color: F7941D
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.physical_size
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Pure Storage FlashArray v2 by HTTP'
            key: purestorage.flasharray.array.system_size
    - uuid: 476512eb28de43c6bcc2bfdfc2240904
      name: 'Call statistics'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.video
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.srtp
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.encrypt
        - sortorder: '3'
          drawtype: GRADIENT_LINE
          color: F7941D
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.concurrent
    - uuid: db7a698f6488496f8a1bbdb00545141e
      name: 'Call status'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.total
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.updates
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.stable
        - sortorder: '3'
          drawtype: GRADIENT_LINE
          color: F7941D
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.active
        - sortorder: '4'
          drawtype: GRADIENT_LINE
          color: FC6EA3
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.completions
        - sortorder: '5'
          drawtype: GRADIENT_LINE
          color: 6C59DC
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.call.attempts
    - uuid: cf37627bd3854f14a6ae5b633a012c9b
      name: 'CPU utilization'
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 81C784
          item:
            host: 'Ribbon SBC SWe CE by HTTP'
            key: ribbon.server.cpu.util
    - uuid: 9f0b5130421143f592f9d068d4e1c5f3
      name: 'Emergency call status'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.emergency.call.stable
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.emergency.call.establishing
    - uuid: 1041f98ee1cf44d29fa37b7b716c6a53
      name: 'HPC queue'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.hpc.queue.timeouts
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.hpc.queue.abandons
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.hpc.queue.overflows
        - sortorder: '3'
          drawtype: GRADIENT_LINE
          color: F7941D
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.hpc.queue.attempts
    - uuid: 29612db53a7944aaa2e9e8d42679b513
      name: 'Memory utilization'
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 81C784
          item:
            host: 'Ribbon SBC SWe CE by HTTP'
            key: ribbon.server.memory.util
    - uuid: b018e24581464b0282df09fb9d6fc129
      name: 'MongoDB: Active clients'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.active_clients.total
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.active_clients.readers
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.active_clients.writers
    - uuid: 815c7f2a6dd941df9bc10bc9153e0e97
      name: 'MongoDB: Activity'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.connections.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.network.numRequests.rate
    - uuid: d7787063a8614cb4afdf41811a8ade59
      name: 'MongoDB: Connections'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.connections.available
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.connections.active
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.connections.current
    - uuid: 230bda1ddd4a45b6a2f11dbea252276e
      name: 'MongoDB: Cursors'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.cursor.open.total
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.cursor.open.pinned
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.metrics.cursor.open.no_timeout
    - uuid: 509211f5f33d4c57a49c5416b2f33937
      name: 'MongoDB: Documents'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongod.document.deleted.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongod.document.inserted.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongod.document.returned.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongod.document.updated.rate
    - uuid: f47175a50c6f488b993d3b04ecb28af4
      name: 'MongoDB: Memory usage'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.mem.mapped
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.mem.resident
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.mem.virtual
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.mem.mapped_with_journal
    - uuid: f1311a6b0d5f4564898d6679a45c438d
      name: 'MongoDB: Network'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.network.bytes_out.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.network.bytes_in.rate
    - uuid: 27c36a56bdca436d8a0fe43c9ee8233b
      name: 'MongoDB: Operations'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.opcounters.query.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.opcounters.insert.rate
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.opcounters.getmore.rate
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.opcounters.update.rate
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.opcounters.delete.rate
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.opcounters.command.rate
    - uuid: e228af86d0a34bd4b494cb6b8cda2ad8
      name: 'MongoDB: Queued operations'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.current_queue.total
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.current_queue.readers
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: 00611C
          item:
            host: 'MongoDB node by Zabbix agent 2'
            key: mongodb.current_queue.writers
    - uuid: 311d33ada96e4910a350e62abc6d5321
      name: 'MongoDB cluster: Connection pool'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connection_pool.available
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connection_pool.refreshing
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connection_pool.in_use
        - sortorder: '3'
          color: F7941D
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connection_pool.scoped
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connection_pool.client
    - uuid: 71a5a2d563d64bceacd564fe25b4d49e
      name: 'MongoDB cluster: Connections'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connections.available
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connections.active
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connections.current
        - sortorder: '3'
          drawtype: BOLD_LINE
          color: F7941D
          yaxisside: RIGHT
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.connections.rate
    - uuid: b4277ddaf3c5486cacba0f9b7208c5b2
      name: 'MongoDB cluster: Cursors'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.cursor.open.total
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.cursor.open.pinned
        - sortorder: '2'
          color: 00611C
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.metrics.cursor.open.no_timeout
    - uuid: d612246739784b9b9403dee6024493ce
      name: 'MongoDB cluster: Network'
      graph_items:
        - color: 199C0D
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.network.bytes_out.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.network.bytes_in.rate
    - uuid: 4228deefccae4cd2959b183ba3e36295
      name: 'MongoDB cluster: Operations rate'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.opcounters.query.rate
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.opcounters.insert.rate
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: 00611C
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.opcounters.getmore.rate
        - sortorder: '3'
          drawtype: BOLD_LINE
          color: F7941D
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.opcounters.update.rate
        - sortorder: '4'
          drawtype: BOLD_LINE
          color: FC6EA3
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.opcounters.delete.rate
        - sortorder: '5'
          drawtype: BOLD_LINE
          color: 6C59DC
          item:
            host: 'MongoDB cluster by Zabbix agent 2'
            key: mongodb.opcounters.command.rate
    - uuid: 33b98206ab36464eb434307807227c9c
      name: 'Signalling call status'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.non.call.total
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.non.call.stable
        - sortorder: '2'
          drawtype: GRADIENT_LINE
          color: 00611C
          item:
            host: 'Ribbon SBC SWe Core by HTTP'
            key: ribbon.system.non.call.active
    - uuid: 0f6c5e0d65b7466cb9c65944dea13836
      name: 'Swap utilization'
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 81C784
          item:
            host: 'Ribbon SBC SWe CE by HTTP'
            key: ribbon.server.swap.util
    - uuid: 2b52c11e2a8e4281b76aed17facd5666
      name: 'YugabyteDB Cluster: Average latency'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.write.latency
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.read.latency
    - uuid: 719c31e55e1d41cfa7e3735ea6250593
      name: 'YugabyteDB Cluster: Connections'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.connection.count
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.connection.max
        - sortorder: '2'
          drawtype: BOLD_LINE
          color: 00611C
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.connection.limit
    - uuid: f7fb23fb03b149cd908bf040dda9ff6c
      name: 'YugabyteDB Cluster: Connections utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.connection.utilization
    - uuid: 67ada72929dd445c96687b1782ff773e
      name: 'YugabyteDB Cluster: CPU usage'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.cpu.utilization
    - uuid: effb3cb75dc14d62b9a704c7358bd1f3
      name: 'YugabyteDB Cluster: Disc space usage'
      graph_items:
        - color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.disk.provisioned
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.disk.usage
    - uuid: 3c13b0a318dd4a609cc67a10124274dc
      name: 'YugabyteDB Cluster: Disc space utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.disk.utilization
    - uuid: f0983e69bb504ff6afe07d09bf5cb5a2
      name: 'YugabyteDB Cluster: Disk operations number'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.disk.write.ops
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.disk.read.ops
    - uuid: 2ed45b6d26874d30abc14ba798b73cb1
      name: 'YugabyteDB Cluster: Disk usage rate'
      graph_items:
        - drawtype: BOLD_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.disk.write.bps
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.disk.read.bps
    - uuid: fb9ea2cc4af642f19ce384764838fce7
      name: 'YugabyteDB Cluster: Memory usage'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.memory.usage
        - sortorder: '1'
          drawtype: BOLD_LINE
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.memory.total
    - uuid: 5fb91db735074557abd584a5cac434d3
      name: 'YugabyteDB Cluster: Memory utilization'
      ymin_type_1: FIXED
      ymax_type_1: FIXED
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.memory.utilization
    - uuid: c845efa993de438899899f722f02cb11
      name: 'YugabyteDB Cluster: Network error'
      graph_items:
        - color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.network.transmit.error.rate
        - sortorder: '1'
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.network.receive.error.rate
    - uuid: 50d707e6f8584688a52049df58ad39d4
      name: 'YugabyteDB Cluster: Network rate'
      graph_items:
        - drawtype: GRADIENT_LINE
          color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.network.transmit.bps
        - sortorder: '1'
          drawtype: GRADIENT_LINE
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.network.receive.bps
    - uuid: d69b497ed5204b07994128984c776102
      name: 'YugabyteDB Cluster: YCQL latency'
      graph_items:
        - color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.select.latency
        - sortorder: '1'
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.update.latency
        - sortorder: '2'
          color: 00611C
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.delete.latency
        - sortorder: '3'
          color: F7941D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.insert.latency
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.other.latency
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.transaction.latency
    - uuid: 2c8bdf3c24ec47d481fdcac99be6a450
      name: 'YugabyteDB Cluster: YCQL operations'
      graph_items:
        - color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.select.ops
        - sortorder: '1'
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.update.ops
        - sortorder: '2'
          color: 00611C
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.delete.ops
        - sortorder: '3'
          color: F7941D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.insert.ops
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.other.ops
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ycql.transaction.ops
    - uuid: 17ac5a90c1b14300898fd23429e3dd11
      name: 'YugabyteDB Cluster: YSQL latency'
      graph_items:
        - color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.select.latency
        - sortorder: '1'
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.update.latency
        - sortorder: '2'
          color: 00611C
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.delete.latency
        - sortorder: '3'
          color: F7941D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.insert.latency
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.other.latency
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.transaction.latency
    - uuid: aadd49cf14f84aacaf34b3d7963be2b3
      name: 'YugabyteDB Cluster: YSQL operations'
      graph_items:
        - color: 199C0D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.select.ops
        - sortorder: '1'
          color: F63100
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.update.ops
        - sortorder: '2'
          color: 00611C
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.delete.ops
        - sortorder: '3'
          color: F7941D
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.insert.ops
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.other.ops
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'YugabyteDB Cluster by HTTP'
            key: yugabytedb.cluster.ysql.transaction.ops
