This is an automated email from the ASF dual-hosted git repository.

gaoxingcun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git


The following commit(s) were added to refs/heads/master by this push:
     new da05b6a15 [feature] Add presto db monitor (#2234)
da05b6a15 is described below

commit da05b6a1515d83b2a6b0e75a3611ad46151b9e43
Author: linDong <[email protected]>
AuthorDate: Mon Jul 8 14:39:38 2024 +0800

    [feature] Add presto db monitor (#2234)
    
    Co-authored-by: 铁甲小宝 <[email protected]>
---
 home/docs/help/prestodb.md                         |  66 +++++
 .../current/help/prestodb.md                       |  64 +++++
 home/sidebars.json                                 |   1 +
 manager/src/main/resources/define/app-prestodb.yml | 277 +++++++++++++++++++++
 4 files changed, 408 insertions(+)

diff --git a/home/docs/help/prestodb.md b/home/docs/help/prestodb.md
new file mode 100644
index 000000000..2616425b2
--- /dev/null
+++ b/home/docs/help/prestodb.md
@@ -0,0 +1,66 @@
+---
+id: presto
+title: Monitoring PrestoDB Atlas Database
+sidebar_label: PrestoDB Atlas Database
+keywords: [ PrestoDB Atlas  monitoring]
+---
+> Collect and monitor general performance metrics of PrestoDB Atlas databases.
+
+### Configuration Parameters
+
+
+| Parameter Name      | Parameter Description                                  
                                                                                
       |
+|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
+| Target Host         | The IP address, IPv4, IPv6, or domain name of the 
target to be monitored. Note: ⚠️ Do not include protocol headers (e.g., 
https://, http://). |
+| port                | Port                                                   
                                                                                
       |
+| Task Name           | The name identifying this monitor, which must be 
unique.                                                                         
             |
+| Connection Timeout  | Timeout for PrestoDB connection when no response is 
received, in milliseconds (ms). Default is 6000 ms.                             
          |
+| Collection Interval | Interval for periodic data collection, in seconds. The 
minimum interval is 30 seconds.                                                 
       |
+| Binding Tags        | Used for categorizing and managing monitoring 
resources.                                                                      
                |
+| Description/Remarks | Additional labels and description for this monitor; 
users can add notes here.                                                       
          |
+
+### Collection Metrics
+
+#### Metric Set: Cluster Status
+
+
+| Metric Name      | Unit | Metric Description              |
+| ---------------- | ---- | ------------------------------- |
+| activeWorkers          | None | Active Workers     |
+| runningQueries       | None | Running Queries          |
+| queuedQueries          | None |  Queued Queries              |
+| blockedQueries        | None | Blocked Queries |
+| runningDrivers | None | Running Drivers|
+| runningTasks | None | Running Tasks |
+
+#### Metric Set:  Node Status
+
+
+| Metric Name | Unit | Metric Description                                |
+| ----------- | ---- | ------------------------------------------------- |
+| nodeId      | None | Node ID                             |
+| nodeVersion      | None | Node Version                             |
+| environment      | None | Environment                                |
+| coordinator       | None | Is Coordinator                       |
+| uptime     | None |Uptime|
+| externalAddress     | None |  External Address                |
+| internalAddress     | None | Internal Address             |
+| processors     | None |Processors              |
+| processCpuLoad     | None | Process CPU Load              |
+| systemCpuLoad     | None | System CPU Load                |
+| heapUsed     | MB | Heap Memory Used               |
+| heapAvailable     | MB | Heap Memory Available               |
+| nonHeapUsed     | MB | Non-Heap Memory Used          |
+
+
+#### Metric Set: Task Query
+
+
+| Metric Name | Unit | Metric Description                                  |
+| ----------- | ---- | --------------------------------------------------- |
+| taskId  | None | Task ID |
+| version  | None | Version                          |
+| state| None | State                          |
+| self| None | Self                                  |
+| lastHeartbeat| None |  Last Heartbeat                                |
+
diff --git 
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/prestodb.md 
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/prestodb.md
new file mode 100644
index 000000000..63840497b
--- /dev/null
+++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/prestodb.md
@@ -0,0 +1,64 @@
+---
+id: presto
+title: 监控:PrestoDB Atlas 数据库
+sidebar_label: PrestoDB Atlas 数据库
+keywords: [ PrestoDB Atlas 监控 ]
+---
+> 对PrestoDB Atlas 的通用性能指标进行采集监控。
+
+### 配置参数
+
+
+| 参数名称   | 参数帮助描述                                      |
+|--------|---------------------------------------------|
+| 目标Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 |
+| 任务名称   | 标识此监控的名称,名称需要保证唯一性。                         |
+| 端口     | 被监控的平台端口。                                   |
+| 连接超时时间 | 设置连接PrestoDB未响应数据时的超时时间,单位ms毫秒,默认6000毫秒。            |
+| 采集间隔   | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒。             |
+| 绑定标签   | 用于对监控资源进行分类管理。                              |
+| 描述备注   | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。                |
+
+### 采集指标
+
+#### 指标集合:集群状态
+
+
+| 指标名称         | 指标单位 | 指标帮助描述                  |
+| ---------------- | -------- | ----------------------------- |
+| activeWorkers          | 无       | 活跃节点数              |
+| runningQueries       | 无       | 运行中的查询数                 |
+| queuedQueries          | 无       | 队列中的查询数                     |
+| blockedQueries        | 无       | 阻塞的查询数     |
+| runningDrivers | 无       | 运行中的驱动数 |
+| runningTasks | 无       | 运行中的任务数 |
+
+
+#### 指标集合:节点状态
+
+
+| 指标名称    | 指标单位 | 指标帮助描述                       |
+| ----------- |------| ---------------------------------- |
+| nodeId    | 无    | 节点ID |
+| nodeVersion  | 无    | 节点版本                       |
+| environment | 无    | 环境                             |
+| coordinator | 无    | 是否为协调节点                             |
+| uptime | 无    | 正常运行时间                             |
+| externalAddress | 无    | 外部地址                            |
+| internalAddress | 无    | 内部地址                             |
+| processors | 无    | 处理器数量                            |
+| processCpuLoad | 无    | 进程CPU负载                            |
+| systemCpuLoad | 无    | 系统CPU负载                            |
+| heapUsed | MB   | 已使用堆内存                            |
+| heapAvailable | MB   | 可用堆内存                            |
+| nonHeapUsed | MB   | 请已使用非堆内存                            |
+
+#### 指标集合: 任务查询
+
+| 指标名称                  | 指标单位 | 指标帮助描述       |
+| ------------------------- | -------- | ------------------ |
+| taskId      | 无       | 任务ID |
+| version    | 无       | 版本       |
+| state | 无       | 状态     |
+| self | 无       | 自身     |
+| lastHeartbeat | 无       | 最后心跳时间     |
diff --git a/home/sidebars.json b/home/sidebars.json
index ea2e285f8..711a6ae5a 100755
--- a/home/sidebars.json
+++ b/home/sidebars.json
@@ -245,6 +245,7 @@
             "help/clickhouse",
             "help/elasticsearch",
             "help/influxdb",
+            "help/presto",
             "help/hugegraph"
           ]
         },
diff --git a/manager/src/main/resources/define/app-prestodb.yml 
b/manager/src/main/resources/define/app-prestodb.yml
new file mode 100644
index 000000000..72ce0f0bf
--- /dev/null
+++ b/manager/src/main/resources/define/app-prestodb.yml
@@ -0,0 +1,277 @@
+# 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.
+
+# The monitoring type category: service-application service monitoring 
db-database monitoring custom-custom monitoring os-operating system monitoring
+category: bigdata
+# The monitoring type eg: linux windows tomcat mysql aws...
+app: prestoDB
+# The app api i18n name
+name:
+  zh-CN: PrestoDB
+  en-US: PrestoDB
+# The description and help of this monitoring type
+help:
+  zh-CN: Hertzbeat 对 PrestoDB 数据库平台的性能指标进行监测。您可以点击“新增 
PrestoDB”按钮并进行配置,或在“更多操作”中导入已有配置。
+  en-US: Hertzbeat monitors performance metrics of the PrestoDB database 
platform. You can click the "Add PrestoDB" button and proceed with the 
configuration or import an existing setup through the "More Actions" menu.
+helpLink:
+  zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/prestodb
+  en-US: https://hertzbeat.apache.org/docs/help/prestodb
+params:
+  - field: host
+    name:
+      zh-CN: 目标Host
+      en-US: Target Host
+    type: host
+    required: true
+  - field: port
+    name:
+      zh-CN: 端口
+      en-US: Port
+    type: number
+    range: '[0,65535]'
+    required: true
+  - field: ssl
+    name:
+      zh-CN: 启用HTTPS
+      en-US: HTTPS
+    type: boolean
+    required: true
+  - field: timeout
+    name:
+      zh-CN: 超时时间(ms)
+      en-US: Timeout(ms)
+    type: number
+    required: false
+    hide: true
+    defaultValue: 6000
+
+metrics:
+  - name: cluster
+    i18n:
+      zh-CN: 集群状态
+      en-US: Cluster Status
+    priority: 0
+    fields:
+      - field: activeWorkers
+        type: 0
+        i18n:
+          zh-CN: 活跃节点数
+          en-US: Active Workers
+      - field: runningQueries
+        type: 0
+        i18n:
+          zh-CN: 运行中的查询数
+          en-US: Running Queries
+      - field: queuedQueries
+        type: 0
+        i18n:
+          zh-CN: 队列中的查询数
+          en-US: Queued Queries
+      - field: blockedQueries
+        type: 0
+        i18n:
+          zh-CN: 阻塞的查询数
+          en-US: Blocked Queries
+      - field: runningDrivers
+        type: 0
+        i18n:
+          zh-CN: 运行中的驱动数
+          en-US: Running Drivers
+      - field: runningTasks
+        type: 0
+        i18n:
+          zh-CN: 运行中的任务数
+          en-US: Running Tasks
+    protocol: http
+    http:
+      host: ^_^host^_^
+      port: ^_^port^_^
+      url: /v1/cluster
+      timeout: ^_^timeout^_^
+      method: GET
+      ssl: ^_^ssl^_^
+      parseType: jsonPath
+      parseScript: '$'
+
+  - name: status
+    i18n:
+      zh-CN: 节点状态
+      en-US: Node Status
+    priority: 0
+    fields:
+      - field: nodeId
+        type: 1
+        i18n:
+          zh-CN: 节点ID
+          en-US: Node ID
+      - field: nodeVersion
+        type: 1
+        i18n:
+          zh-CN: 节点版本
+          en-US: Node Version
+      - field: environment
+        type: 1
+        i18n:
+          zh-CN: 环境
+          en-US: Environment
+      - field: coordinator
+        type: 1
+        i18n:
+          zh-CN: 是否为协调节点
+          en-US: Is Coordinator
+      - field: uptime
+        type: 1
+        i18n:
+          zh-CN: 正常运行时间
+          en-US: Uptime
+      - field: externalAddress
+        type: 1
+        i18n:
+          zh-CN: 外部地址
+          en-US: External Address
+      - field: internalAddress
+        type: 1
+        i18n:
+          zh-CN: 内部地址
+          en-US: Internal Address
+      - field: processors
+        type: 0
+        i18n:
+          zh-CN: 处理器数量
+          en-US: Processors
+      - field: processCpuLoad
+        type: 0
+        i18n:
+          zh-CN: 进程CPU负载
+          en-US: Process CPU Load
+      - field: systemCpuLoad
+        type: 0
+        i18n:
+          zh-CN: 系统CPU负载
+          en-US: System CPU Load
+      - field: heapUsed
+        type: 0
+        i18n:
+          zh-CN: 已使用堆内存
+          en-US: Heap Memory Used
+        unit: MB
+      - field: heapAvailable
+        type: 0
+        i18n:
+          zh-CN: 可用堆内存
+          en-US: Heap Memory Available
+        unit: MB
+      - field: nonHeapUsed
+        type: 0
+        i18n:
+          zh-CN: 已使用非堆内存
+          en-US: Non-Heap Memory Used
+        unit: MB
+    units:
+      - heapUsed=B->MB
+      - heapAvailable=B->MB
+      - nonHeapUsed=B->MB
+    aliasFields:
+      - $.nodeId
+      - $.nodeVersion.version
+      - $.environment
+      - $.coordinator
+      - $.uptime
+      - $.externalAddress
+      - $.internalAddress
+      - $.processors
+      - $.processCpuLoad
+      - $.systemCpuLoad
+      - $.heapUsed
+      - $.heapAvailable
+      - $.nonHeapUsed
+    calculates:
+      - nodeId = $.nodeId
+      - nodeVersion = $.nodeVersion.version
+      - environment = $.environment
+      - coordinator = $.coordinator
+      - uptime = $.uptime
+      - externalAddress = $.externalAddress
+      - internalAddress = $.internalAddress
+      - processors = $.processors
+      - processCpuLoad = $.processCpuLoad
+      - systemCpuLoad = $.systemCpuLoad
+      - heapUsed = $.heapUsed
+      - heapAvailable = $.heapAvailable
+      - nonHeapUsed = $.nonHeapUsed
+    protocol: http
+    http:
+      host: ^_^host^_^
+      port: ^_^port^_^
+      url: /v1/status
+      timeout: ^_^timeout^_^
+      method: GET
+      ssl: ^_^ssl^_^
+      authorization:
+        type: ^_^authType^_^
+        basicAuthUsername: ^_^username^_^
+        basicAuthPassword: ^_^password^_^
+        digestAuthUsername: ^_^username^_^
+        digestAuthPassword: ^_^password^_^
+      parseType: jsonPath
+      parseScript: '$'
+
+  - name: task
+    i18n:
+      zh-CN: 任务查询
+      en-US: Task Query
+    priority: 0
+    fields:
+      - field: taskId
+        type: 1
+        i18n:
+          zh-CN: 任务ID
+          en-US: Task ID
+      - field: version
+        type: 0
+        i18n:
+          zh-CN: 版本
+          en-US: Version
+      - field: state
+        type: 1
+        i18n:
+          zh-CN: 状态
+          en-US: State
+      - field: self
+        type: 1
+        i18n:
+          zh-CN: 自身
+          en-US: Self
+      - field: lastHeartbeat
+        type: 1
+        i18n:
+          zh-CN: 最后心跳时间
+          en-US: Last Heartbeat
+    protocol: http
+    http:
+      host: ^_^host^_^
+      port: ^_^port^_^
+      url: /v1/task
+      timeout: ^_^timeout^_^
+      method: GET
+      ssl: ^_^ssl^_^
+      authorization:
+        type: ^_^authType^_^
+        basicAuthUsername: ^_^username^_^
+        basicAuthPassword: ^_^password^_^
+        digestAuthUsername: ^_^username^_^
+        digestAuthPassword: ^_^password^_^
+      parseType: jsonPath
+      parseScript: '$[*]'


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to