You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/12/15 01:52:17 UTC
(skywalking) branch master updated: Add webhook/gRPC hooks settings example for backend-alarm.md. (#11658)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new e57dee45fb Add webhook/gRPC hooks settings example for backend-alarm.md. (#11658)
e57dee45fb is described below
commit e57dee45fbb565af224587ea1825ab7e0f83c4c3
Author: Wan Kai <wa...@foxmail.com>
AuthorDate: Fri Dec 15 09:52:12 2023 +0800
Add webhook/gRPC hooks settings example for backend-alarm.md. (#11658)
---
docs/en/changes/changes.md | 1 +
docs/en/setup/backend/backend-alarm.md | 22 ++++++++++++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index f0b7a8bf56..0a2b100a5f 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -20,5 +20,6 @@
* Update the release doc to remove the announcement as the tests are through e2e rather than manually.
* Update the release notification mail a little.
* Polish docs structure. Move customization docs separately from the introduction docs.
+* Add webhook/gRPC hooks settings example for `backend-alarm.md`.
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/202?closed=1)
diff --git a/docs/en/setup/backend/backend-alarm.md b/docs/en/setup/backend/backend-alarm.md
index e87c7b72e7..85360db331 100644
--- a/docs/en/setup/backend/backend-alarm.md
+++ b/docs/en/setup/backend/backend-alarm.md
@@ -163,7 +163,17 @@ hooks:
Currently, SkyWalking supports the following hook types:
### Webhook
-The Webhook requires the peer to be a web container. The alarm message will be sent through HTTP post by `application/json` content type. The JSON format is based on `List<org.apache.skywalking.oap.server.core.alarm.AlarmMessage>` with the following key information:
+The Webhook requires the peer to be a web container. The alarm message will be sent through HTTP post by `application/json` content type after you have set up Webhook hooks as follows:
+```yml
+webhook:
+ default:
+ is-default: true
+ urls:
+ - http://ip:port/xxx
+ - http://ip:port/yyy
+```
+
+The JSON format is based on `List<org.apache.skywalking.oap.server.core.alarm.AlarmMessage>` with the following key information:
- **scopeId**, **scope**. All scopes are defined in `org.apache.skywalking.oap.server.core.source.DefaultScopeDefine`.
- **name**. Target scope entity name. Please follow the [entity name definitions](#entity-name).
- **id0**. The ID of the scope entity that matches with the name. When using the relation scope, it is the source entity ID.
@@ -205,7 +215,15 @@ See the following example:
```
### gRPC
-The alarm message will be sent through remote gRPC method by `Protobuf` content type.
+The alarm message will be sent through remote gRPC method by `Protobuf` content type after you have set up gRPC hooks as follows:
+```yml
+gRPC:
+ default:
+ is-default: true
+ target-host: ip
+ target-port: port
+```
+
The message contains key information which are defined in `oap-server/server-alarm-plugin/src/main/proto/alarm-hook.proto`.
Part of the protocol looks like this: