Skip to content

Commit

Permalink
[script] update monitoring app define yml (#826)
Browse files Browse the repository at this point in the history
* [script] update app define yml

* [script] update app define yml
  • Loading branch information
tomsun28 authored Apr 1, 2023
1 parent d003b61 commit d9ffaed
Show file tree
Hide file tree
Showing 29 changed files with 933 additions and 481 deletions.
8 changes: 7 additions & 1 deletion manager/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ spring:
template-resolver-order: 1

management:
health:
mail:
enabled: off
endpoints:
web:
exposure:
include: 'metrics'
include:
- 'metrics'
- 'health'
- 'env'
enabled-by-default: on

sureness:
Expand Down
2 changes: 1 addition & 1 deletion manager/src/main/resources/define/app-a_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ params:
defaultValue: 80
# 参数输入框提示信息
# param field input placeholder
placeholder: '请输入端口'
placeholder: 'Please Input Port'
# field-param field key
# field-变量字段标识符
- field: username
Expand Down
19 changes: 0 additions & 19 deletions manager/src/main/resources/define/app-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,53 +297,34 @@ params:
# 是否隐藏字段 true or false
hide: true

# 指标组列表
metrics:
# 第一个监控指标组 cpu
# 注意:内置监控指标有 (responseTime - 响应时间)
- name: summary
# 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集
# 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度
priority: 0
# 指标组中的具体监控指标
fields:
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
- field: responseTime
type: 0
unit: ms
- field: keyword
type: 0
# 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# 当protocol为http协议时具体的采集配置
http:
# 主机host: ipv4 ipv6 域名
host: ^_^host^_^
# 端口
port: ^_^port^_^
# url请求接口路径
url: ^_^uri^_^
timeout: ^_^timeout^_^
# 请求方式 GET POST PUT DELETE PATCH
method: ^_^method^_^
# 是否启用ssl/tls,即是http还是https,默认false
ssl: ^_^ssl^_^
payload: ^_^payload^_^
# 请求头内容
headers:
content-type: ^_^contentType^_^
^_^headers^_^: ^_^headers^_^
# 请求参数内容
params:
^_^params^_^: ^_^params^_^
# 认证
authorization:
# 认证方式: Basic Auth, Digest Auth, Bearer Token
type: ^_^authType^_^
basicAuthUsername: ^_^username^_^
basicAuthPassword: ^_^password^_^
digestAuthUsername: ^_^username^_^
digestAuthPassword: ^_^password^_^
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-网站可用性指标监控
parseType: website
keyword: ^_^keyword^_^
19 changes: 3 additions & 16 deletions manager/src/main/resources/define/app-api_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ params:
# type-字段类型,样式(大部分映射input标签type属性)
type: text
# required-true or false
# required-是否是必输项 true-必填 false-可选
# required-是否是必输项 true-必填 false-可选
required: true
# default value
# 默认值
Expand Down Expand Up @@ -312,7 +312,7 @@ params:
zh-CN: 认证Token
en-US: Access Token
# type-param field type(most mapping the html input type)
# type-字段类型,样式(大部分映射input标签type属性)
# type-字段类型,样式(大部分映射input标签type属性)
type: text
# required-true or false
# required-是否是必输项 true-必填 false-可选
Expand Down Expand Up @@ -340,17 +340,11 @@ params:
# hide param-true or false
# 是否隐藏字段 true or false
hide: true
# 指标组列表

metrics:
# 第一个监控指标组 cpu
# 注意:内置监控指标有 (responseTime - 响应时间)
- name: status
# 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集
# 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度
priority: 0
# 指标组中的具体监控指标
fields:
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
- field: responseTime
type: 0
unit: ms
Expand All @@ -364,26 +358,19 @@ metrics:
- responseTime=responseTime
protocol: http
http:
# 主机host: ipv4 ipv6 域名
host: ^_^host^_^
# 端口
port: ^_^port^_^
# url请求接口路径
url: ^_^uri^_^
timeout: ^_^timeout^_^
# 请求方式 GET POST PUT DELETE PATCH
method: ^_^method^_^
# 是否启用ssl/tls,即是http还是https,默认false
ssl: ^_^ssl^_^
payload: ^_^payload^_^
# 请求头内容
headers:
content-type: ^_^contentType^_^
^_^headers^_^: ^_^headers^_^
params:
^_^params^_^: ^_^params^_^
authorization:
# 认证方式: Basic Auth, Digest Auth, Bearer Token
type: ^_^authType^_^
basicAuthUsername: ^_^username^_^
basicAuthPassword: ^_^password^_^
Expand Down
Loading

0 comments on commit d9ffaed

Please sign in to comment.