This is an automated email from the ASF dual-hosted git repository.
wankai pushed a commit to branch website-docs/9.7.0
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/website-docs/9.7.0 by this
push:
new 772f9a40f5 Add webhook/gRPC hooks settings example for backend-alarm.md
772f9a40f5 is described below
commit 772f9a40f54052defc24f8c6b716f9e9b3fe127c
Author: Wan Kai <[email protected]>
AuthorDate: Thu Jan 4 11:48:52 2024 +0800
Add webhook/gRPC hooks settings example for backend-alarm.md
---
docs/en/setup/backend/backend-alarm.md | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
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: