Skip to content

Commit

Permalink
Merge branch '0819-yuluo/test-1' of https://github.com/yuluo-yx/hertz…
Browse files Browse the repository at this point in the history
…beat into 0819-yuluo/test-1
  • Loading branch information
yuluo-yx committed Aug 11, 2024
2 parents 3740f07 + 593f3f4 commit 5cfc86a
Show file tree
Hide file tree
Showing 7 changed files with 396 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-dynamic_tp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ category: program
app: dynamic_tp
# The monitoring i18n name
name:
zh-CN: DynamicTp线程池
zh-CN: DynamicTp 线程池
en-US: DynamicTp Pool
# The description and help of this monitoring type
help:
Expand Down
111 changes: 111 additions & 0 deletions manager/src/main/resources/define/app-emqx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ metrics:
parseScript: '$'

- name: metrics
i18n:
zh-CN: 指标
en-US: Metrics
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
priority: 1
Expand All @@ -170,30 +173,69 @@ metrics:
# metrics content contains field-metric name, type-metric type:0-number,1-string, instance-if is metrics, unit-metric unit('%','ms','MB')
- field: client_connected
type: 0
i18n:
zh-CN: 客户端连接
en-US: Client Connected
- field: client_disconnected
type: 0
i18n:
zh-CN: 客户端断开
en-US: Client Disconnected
- field: packets_sent
type: 0
i18n:
zh-CN: 发送数据包
en-US: Packets Sent
- field: packets_received
type: 0
i18n:
zh-CN: 接收数据包
en-US: Packets Received
- field: bytes_sent
type: 0
i18n:
zh-CN: 发送字节
en-US: Bytes Sent
- field: bytes_received
type: 0
i18n:
zh-CN: 接收字节
en-US: Bytes Received
- field: messages_sent
type: 0
i18n:
zh-CN: 发送消息
en-US: Messages Sent
- field: messages_acked
type: 0
i18n:
zh-CN: 消息确认
en-US: Messages Acked
- field: messages_delayed
type: 0
i18n:
zh-CN: 延迟消息
en-US: Messages Delayed
- field: authorization_deny
type: 0
i18n:
zh-CN: 授权拒绝
en-US: Authorization Deny
- field: client_authorize
type: 0
i18n:
zh-CN: 客户端授权
en-US: Client Authorize
- field: session_created
type: 0
i18n:
zh-CN: 会话创建
en-US: Session Created
- field: session_discarded
type: 0
i18n:
zh-CN: 会话丢弃
en-US: Session Discarded
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- client.connected
Expand Down Expand Up @@ -251,53 +293,122 @@ metrics:
parseScript: '$'

- name: stats
i18n:
zh-CN: 统计
en-US: Stats
priority: 2
fields:
# metrics content contains field-metric name, type-metric type:0-number,1-string, instance-if is metrics, unit-metric unit('%','ms','MB')
- field: channels_count
type: 0
i18n:
zh-CN: 通道数
en-US: Channels Count
- field: channels_max
type: 0
i18n:
zh-CN: 通道最大数
en-US: Channels Max
- field: connections_count
type: 0
i18n:
zh-CN: 连接数
en-US: Connections Count
- field: connections_max
type: 0
i18n:
zh-CN: 最大连接数
en-US: Connections Max
- field: delayed_count
type: 0
i18n:
zh-CN: 延迟数
en-US: Delayed Count
- field: delayed_max
type: 0
i18n:
zh-CN: 最大延迟数
en-US: Delayed Max
- field: live_connections_count
type: 0
i18n:
zh-CN: 活动连接数
en-US: Live Connections Count
- field: live_connections_max
type: 0
i18n:
zh-CN: 最大活动连接数
en-US: Live Connections Max
- field: retained_count
type: 0
i18n:
zh-CN: 保留数
en-US: Retained Count
- field: retained_max
type: 0
i18n:
zh-CN: 最大保留数
en-US: Retained Max
- field: sessions_count
type: 0
i18n:
zh-CN: 会话数
en-US: Sessions Count
- field: sessions_max
type: 0
i18n:
zh-CN: 最大会话数
en-US: Sessions Max
- field: suboptions_count
type: 0
i18n:
zh-CN: 订阅选项数
en-US: Suboptions Count
- field: suboptions_max
type: 0
i18n:
zh-CN: 最大订阅选项数
en-US: Suboptions Max
- field: subscribers_count
type: 0
i18n:
zh-CN: 订阅者数
en-US: Subscribers Count
- field: subscribers_max
type: 0
i18n:
zh-CN: 最大订阅者数
en-US: Subscribers Max
- field: subscriptions_count
type: 0
i18n:
zh-CN: 订阅数
en-US: Subscriptions Count
- field: subscriptions_max
type: 0
i18n:
zh-CN: 最大订阅数
en-US: Subscriptions Max
- field: subscriptions_shared_count
type: 0
i18n:
zh-CN: 共享订阅数
en-US: Subscriptions Shared Count
- field: subscriptions_shared_max
type: 0
i18n:
zh-CN: 最大共享订阅数
en-US: Subscriptions Shared Max
- field: topics_count
type: 0
i18n:
zh-CN: 主题数
en-US: Topics Count
- field: topics_max
type: 0
i18n:
zh-CN: 最大主题数
en-US: Topics Max
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- channels.count
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-euleros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ category: os
app: euleros
# The monitoring i18n name
name:
zh-CN: EulerOS操作系统
zh-CN: EulerOS 操作系统
en-US: EulerOS
# The description and help of this monitoring type
help:
Expand Down
66 changes: 66 additions & 0 deletions manager/src/main/resources/define/app-hertzbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ metrics:
# the first metrics summary
# attention: Built-in monitoring metrics contains (responseTime - Response time)
- name: summary
i18n:
zh-CN: 概要信息
en-US: Summary
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
priority: 0
Expand All @@ -96,14 +99,29 @@ metrics:
- field: app
type: 1
label: true
i18n:
zh-CN: 应用
en-US: App
- field: category
type: 1
i18n:
zh-CN: 类别
en-US: Category
- field: status
type: 0
i18n:
zh-CN: 状态
en-US: Status
- field: size
type: 0
i18n:
zh-CN: 数量
en-US: Size
- field: availableSize
type: 0
i18n:
zh-CN: 可用数量
en-US: Available Size
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here
protocol: http
# the config content when protocol is http
Expand Down Expand Up @@ -132,19 +150,37 @@ metrics:
parseScript: '$.data.apps.*'

- name: inner_queue
i18n:
zh-CN: 内部队列
en-US: Inner Queue
priority: 1
fields:
- field: responseTime
type: 0
unit: ms
i18n:
zh-CN: 响应时间
en-US: Response Time
- field: alertDataQueue
type: 0
i18n:
zh-CN: 变更数据队列
en-US: Data Change Queue
- field: metricsDataToAlertQueue
type: 0
i18n:
zh-CN: 指标数据到变更队列
en-US: Metrics Data to Change Queue
- field: metricsDataToPersistentStorageQueue
type: 0
i18n:
zh-CN: 指标数据到持久化队列
en-US: Metrics Data to Persistent Queue
- field: metricsDataToMemoryStorageQueue
type: 0
i18n:
zh-CN: 指标数据到内存存储队列
en-US: Metrics Data to Memory Storage Queue
protocol: http
http:
host: ^_^host^_^
Expand All @@ -163,11 +199,17 @@ metrics:
parseScript: '$.data'

- name: thread_state
i18n:
zh-CN: 线程状态
en-US: Thread State
visible: false
priority: 1
fields:
- field: state
type: 2
i18n:
zh-CN: 状态
en-US: State
protocol: http
http:
host: ^_^host^_^
Expand All @@ -185,12 +227,21 @@ metrics:
parseScript: '$.availableTags[?(@.tag == "state")].values[*]'

- name: threads
i18n:
zh-CN: 线程
en-US: Threads
priority: 3
fields:
- field: state
type: 1
i18n:
zh-CN: 状态
en-US: State
- field: number
type: 0
i18n:
zh-CN: 数量
en-US: Number
aliasFields:
- $.measurements[?(@.statistic == "VALUE")].value
calculates:
Expand All @@ -213,11 +264,17 @@ metrics:
parseScript: '$'

- name: space_name
i18n:
zh-CN: 空间名称
en-US: Space Name
visible: false
priority: 4
fields:
- field: id
type: 1
i18n:
zh-CN: ID
en-US: ID
protocol: http
http:
host: ^_^host^_^
Expand All @@ -235,13 +292,22 @@ metrics:
parseScript: '$.availableTags[?(@.tag == "id")].values[*]'

- name: memory_used
i18n:
zh-CN: 内存使用
en-US: Memory Used
priority: 5
fields:
- field: space
type: 1
i18n:
zh-CN: 空间
en-US: Space
- field: mem_used
type: 0
unit: MB
i18n:
zh-CN: 已使用内存
en-US: Used Memory
aliasFields:
- $.measurements[?(@.statistic == "VALUE")].value
calculates:
Expand Down
Loading

0 comments on commit 5cfc86a

Please sign in to comment.