forked from apache/hertzbeat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-api.yml
192 lines (189 loc) · 5.23 KB
/
app-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# 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.
# 此监控类型所属类别:service-应用服务监控 db-数据库监控 custom-自定义监控 os-操作系统监控
category: service
# 监控应用类型名称(与文件名保持一致) eg: linux windows tomcat mysql aws...
app: api
name:
zh-CN: HTTP API
en-US: HTTP API
params:
- 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: 80
- field: method
name:
zh-CN: 请求方式
en-US: Method
type: radio
required: true
options:
- label: GET
value: GET
- label: POST
value: POST
- label: PUT
value: PUT
- label: DELETE
value: DELETE
- field: uri
name:
zh-CN: 相对路径
en-US: URI
type: text
limit: 200
required: false
placeholder: 'Website uri path(no ip port) EG:/v2/book/bar'
- 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
- field: headers
name:
zh-CN: 请求Headers
en-US: Headers
type: key-value
required: false
keyAlias: Header Name
valueAlias: Header Value
- field: params
name:
zh-CN: 查询Params
en-US: Params
type: key-value
required: false
keyAlias: Param Key
valueAlias: Param Value
- field: contentType
name:
zh-CN: Content-Type
en-US: Content-Type
type: text
placeholder: 'Request Body Type'
required: false
hide: true
- field: payload
name:
zh-CN: 请求BODY
en-US: BODY
type: textarea
placeholder: 'Available When POST PUT'
required: false
hide: true
- field: authType
name:
zh-CN: 认证方式
en-US: Auth Type
type: radio
required: false
hide: true
options:
- label: Basic Auth
value: Basic Auth
- label: Digest Auth
value: Digest Auth
- field: username
name:
zh-CN: 用户名
en-US: Username
type: text
limit: 20
required: false
hide: true
- field: password
name:
zh-CN: 密码
en-US: Password
type: password
required: false
hide: true
- field: keyword
name:
zh-CN: 关键字计数
en-US: Keyword Num
type: text
placeholder: 'Input Keyword'
required: 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^_^