# 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 mid-middleware custom-custom monitoring os-operating system monitoring
category: program
# The monitoring type eg: linux windows tomcat mysql aws...
app: dynamic_tp
# The monitoring i18n name
name:
zh-CN: DynamicTp 线程池
en-US: DynamicTp Pool
# The description and help of this monitoring type
help:
zh-CN: HertzBeat 对 DynamicTp actuator 暴露的线程池性能指标(thread pool)进行采集监控。
注意⚠️:您需要集成使用 DynamicTp,点击查看集成步骤。
en-US: HertzBeat monitoring DynamicTp of the thread Pool Performance Metrics which exposed by DynamicTp actuator.
Note⚠️:You should integrate and use DynamicTp, Click here to view the specific steps."
zh-TW: HertzBeat 對 DynamicTp actuator暴露的執行緒池性能指標(thread pool)進行採集監控。
注意⚠️:您需要集成使用DynamicTp,點擊查看集成步驟。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/dynamic_tp/
en-US: https://hertzbeat.apache.org/docs/help/dynamic_tp/
# Input params define for monitoring(render web ui by the definition)
params:
# field-param field key
- field: host
# name-param field display i18n name
name:
zh-CN: 目标Host
en-US: Target Host
# type-param field type(most mapping the html input type)
type: host
# required-true or false
required: true
# field-param field key
- field: port
# name-param field display i18n name
name:
zh-CN: 端口
en-US: Port
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
range: '[0,65535]'
# required-true or false
required: true
# default value
defaultValue: 8080
# field-param field key
- field: ssl
# name-param field display i18n name
name:
zh-CN: 启动SSL
en-US: SSL
# type-param field type(most mapping the html input type)
type: boolean
# required-true or false
required: false
# field-param field key
- field: base_path
# name-param field display i18n name
name:
zh-CN: Base Path
en-US: Base Path
# type-param field type(most mapping the html input type)
type: text
# default value
defaultValue: /actuator
# required-true or false
required: true
# hide-is hide this field and put it in advanced layout
hide: true
# collect metrics config list
metrics:
# metrics - thread_pool
- name: thread_pool
i18n:
zh-CN: 线程池
en-US: thread pool
# 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
# collect metrics content
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: pool_name
i18n:
zh-CN: 池名称
en-US: pool name
type: 1
label: true
- field: queue_type
i18n:
zh-CN: 队列类型
en-US: queue type
type: 1
- field: core_pool_size
i18n:
zh-CN: 核心线程数
en-US: core pool size
type: 0
- field: maximum_pool_size
i18n:
zh-CN: 最大线程数
en-US: maximum pool size
type: 0
- field: fair
i18n:
zh-CN: 公平
en-US: fair
type: 1
- field: reject_handler_name
type: 1
i18n:
zh-CN: 拒绝策略
en-US: reject handler name
- field: dynamic
i18n:
zh-CN: 动态
en-US: dynamic
type: 1
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- poolName
- corePoolSize
- maximumPoolSize
- queueType
- fair
- rejectHandlerName
- dynamic
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
calculates:
- pool_name=poolName
- core_pool_size=corePoolSize
- maximum_pool_size=maximumPoolSize
- queue_type=queueType
- fair=fair
- reject_handler_name=rejectHandlerName
- dynamic=dynamic
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# the config content when protocol is http
http:
# http host: ipv4 ipv6 domain
host: ^_^host^_^
# http port
port: ^_^port^_^
# url request interface path
url: ^_^base_path^_^/dynamic-tp
# http method: GET POST PUT DELETE PATCH
method: GET
# Whether to enable ssl/tls, that is, http or https, the default is false
ssl: ^_^ssl^_^
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
parseType: jsonPath
# http response data parse script
parseScript: '$.*'
- name: thread_pool_running
i18n:
zh-CN: 运行中的线程池
en-US: thread pool running
priority: 1
fields:
- field: pool_name
i18n:
zh-CN: 池名称
en-US: pool name
type: 1
label: true
- field: queue_capacity
i18n:
zh-CN: 队列容量
en-US: queue capacity
type: 0
unit: MB
- field: queue_size
i18n:
zh-CN: 队列大小
en-US: queue size
type: 0
- field: queue_remaining_capacity
i18n:
zh-CN: 队列剩余容量
en-US: queue remaining capacity
type: 0
unit: MB
- field: active_count
i18n:
zh-CN: 活动线程数
en-US: active count
type: 0
- field: task_count
i18n:
zh-CN: 任务数
en-US: task count
type: 0
- field: completed_task_count
i18n:
zh-CN: 完成的任务数
en-US: completed task count
type: 0
- field: largest_pool_size
i18n:
zh-CN: 最大线程数
en-US: largest pool size
type: 0
- field: pool_size
i18n:
zh-CN: 线程池大小
en-US: pool size
type: 0
- field: wait_task_count
i18n:
zh-CN: 等待任务数
en-US: wait task count
type: 0
- field: reject_count
i18n:
zh-CN: 拒绝数
en-US: reject count
type: 0
- field: run_timeout_count
i18n:
zh-CN: 运行超时数
en-US: run timeout count
type: 0
- field: queue_timeout_count
i18n:
zh-CN: 队列超时数
en-US: queue timeout count
type: 0
aliasFields:
- poolName
- queueCapacity
- queueSize
- queueRemainingCapacity
- activeCount
- taskCount
- completedTaskCount
- largestPoolSize
- poolSize
- waitTaskCount
- rejectCount
- runTimeoutCount
- queueTimeoutCount
calculates:
- pool_name=poolName
- queue_capacity=queueCapacity
- queue_size=queueSize
- queue_remaining_capacity=queueRemainingCapacity
- active_count=activeCount
- task_count=taskCount
- completed_task_count=completedTaskCount
- largest_pool_size=largestPoolSize
- pool_size=poolSize
- wait_task_count=waitTaskCount
- reject_count=rejectCount
- run_timeout_count=runTimeoutCount
- queue_timeout_count=queueTimeoutCount
units:
- queue_capacity=B->MB
- queue_remaining_capacity=B->MB
protocol: http
http:
host: ^_^host^_^
port: ^_^port^_^
url: ^_^base_path^_^/dynamic-tp
method: GET
ssl: ^_^ssl^_^
parseType: jsonPath
parseScript: '$.*'