# 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: clickhouse name: zh-CN: ClickHouse数据库 en-US: ClickHouse DB params: - field: host name: zh-CN: 主机Host en-US: Host type: host required: true - field: port name: zh-CN: HTTP端口 en-US: HTTP Port type: number range: '[0,65535]' required: true defaultValue: 8123 - field: timeout name: zh-CN: 查询超时时间(ms) en-US: Query Timeout(ms) type: number required: false hide: true defaultValue: 6000 - field: database name: zh-CN: 数据库名称 en-US: Database Name type: text required: false - field: username name: zh-CN: 用户名 en-US: Username type: text limit: 20 required: false - field: password name: zh-CN: 密码 en-US: Password type: password required: false metrics: - name: ping_available priority: 0 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: responseTime type: 0 unit: ms protocol: http # 当protocol为http协议时具体的采集配置 http: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ # url请求接口路径 url: /ping timeout: ^_^timeout^_^ # 请求方式 GET POST PUT DELETE PATCH method: GET # 是否启用ssl/tls,即是http还是https,默认false ssl: false # 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-网站可用性指标监控 parseType: website - name: system priority: 1 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: metric type: 1 instance: true - field: value type: 0 # - field: description # type: 1 protocol: jdbc jdbc: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ platform: clickhouse username: ^_^username^_^ password: ^_^password^_^ database: ^_^database^_^ timeout: ^_^timeout^_^ # SQL查询方式: oneRow, multiRow, columns queryType: multiRow # sql sql: SELECT * FROM system.metrics LIMIT 10; - name: events priority: 2 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: event type: 1 instance: true - field: value type: 0 # - field: description # type: 1 protocol: jdbc jdbc: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ platform: clickhouse username: ^_^username^_^ password: ^_^password^_^ database: ^_^database^_^ timeout: ^_^timeout^_^ # SQL查询方式: oneRow, multiRow, columns queryType: multiRow # sql sql: SELECT * FROM system.events LIMIT 5; - name: asynchronous priority: 3 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: metric type: 1 instance: true - field: value type: 0 # - field: description # type: 1 protocol: jdbc jdbc: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ platform: clickhouse username: ^_^username^_^ password: ^_^password^_^ database: ^_^database^_^ timeout: ^_^timeout^_^ # SQL查询方式: oneRow, multiRow, columns queryType: multiRow # sql sql: SELECT * FROM system.asynchronous_metrics LIMIT 10;