-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
manager/src/main/resources/define/app/app-clickhouse.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
# 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 | ||
# 参数映射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 | ||
- key: keyword | ||
type: 1 | ||
# 指标组列表 | ||
metrics: | ||
- name: system.metrics | ||
priority: 1 | ||
fields: | ||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 | ||
- field: metric | ||
type: 1 | ||
- field: value | ||
type: 0 | ||
# - field: description | ||
# type: 1 | ||
# (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换 | ||
aliasFields: | ||
- metric | ||
- value | ||
# - description | ||
# (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值 | ||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime | ||
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: system.events | ||
priority: 2 | ||
fields: | ||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 | ||
- field: event | ||
type: 1 | ||
- field: value | ||
type: 0 | ||
# - field: description | ||
# type: 1 | ||
# (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换 | ||
aliasFields: | ||
- event | ||
- value | ||
# - description | ||
# (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值 | ||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime | ||
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.metrics | ||
priority: 3 | ||
fields: | ||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 | ||
- field: metric | ||
type: 1 | ||
- field: value | ||
type: 0 | ||
# - field: description | ||
# type: 1 | ||
# (非必须)监控指标别名,与上面的指标名映射。用于采集接口数据字段不直接是最终指标名称,需要此别名做映射转换 | ||
aliasFields: | ||
- metric | ||
- value | ||
# - description | ||
# (非必须)指标计算表达式,与上面的别名一起作用,计算出最终需要的指标值 | ||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime | ||
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; |
73 changes: 73 additions & 0 deletions
73
manager/src/main/resources/define/param/param-clickhouse.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# 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. | ||
|
||
app: clickhouse | ||
param: | ||
- field: host | ||
name: | ||
zh-CN: 主机Host | ||
en-US: Host | ||
type: host | ||
required: true | ||
- field: port | ||
name: | ||
zh-CN: 端口 | ||
en-US: Port | ||
type: number | ||
range: '[0,65535]' | ||
required: true | ||
defaultValue: 3306 | ||
- 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 | ||
- field: url | ||
name: | ||
zh-CN: URL | ||
en-US: URL | ||
type: text | ||
required: false | ||
hide: true | ||
- field: keyword | ||
name: | ||
zh-CN: 关键字计数 | ||
en-US: Keyword Num | ||
type: text | ||
placeholder: 'Input Keyword' | ||
required: false | ||
hide: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters