Replace e2e cases to e2e-v2: Alarm (#8036)
This commit is contained in:
parent
c9b28e4d00
commit
fea9ce366c
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ Release Notes.
|
|||
- Client-JS
|
||||
- Istio: ALS, Metrics
|
||||
- TTL
|
||||
- Alarm
|
||||
* Support JDK 16 and 17.
|
||||
|
||||
#### OAP Server
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
# 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:
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# 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 }}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
# 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 }}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
# 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 }}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
# 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 }}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
# 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 }}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
# 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:
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
# 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:
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
# 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:
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
# 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:
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
# 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
|
||||
Loading…
Reference in New Issue