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` 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` 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: