zabbix_export:
  version: '6.4'
  template_groups:
    - uuid: 748ad4d098d447d492bb935c907f652f
      name: Templates/Databases
  templates:
    - uuid: 00ade9277d7c41e8b57d638b22d54372
      template: 'Oracle by ODBC'
      name: 'Oracle by ODBC'
      description: |
        1. Create an Oracle user for monitoring.
        
        2. Set the user name and password in host macros ({$ORACLE.USER} and {$ORACLE.PASSWORD}).
          Do not forget to install the Microsoft ODBC driver on the Zabbix server or the Zabbix proxy.
          See Oracle documentation for instructions: https://www.oracle.com/database/technologies/releasenote-odbc-ic.html.
        
          Note! Credentials in the odbc.ini do not work for Oracle.
          Note! Be sure that ODBC connects to Oracle with session parameter NLS_NUMERIC_CHARACTERS= '.,' It is important for correct display float numbers in Zabbix.
        The "Service's TCP port state" item uses {HOST.CONN} and {$ORACLE.PORT} macros to check the availability of the listener.
        
        
        Template tooling version used: 0.42
      vendor:
        name: Zabbix
        version: 6.4-0
      groups:
        - name: Templates/Databases
      items:
        - uuid: dde19b79507648bd80a82a0575bf8671
          name: 'Oracle: Get instance state'
          type: ODBC
          key: 'db.odbc.get[get_instance_state,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          history: '0'
          trends: '0'
          value_type: TEXT
          params: |
            SELECT
            INSTANCE_NAME,
            HOST_NAME,
            VERSION,
            floor((SYSDATE - startup_time)*60*60*24) AS UPTIME,
            decode(status,'STARTED',1,'MOUNTED',2,'OPEN',3,'OPEN MIGRATE',4, 0) AS STATUS,
            decode(archiver,'STOPPED',1,'STARTED',2,'FAILED',3, 0) AS  ARCHIVER,
            decode(instance_role,'PRIMARY_INSTANCE',1,'SECONDARY_INSTANCE',2, 0) AS  INSTANCE_ROLE
            FROM v$instance;
          username: '{$ORACLE.USER}'
          password: '{$ORACLE.PASSWORD}'
          description: 'The item gets its state of the current instance.'
          tags:
            - tag: component
              value: raw
        - uuid: 3839683749974cdeafd9178bdccb38d6
          name: 'Oracle: Get system metrics'
          type: ODBC
          key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          delay: 0;m0-59
          history: '0'
          trends: '0'
          value_type: TEXT
          params: |
            SELECT 'SYS::' || METRIC_NAME AS METRIC, ROUND(VALUE,3) as VALUE
             FROM V$SYSMETRIC WHERE GROUP_ID = 2
            UNION
              SELECT 'SYSPARAM::' || INITCAP(NAME) AS METRIC, to_number(VALUE)
              FROM V$SYSTEM_PARAMETER WHERE NAME IN ('sessions', 'processes', 'db_files')
            UNION
             SELECT 'SESSION::Long time locked' ,count(*) FROM V$SESSION s WHERE s.BLOCKING_SESSION IS NOT NULL AND s.BLOCKING_SESSION_STATUS='VALID' AND s.SECONDS_IN_WAIT > {$ORACLE.SESSION.LOCK.MAX.TIME}
            UNION
            SELECT 'SESSION::Lock rate' ,(cnt_block / cnt_all)* 100 pct
            FROM ( SELECT COUNT(*) cnt_block FROM v$session WHERE blocking_session IS NOT NULL), ( SELECT COUNT(*) cnt_all FROM v$session)
            UNION
              SELECT 'SESSION::Long time locked' ,count(*) FROM V$SESSION s WHERE s.BLOCKING_SESSION IS NOT NULL AND s.BLOCKING_SESSION_STATUS='VALID' AND s.SECONDS_IN_WAIT > {$ORACLE.SESSION.LOCK.MAX.TIME}
            UNION
             SELECT 'SESSION::Total', COUNT(*) AS VALUE FROM V$SESSION
            UNION
            SELECT 'SESSION::Concurrency rate', NVL(ROUND(SUM(duty_act.cnt*100 / num_cores.val)), 0)
            FROM
            ( SELECT DECODE(session_state, 'ON CPU', 'CPU', wait_class) wait_class, ROUND(COUNT(*)/(60 * 15), 1) cnt
            FROM v$active_session_history sh
            WHERE sh.sample_time >= SYSDATE - 15 / 1440 AND DECODE(session_state, 'ON CPU', 'CPU', wait_class) IN('Concurrency')
            GROUP BY DECODE(session_state, 'ON CPU', 'CPU', wait_class)) duty_act,
            ( SELECT SUM(value) val FROM v$osstat WHERE stat_name = 'NUM_CPU_CORES') num_cores
            UNION
             SELECT 'PGA::' || INITCAP(NAME), VALUE FROM V$PGASTAT
            UNION
             SELECT 'FRA::Space Limit' AS METRIC, space_limit AS VALUE FROM V$RECOVERY_FILE_DEST
            UNION
             SELECT 'FRA::Space Used', space_used AS VALUE FROM V$RECOVERY_FILE_DEST
            UNION
             SELECT 'FRA::Space Reclaimable', space_reclaimable AS VALUE FROM V$RECOVERY_FILE_DEST
            UNION
             SELECT 'FRA::Number Of Files', number_of_files AS VALUE FROM V$RECOVERY_FILE_DEST
            UNION
             SELECT 'FRA::Usable Pct', DECODE(space_limit, 0, 0,(100-(100 *(space_used-space_reclaimable)/ space_limit))) AS VALUE FROM V$RECOVERY_FILE_DEST
            UNION
             SELECT 'FRA::Restore Point', COUNT(*) AS VALUE FROM V$RESTORE_POINT
            UNION
             SELECT 'PROC::Procnum', COUNT(*) FROM v$process
            UNION
             SELECT 'DATAFILE::Count', COUNT(*) FROM v$datafile
            UNION
             SELECT 'SGA::' || INITCAP(pool), SUM(bytes) FROM V$SGASTAT
             WHERE pool IN ( 'java pool', 'large pool' ) GROUP BY pool
            UNION
             SELECT 'SGA::Shared Pool', SUM(bytes) FROM V$SGASTAT
             WHERE pool = 'shared pool' AND name NOT IN ('library cache', 'dictionary cache', 'free memory', 'sql area')
            UNION
             SELECT 'SGA::' || INITCAP(name), bytes FROM V$SGASTAT
             WHERE pool IS NULL AND name IN ('log_buffer', 'fixed_sga')
            UNION
             SELECT 'SGA::Buffer_Cache', SUM(bytes) FROM V$SGASTAT
             WHERE pool IS NULL AND name IN ('buffer_cache', 'db_block_buffers')
            UNION
             SELECT 'REDO::Available', count(*) from v$log t where t.status in ('INACTIVE', 'UNUSED')
            UNION
             SELECT 'USER::Expire password', ROUND(DECODE(SIGN(NVL(u.expiry_date, SYSDATE + 999) - SYSDATE),-1, 0, NVL(u.expiry_date, SYSDATE + 999) - SYSDATE)) exp_passwd_days_before
            FROM dba_users u WHERE username = UPPER('{$ORACLE.USER}');
          username: '{$ORACLE.USER}'
          password: '{$ORACLE.PASSWORD}'
          description: 'The item gets the values of the system metrics.'
          tags:
            - tag: component
              value: raw
        - uuid: 7ee99dfbd8dd4048bc2867aaa2fc335e
          name: 'Oracle: Service''s TCP port state'
          key: 'net.tcp.service[tcp,{HOST.CONN},{$ORACLE.PORT}]'
          delay: 30s
          history: 7d
          description: 'It checks the availability of Oracle on the TCP port.'
          valuemap:
            name: 'Service state'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: health
            - tag: component
              value: network
        - uuid: 6b6ce717919e45df93015a8f65337055
          name: 'Oracle: Active parallel sessions'
          type: DEPENDENT
          key: oracle.active_parallel_sessions
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The number of active parallel sessions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Active Parallel Sessions'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
        - uuid: 928b095ffe57404eb6863b06b466524d
          name: 'Oracle: Active serial sessions'
          type: DEPENDENT
          key: oracle.active_serial_sessions
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The number of active serial sessions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Active Serial Sessions'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
        - uuid: 70633c6c4e27410dabcf035dd583f820
          name: 'Oracle: Average active sessions'
          type: DEPENDENT
          key: oracle.active_sessions
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The average active sessions at a point in time. The number of sessions that are either working or waiting.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Average Active Sessions'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
        - uuid: eb9f4179a87249fc9df9989f58502a12
          name: 'Oracle: Archiver state'
          type: DEPENDENT
          key: oracle.archiver_state
          delay: '0'
          history: 7d
          description: 'The status of automatic archiving.'
          valuemap:
            name: 'Oracle archiver state'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..ARCHIVER.first()
          master_item:
            key: 'db.odbc.get[get_instance_state,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 836e01f5247a468dbf1866a744979376
          name: 'Oracle: Buffer cache hit ratio'
          type: DEPENDENT
          key: oracle.buffer_cache_hit_ratio
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'The ratio of buffer cache hits ((LogRead - PhyRead)/LogRead).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Buffer Cache Hit Ratio'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: cache
        - uuid: dedafce88267427a8f0b51d74de28c58
          name: 'Oracle: Global cache blocks corrupted'
          type: DEPENDENT
          key: oracle.cache_blocks_corrupt
          delay: '0'
          history: 7d
          units: Rps
          description: 'The number of blocks that encountered corruption or checksum failure during the interconnect.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Global Cache Blocks Corrupted'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: cache
        - uuid: d0d0dbbf1869487d957e60d03e8e3512
          name: 'Oracle: Global cache blocks lost'
          type: DEPENDENT
          key: oracle.cache_blocks_lost
          delay: '0'
          history: 7d
          units: Rps
          description: 'The number of lost global cache blocks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Global Cache Blocks Lost'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: cache
        - uuid: 50ea6f52e01c44e5b9039add026faaa2
          name: 'Oracle: Cursor cache hit ratio'
          type: DEPENDENT
          key: oracle.cursor_cache_hit_ratio
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'The ratio of cursor cache hits (CursorCacheHit/SoftParse).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Cursor Cache Hit Ratio'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: cache
        - uuid: 82228fbb70bf4660aa64bdde2f57686d
          name: 'Oracle: Database CPU time ratio'
          type: DEPENDENT
          key: oracle.database_cpu_time_ratio
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'It is calculated by dividing the total CPU (used by the database) by the Oracle time model statistic DB time.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Database CPU Time Ratio'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: cpu
        - uuid: 877272b0b9424d279b1efaa6536eb19b
          name: 'Oracle: Database wait time ratio'
          type: DEPENDENT
          key: oracle.database_wait_time_ratio
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'Wait time - the time that the server process spends waiting for available shared resources to be released by other server processes, such as latches, locks, data buffers, etc.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Database Wait Time Ratio'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 751fe010337e40a5a12fc24d327ffcee
          name: 'Oracle: Datafiles count'
          type: DEPENDENT
          key: oracle.db_files_count
          delay: '0'
          history: 7d
          description: 'The current number of datafiles.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''DATAFILE::Count'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: datafiles
        - uuid: a0e263bf207042058b5d9d2e735e05eb
          name: 'Oracle: Datafiles limit'
          type: DEPENDENT
          key: oracle.db_files_limit
          delay: '0'
          history: 7d
          description: 'The maximum allowable number of datafiles.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYSPARAM::Db_Files'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: datafiles
        - uuid: 22d9cccf44924f99aaf444c80b3beab9
          name: 'Oracle: Disk sort per second'
          type: DEPENDENT
          key: oracle.disk_sorts
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Rps
          description: 'The number of sorts going to disk per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Disk Sort Per Sec'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 46e0598b703a412e96a3b18e2248e754
          name: 'Oracle: Enqueue timeouts per second'
          type: DEPENDENT
          key: oracle.enqueue_timeouts_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Rps
          description: 'Enqueue timeouts per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Enqueue Timeouts Per Sec'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: beca246cadb44e48a20bc8809624a6f4
          name: 'Oracle: FRA, Number of files'
          type: DEPENDENT
          key: oracle.fra_number_of_files
          delay: '0'
          history: 7d
          description: 'The number of files in the FRA.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''FRA::Number Of Files'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: fra
        - uuid: 61eb041ea3b349df88cb3495b383fbe4
          name: 'Oracle: FRA, Number of restore points'
          type: DEPENDENT
          key: oracle.fra_restore_point
          delay: '0'
          history: 7d
          value_type: FLOAT
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''FRA::Restore Point'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: fra
        - uuid: 375e094a1a024a19b8e69e4f362c0163
          name: 'Oracle: FRA, Space limit'
          type: DEPENDENT
          key: oracle.fra_space_limit
          delay: '0'
          history: 7d
          units: B
          description: 'The maximum amount of disk space (in bytes) that the database can use for the Fast Recovery Area (FRA).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''FRA::Space Limit'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: fra
        - uuid: 4028e389cc9e4b24946657f1ded1ba47
          name: 'Oracle: FRA, Space reclaimable'
          type: DEPENDENT
          key: oracle.fra_space_reclaimable
          delay: '0'
          history: 7d
          units: B
          description: 'The total amount of disk space (in bytes) that can be created by deleting obsolete, redundant, and other low priority files from the FRA.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''FRA::Space Reclaimable'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: fra
        - uuid: 40b03e917c3c4c0385536336e48affcb
          name: 'Oracle: FRA, Used space'
          type: DEPENDENT
          key: oracle.fra_space_used
          delay: '0'
          history: 7d
          units: B
          description: 'The amount of disk space (in bytes) used by FRA files created in the current and all the previous FRAs.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''FRA::Space Used'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: fra
        - uuid: b29c93eecf9d4d1b8c5de1ce9721801f
          name: 'Oracle: FRA, Usable space in %'
          type: DEPENDENT
          key: oracle.fra_usable_pct
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''FRA::Usable Pct'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: fra
        - uuid: 3243beb0fe70425f8d71938a52f765ae
          name: 'Oracle: GC CR block received per second'
          type: DEPENDENT
          key: oracle.gc_cr_block_received_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Rps
          description: 'The global cache (GC) and the consistent read (CR) block received per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::GC CR Block Received Per Second'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: cache
        - uuid: cc3c9200deed42e5a8e187e82c123009
          name: 'Oracle: Instance role'
          type: DEPENDENT
          key: oracle.instance.role
          delay: '0'
          history: 7d
          description: 'It indicates whether the instance is an active instance or an inactive secondary instance.'
          valuemap:
            name: 'Oracle instance role'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..INSTANCE_ROLE.first()
          master_item:
            key: 'db.odbc.get[get_instance_state,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 3da27d558e034236a42b3b94bfa13159
          name: 'Oracle: Instance hostname'
          type: DEPENDENT
          key: oracle.instance_hostname
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'The name of the host machine.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..HOST_NAME.first()
          master_item:
            key: 'db.odbc.get[get_instance_state,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 618a3e3c82dc4ccba82477afdd100a98
              expression: 'last(/Oracle by ODBC/oracle.instance_hostname,#1)<>last(/Oracle by ODBC/oracle.instance_hostname,#2) and length(last(/Oracle by ODBC/oracle.instance_hostname))>0'
              name: 'Oracle: Instance hostname has changed'
              event_name: 'Oracle: Instance hostname has changed (new hostname received: {ITEM.VALUE})'
              priority: INFO
              description: 'Oracle DB Instance hostname has changed. Ack to close.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 4e5df3339a2940c6b3cdad6f5b65234b
          name: 'Oracle: Instance name'
          type: DEPENDENT
          key: oracle.instance_name
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'The name of an instance.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..INSTANCE_NAME.first()
          master_item:
            key: 'db.odbc.get[get_instance_state,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 2fe53d1d931e4eb38fef10a3171c1665
              expression: 'last(/Oracle by ODBC/oracle.instance_name,#1)<>last(/Oracle by ODBC/oracle.instance_name,#2) and length(last(/Oracle by ODBC/oracle.instance_name))>0'
              name: 'Oracle: Instance name has changed'
              event_name: 'Oracle: Instance name has changed (new name received: {ITEM.VALUE})'
              priority: INFO
              description: 'The Oracle DB instance has changed. Ack to close manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: 632a953eead74114bdaf640bbf5929a5
          name: 'Oracle: Instance status'
          type: DEPENDENT
          key: oracle.instance_status
          delay: '0'
          history: 7d
          description: 'The status of the instance.'
          valuemap:
            name: 'Oracle instance status'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..STATUS.first()
          master_item:
            key: 'db.odbc.get[get_instance_state,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 9a3084287a354fb0b0eb5de377a6de92
          name: 'Oracle: Library cache hit ratio'
          type: DEPENDENT
          key: oracle.library_cache_hit_ratio
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'The ratio of library cache hits (Hits/Pins).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Library Cache Hit Ratio'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: cache
        - uuid: ac44884b2518485eae4bc7caf46799a8
          name: 'Oracle: Logons per second'
          type: DEPENDENT
          key: oracle.logons_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Rps
          description: 'The number of logon attempts.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Logons Per Sec'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: f7691a5d7ef74a4d99cac61835052fba
          name: 'Oracle: Long table scans per second'
          type: DEPENDENT
          key: oracle.long_table_scans_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Rps
          description: 'The number of long table scans per second. A table is considered ''long'' if the table is not cached and if its high-water mark is greater than five blocks.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Long Table Scans Per Sec'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 49445baea18640ea844f869c51aee565
          name: 'Oracle: Memory sorts ratio'
          type: DEPENDENT
          key: oracle.memory_sorts_ratio
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'The percentage of sorts (from ORDER BY clauses or index building) that are done to disk vs in-memory.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Memory Sorts Ratio'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 786188c7719048cb863450f98ab921ac
          name: 'Oracle: PGA, Global memory bound'
          type: DEPENDENT
          key: oracle.pga_global_bound
          delay: '0'
          history: 7d
          units: B
          description: 'The maximum size of work area executed in automatic mode.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''PGA::Global Memory Bound'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: pga
        - uuid: 1f532b6599f34db285b60a8879638d75
          name: 'Oracle: PGA, Aggregate target parameter'
          type: DEPENDENT
          key: oracle.pga_target
          delay: '0'
          history: 7d
          units: B
          description: 'The current value of the PGA_AGGREGATE_TARGET initialization parameter. If this parameter is not set, then its value is 0 and automatic management of the PGA memory is disabled.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''PGA::Aggregate Pga Target Parameter'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: pga
        - uuid: 001bf0d526cb455386f5a63e6bb8f410
          name: 'Oracle: Physical reads per second'
          type: DEPENDENT
          key: oracle.physical_reads_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Rps
          description: 'Reads per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Physical Reads Per Sec'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: disk
        - uuid: 2f305e09eafd4f7a9360f138be20a631
          name: 'Oracle: Physical reads bytes per second'
          type: DEPENDENT
          key: oracle.physical_read_bytes_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Bps
          description: 'Read bytes per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Physical Read Bytes Per Sec'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: disk
        - uuid: d20f81d99e6647479abcc9ffcbc208fc
          name: 'Oracle: Physical writes per second'
          type: DEPENDENT
          key: oracle.physical_writes_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Rps
          description: 'Writes per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Physical Writes Per Sec'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: disk
        - uuid: e2e21384fbae431a88f1eef610b0307b
          name: 'Oracle: Physical writes bytes per second'
          type: DEPENDENT
          key: oracle.physical_write_bytes_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Bps
          description: 'Write bytes per second.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Physical Write Bytes Per Sec'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: disk
        - uuid: 533ae91bb94e4077870aa362a8cea7e5
          name: 'Oracle: Number of processes'
          type: DEPENDENT
          key: oracle.processes_count
          delay: '0'
          history: 7d
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''PROC::Procnum'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: system
        - uuid: 721c04b5f3ba42d0ae7acceb5876c360
          name: 'Oracle: Processes limit'
          type: DEPENDENT
          key: oracle.processes_limit
          delay: '0'
          history: 7d
          description: 'The maximum number of user processes.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYSPARAM::Processes'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: system
        - uuid: 65064008eef54657b7b7f2beeba70b0a
          name: 'Oracle: Redo logs available to switch'
          type: DEPENDENT
          key: oracle.redo_logs_available
          delay: '0'
          history: 7d
          description: 'The number of inactive/unused redo logs available for log switching.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''REDO::Available'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 1348b1e854e64d34b6b00be118f045c3
              expression: 'max(/Oracle by ODBC/oracle.redo_logs_available,5m) < {$ORACLE.REDO.MIN.WARN}'
              name: 'Oracle: Number of REDO logs available for switching is too low'
              event_name: 'Oracle: Number of REDO logs available for switching is too low (less {$ORACLE.REDO.MIN.WARN} for 5 min)'
              priority: WARNING
              description: 'The number of inactive/unused REDOs available for log switching is low (database down risk).'
              tags:
                - tag: scope
                  value: capacity
        - uuid: ab298981f26a4ec6849e1155ce35ee76
          name: 'Oracle: Rows per sort'
          type: DEPENDENT
          key: oracle.rows_per_sort
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The average number of rows per sort for all types of sorts performed.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Rows Per Sort'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: ddbdd3d7d40d42b9b9711470516a5aec
          name: 'Oracle: SQL service response time'
          type: DEPENDENT
          key: oracle.service_response_time
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: s
          description: 'The Structured Query Language (SQL) service response time expressed in seconds.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::SQL Service Response Time'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
            - type: MULTIPLIER
              parameters:
                - '0.01'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: e269a27f3c3f47ae86fef231da2a6fce
          name: 'Oracle: Active background sessions'
          type: DEPENDENT
          key: oracle.session_active_background
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The number of active background sessions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SESSION::Active Background'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
        - uuid: 6e8defc1e3e2485784d8bef6e2b988c7
          name: 'Oracle: Active user sessions'
          type: DEPENDENT
          key: oracle.session_active_user
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The number of active user sessions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SESSION::Active User'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
        - uuid: a3f2b314a6354d238d6604afa2333ae6
          name: 'Oracle: Sessions concurrency'
          type: DEPENDENT
          key: oracle.session_concurrency_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'The percentage of concurrency. Concurrency is a DB behavior when different transactions request to change the same resource. In the case of modifying data transactions, it sequentially temporarily blocks the right to change the data, the rest of the transactions are waiting for the access. In the case when the access for the resource is locked for a long time, then the concurrency grows (like the transaction queue) and this often has an extremely negative impact on the performance. A high contention value does not indicate the root cause of the problem but is a signal to search for it.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SESSION::Concurrency rate'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
          triggers:
            - uuid: 7099e4a160c1446395b9e5b721db7b38
              expression: 'min(/Oracle by ODBC/oracle.session_concurrency_rate,5m) > {$ORACLE.CONCURRENCY.MAX.WARN}'
              name: 'Oracle: Too high database concurrency'
              event_name: 'Oracle: Too high database concurrency (over {$ORACLE.CONCURRENCY.MAX.WARN}% for 5 min)'
              priority: WARNING
              description: 'The concurrency rate exceeds {$ORACLE.CONCURRENCY.MAX.WARN}%. A high contention value does not indicate the root cause of the problem, but it is a signal to search for it. In the case of high competition, the analysis of resource consumption should be carried out. Which are the most "heavy" queries made in the database? Possibly, also session tracing. All this will help to determine the root cause and possible optimization points both in the database configuration and in the logic of building queries of the application itself.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 3459ae7c82454882a9655db8a83120fd
          name: 'Oracle: Session count'
          type: DEPENDENT
          key: oracle.session_count
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The count of sessions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SESSION::Total'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
        - uuid: 5abf01d0bad442e7817752ae01dfc2d2
          name: 'Oracle: Inactive user sessions'
          type: DEPENDENT
          key: oracle.session_inactive_user
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The number of inactive user sessions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SESSION::Inactive User'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
        - uuid: ebc142a0784041d2bbe982c4d766b98f
          name: 'Oracle: Sessions limit'
          type: DEPENDENT
          key: oracle.session_limit
          delay: '0'
          history: 7d
          description: 'The user and system sessions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYSPARAM::Sessions'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
        - uuid: 64361f8862e8482d86a8bdd71c709142
          name: 'Oracle: Sessions lock rate'
          type: DEPENDENT
          key: oracle.session_lock_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'The percentage of locked sessions. Locks are mechanisms that prevent destructive interaction between transactions accessing the same resource — either user objects, such as tables and rows or system objects not visible to users, such as shared data structures in memory and data dictionary rows.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SESSION::Lock rate'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
          triggers:
            - uuid: 9a75f3a039094ca89c2ba7e3fa93b1a8
              expression: 'min(/Oracle by ODBC/oracle.session_lock_rate,5m) > {$ORACLE.SESSIONS.LOCK.MAX.WARN}'
              name: 'Oracle: Too many locked sessions'
              event_name: 'Oracle: Too many locked sessions (over {$ORACLE.SESSIONS.LOCK.MAX.WARN}% for 5 min)'
              priority: WARNING
              description: 'The number of locked sessions exceeds {$ORACLE.SESSIONS.LOCK.MAX.WARN}% of the running sessions.'
              tags:
                - tag: scope
                  value: performance
        - uuid: a9669cb6290b4a158e7f02c1f079b6f9
          name: 'Oracle: Sessions locked over {$ORACLE.SESSION.LOCK.MAX.TIME}s'
          type: DEPENDENT
          key: oracle.session_long_time_locked
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The count of the prolongedly locked sessions. (You can change the duration of maximum session lock in seconds for a query by {$ORACLE.SESSION.LOCK.MAX.TIME} macro. Default is 600 sec).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SESSION::Long time locked'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: sessions
          triggers:
            - uuid: a8f5ec966f5e4c72baad1380eda4d0a2
              expression: 'min(/Oracle by ODBC/oracle.session_long_time_locked,5m) > {$ORACLE.SESSION.LONG.LOCK.MAX.WARN}'
              name: 'Oracle: Too many sessions locked'
              event_name: 'Oracle: Too many sessions locked over {$ORACLE.SESSION.LOCK.MAX.TIME}s (over {$ORACLE.SESSION.LONG.LOCK.MAX.WARN} for 5 min)'
              priority: WARNING
              description: 'The number of locked sessions exceeding {$ORACLE.SESSION.LOCK.MAX.TIME} seconds is too high. Long-term locks can negatively affect the database performance. Therefore, if they are detected, you should first find the most difficult queries from the database point of view and then analyze possible resource leaks.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 94fe3a129f08415bb7e02a862bd9e8a8
          name: 'Oracle: SGA, buffer cache'
          type: DEPENDENT
          key: oracle.sga_buffer_cache
          delay: '0'
          history: 7d
          units: B
          description: 'The size of standard block cache.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SGA::Buffer_Cache'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: cache
            - tag: component
              value: sga
        - uuid: 062fbd601d6f41208e364c80f1d08b1e
          name: 'Oracle: SGA, fixed'
          type: DEPENDENT
          key: oracle.sga_fixed
          delay: '0'
          history: 7d
          units: B
          description: 'The fixed System Global Area (SGA) is an internal housekeeping area.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SGA::Fixed_Sga'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: sga
        - uuid: 614066ff91e144dbae58b4920c1db932
          name: 'Oracle: SGA, java pool'
          type: DEPENDENT
          key: oracle.sga_java_pool
          delay: '0'
          history: 7d
          units: B
          description: 'The memory is allocated from the Java pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SGA::Java Pool'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: sga
        - uuid: 0f726310d4a8426188658f7c093c3989
          name: 'Oracle: SGA, large pool'
          type: DEPENDENT
          key: oracle.sga_large_pool
          delay: '0'
          history: 7d
          units: B
          description: 'The memory is allocated from a large pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SGA::Large Pool'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: sga
        - uuid: 03e9cea3887447349c9116b89b1be026
          name: 'Oracle: SGA, log buffer'
          type: DEPENDENT
          key: oracle.sga_log_buffer
          delay: '0'
          history: 7d
          units: B
          description: 'The number of bytes allocated for the redo log buffer.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SGA::Log_Buffer'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: sga
        - uuid: eb4c2f63ef8449d99794e5fdb7fed7bf
          name: 'Oracle: SGA, shared pool'
          type: DEPENDENT
          key: oracle.sga_shared_pool
          delay: '0'
          history: 7d
          units: B
          description: 'The memory is allocated from a shared pool.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SGA::Shared Pool'')].VALUE.first()'
              error_handler: CUSTOM_VALUE
              error_handler_params: '0'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: sga
        - uuid: b14b0126cf64436ea206ec151984cd95
          name: 'Oracle: Shared pool free %'
          type: DEPENDENT
          key: oracle.shared_pool_free
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: '%'
          description: 'Free memory of a shared pool expressed in %.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Shared Pool Free %'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
          triggers:
            - uuid: 8facfa98bcd3447ea53d0a3d09ada933
              expression: 'max(/Oracle by ODBC/oracle.shared_pool_free,5m)<{$ORACLE.SHARED.FREE.MIN.WARN}'
              name: 'Oracle: Shared pool free is too low'
              event_name: 'Oracle: Shared pool free is too low (less {$ORACLE.SHARED.FREE.MIN.WARN}% for 5m)'
              priority: WARNING
              description: 'The free memory percent of the shared pool has been less than {$ORACLE.SHARED.FREE.MIN.WARN}% for the last 5 minutes.'
              tags:
                - tag: scope
                  value: capacity
        - uuid: 8b3e958d76d14ef7a6869634106f1277
          name: 'Oracle: Total sorts per user call'
          type: DEPENDENT
          key: oracle.sorts_per_user_call
          delay: '0'
          history: 7d
          value_type: FLOAT
          description: 'The total sorts per user call.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Total Sorts Per User Call'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: fc2cff59b0804989989179e1dbc338b5
          name: 'Oracle: Temp space used'
          type: DEPENDENT
          key: oracle.temp_space_used
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: B
          description: 'Used temporary space.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::Temp Space Used'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 085c097ab3b34f07b262caf80703b469
          name: 'Oracle: PGA, Total allocated'
          type: DEPENDENT
          key: oracle.total_pga_allocated
          delay: '0'
          history: 7d
          units: B
          description: 'The current amount of the PGA memory allocated by the instance. The Oracle Database attempts to keep this number below the value of the PGA_AGGREGATE_TARGET initialization parameter. However, it is possible for the PGA allocated to exceed that value by a small percentage and for a short period of time when the work area workload is increasing very rapidly or when PGA_AGGREGATE_TARGET is set to a small value.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''PGA::Total Pga Allocated'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: pga
        - uuid: c2c18a0a502d4fbe91db25d29ae57d45
          name: 'Oracle: PGA, Total freeable'
          type: DEPENDENT
          key: oracle.total_pga_freeable
          delay: '0'
          history: 7d
          units: B
          description: 'The number of bytes of the PGA memory in all processes that could be freed back to the operating system.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''PGA::Total Freeable Pga Memory'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: pga
        - uuid: e0e88ce92ece4ca0b776f09dc4ec5039
          name: 'Oracle: PGA, Total inuse'
          type: DEPENDENT
          key: oracle.total_pga_used
          delay: '0'
          history: 7d
          units: B
          description: 'It indicates how much the Program Global Area (PGA) memory is currently consumed by work areas. This number can be used to determine how much memory is consumed by other consumers of the PGA memory (for example, PL/SQL or Java).'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''PGA::Total Pga Inuse'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: memory
            - tag: component
              value: pga
        - uuid: 3c817d2b45fc471aa86771ce1739de6f
          name: 'Oracle: Uptime'
          type: DEPENDENT
          key: oracle.uptime
          delay: '0'
          history: 7d
          trends: 0d
          units: s
          description: 'The Oracle instance uptime expressed in seconds.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..UPTIME.first()
          master_item:
            key: 'db.odbc.get[get_instance_state,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: 03a4fb1d6e684c9b82c1317699c71468
              expression: 'nodata(/Oracle by ODBC/oracle.uptime,5m)=1'
              name: 'Oracle: Failed to fetch info data'
              event_name: 'Oracle: Failed to fetch info data (or no data for 5m)'
              priority: WARNING
              description: 'Zabbix has not received any data for the items for the last 5 minutes. The database might be unavailable for connecting.'
              dependencies:
                - name: 'Oracle: Port {$ORACLE.PORT} is unavailable'
                  expression: 'max(/Oracle by ODBC/net.tcp.service[tcp,{HOST.CONN},{$ORACLE.PORT}],#3)=0  and max(/Oracle by ODBC/proc.num[,,,"tnslsnr LISTENER"],#3)>0'
              tags:
                - tag: scope
                  value: availability
            - uuid: 431201a1ce0d47948751c7e4e6bbeb92
              expression: 'last(/Oracle by ODBC/oracle.uptime)<10m'
              name: 'Oracle: Host has been restarted'
              event_name: 'Oracle: {HOST.NAME} has been restarted (uptime < 10m)'
              priority: INFO
              description: 'The host uptime is less than 10 minutes.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: ad275dbbe8af483b93d37e416c3f1fd2
          name: 'Oracle: User ''{$ORACLE.USER}'' expire password'
          type: DEPENDENT
          key: oracle.user_expire_password
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: days
          description: 'The number of days before the password of Zabbix account expires.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''USER::Expire password'')].VALUE.first()'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: a909d8cccacf4470a3e2da88b4e5c3d5
              expression: 'last(/Oracle by ODBC/oracle.user_expire_password)  < {$ORACLE.EXPIRE.PASSWORD.MIN.WARN}'
              name: 'Oracle: Zabbix account will expire soon'
              event_name: 'Oracle: Zabbix account will expire soon (under {$ORACLE.EXPIRE.PASSWORD.MIN.WARN} days)'
              priority: WARNING
              description: 'The password for Zabbix user in the database expires soon.'
              tags:
                - tag: scope
                  value: notice
        - uuid: 3455378f6ecf4ecb93a69d2387e4a57d
          name: 'Oracle: User rollbacks per second'
          type: DEPENDENT
          key: oracle.user_rollbacks_rate
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: Rps
          description: 'The number of times that users manually issue the ROLLBACK statement or an error occurred during the users'' transactions.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - '$[?(@.METRIC==''SYS::User Rollbacks Per Sec'')].VALUE.first()'
            - type: JAVASCRIPT
              parameters:
                - 'return value.replace('','',''.'');'
          master_item:
            key: 'db.odbc.get[get_system_metrics,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
        - uuid: 45143cb0d0284608bf48897885a91bbb
          name: 'Oracle: Version'
          type: DEPENDENT
          key: oracle.version
          delay: '0'
          history: 7d
          trends: '0'
          value_type: CHAR
          description: 'The Oracle Server version.'
          preprocessing:
            - type: JSONPATH
              parameters:
                - $..VERSION.first()
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 1d
          master_item:
            key: 'db.odbc.get[get_instance_state,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: a5dd4fe627c44afebdfe7beeefc4ec3d
              expression: 'last(/Oracle by ODBC/oracle.version,#1)<>last(/Oracle by ODBC/oracle.version,#2) and length(last(/Oracle by ODBC/oracle.version))>0'
              name: 'Oracle: Version has changed'
              event_name: 'Oracle: Version has changed (new version value received: {ITEM.VALUE})'
              priority: INFO
              description: 'The Oracle DB version has changed. Acknowledge to close manually.'
              manual_close: 'YES'
              tags:
                - tag: scope
                  value: notice
        - uuid: bf89a6ced768432a9cc3c27e1e3159d0
          name: 'Oracle: Number of LISTENER processes'
          key: 'proc.num[,,,"tnslsnr LISTENER"]'
          delay: 30s
          history: 7d
          description: 'The number of running LISTENER processes.'
          preprocessing:
            - type: DISCARD_UNCHANGED_HEARTBEAT
              parameters:
                - 10m
          tags:
            - tag: component
              value: application
          triggers:
            - uuid: eb5e531eb3f142569775349a126d1ab0
              expression: 'max(/Oracle by ODBC/proc.num[,,,"tnslsnr LISTENER"],#3)=0'
              name: 'Oracle: LISTENER process is not running'
              priority: DISASTER
              tags:
                - tag: scope
                  value: availability
      discovery_rules:
        - uuid: a527b14b1cee4115be5c5e9387af821b
          name: 'Archive log discovery'
          type: ODBC
          key: 'db.odbc.discovery[archivelog,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          delay: 1h
          params: |
            SELECT d.dest_name
            FROM v$archive_dest d , v$database db WHERE d.status != 'INACTIVE' AND db.log_mode = 'ARCHIVELOG';
          username: '{$ORACLE.USER}'
          password: '{$ORACLE.PASSWORD}'
          description: 'Destinations of the log archive.'
          item_prototypes:
            - uuid: 1a6e01f90dca47459975632c14ce5a39
              name: 'Archivelog ''{#DEST_NAME}'': Get archive log info'
              type: ODBC
              key: 'db.odbc.get[get_archivelog_{#DEST_NAME}_stat,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              delay: 5m
              history: '0'
              trends: '0'
              value_type: TEXT
              params: |
                SELECT
                d.dest_name, DECODE (d.status, 'VALID',3, 'DEFERRED', 2, 'ERROR', 1, 0) AS status,
                d.log_sequence,
                d.error
                FROM v$archive_dest d , v$database db
                WHERE d.dest_name = '{#DEST_NAME}' AND d.status != 'INACTIVE' AND db.log_mode = 'ARCHIVELOG';
              username: '{$ORACLE.USER}'
              password: '{$ORACLE.PASSWORD}'
              description: 'It gets the archivelog statistics.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.first()
                  error_handler: DISCARD_VALUE
              tags:
                - tag: component
                  value: archive-log
                - tag: component
                  value: raw
            - uuid: 06e47a56685e4dd784628c40d5038c88
              name: 'Archivelog ''{#DEST_NAME}'': Error'
              type: DEPENDENT
              key: 'oracle.archivelog_error["{#DEST_NAME}"]'
              delay: '0'
              history: 7d
              trends: '0'
              value_type: TEXT
              description: 'It displays the error message.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ERROR
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_archivelog_{#DEST_NAME}_stat,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: archive-log
                - tag: destination
                  value: '{#DEST_NAME}'
            - uuid: 1948e6bfaa48451cac6ee83a16b07826
              name: 'Archivelog ''{#DEST_NAME}'': Last sequence'
              type: DEPENDENT
              key: 'oracle.archivelog_log_sequence["{#DEST_NAME}"]'
              delay: '0'
              history: 7d
              description: 'It identifies the sequence number of the last archived redo log to be archived.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.LOG_SEQUENCE
              master_item:
                key: 'db.odbc.get[get_archivelog_{#DEST_NAME}_stat,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: archive-log
                - tag: destination
                  value: '{#DEST_NAME}'
            - uuid: 0d561969fc2942fea854541a03b6a490
              name: 'Archivelog ''{#DEST_NAME}'': Status'
              type: DEPENDENT
              key: 'oracle.archivelog_log_status["{#DEST_NAME}"]'
              delay: '0'
              history: 7d
              description: |
                It identifies the current status of the destination where:
                1 - 'VALID';
                2 - 'DEFERRED';
                3 - 'ERROR';
                0 - 'UNKNOWN'.
              valuemap:
                name: 'Oracle Archivelog status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.STATUS
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              master_item:
                key: 'db.odbc.get[get_archivelog_{#DEST_NAME}_stat,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: archive-log
                - tag: destination
                  value: '{#DEST_NAME}'
              trigger_prototypes:
                - uuid: 1202e75015304115a4ccdab027617816
                  expression: 'last(/Oracle by ODBC/oracle.archivelog_log_status["{#DEST_NAME}"])<2'
                  name: 'Archivelog ''{#DEST_NAME}'': Log Archive is not valid'
                  priority: HIGH
                  description: |
                    The trigger will launch if the archive log destination is not in one of these states:
                    2 - 'DEFERRED';
                    3 - 'VALID'."
                  tags:
                    - tag: scope
                      value: availability
        - uuid: c40708b755c7464bb064b7bffc584381
          name: 'ASM disk groups discovery'
          type: ODBC
          key: 'db.odbc.discovery[asm,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          delay: 1h
          params: 'SELECT name AS dgname FROM v$asm_diskgroup;'
          username: '{$ORACLE.USER}'
          password: '{$ORACLE.PASSWORD}'
          description: 'The ASM disk groups.'
          item_prototypes:
            - uuid: 63fad55a2ced487aa30017b33bf1692e
              name: 'ASM ''{#DGNAME}'': Get ASM stats'
              type: ODBC
              key: 'db.odbc.get[get_asm_{#DGNAME}_stat,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              history: '0'
              trends: '0'
              value_type: TEXT
              params: |
                SELECT
                name AS dgname,
                ROUND(total_mb / DECODE(TYPE, 'NORMAL', 2, 'HIGH', 3, 'EXTERN', 1)*1024*1024) AS size_byte,
                ROUND(usable_file_mb*1024*1024 ) AS free_size_byte,
                ROUND(100-(usable_file_mb /(total_mb / DECODE(TYPE, 'NORMAL', 2, 'HIGH', 3, 'EXTERN', 1)))* 100, 2) AS used_percent
                FROM v$asm_diskgroup
                WHERE name = '{#DGNAME}';
              username: '{$ORACLE.USER}'
              password: '{$ORACLE.PASSWORD}'
              description: 'It gets the ASM disk group statistics.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.first()
                  error_handler: DISCARD_VALUE
              tags:
                - tag: component
                  value: asm
                - tag: component
                  value: raw
            - uuid: da6116af9f54452ab1694af8eef9f38d
              name: 'ASM ''{#DGNAME}'': Free size'
              type: DEPENDENT
              key: 'oracle.asm_free_size["{#DGNAME}"]'
              delay: '0'
              history: 7d
              units: B
              description: 'The free size of the ASM disk group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.FREE_SIZE_BYTE
              master_item:
                key: 'db.odbc.get[get_asm_{#DGNAME}_stat,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: asm
                - tag: disk-group
                  value: '{#DGNAME}'
            - uuid: 7f2a51d7eeb64c5b8929dcb0e3a49273
              name: 'ASM ''{#DGNAME}'': Total size'
              type: DEPENDENT
              key: 'oracle.asm_total_size["{#DGNAME}"]'
              delay: '0'
              history: 7d
              units: B
              description: 'The total size of the ASM disk group.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.SIZE_BYTE
              master_item:
                key: 'db.odbc.get[get_asm_{#DGNAME}_stat,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: asm
                - tag: disk-group
                  value: '{#DGNAME}'
            - uuid: 9c87a9089a19468f85eb1d3c28893092
              name: 'ASM ''{#DGNAME}'': Free size'
              type: DEPENDENT
              key: 'oracle.asm_used_pct["{#DGNAME}"]'
              delay: '0'
              history: 7d
              value_type: FLOAT
              units: '%'
              description: 'Usage of the ASM disk group expressed in %.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.USED_PERCENT
              master_item:
                key: 'db.odbc.get[get_asm_{#DGNAME}_stat,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: asm
                - tag: disk-group
                  value: '{#DGNAME}'
              trigger_prototypes:
                - uuid: 756a8b4b04bc4aadab6b4b4cc856ad32
                  expression: 'min(/Oracle by ODBC/oracle.asm_used_pct["{#DGNAME}"],5m)>{$ORACLE.ASM.USED.PCT.MAX.HIGH}'
                  name: 'ASM ''{#DGNAME}'': Disk group usage is too high'
                  event_name: 'ASM ''{#DGNAME}'': Disk group usage is too high (over {$ORACLE.ASM.USED.PCT.MAX.HIGH}% for 5m)'
                  priority: HIGH
                  description: 'The usage of the ASM disk group expressed in % exceeds {$ORACLE.ASM.USED.PCT.MAX.WARN}.'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: d65971e0f3994dfcbcbde145c9866678
                  expression: 'min(/Oracle by ODBC/oracle.asm_used_pct["{#DGNAME}"],5m)>{$ORACLE.ASM.USED.PCT.MAX.WARN}'
                  name: 'ASM ''{#DGNAME}'': Disk group usage is too high'
                  event_name: 'ASM ''{#DGNAME}'': Disk group usage is too high (over {$ORACLE.ASM.USED.PCT.MAX.WARN}% for 5m)'
                  priority: WARNING
                  description: 'The usage of the ASM disk group expressed in % exceeds {$ORACLE.ASM.USED.PCT.MAX.WARN}.'
                  dependencies:
                    - name: 'ASM ''{#DGNAME}'': Disk group usage is too high'
                      expression: 'min(/Oracle by ODBC/oracle.asm_used_pct["{#DGNAME}"],5m)>{$ORACLE.ASM.USED.PCT.MAX.HIGH}'
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: 75f9f07dbae84443900aad10095e37f9
              name: 'ASM ''{#DGNAME}'': ASM disk group ''{#DGNAME}'''
              graph_items:
                - color: 1A7C11
                  item:
                    host: 'Oracle by ODBC'
                    key: 'oracle.asm_free_size["{#DGNAME}"]'
                - sortorder: '1'
                  color: 2774A4
                  item:
                    host: 'Oracle by ODBC'
                    key: 'oracle.asm_total_size["{#DGNAME}"]'
        - uuid: 0f65936b86314c269b7720a9ff3f1c14
          name: 'Database discovery'
          type: ODBC
          key: 'db.odbc.discovery[db_list,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          delay: 1h
          params: 'SELECT name as DBNAME, DECODE(CDB, ''YES'', ''CDB'', ''No-CDB'') AS TYPE  FROM V$DATABASE;'
          username: '{$ORACLE.USER}'
          password: '{$ORACLE.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DBNAME}'
                value: '{$ORACLE.DBNAME.MATCHES}'
                formulaid: A
              - macro: '{#DBNAME}'
                value: '{$ORACLE.DBNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Scanning databases in the database management system (DBMS).'
          item_prototypes:
            - uuid: 5de7c786988d49d0b50f28d2d622db62
              name: 'Oracle Database ''{#DBNAME}'': Get CDB and No-CDB info'
              type: ODBC
              key: 'db.odbc.get[get_cdb_{#DBNAME}_info,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              history: '0'
              trends: '0'
              value_type: TEXT
              params: |
                SELECT name as DBNAME,
                DECODE(open_mode, 'MOUNTED', 1, 'READ ONLY', 2, 'READ WRITE', 3, 'READ ONLY WITH APPLY', 4, 'MIGRATE', 5, 0) AS open_mode,
                DECODE(database_role, 'SNAPSHOT STANDBY', 1, 'LOGICAL STANDBY', 2, 'PHYSICAL STANDBY', 3, 'PRIMARY', 4, 'FAR SYNC', 5, 0) AS ROLE,
                DECODE(force_logging, 'YES',1,'NO',0,0) AS force_logging,
                DECODE(log_mode, 'MANUAL',2 ,'ARCHIVELOG',1,'NOARCHIVELOG',0,0) AS log_mode
                FROM v$database
                WHERE name = '{#DBNAME}';
              username: '{$ORACLE.USER}'
              password: '{$ORACLE.PASSWORD}'
              description: 'It gets the information about the container database (CDB) and non-CDB database on an instance.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.first()
                  error_handler: DISCARD_VALUE
              tags:
                - tag: component
                  value: cdb
                - tag: component
                  value: raw
            - uuid: 075885bfd41d43aba7861ae49e9abbee
              name: 'Oracle Database ''{#DBNAME}'': Force logging'
              type: DEPENDENT
              key: 'oracle.db_force_logging["{#DBNAME}"]'
              delay: '0'
              history: 7d
              description: 'It indicates whether the database is under force logging mode ''YES'' or ''NO''.'
              valuemap:
                name: 'Oracle force log status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.FORCE_LOGGING
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'db.odbc.get[get_cdb_{#DBNAME}_info,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: 9b88e24d523e4111b2ff65ae26650e04
              name: 'Oracle Database ''{#DBNAME}'': Log mode'
              type: DEPENDENT
              key: 'oracle.db_log_mode["{#DBNAME}"]'
              delay: '0'
              history: 7d
              description: |
                The archive log mode where:
                0 - 'NOARCHIVELOG';
                1 - 'ARCHIVELOG';
                2 - 'MANUAL'.
              valuemap:
                name: 'Oracle log mode'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.LOG_MODE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'db.odbc.get[get_cdb_{#DBNAME}_info,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
                - tag: type
                  value: '{#TYPE}'
            - uuid: f1971909355f4ef48c32695b5d204d56
              name: 'Oracle Database ''{#DBNAME}'': Open status'
              type: DEPENDENT
              key: 'oracle.db_open_mode["{#DBNAME}"]'
              delay: '0'
              history: 7d
              description: |
                1 - 'MOUNTED';
                2 - 'READ WRITE';
                3 - 'READ ONLY';
                4 - 'READ ONLY WITH APPLY' (a physical standby database is open in real-time query mode).
              valuemap:
                name: 'Oracle DB open status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.OPEN_MODE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'db.odbc.get[get_cdb_{#DBNAME}_info,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: 9bf80a9372ef4b3898fd5a4f0c3cec7c
                  expression: 'last(/Oracle by ODBC/oracle.db_open_mode["{#DBNAME}"],#1)<>last(/Oracle by ODBC/oracle.db_open_mode["{#DBNAME}"],#2)'
                  name: 'Oracle Database ''{#DBNAME}'': Open status has changed'
                  event_name: 'Oracle Database ''{#DBNAME}'': Open status has changed (new value received: {ITEM.VALUE})'
                  priority: INFO
                  description: 'The Oracle DB open status has changed. Ack to close manually.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'Oracle Database ''{#DBNAME}'': Open status in mount mode'
                      expression: 'last(/Oracle by ODBC/oracle.db_open_mode["{#DBNAME}"])=1'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 3620ac4e75644789a2f0245dbb948771
                  expression: 'last(/Oracle by ODBC/oracle.db_open_mode["{#DBNAME}"])=1'
                  name: 'Oracle Database ''{#DBNAME}'': Open status in mount mode'
                  priority: WARNING
                  description: 'The Oracle DB is in a mounted state.'
                  tags:
                    - tag: scope
                      value: notice
            - uuid: 949d1e5fc4424b2bb0ffd220f00f6a79
              name: 'Oracle Database ''{#DBNAME}'': Role'
              type: DEPENDENT
              key: 'oracle.db_role["{#DBNAME}"]'
              delay: '0'
              history: 7d
              description: |
                The current role of the database where:
                1 - 'SNAPSHOT STANDBY';
                2 - 'LOGICAL STANDBY';
                3 - 'PHYSICAL STANDBY';
                4 - 'PRIMARY ';
                5 - 'FAR SYNC'.
              valuemap:
                name: 'Oracle DB role'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.ROLE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'db.odbc.get[get_cdb_{#DBNAME}_info,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
                - tag: type
                  value: '{#TYPE}'
              trigger_prototypes:
                - uuid: fb5ccc917a8344d7945b8867a1982d6b
                  expression: 'last(/Oracle by ODBC/oracle.db_role["{#DBNAME}"],#1)<>last(/Oracle by ODBC/oracle.db_role["{#DBNAME}"],#2)'
                  name: 'Oracle Database ''{#DBNAME}'': Role has changed'
                  event_name: 'Oracle Database ''{#DBNAME}'': Role has changed (new value received: {ITEM.VALUE})'
                  priority: INFO
                  description: 'The Oracle DB role has changed. Ack to close manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
          trigger_prototypes:
            - uuid: 9c17e0fdd6fe409e8f298433e58b7445
              expression: 'last(/Oracle by ODBC/oracle.db_force_logging["{#DBNAME}"]) = 0 and last(/Oracle by ODBC/oracle.db_log_mode["{#DBNAME}"]) = 1'
              name: 'Oracle Database ''{#DBNAME}'': Force logging is deactivated for DB with active Archivelog'
              priority: WARNING
              description: 'Force Logging mode - it is very important metric for Databases in ''ARCHIVELOG''. This feature allows to forcibly write all the transactions to the REDO.'
              tags:
                - tag: scope
                  value: performance
        - uuid: 2611e69f735a42b190852589658dd591
          name: 'PDB discovery'
          type: ODBC
          key: 'db.odbc.discovery[pdb_list,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          delay: 1h
          params: 'SELECT name as DBNAME FROM V$PDBS;'
          username: '{$ORACLE.USER}'
          password: '{$ORACLE.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#DBNAME}'
                value: '{$ORACLE.DBNAME.MATCHES}'
                formulaid: A
              - macro: '{#DBNAME}'
                value: '{$ORACLE.DBNAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Scanning a pluggable database (PDB) in DBMS.'
          item_prototypes:
            - uuid: cedcebd0b7ce474c9681022fcc75df1c
              name: 'Oracle Database ''{#DBNAME}'': Get PDB info'
              type: ODBC
              key: 'db.odbc.get[get_pdb_{#DBNAME}_info,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              history: '0'
              trends: '0'
              value_type: TEXT
              params: |
                SELECT
                name as DBNAME,
                DECODE(open_mode, 'MOUNTED', 1, 'READ ONLY', 2, 'READ WRITE', 3, 'READ ONLY WITH APPLY', 4, 'MIGRATE', 5, 0) AS open_mode
                FROM v$pdbs
                WHERE name = '{#DBNAME}';
              username: '{$ORACLE.USER}'
              password: '{$ORACLE.PASSWORD}'
              description: 'It gets the information about the PDB database on an instance.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.first()
                  error_handler: DISCARD_VALUE
              tags:
                - tag: component
                  value: pdb
                - tag: component
                  value: raw
            - uuid: 975d302e3e9a4316b6d63256b88b5006
              name: 'Oracle Database ''{#DBNAME}'': Open status'
              type: DEPENDENT
              key: 'oracle.pdb_open_mode["{#DBNAME}"]'
              delay: '0'
              history: 7d
              description: |
                1 - 'MOUNTED';
                2 - 'READ WRITE';
                3 - 'READ ONLY';
                4 - 'READ ONLY WITH APPLY' (a physical standby database is open in real-time query mode).
              valuemap:
                name: 'Oracle DB open status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.OPEN_MODE
                - type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 15m
              master_item:
                key: 'db.odbc.get[get_pdb_{#DBNAME}_info,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: database
                - tag: database
                  value: '{#DBNAME}'
                - tag: type
                  value: pdb
              trigger_prototypes:
                - uuid: 3dbb9379f8024924b197037acfbbdac4
                  expression: 'last(/Oracle by ODBC/oracle.pdb_open_mode["{#DBNAME}"],#1)<>last(/Oracle by ODBC/oracle.pdb_open_mode["{#DBNAME}"],#2)'
                  name: 'Oracle Database ''{#DBNAME}'': Open status has changed'
                  event_name: 'Oracle Database ''{#DBNAME}'': Open status has changed (new value received: {ITEM.VALUE})'
                  priority: INFO
                  description: 'The Oracle DB open status has changed. Ack to close manually.'
                  manual_close: 'YES'
                  tags:
                    - tag: scope
                      value: notice
                - uuid: 5f8ed69b2c074a29b9975baf10a2a2f8
                  expression: 'last(/Oracle by ODBC/oracle.pdb_open_mode["{#DBNAME}"])=1'
                  name: 'Oracle Database ''{#DBNAME}'': Open status in mount mode'
                  priority: WARNING
                  description: 'The Oracle DB is in a mounted state.'
                  tags:
                    - tag: scope
                      value: notice
        - uuid: c8de553c98f64e59b40bf927f6447ad1
          name: 'Tablespace discovery'
          type: ODBC
          key: 'db.odbc.discovery[tbsname,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
          delay: 1h
          params: |
            SELECT
            tablespace_name AS tablespace,
            contents  FROM DBA_TABLESPACES;
          username: '{$ORACLE.USER}'
          password: '{$ORACLE.PASSWORD}'
          filter:
            evaltype: AND
            conditions:
              - macro: '{#TABLESPACE}'
                value: '{$ORACLE.TABLESPACE.NAME.MATCHES}'
                formulaid: A
              - macro: '{#TABLESPACE}'
                value: '{$ORACLE.TABLESPACE.NAME.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Scanning tablespaces in DBMS.'
          item_prototypes:
            - uuid: 972be2e777e44c539d0ddd7918b79e88
              name: 'Oracle TBS ''{#TABLESPACE}'': Get tablespaces stats'
              type: ODBC
              key: 'db.odbc.get[get_tablespace_{#TABLESPACE}_stats,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              history: '0'
              trends: '0'
              value_type: TEXT
              params: |
                SELECT df.tablespace_name                                                                         AS TABLESPACE,
                       df.type                                                                                    AS TYPE,
                       NVL(SUM(df.BYTES), 0)                                                                      AS FILE_BYTES,
                       NVL(SUM(df.MAX_BYTES), 0)                                                                  AS MAX_BYTES,
                       NVL(SUM(f.FREE), 0)                                                                        AS FREE_BYTES,
                       SUM(df.BYTES) - SUM(f.FREE)                                                                AS USED_BYTES,
                       ROUND(DECODE(SUM(df.MAX_BYTES), 0, 0, (SUM(df.BYTES) / SUM(df.MAX_BYTES) * 100)), 2)       AS USED_PCT_MAX,
                       ROUND(DECODE(SUM(df.BYTES), 0, 0, (SUM(df.BYTES) - SUM(f.FREE)) / SUM(df.BYTES) * 100), 2) AS USED_FILE_PCT,
                       DECODE(df.STATUS, 'ONLINE', 1, 'OFFLINE', 2, 'READ ONLY', 3, 0)                            AS STATUS
                FROM (SELECT ddf.file_id,
                             dt.contents                              AS TYPE,
                             dt.STATUS,
                             ddf.file_name,
                             ddf.tablespace_name,
                             TRUNC(ddf.bytes)                         AS bytes,
                             TRUNC(GREATEST(ddf.bytes, ddf.maxbytes)) AS max_bytes
                      FROM dba_data_files ddf,
                           dba_tablespaces dt
                      WHERE ddf.tablespace_name = '{#TABLESPACE}'
                          AND dt.contents = '{#CONTENTS}'
                      ) df,
                     (SELECT TRUNC(SUM(bytes)) AS FREE, file_id
                      FROM dba_free_space
                      GROUP BY file_id) f
                WHERE df.file_id = f.file_id (+)
                GROUP BY df.tablespace_name, df.TYPE, df.status
                UNION ALL
                SELECT Y.name                                                                                        AS TABLESPACE,
                       Y.type                                                                                        AS TYPE,
                       NVL(SUM(Y.BYTES), 0)                                                                          AS FILE_BYTES,
                       NVL(SUM(Y.MAX_BYTES), 0)                                                                      AS MAX_BYTES,
                       NVL(MAX(NVL(Y.FREE_BYTES, 0)), 0)                                                             AS FREE,
                       SUM(Y.BYTES) - MAX(Y.FREE_BYTES)                                                              AS USED_BYTES,
                       ROUND(DECODE(SUM(Y.MAX_BYTES), 0, 0, (SUM(Y.BYTES) / SUM(Y.MAX_BYTES) * 100)), 2)             AS USED_PCT_MAX,
                       ROUND(DECODE(SUM(Y.BYTES), 0, 0, (SUM(Y.BYTES) - MAX(Y.FREE_BYTES)) / SUM(Y.BYTES) * 100), 2) AS USED_FILE_PCT,
                       DECODE(Y.TBS_STATUS, 'ONLINE', 1, 'OFFLINE', 2, 'READ ONLY', 3, 0)                            AS STATUS
                FROM (SELECT dtf.tablespace_name                             AS name,
                             dt.contents                                     AS TYPE,
                             dt.STATUS                                       AS tbs_status,
                             dtf.status                                      AS status,
                             dtf.bytes                                       AS bytes,
                             (SELECT ((f.total_blocks - s.tot_used_blocks) * vp.value)
                              FROM (SELECT tablespace_name, SUM(used_blocks) tot_used_blocks
                                    FROM gv$sort_segment
                                    WHERE tablespace_name != 'DUMMY'
                                    GROUP BY tablespace_name) s,
                                   (SELECT tablespace_name, SUM(blocks) total_blocks
                                    FROM dba_temp_files
                                    WHERE tablespace_name != 'DUMMY'
                                    GROUP BY tablespace_name) f,
                                   (SELECT value FROM v$parameter WHERE name = 'db_block_size') vp
                              WHERE f.tablespace_name = s.tablespace_name
                                AND f.tablespace_name = dtf.tablespace_name) AS free_bytes,
                             CASE
                                 WHEN dtf.maxbytes = 0 THEN dtf.bytes
                                 ELSE dtf.maxbytes END                       AS max_bytes
                      FROM sys.dba_temp_files dtf,
                           sys.dba_tablespaces dt
                      WHERE dtf.tablespace_name = '{#TABLESPACE}'
                          AND dt.contents = '{#CONTENTS}'
                      ) Y
                GROUP BY Y.name, Y.TYPE, Y.tbs_status;
              username: '{$ORACLE.USER}'
              password: '{$ORACLE.PASSWORD}'
              description: 'It gets the statistics of the tablespace.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.first()
                  error_handler: DISCARD_VALUE
              tags:
                - tag: component
                  value: raw
                - tag: component
                  value: tablespaces
            - uuid: 46956fd7e5d8462798b85cd7b425a794
              name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace allocated, bytes'
              type: DEPENDENT
              key: 'oracle.tbs_alloc_bytes["{#TABLESPACE}"]'
              delay: '0'
              history: 7d
              units: B
              description: 'Currently allocated bytes for the tablespace (sum of the current size of datafiles).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.FILE_BYTES
              master_item:
                key: 'db.odbc.get[get_tablespace_{#TABLESPACE}_stats,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: tablespaces
                - tag: contents
                  value: '{#CONTENTS}'
                - tag: tablespace
                  value: '{#TABLESPACE}'
            - uuid: 8c3284a21872423499ee15fd7b0038f1
              name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace free, bytes'
              type: DEPENDENT
              key: 'oracle.tbs_free_bytes["{#TABLESPACE}"]'
              delay: '0'
              history: 7d
              units: B
              description: 'Free bytes of the allocated space.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.FREE_BYTES
              master_item:
                key: 'db.odbc.get[get_tablespace_{#TABLESPACE}_stats,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: tablespaces
                - tag: contents
                  value: '{#CONTENTS}'
                - tag: tablespace
                  value: '{#TABLESPACE}'
            - uuid: afd8c1a01b64408fbc6f8f95fbb13593
              name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace MAX size, bytes'
              type: DEPENDENT
              key: 'oracle.tbs_max_bytes["{#TABLESPACE}"]'
              delay: '0'
              history: 7d
              units: B
              description: 'The maximum size of the tablespace.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.MAX_BYTES
              master_item:
                key: 'db.odbc.get[get_tablespace_{#TABLESPACE}_stats,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: tablespaces
                - tag: contents
                  value: '{#CONTENTS}'
                - tag: tablespace
                  value: '{#TABLESPACE}'
            - uuid: 42c7812a75d5433ab8a275498635c81c
              name: 'Oracle TBS ''{#TABLESPACE}'': Open status'
              type: DEPENDENT
              key: 'oracle.tbs_status["{#TABLESPACE}"]'
              delay: '0'
              history: 7d
              description: |
                The tablespace status where:
                1 - 'ONLINE';
                2 - 'OFFLINE';
                3 - 'READ ONLY'.
              valuemap:
                name: 'Oracle tablespace status'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.STATUS
              master_item:
                key: 'db.odbc.get[get_tablespace_{#TABLESPACE}_stats,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: tablespaces
                - tag: contents
                  value: '{#CONTENTS}'
                - tag: tablespace
                  value: '{#TABLESPACE}'
              trigger_prototypes:
                - uuid: 3c5f54f41f95440aa18ca5316aeb50f6
                  expression: 'last(/Oracle by ODBC/oracle.tbs_status["{#TABLESPACE}"])=2'
                  name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace is OFFLINE'
                  priority: WARNING
                  description: 'The tablespace is in the offline state.'
                  tags:
                    - tag: scope
                      value: availability
                - uuid: 05c2af5a765842a1a70f2f67355db1b3
                  expression: 'last(/Oracle by ODBC/oracle.tbs_status["{#TABLESPACE}"],#1)<>last(/Oracle by ODBC/oracle.tbs_status["{#TABLESPACE}"],#2)'
                  name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace status has changed'
                  event_name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace status has changed (new value received: {ITEM.VALUE})'
                  priority: INFO
                  description: 'Oracle tablespace status has changed. Ack to close.'
                  manual_close: 'YES'
                  dependencies:
                    - name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace is OFFLINE'
                      expression: 'last(/Oracle by ODBC/oracle.tbs_status["{#TABLESPACE}"])=2'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: b9cc0eabdcbc404fb0df2a2a082411f1
              name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace used, bytes'
              type: DEPENDENT
              key: 'oracle.tbs_used_bytes["{#TABLESPACE}"]'
              delay: '0'
              history: 7d
              units: B
              description: 'Currently used bytes for the tablespace (current size of datafiles - the free space).'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.USED_BYTES
              master_item:
                key: 'db.odbc.get[get_tablespace_{#TABLESPACE}_stats,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: tablespaces
                - tag: contents
                  value: '{#CONTENTS}'
                - tag: tablespace
                  value: '{#TABLESPACE}'
            - uuid: 877961c286e448238f58cff9c51088c8
              name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace usage, percent'
              type: DEPENDENT
              key: 'oracle.tbs_used_file_pct["{#TABLESPACE}"]'
              delay: '0'
              history: 7d
              value_type: FLOAT
              units: '%'
              description: 'Used bytes/allocated bytes*100.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.USED_FILE_PCT
                - type: JAVASCRIPT
                  parameters:
                    - 'return value.replace('','',''.'');'
              master_item:
                key: 'db.odbc.get[get_tablespace_{#TABLESPACE}_stats,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: tablespaces
                - tag: contents
                  value: '{#CONTENTS}'
                - tag: tablespace
                  value: '{#TABLESPACE}'
              trigger_prototypes:
                - uuid: 78c293ae7ded42b0b05d50af99762017
                  expression: 'min(/Oracle by ODBC/oracle.tbs_used_file_pct["{#TABLESPACE}"],5m)>{$ORACLE.TBS.USED.PCT.MAX.HIGH}'
                  name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace usage is too high'
                  event_name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace usage is too high (over {$ORACLE.TBS.USED.PCT.MAX.HIGH}% for 5m).'
                  status: DISABLED
                  discover: NO_DISCOVER
                  priority: HIGH
                  dependencies:
                    - name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace utilization is too high'
                      expression: 'min(/Oracle by ODBC/oracle.tbs_used_pct["{#TABLESPACE}"],5m)>{$ORACLE.TBS.UTIL.PCT.MAX.HIGH}'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: e6f2cb4ade52464b97f5e0f5e05ab61b
                  expression: 'min(/Oracle by ODBC/oracle.tbs_used_file_pct["{#TABLESPACE}"],5m)>{$ORACLE.TBS.USED.PCT.MAX.WARN}'
                  name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace usage is too high'
                  event_name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace usage is too high (over {$ORACLE.TBS.USED.PCT.MAX.WARN}% for 5m).'
                  priority: WARNING
                  dependencies:
                    - name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace usage is too high'
                      expression: 'min(/Oracle by ODBC/oracle.tbs_used_file_pct["{#TABLESPACE}"],5m)>{$ORACLE.TBS.USED.PCT.MAX.HIGH}'
                  tags:
                    - tag: scope
                      value: capacity
            - uuid: c3a904455ff244e1a30bf32f0b4ea0d7
              name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace allocated, percent'
              type: DEPENDENT
              key: 'oracle.tbs_used_pct["{#TABLESPACE}"]'
              delay: '0'
              history: 7d
              value_type: FLOAT
              units: '%'
              description: 'Allocated bytes/max bytes*100.'
              preprocessing:
                - type: JSONPATH
                  parameters:
                    - $.USED_PCT_MAX
                - type: JAVASCRIPT
                  parameters:
                    - 'return value.replace('','',''.'');'
              master_item:
                key: 'db.odbc.get[get_tablespace_{#TABLESPACE}_stats,,"Driver={$ORACLE.DRIVER};DBQ=//{HOST.CONN}:{$ORACLE.PORT}/{$ORACLE.SERVICE};"]'
              tags:
                - tag: component
                  value: tablespaces
                - tag: contents
                  value: '{#CONTENTS}'
                - tag: tablespace
                  value: '{#TABLESPACE}'
              trigger_prototypes:
                - uuid: 9469e51bd69e4baba82de4fd4e5eb14c
                  expression: 'min(/Oracle by ODBC/oracle.tbs_used_pct["{#TABLESPACE}"],5m)>{$ORACLE.TBS.USED.PCT.MAX.WARN}'
                  name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace utilization is too high'
                  event_name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace utilization is too high (over {$ORACLE.TBS.USED.PCT.MAX.WARN}% for 5m).'
                  priority: WARNING
                  dependencies:
                    - name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace utilization is too high'
                      expression: 'min(/Oracle by ODBC/oracle.tbs_used_pct["{#TABLESPACE}"],5m)>{$ORACLE.TBS.UTIL.PCT.MAX.HIGH}'
                  tags:
                    - tag: scope
                      value: capacity
                - uuid: a8aa7255866d4a5ba71d2f89a1d234fe
                  expression: 'min(/Oracle by ODBC/oracle.tbs_used_pct["{#TABLESPACE}"],5m)>{$ORACLE.TBS.UTIL.PCT.MAX.HIGH}'
                  name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace utilization is too high'
                  event_name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace utilization is too high (over {$ORACLE.TBS.UTIL.PCT.MAX.HIGH}% for 5m).'
                  priority: HIGH
                  tags:
                    - tag: scope
                      value: capacity
          graph_prototypes:
            - uuid: a9f3bc52aa0340feb35600ad249e82d3
              name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace ''{#TABLESPACE}'''
              graph_items:
                - color: 1A7C11
                  item:
                    host: 'Oracle by ODBC'
                    key: 'oracle.tbs_alloc_bytes["{#TABLESPACE}"]'
                - sortorder: '1'
                  color: 2774A4
                  item:
                    host: 'Oracle by ODBC'
                    key: 'oracle.tbs_max_bytes["{#TABLESPACE}"]'
                - sortorder: '2'
                  color: F63100
                  item:
                    host: 'Oracle by ODBC'
                    key: 'oracle.tbs_used_bytes["{#TABLESPACE}"]'
      tags:
        - tag: class
          value: database
        - tag: target
          value: oracle
      macros:
        - macro: '{$ORACLE.ASM.USED.PCT.MAX.HIGH}'
          value: '95'
          description: 'The maximum percentage of used Automatic Storage Management (ASM) disk group for a high trigger expression.'
        - macro: '{$ORACLE.ASM.USED.PCT.MAX.WARN}'
          value: '90'
          description: 'The maximum percentage of used ASM disk group for a warning trigger expression.'
        - macro: '{$ORACLE.CONCURRENCY.MAX.WARN}'
          value: '80'
          description: 'The maximum percentage of sessions concurrency usage for a trigger expression.'
        - macro: '{$ORACLE.DB.FILE.MAX.WARN}'
          value: '80'
          description: 'The maximum percentage of used database files for a trigger expression.'
        - macro: '{$ORACLE.DBNAME.MATCHES}'
          value: '.*'
          description: 'This macro is used in database discovery. It can be overridden on host level or its linked template level.'
        - macro: '{$ORACLE.DBNAME.NOT_MATCHES}'
          value: PDB\$SEED
          description: 'This macro is used in database discovery. It can be overridden on host level or its linked template level.'
        - macro: '{$ORACLE.DRIVER}'
          value: '<Put path to oracle driver here>'
          description: 'The Oracle driver path. For example: `/usr/lib/oracle/21/client64/lib/libsqora.so.21.1`'
        - macro: '{$ORACLE.EXPIRE.PASSWORD.MIN.WARN}'
          value: '7'
          description: 'The number of warning days before the password expires for a trigger expression.'
        - macro: '{$ORACLE.PASSWORD}'
          value: '<Put your password here>'
          description: 'The Oracle user''s password.'
        - macro: '{$ORACLE.PGA.USE.MAX.WARN}'
          value: '90'
          description: 'Alert threshold for the maximum percentage of the Program Global Area (PGA) usage for a trigger expression.'
        - macro: '{$ORACLE.PORT}'
          value: '1521'
          description: 'Oracle DB TCP port.'
        - macro: '{$ORACLE.PROCESSES.MAX.WARN}'
          value: '80'
          description: 'Alert threshold for the maximum percentage of active processes for a trigger expression.'
        - macro: '{$ORACLE.REDO.MIN.WARN}'
          value: '3'
          description: 'Alert threshold for the minimum number of REDO logs for a trigger expression.'
        - macro: '{$ORACLE.SERVICE}'
          value: '<Put oracle service name here>'
          description: 'Oracle Service Name.'
        - macro: '{$ORACLE.SESSION.LOCK.MAX.TIME}'
          value: '600'
          description: 'The maximum duration of the session lock in seconds to count the session as a prolongedly locked query.'
        - macro: '{$ORACLE.SESSION.LONG.LOCK.MAX.WARN}'
          value: '3'
          description: 'Alert threshold for the maximum number of the prolongedly locked sessions for a trigger expression.'
        - macro: '{$ORACLE.SESSIONS.LOCK.MAX.WARN}'
          value: '20'
          description: 'Alert threshold for the maximum percentage of locked sessions for a trigger expression.'
        - macro: '{$ORACLE.SESSIONS.MAX.WARN}'
          value: '80'
          description: 'Alert threshold for the maximum percentage of active sessions for a trigger expression.'
        - macro: '{$ORACLE.SHARED.FREE.MIN.WARN}'
          value: '5'
          description: 'Alert threshold for the minimum percentage of free shared pool for a trigger expression.'
        - macro: '{$ORACLE.TABLESPACE.NAME.MATCHES}'
          value: '.*'
          description: 'This macro is used in tablespace discovery. It can be overridden on host level or its linked template level.'
        - macro: '{$ORACLE.TABLESPACE.NAME.NOT_MATCHES}'
          value: CHANGE_IF_NEEDED
          description: 'This macro is used in tablespace discovery. It can be overridden on host level or its linked template level.'
        - macro: '{$ORACLE.TBS.USED.PCT.MAX.HIGH}'
          value: '95'
          description: 'High severity alert threshold for the maximum percentage of tablespace usage (used bytes/allocated bytes) for a trigger expression.'
        - macro: '{$ORACLE.TBS.USED.PCT.MAX.WARN}'
          value: '90'
          description: 'Warning severity alert threshold for the maximum percentage of tablespace usage (used bytes/allocated bytes) for a trigger expression.'
        - macro: '{$ORACLE.TBS.UTIL.PCT.MAX.HIGH}'
          value: '90'
          description: 'High severity alert threshold for the maximum percentage of tablespace utilization (allocated bytes/max bytes) for a trigger expression.'
        - macro: '{$ORACLE.TBS.UTIL.PCT.MAX.WARN}'
          value: '80'
          description: 'Warning severity alert threshold for the maximum percentage of tablespace utilization (allocated bytes/max bytes) for a trigger expression.'
        - macro: '{$ORACLE.USER}'
          value: '<Put your username here>'
          description: 'Oracle username.'
      dashboards:
        - uuid: e6ba4dd2003446bbb39057e4b4003bbb
          name: 'Oracle Performance'
          pages:
            - widgets:
                - type: graph
                  name: Processes
                  width: '12'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'Oracle: Processes'
                - type: graphprototype
                  name: Tablespaces
                  'y': '5'
                  width: '24'
                  height: '6'
                  fields:
                    - type: GRAPH_PROTOTYPE
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'Oracle TBS ''{#TABLESPACE}'': Tablespace ''{#TABLESPACE}'''
                - type: graph
                  name: Datafile
                  'y': '11'
                  width: '12'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'Oracle: Datafiles'
                - type: graph
                  name: 'Physical ReadWrite Rate'
                  'y': '16'
                  width: '12'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'Oracle: Physical Read\Write Rate'
                - type: graphprototype
                  name: 'ASM disk group'
                  'y': '21'
                  width: '24'
                  height: '5'
                  fields:
                    - type: GRAPH_PROTOTYPE
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'ASM ''{#DGNAME}'': ASM disk group ''{#DGNAME}'''
                - type: graph
                  name: 'SGA Memory Usage'
                  'y': '26'
                  width: '12'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'Oracle: SGA Memory Usage'
                - type: graph
                  name: Session
                  x: '12'
                  width: '12'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'Oracle: Sessions'
                - type: graph
                  name: PGA
                  x: '12'
                  'y': '11'
                  width: '12'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'Oracle: PGA'
                - type: graph
                  name: 'Physical ReadWrite Rate Bytes'
                  x: '12'
                  'y': '16'
                  width: '12'
                  height: '5'
                  fields:
                    - type: GRAPH
                      name: graphid
                      value:
                        host: 'Oracle by ODBC'
                        name: 'Oracle: Physical Read\Write Rate, Bytes'
      valuemaps:
        - uuid: 79af6c068ba141ba9806f4341edd9266
          name: 'Oracle Archivelog status'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Error
            - value: '2'
              newvalue: Deferred
            - value: '3'
              newvalue: Valid
        - uuid: 3afaab75342c4be186fb4f595ed62a31
          name: 'Oracle archiver state'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Stopped
            - value: '2'
              newvalue: Started
            - value: '3'
              newvalue: Failed
        - uuid: d0912db18fe54941b9345ebf869fd1a6
          name: 'Oracle DB open status'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Mounted
            - value: '2'
              newvalue: 'Read Only'
            - value: '3'
              newvalue: Read-Write
            - value: '4'
              newvalue: 'Read Only with Apply'
        - uuid: df05d594141f42ebb294cf6adca5fd6b
          name: 'Oracle DB role'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: 'Snapshot standby'
            - value: '2'
              newvalue: 'Logical standby'
            - value: '3'
              newvalue: 'Physical standby'
            - value: '4'
              newvalue: Primary
            - value: '5'
              newvalue: 'Far sync'
        - uuid: f00ca5c45ab84df788820af2642e4784
          name: 'Oracle force log status'
          mappings:
            - value: '0'
              newvalue: 'No'
            - value: '1'
              newvalue: 'Yes'
        - uuid: 97b689d7ddc04bcd9b9f92af6ba783bd
          name: 'Oracle instance role'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Primary
            - value: '2'
              newvalue: Secondary
        - uuid: 41e105c52bf045899c3c4a1cb4e16865
          name: 'Oracle instance status'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Started
            - value: '2'
              newvalue: Mounted
            - value: '3'
              newvalue: Open
            - value: '4'
              newvalue: 'Open migrate'
        - uuid: 809554f521d645ea8e8850c3b1f41579
          name: 'Oracle log mode'
          mappings:
            - value: '0'
              newvalue: NOARCHIVELOG
            - value: '1'
              newvalue: ARCHIVELOG
            - value: '2'
              newvalue: MANUAL
        - uuid: c6633e4ef9a84fa7b843529479a06158
          name: 'Oracle tablespace status'
          mappings:
            - value: '0'
              newvalue: Unknown
            - value: '1'
              newvalue: Online
            - value: '2'
              newvalue: Offline
            - value: '3'
              newvalue: Read-Only
        - uuid: 45ad479873b84113a98fa21b21081c65
          name: 'Service state'
          mappings:
            - value: '0'
              newvalue: Down
            - value: '1'
              newvalue: Up
  triggers:
    - uuid: 7b0bde98c6c54e67b0aa8b3339fe464d
      expression: 'max(/Oracle by ODBC/net.tcp.service[tcp,{HOST.CONN},{$ORACLE.PORT}],#3)=0  and max(/Oracle by ODBC/proc.num[,,,"tnslsnr LISTENER"],#3)>0'
      name: 'Oracle: Port {$ORACLE.PORT} is unavailable'
      priority: DISASTER
      description: 'The TCP port of the Oracle Server service is currently unavailable.'
      tags:
        - tag: scope
          value: availability
    - uuid: 38471058988c46f4b81af9f77637914a
      expression: 'min(/Oracle by ODBC/oracle.processes_count,5m) * 100 / last(/Oracle by ODBC/oracle.processes_limit) > {$ORACLE.PROCESSES.MAX.WARN}'
      name: 'Oracle: Too many active processes'
      event_name: 'Oracle: Too many active processes (over {$ORACLE.PROCESSES.MAX.WARN}% for 5 min)'
      priority: WARNING
      description: 'Active processes are using more than {$ORACLE.PROCESSES.MAX.WARN}% of the available number of processes.'
      tags:
        - tag: scope
          value: capacity
    - uuid: 4a055da31f09489ea0f03e4582ee4333
      expression: 'min(/Oracle by ODBC/oracle.session_count,5m) * 100 / last(/Oracle by ODBC/oracle.session_limit) > {$ORACLE.SESSIONS.MAX.WARN}'
      name: 'Oracle: Too many active sessions'
      event_name: 'Oracle: Too many active sessions (over {$ORACLE.SESSIONS.MAX.WARN}% for 5 min)'
      priority: WARNING
      description: 'Active sessions are using more than {$ORACLE.SESSIONS.MAX.WARN}% of the available sessions.'
      tags:
        - tag: scope
          value: capacity
    - uuid: 5752d92063f84aaa818bc85b135cd4fd
      expression: 'min(/Oracle by ODBC/oracle.db_files_count,5m) * 100 / last(/Oracle by ODBC/oracle.db_files_limit) > {$ORACLE.DB.FILE.MAX.WARN}'
      name: 'Oracle: Too many database files'
      event_name: 'Oracle: Too many database files (over {$ORACLE.DB.FILE.MAX.WARN}% for 5 min)'
      priority: WARNING
      description: 'The number of datafiles is higher than {$ORACLE.DB.FILE.MAX.WARN}% of the available datafiles limit.'
      tags:
        - tag: scope
          value: capacity
    - uuid: 476001f0f52a45f59942d73c643371c1
      expression: 'min(/Oracle by ODBC/oracle.total_pga_used,5m) * 100 / last(/Oracle by ODBC/oracle.pga_target) > {$ORACLE.PGA.USE.MAX.WARN}'
      name: 'Oracle: Total PGA inuse is too high'
      event_name: 'Oracle: Total PGA inuse is too high (over {$ORACLE.PGA.USE.MAX.WARN}% for 5 min)'
      priority: WARNING
      description: 'The total PGA in use is more than {$ORACLE.PGA.USE.MAX.WARN}% of PGA_AGGREGATE_TARGET.'
      tags:
        - tag: scope
          value: capacity
  graphs:
    - uuid: 72ad9e81bb5147e6827499143d256068
      name: 'Oracle: Datafiles'
      graph_items:
        - color: 1A7C11
          item:
            host: 'Oracle by ODBC'
            key: oracle.db_files_count
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Oracle by ODBC'
            key: oracle.db_files_limit
    - uuid: dba3f3b856114d50b826a15cacd1d896
      name: 'Oracle: PGA'
      graph_items:
        - color: 1A7C11
          item:
            host: 'Oracle by ODBC'
            key: oracle.total_pga_used
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Oracle by ODBC'
            key: oracle.pga_target
        - sortorder: '2'
          color: F63100
          item:
            host: 'Oracle by ODBC'
            key: oracle.total_pga_allocated
    - uuid: 3d1c6ffe69f34695b30d132d99d41dbb
      name: 'Oracle: Physical Read\Write Rate'
      graph_items:
        - color: 1A7C11
          item:
            host: 'Oracle by ODBC'
            key: oracle.physical_writes_rate
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Oracle by ODBC'
            key: oracle.physical_reads_rate
    - uuid: 5002e9a128524991b16dbea89e0f4b07
      name: 'Oracle: Physical Read\Write Rate, Bytes'
      graph_items:
        - color: 1A7C11
          item:
            host: 'Oracle by ODBC'
            key: oracle.physical_write_bytes_rate
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Oracle by ODBC'
            key: oracle.physical_read_bytes_rate
    - uuid: 044e0b3a485547b7b41939a78be80784
      name: 'Oracle: Processes'
      graph_items:
        - color: 1A7C11
          item:
            host: 'Oracle by ODBC'
            key: oracle.processes_count
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Oracle by ODBC'
            key: oracle.processes_limit
    - uuid: eef29b959d334e4b9ba3a4d83a571f1f
      name: 'Oracle: Sessions'
      graph_items:
        - color: 1A7C11
          item:
            host: 'Oracle by ODBC'
            key: oracle.session_count
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Oracle by ODBC'
            key: oracle.session_active_background
        - sortorder: '2'
          color: F63100
          item:
            host: 'Oracle by ODBC'
            key: oracle.session_inactive_user
        - sortorder: '3'
          color: A54F10
          item:
            host: 'Oracle by ODBC'
            key: oracle.session_active_user
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Oracle by ODBC'
            key: oracle.session_limit
    - uuid: dd6a3c604ba446e793526564527c5c2f
      name: 'Oracle: SGA Memory Usage'
      type: STACKED
      graph_items:
        - color: 1A7C11
          item:
            host: 'Oracle by ODBC'
            key: oracle.sga_java_pool
        - sortorder: '1'
          color: 2774A4
          item:
            host: 'Oracle by ODBC'
            key: oracle.sga_large_pool
        - sortorder: '2'
          color: F63100
          item:
            host: 'Oracle by ODBC'
            key: oracle.sga_shared_pool
        - sortorder: '3'
          color: A54F10
          item:
            host: 'Oracle by ODBC'
            key: oracle.sga_log_buffer
        - sortorder: '4'
          color: FC6EA3
          item:
            host: 'Oracle by ODBC'
            key: oracle.sga_fixed
        - sortorder: '5'
          color: 6C59DC
          item:
            host: 'Oracle by ODBC'
            key: oracle.sga_buffer_cache
