182 lines
5.6 KiB
YAML
182 lines
5.6 KiB
YAML
category: db
|
||
app: oracle
|
||
name:
|
||
zh-CN: Oracle数据库
|
||
en-US: Oracle DB
|
||
# 参数映射map. type是参数类型: 0-number数字, 1-string明文字符串, 2-secret加密字符串
|
||
# 强制固定必须参数 - host
|
||
configmap:
|
||
- key: host
|
||
type: 1
|
||
- key: port
|
||
type: 0
|
||
- key: username
|
||
type: 1
|
||
- key: password
|
||
type: 2
|
||
- key: database
|
||
type: 1
|
||
- key: timeout
|
||
type: 0
|
||
- key: url
|
||
type: 1
|
||
# 指标组列表
|
||
metrics:
|
||
- name: basic
|
||
# 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集
|
||
# 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度
|
||
priority: 0
|
||
# 指标组中的具体监控指标
|
||
fields:
|
||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
|
||
- field: database_version
|
||
type: 1
|
||
instance: true
|
||
- field: database_type
|
||
type: 1
|
||
- field: hostname
|
||
type: 1
|
||
- field: instance_name
|
||
type: 1
|
||
- field: startup_time
|
||
type: 1
|
||
- field: status
|
||
type: 1
|
||
# (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换
|
||
aliasFields:
|
||
- VERSION
|
||
- DATABASE_TYPE
|
||
- HOST_NAME
|
||
- INSTANCE_NAME
|
||
- STARTUP_TIME
|
||
- STATUS
|
||
# (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值
|
||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
|
||
calculates:
|
||
- database_version=VERSION
|
||
- database_type=DATABASE_TYPE
|
||
- hostname=HOST_NAME
|
||
- instance_name=INSTANCE_NAME
|
||
- startup_time=STARTUP_TIME
|
||
- status=STATUS
|
||
protocol: jdbc
|
||
jdbc:
|
||
# 主机host: ipv4 ipv6 域名
|
||
host: ^_^host^_^
|
||
# 端口
|
||
port: ^_^port^_^
|
||
platform: oracle
|
||
username: ^_^username^_^
|
||
password: ^_^password^_^
|
||
database: ^_^database^_^
|
||
timeout: ^_^timeout^_^
|
||
# SQL查询方式: oneRow, multiRow, columns
|
||
queryType: oneRow
|
||
# sql
|
||
sql: select * from sys.v_$instance
|
||
url: ^_^url^_^
|
||
|
||
- name: tablespace
|
||
priority: 1
|
||
# 指标组中的具体监控指标
|
||
fields:
|
||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
|
||
- field: file_id
|
||
type: 1
|
||
instance: true
|
||
- field: file_name
|
||
type: 1
|
||
- field: tablespace_name
|
||
type: 1
|
||
- field: status
|
||
type: 1
|
||
- field: bytes
|
||
type: 0
|
||
unit: MB
|
||
- field: blocks
|
||
type: 0
|
||
unit: 块数
|
||
protocol: jdbc
|
||
jdbc:
|
||
# 主机host: ipv4 ipv6 域名
|
||
host: ^_^host^_^
|
||
# 端口
|
||
port: ^_^port^_^
|
||
platform: oracle
|
||
username: ^_^username^_^
|
||
password: ^_^password^_^
|
||
database: ^_^database^_^
|
||
timeout: ^_^timeout^_^
|
||
# SQL查询方式: oneRow, multiRow, columns
|
||
queryType: oneRow
|
||
# sql
|
||
sql: select file_id, file_name, tablespace_name, status, bytes / 1024 / 1024 as bytes, blocks from dba_data_files
|
||
url: ^_^url^_^
|
||
|
||
- name: user_connect
|
||
priority: 1
|
||
fields:
|
||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
|
||
- field: username
|
||
type: 1
|
||
instance: true
|
||
- field: counts
|
||
type: 0
|
||
unit: 连接数
|
||
protocol: jdbc
|
||
jdbc:
|
||
# 主机host: ipv4 ipv6 域名
|
||
host: ^_^host^_^
|
||
# 端口
|
||
port: ^_^port^_^
|
||
platform: oracle
|
||
username: ^_^username^_^
|
||
password: ^_^password^_^
|
||
database: ^_^database^_^
|
||
timeout: ^_^timeout^_^
|
||
# SQL查询方式: oneRow, multiRow, columns
|
||
queryType: oneRow
|
||
# sql
|
||
sql: SELECT username, count( username ) as counts FROM v$session WHERE username IS NOT NULL GROUP BY username
|
||
url: ^_^url^_^
|
||
|
||
- name: performance
|
||
priority: 1
|
||
fields:
|
||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
|
||
- field: qps
|
||
type: 0
|
||
unit: qps
|
||
- field: tps
|
||
type: 0
|
||
unit: tps
|
||
- field: mbps
|
||
type: 0
|
||
unit: mbps
|
||
# (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换
|
||
aliasFields:
|
||
- I/O Requests per Second
|
||
- User Transaction Per Sec
|
||
- I/O Megabytes per Second
|
||
# (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值
|
||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
|
||
calculates:
|
||
- qps=I/O Requests per Second
|
||
- tps=User Transaction Per Sec
|
||
- mbps=I/O Megabytes per Second
|
||
protocol: jdbc
|
||
jdbc:
|
||
# 主机host: ipv4 ipv6 域名
|
||
host: ^_^host^_^
|
||
# 端口
|
||
port: ^_^port^_^
|
||
platform: oracle
|
||
username: ^_^username^_^
|
||
password: ^_^password^_^
|
||
database: ^_^database^_^
|
||
timeout: ^_^timeout^_^
|
||
# SQL查询方式: oneRow, multiRow, columns
|
||
queryType: columns
|
||
# sql
|
||
sql: select metric_name, value from gv$sysmetric where metric_name = 'I/O Megabytes per Second' or metric_name = 'User Transaction Per Sec' or metric_name = 'I/O Requests per Second'
|
||
url: ^_^url^_^ |