# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. category: db app: dm name: zh-CN: 达梦数据库 en-US: DM DB params: # field-字段名称标识符 - field: host # name-参数字段显示名称 name: zh-CN: 主机Host en-US: Host # type-字段类型,样式(大部分映射input标签type属性) type: host # 是否是必输项 true-必填 false-可选 required: true - field: port name: zh-CN: 端口 en-US: Port type: number # 当type为number时,用range表示范围 range: '[0,65535]' required: true # 端口默认值 defaultValue: 5236 # 参数输入框提示信息 # 这个是什么参数? placeholder: '请输入端口' - field: username name: zh-CN: 用户名 en-US: Username type: text # 当type为text时,用limit表示字符串限制大小 limit: 20 required: false hide: true - field: password name: zh-CN: 用户密码 en-US: Password type: password required: false hide: true - field: timeout name: zh-CN: 超时时间 en-US: Timeout type: number range: '[0, 100000]' required: true defaultValue: 3000 metrics: - name: basic # 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集 # 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度 priority: 0 # 指标组中的具体监控指标 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: PORT_NUM type: 1 - field: CTL_PATH type: 1 - field: MAX_SESSIONS type: 0 # (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换 aliasFields: - PORT_NUM - CTL_PATH - MAX_SESSIONS # (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值 # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime calculates: - PORT_NUM=PORT_NUM - CTL_PATH=CTL_PATH - MAX_SESSIONS=MAX_SESSIONS protocol: jdbc jdbc: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ platform: dm username: ^_^username^_^ password: ^_^password^_^ database: ^_^database^_^ timeout: ^_^timeout^_^ # SQL查询方式: oneRow, multiRow, columns queryType: columns # sql sql: select PARA_NAME, PARA_VALUE from SYS."V$DM_INI" where PARA_NAME = 'MAX_SESSIONS'or PARA_NAME = 'CTL_PATH' or PARA_NAME = 'PORT_NUM'; url: ^_^url^_^ - name: status priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: status type: 1 protocol: jdbc jdbc: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ platform: dm username: ^_^username^_^ password: ^_^password^_^ database: ^_^database^_^ timeout: ^_^timeout^_^ # SQL查询方式: oneRow, multiRow, columns queryType: oneRow # sql sql: SELECT status$ as status FROM v$instance; url: ^_^url^_^ - name: thread priority: 2 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: dm_sql_thd type: 0 - field: dm_io_thd type: 0 - field: dm_quit_thd type: 0 # (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换 aliasFields: - dm_sql_thd - dm_io_thd - dm_quit_thd # (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值 # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime calculates: - dm_sql_thd=dm_sql_thd - dm_io_thd=dm_io_thd - dm_quit_thd=dm_quit_thd protocol: jdbc jdbc: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ platform: dm username: ^_^username^_^ password: ^_^password^_^ database: ^_^database^_^ timeout: ^_^timeout^_^ # SQL查询方式: oneRow, multiRow, columns queryType: columns # sql sql: SELECT DISTINCT NAME, COUNT(*) AS NUM FROM V$THREADS GROUP BY NAME ORDER BY NUM DESC; url: ^_^url^_^