Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
fea9ce36
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
fea9ce36
编写于
10月 29, 2021
作者:
W
wankai123
提交者:
GitHub
10月 29, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace e2e cases to e2e-v2: Alarm (#8036)
上级
c9b28e4d
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
981 addition
and
5 deletion
+981
-5
.github/workflows/e2e.alarm.yaml
.github/workflows/e2e.alarm.yaml
+8
-5
CHANGES.md
CHANGES.md
+1
-0
test/e2e-v2/cases/alarm/alarm-cases.yaml
test/e2e-v2/cases/alarm/alarm-cases.yaml
+41
-0
test/e2e-v2/cases/alarm/alarm-settings.yml
test/e2e-v2/cases/alarm/alarm-settings.yml
+49
-0
test/e2e-v2/cases/alarm/es/docker-compose.yml
test/e2e-v2/cases/alarm/es/docker-compose.yml
+59
-0
test/e2e-v2/cases/alarm/es/e2e.yaml
test/e2e-v2/cases/alarm/es/e2e.yaml
+47
-0
test/e2e-v2/cases/alarm/expected/service.yml
test/e2e-v2/cases/alarm/expected/service.yml
+20
-0
test/e2e-v2/cases/alarm/expected/silence-after-graphql-critical.yml
...2/cases/alarm/expected/silence-after-graphql-critical.yml
+65
-0
test/e2e-v2/cases/alarm/expected/silence-after-graphql-warn.yml
...2e-v2/cases/alarm/expected/silence-after-graphql-warn.yml
+65
-0
test/e2e-v2/cases/alarm/expected/silence-after-webhook.yml
test/e2e-v2/cases/alarm/expected/silence-after-webhook.yml
+70
-0
test/e2e-v2/cases/alarm/expected/silence-before-graphql-critical.yml
.../cases/alarm/expected/silence-before-graphql-critical.yml
+42
-0
test/e2e-v2/cases/alarm/expected/silence-before-graphql-warn.yml
...e-v2/cases/alarm/expected/silence-before-graphql-warn.yml
+42
-0
test/e2e-v2/cases/alarm/expected/silence-before-webhook.yml
test/e2e-v2/cases/alarm/expected/silence-before-webhook.yml
+44
-0
test/e2e-v2/cases/alarm/h2/docker-compose.yml
test/e2e-v2/cases/alarm/h2/docker-compose.yml
+60
-0
test/e2e-v2/cases/alarm/h2/e2e.yaml
test/e2e-v2/cases/alarm/h2/e2e.yaml
+47
-0
test/e2e-v2/cases/alarm/influxdb/docker-compose.yml
test/e2e-v2/cases/alarm/influxdb/docker-compose.yml
+57
-0
test/e2e-v2/cases/alarm/influxdb/e2e.yaml
test/e2e-v2/cases/alarm/influxdb/e2e.yaml
+47
-0
test/e2e-v2/cases/alarm/mysql/docker-compose.yml
test/e2e-v2/cases/alarm/mysql/docker-compose.yml
+62
-0
test/e2e-v2/cases/alarm/mysql/e2e.yaml
test/e2e-v2/cases/alarm/mysql/e2e.yaml
+47
-0
test/e2e-v2/cases/alarm/postgres/docker-compose.yml
test/e2e-v2/cases/alarm/postgres/docker-compose.yml
+61
-0
test/e2e-v2/cases/alarm/postgres/e2e.yaml
test/e2e-v2/cases/alarm/postgres/e2e.yaml
+47
-0
未找到文件。
.github/workflows/e2e.alarm.yaml
浏览文件 @
fea9ce36
...
...
@@ -38,9 +38,12 @@ jobs:
runs-on
:
ubuntu-latest
strategy
:
matrix
:
storage
:
[
'
h2'
,
'
mysql'
,
'
es6'
,
'
es7'
,
'
influxdb'
,
'
postgres'
]
env
:
SW_STORAGE
:
${{ matrix.storage }}
config-file
:
-
alarm/h2/e2e.yaml
-
alarm/es/e2e.yaml
-
alarm/mysql/e2e.yaml
-
alarm/influxdb/e2e.yaml
-
alarm/postgres/e2e.yaml
steps
:
-
uses
:
actions/checkout@v2
with
:
...
...
@@ -49,6 +52,6 @@ jobs:
uses
:
./.github/actions/skip
-
name
:
Run E2E Test
if
:
env.SKIP_CI != 'true'
uses
:
./.github/actions/e2e-test
uses
:
./.github/actions/
infra-
e2e-test
with
:
test_class
:
org.apache.skywalking.e2e.alarm.AlarmE2E
config-file
:
${{ matrix.config-file }}
CHANGES.md
浏览文件 @
fea9ce36
...
...
@@ -27,6 +27,7 @@ Release Notes.
-
Client-JS
-
Istio: ALS, Metrics
-
TTL
-
Alarm
*
Support JDK 16 and 17.
#### OAP Server
...
...
test/e2e-v2/cases/alarm/alarm-cases.yaml
0 → 100644
浏览文件 @
fea9ce36
# 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.
cases
:
# service list
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
expected
:
expected/service.yml
# before silence alarm list WARNING,receivers=lisi
-
query
:
|
sleep 5;
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql alarm ls --tags level=WARNING,receivers=lisi
expected
:
expected/silence-before-graphql-warn.yml
# before silence alarm list level=CRITICAL,receivers=zhangsan
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql alarm ls --tags level=CRITICAL,receivers=zhangsan
expected
:
expected/silence-before-graphql-critical.yml
# before silence webhook
-
query
:
curl -s -XPOST http://${provider_host}:${provider_9090}/alarm/read
expected
:
expected/silence-before-webhook.yml
# after silence alarm list WARNING,receivers=lisi
-
query
:
|
sleep 30;
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql alarm ls --tags level=WARNING,receivers=lisi
expected
:
expected/silence-after-graphql-warn.yml
# after silence alarm list level=CRITICAL,receivers=zhangsan
-
query
:
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql alarm ls --tags level=CRITICAL,receivers=zhangsan
expected
:
expected/silence-after-graphql-critical.yml
# after silence webhook
-
query
:
curl -s -XPOST http://${provider_host}:${provider_9090}/alarm/read
expected
:
expected/silence-after-webhook.yml
test/e2e-v2/cases/alarm/alarm-settings.yml
0 → 100755
浏览文件 @
fea9ce36
# 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.
rules
:
# service response time > 10ms
service_resp_time_rule
:
metrics-name
:
service_resp_time
op
:
"
>"
threshold
:
10
period
:
10
count
:
1
silence-period
:
1
message
:
Response time of service {name} is more than 10ms in 1 minutes of last 10 minutes.
only-as-condition
:
false
tags
:
level
:
WARNING
receivers
:
lisi
# service sla > 1%
service_sla_rule
:
metrics-name
:
service_sla
op
:
"
>"
threshold
:
100
period
:
10
count
:
1
silence-period
:
1
message
:
Successful rate of service {name} is more than 1% in 1 minutes of last 10 minutes
only-as-condition
:
true
composite-rules
:
comp_rule
:
expression
:
service_resp_time_rule && service_sla_rule
message
:
Service {name} response time is more than 10ms and sla is more than 1%.
tags
:
level
:
CRITICAL
receivers
:
zhangsan
webhooks
:
-
http://provider:9090/alarm/receive
test/e2e-v2/cases/alarm/es/docker-compose.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
version
:
'
2.1'
services
:
es
:
image
:
elastic/elasticsearch:7.15.0
expose
:
-
9200
networks
:
-
e2e
environment
:
-
discovery.type=single-node
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/9200"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
elasticsearch
SW_SEARCHABLE_ALARM_TAG_KEYS
:
level,receivers
ports
:
-
12800
depends_on
:
es
:
condition
:
service_healthy
volumes
:
-
../alarm-settings.yml:/skywalking/config/alarm-settings.yml
provider
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
provider
ports
:
-
9090
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/alarm/es/e2e.yaml
0 → 100644
浏览文件 @
fea9ce36
# 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.
# This file is used to show how to write configuration files and can be used to test.
setup
:
env
:
compose
file
:
docker-compose.yml
timeout
:
1200
init-system-environment
:
../../../script/env
steps
:
-
name
:
install yq
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-
name
:
install swctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
trigger
:
action
:
http
interval
:
3s
times
:
10
url
:
http://${provider_host}:${provider_9090}/users
method
:
POST
body
:
'
{"id":"123","name":"skywalking"}'
headers
:
"
Content-Type"
:
"
application/json"
verify
:
retry
:
count
:
20
interval
:
3s
cases
:
-
includes
:
-
../alarm-cases.yaml
test/e2e-v2/cases/alarm/expected/service.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
{{
- contains .
}}
-
id
:
{{
b64enc "e2e-service-provider"
}}
.1
name
:
e2e-service-provider
group
:
"
"
{{
- end
}}
test/e2e-v2/cases/alarm/expected/silence-after-graphql-critical.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
msgs
:
{{
- contains .msgs
}}
-
starttime
:
{{
gt .starttime 0
}}
scope
:
Service
id
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
message
:
Service e2e-service-provider response time is more than 10ms and sla is more than 1%.
tags
:
-
key
:
level
value
:
CRITICAL
-
key
:
receivers
value
:
zhangsan
events
:
{{
- contains .events
}}
-
uuid
:
{{
notEmpty .uuid
}}
source
:
service
:
e2e-service-provider
serviceinstance
:
"
"
endpoint
:
"
"
name
:
Alarm
type
:
"
"
message
:
{{
notEmpty .message
}}
parameters
:
[]
starttime
:
{{
gt .starttime 0
}}
endtime
:
{{
gt .endtime 0
}}
{{
- end
}}
-
starttime
:
{{
gt .starttime 0
}}
scope
:
Service
id
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
message
:
Service e2e-service-provider response time is more than 10ms and sla is more than 1%.
tags
:
-
key
:
level
value
:
CRITICAL
-
key
:
receivers
value
:
zhangsan
events
:
{{
- contains .events
}}
-
uuid
:
{{
notEmpty .uuid
}}
source
:
service
:
e2e-service-provider
serviceinstance
:
"
"
endpoint
:
"
"
name
:
Alarm
type
:
"
"
message
:
{{
notEmpty .message
}}
parameters
:
[]
starttime
:
{{
gt .starttime 0
}}
endtime
:
{{
gt .endtime 0
}}
{{
- end
}}
{{
- end
}}
total
:
{{
gt .total 1
}}
test/e2e-v2/cases/alarm/expected/silence-after-graphql-warn.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
msgs
:
{{
- contains .msgs
}}
-
starttime
:
{{
gt .starttime 0
}}
scope
:
Service
id
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
message
:
Response time of service e2e-service-provider is more than 10ms in 1 minutes of last 10 minutes.
tags
:
-
key
:
level
value
:
WARNING
-
key
:
receivers
value
:
lisi
events
:
{{
- contains .events
}}
-
uuid
:
{{
notEmpty .uuid
}}
source
:
service
:
e2e-service-provider
serviceinstance
:
"
"
endpoint
:
"
"
name
:
Alarm
type
:
"
"
message
:
{{
notEmpty .message
}}
parameters
:
[]
starttime
:
{{
gt .starttime 0
}}
endtime
:
{{
gt .endtime 0
}}
{{
- end
}}
-
starttime
:
{{
gt .starttime 0
}}
scope
:
Service
id
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
message
:
Response time of service e2e-service-provider is more than 10ms in 1 minutes of last 10 minutes.
tags
:
-
key
:
level
value
:
WARNING
-
key
:
receivers
value
:
lisi
events
:
{{
- contains .events
}}
-
uuid
:
{{
notEmpty .uuid
}}
source
:
service
:
e2e-service-provider
serviceinstance
:
"
"
endpoint
:
"
"
name
:
Alarm
type
:
"
"
message
:
{{
notEmpty .message
}}
parameters
:
[]
starttime
:
{{
gt .starttime 0
}}
endtime
:
{{
gt .endtime 0
}}
{{
- end
}}
{{
- end
}}
total
:
{{
gt .total 1
}}
test/e2e-v2/cases/alarm/expected/silence-after-webhook.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
messages
:
{{
- contains .messages
}}
-
scopeId
:
1
scope
:
SERVICE
name
:
e2e-service-provider
id0
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
id1
:
"
"
ruleName
:
service_resp_time_rule
alarmMessage
:
Response time of service e2e-service-provider is more than 10ms in 1 minutes of last 10 minutes.
startTime
:
{{
gt .startTime 0
}}
tags
:
-
key
:
level
value
:
WARNING
-
key
:
receivers
value
:
lisi
-
scopeId
:
1
scope
:
SERVICE
name
:
e2e-service-provider
id0
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
id1
:
"
"
ruleName
:
comp_rule
alarmMessage
:
Service e2e-service-provider response time is more than 10ms and sla is more than 1%.
startTime
:
{{
gt .startTime 0
}}
tags
:
-
key
:
level
value
:
CRITICAL
-
key
:
receivers
value
:
zhangsan
-
scopeId
:
1
scope
:
SERVICE
name
:
e2e-service-provider
id0
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
id1
:
"
"
ruleName
:
service_resp_time_rule
alarmMessage
:
Response time of service e2e-service-provider is more than 10ms in 1 minutes of last 10 minutes.
startTime
:
{{
gt .startTime 0
}}
tags
:
-
key
:
level
value
:
WARNING
-
key
:
receivers
value
:
lisi
-
scopeId
:
1
scope
:
SERVICE
name
:
e2e-service-provider
id0
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
id1
:
"
"
ruleName
:
comp_rule
alarmMessage
:
Service e2e-service-provider response time is more than 10ms and sla is more than 1%.
startTime
:
{{
gt .startTime 0
}}
tags
:
-
key
:
level
value
:
CRITICAL
-
key
:
receivers
value
:
zhangsan
{{
- end
}}
test/e2e-v2/cases/alarm/expected/silence-before-graphql-critical.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
msgs
:
{{
- contains .msgs
}}
-
starttime
:
{{
gt .starttime 0
}}
scope
:
Service
id
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
message
:
Service e2e-service-provider response time is more than 10ms and sla is more than 1%.
tags
:
-
key
:
level
value
:
CRITICAL
-
key
:
receivers
value
:
zhangsan
events
:
{{
- contains .events
}}
-
uuid
:
{{
notEmpty .uuid
}}
source
:
service
:
e2e-service-provider
serviceinstance
:
"
"
endpoint
:
"
"
name
:
Alarm
type
:
"
"
message
:
{{
notEmpty .message
}}
parameters
:
[]
starttime
:
{{
gt .starttime 0
}}
endtime
:
{{
gt .endtime 0
}}
{{
- end
}}
{{
- end
}}
total
:
1
test/e2e-v2/cases/alarm/expected/silence-before-graphql-warn.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
msgs
:
{{
- contains .msgs
}}
-
starttime
:
{{
gt .starttime 0
}}
scope
:
Service
id
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
message
:
Response time of service e2e-service-provider is more than 10ms in 1 minutes of last 10 minutes.
tags
:
-
key
:
level
value
:
WARNING
-
key
:
receivers
value
:
lisi
events
:
{{
- contains .events
}}
-
uuid
:
{{
notEmpty .uuid
}}
source
:
service
:
e2e-service-provider
serviceinstance
:
"
"
endpoint
:
"
"
name
:
Alarm
type
:
"
"
message
:
{{
notEmpty .message
}}
parameters
:
[]
starttime
:
{{
gt .starttime 0
}}
endtime
:
{{
gt .endtime 0
}}
{{
- end
}}
{{
- end
}}
total
:
1
test/e2e-v2/cases/alarm/expected/silence-before-webhook.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
messages
:
{{
- contains .messages
}}
-
scopeId
:
1
scope
:
SERVICE
name
:
e2e-service-provider
id0
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
id1
:
"
"
ruleName
:
service_resp_time_rule
alarmMessage
:
Response time of service e2e-service-provider is more than 10ms in 1 minutes of last 10 minutes.
startTime
:
{{
gt .startTime 0
}}
tags
:
-
key
:
level
value
:
WARNING
-
key
:
receivers
value
:
lisi
-
scopeId
:
1
scope
:
SERVICE
name
:
e2e-service-provider
id0
:
ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1
id1
:
"
"
ruleName
:
comp_rule
alarmMessage
:
Service e2e-service-provider response time is more than 10ms and sla is more than 1%.
startTime
:
{{
gt .startTime 0
}}
tags
:
-
key
:
level
value
:
CRITICAL
-
key
:
receivers
value
:
zhangsan
{{
- end
}}
test/e2e-v2/cases/alarm/h2/docker-compose.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
version
:
'
2.1'
services
:
h2db
:
build
:
context
:
.
dockerfile
:
../../../script/dockerfile/Dockerfile.h2
networks
:
-
e2e
expose
:
-
1521
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-z
127.0.0.1
1521"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
h2
SW_STORAGE_H2_URL
:
jdbc:h2:tcp://h2db:1521/skywalking-oap-db
SW_SEARCHABLE_ALARM_TAG_KEYS
:
level,receivers
ports
:
-
12800
depends_on
:
h2db
:
condition
:
service_healthy
volumes
:
-
../alarm-settings.yml:/skywalking/config/alarm-settings.yml
provider
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
provider
ports
:
-
9090
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/alarm/h2/e2e.yaml
0 → 100644
浏览文件 @
fea9ce36
# 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.
# This file is used to show how to write configuration files and can be used to test.
setup
:
env
:
compose
file
:
docker-compose.yml
timeout
:
1200
init-system-environment
:
../../../script/env
steps
:
-
name
:
install yq
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-
name
:
install swctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
trigger
:
action
:
http
interval
:
3s
times
:
10
url
:
http://${provider_host}:${provider_9090}/users
method
:
POST
body
:
'
{"id":"123","name":"skywalking"}'
headers
:
"
Content-Type"
:
"
application/json"
verify
:
retry
:
count
:
20
interval
:
3s
cases
:
-
includes
:
-
../alarm-cases.yaml
test/e2e-v2/cases/alarm/influxdb/docker-compose.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
version
:
'
2.1'
services
:
influxdb
:
image
:
influxdb:1.7.9
expose
:
-
8086
networks
:
-
e2e
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/8086"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
influxdb
SW_SEARCHABLE_ALARM_TAG_KEYS
:
level,receivers
ports
:
-
12800
depends_on
:
influxdb
:
condition
:
service_healthy
volumes
:
-
../alarm-settings.yml:/skywalking/config/alarm-settings.yml
provider
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
provider
ports
:
-
9090
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/alarm/influxdb/e2e.yaml
0 → 100644
浏览文件 @
fea9ce36
# 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.
# This file is used to show how to write configuration files and can be used to test.
setup
:
env
:
compose
file
:
docker-compose.yml
timeout
:
1200
init-system-environment
:
../../../script/env
steps
:
-
name
:
install yq
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-
name
:
install swctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
trigger
:
action
:
http
interval
:
3s
times
:
10
url
:
http://${provider_host}:${provider_9090}/users
method
:
POST
body
:
'
{"id":"123","name":"skywalking"}'
headers
:
"
Content-Type"
:
"
application/json"
verify
:
retry
:
count
:
20
interval
:
3s
cases
:
-
includes
:
-
../alarm-cases.yaml
test/e2e-v2/cases/alarm/mysql/docker-compose.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
version
:
'
2.1'
services
:
mysql
:
image
:
mysql/mysql-server:8.0.13
networks
:
-
e2e
expose
:
-
3306
environment
:
-
MYSQL_ROOT_PASSWORD=root@1234
-
MYSQL_DATABASE=swtest
-
MYSQL_ROOT_HOST=%
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/3306"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
mysql
SW_SEARCHABLE_ALARM_TAG_KEYS
:
level,receivers
entrypoint
:
[
'
sh'
,
'
-c'
,
'
apk
add
--no-cache
bash
&&
/download-mysql.sh
&&
/skywalking/docker-entrypoint.sh'
]
ports
:
-
12800
depends_on
:
mysql
:
condition
:
service_healthy
volumes
:
-
../alarm-settings.yml:/skywalking/config/alarm-settings.yml
provider
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
provider
ports
:
-
9090
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/alarm/mysql/e2e.yaml
0 → 100644
浏览文件 @
fea9ce36
# 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.
# This file is used to show how to write configuration files and can be used to test.
setup
:
env
:
compose
file
:
docker-compose.yml
timeout
:
1200
init-system-environment
:
../../../script/env
steps
:
-
name
:
install yq
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-
name
:
install swctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
trigger
:
action
:
http
interval
:
3s
times
:
10
url
:
http://${provider_host}:${provider_9090}/users
method
:
POST
body
:
'
{"id":"123","name":"skywalking"}'
headers
:
"
Content-Type"
:
"
application/json"
verify
:
retry
:
count
:
20
interval
:
3s
cases
:
-
includes
:
-
../alarm-cases.yaml
test/e2e-v2/cases/alarm/postgres/docker-compose.yml
0 → 100644
浏览文件 @
fea9ce36
# 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.
version
:
'
2.1'
services
:
postgres
:
image
:
postgres:13
networks
:
-
e2e
expose
:
-
5432
environment
:
-
POSTGRES_PASSWORD=123456
-
POSTGRES_DB=skywalking
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/5432"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
postgresql
SW_JDBC_URL
:
"
jdbc:postgresql://postgres:5432/skywalking"
SW_SEARCHABLE_ALARM_TAG_KEYS
:
level,receivers
ports
:
-
12800
depends_on
:
postgres
:
condition
:
service_healthy
volumes
:
-
../alarm-settings.yml:/skywalking/config/alarm-settings.yml
provider
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
provider
ports
:
-
9090
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/alarm/postgres/e2e.yaml
0 → 100644
浏览文件 @
fea9ce36
# 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.
# This file is used to show how to write configuration files and can be used to test.
setup
:
env
:
compose
file
:
docker-compose.yml
timeout
:
1200
init-system-environment
:
../../../script/env
steps
:
-
name
:
install yq
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-
name
:
install swctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
trigger
:
action
:
http
interval
:
3s
times
:
10
url
:
http://${provider_host}:${provider_9090}/users
method
:
POST
body
:
'
{"id":"123","name":"skywalking"}'
headers
:
"
Content-Type"
:
"
application/json"
verify
:
retry
:
count
:
20
interval
:
3s
cases
:
-
includes
:
-
../alarm-cases.yaml
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录