From c5632450481aebfe1530f2c6e93adcb8c9b63c3b Mon Sep 17 00:00:00 2001 From: Zhenxu Date: Thu, 27 May 2021 21:07:40 +0800 Subject: [PATCH] Add missing doc for events alarm metrics name (#7029) --- docs/en/concepts-and-designs/event.md | 27 +++++++++++++++++++++----- docs/en/setup/backend/backend-alarm.md | 9 +++++++-- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/docs/en/concepts-and-designs/event.md b/docs/en/concepts-and-designs/event.md index 940a64109..133ccddca 100644 --- a/docs/en/concepts-and-designs/event.md +++ b/docs/en/concepts-and-designs/event.md @@ -103,8 +103,25 @@ however, you can use the methods in [How to Report Events](#how-to-report-events ## Known Events -| Name | Type | When | -| :----: | :----: | :-----| -| Start | Normal | When your Java Application starts with SkyWalking Agent installed, the `Start` Event will be created. | -| Shutdown | Normal | When your Java Application stops with SkyWalking Agent installed, the `Shutdown` Event will be created. | -| Alarm | Error | When the Alarm is triggered, the corresponding `Alarm` Event will is created. | +| Name | Type | When | Where | +| :----: | :----: | :-----| :---- | +| Start | Normal | When your Java Application starts with SkyWalking Agent installed, the `Start` Event will be created. | Reported from SkyWalking agent. | +| Shutdown | Normal | When your Java Application stops with SkyWalking Agent installed, the `Shutdown` Event will be created. | Reported from SkyWalking agent. | +| Alarm | Error | When the Alarm is triggered, the corresponding `Alarm` Event will is created. | Reported from internal SkyWalking OAP. | + +The following events are all reported +by [Kubernetes Event Exporter](http://github.com/apache/skywalking-kubernetes-event-exporter), in order to see these +events, please make sure you have deployed the exporter. + +| Name | Type | When | Where | +| :----: | :----: | :-----| :---- | +| Killing | Normal | When the Kubernetes Pod is being killing. | Reporter by Kubernetes Event Exporter. | +| Pulling | Normal | When a docker image is being pulled for deployment. | Reporter by Kubernetes Event Exporter. | +| Pulled | Normal | When a docker image is pulled for deployment. | Reporter by Kubernetes Event Exporter. | +| Created | Normal | When a container inside a Pod is created. | Reporter by Kubernetes Event Exporter. | +| Started | Normal | When a container inside a Pod is started. | Reporter by Kubernetes Event Exporter. | +| Unhealthy | Error | When the readiness probe failed. | Reporter by Kubernetes Event Exporter. | + +The complete event lists can be found +in [the Kubernetes codebase](https://github.com/kubernetes/kubernetes/blob/v1.21.1/pkg/kubelet/events/event.go), please +note that not all the events are supported by the exporter for now. diff --git a/docs/en/setup/backend/backend-alarm.md b/docs/en/setup/backend/backend-alarm.md index 9b402452d..7e6e34ff9 100644 --- a/docs/en/setup/backend/backend-alarm.md +++ b/docs/en/setup/backend/backend-alarm.md @@ -21,7 +21,8 @@ Defines the relation between scope and entity name. An alarm rule is made up of the following elements: - **Rule name**. A unique name shown in the alarm message. It must end with `_rule`. - **Metrics name**. This is also the metrics name in the OAL script. Only long, double, int types are supported. See the -[list of all potential metrics name](#list-of-all-potential-metrics-name). +[list of all potential metrics name](#list-of-all-potential-metrics-name). Events can be also configured as the source +of alarm, please refer to [the event doc](../../concepts-and-designs/event.md) for more details. - **Include names**. Entity names which are included in this rule. Please follow the [entity name definitions](#entity-name). - **Exclude names**. Entity names which are excluded from this rule. Please follow the [entity name definitions](#entity-name). - **Include names regex**. A regex that includes entity names. If both include-name list and include-name regex are set, both rules will take effect. @@ -129,7 +130,11 @@ For convenience's sake, we have provided a default `alarm-setting.yml` in our re 1. Endpoint relation average response time over 1s in the last 2 minutes. ### List of all potential metrics name -The metrics names are defined in official the [OAL scripts](../../guides/backend-oal-scripts.md). Currently, metrics from the **Service**, **Service Instance**, **Endpoint**, **Service Relation**, **Service Instance Relation**, **Endpoint Relation** scopes could be used in Alarm, and the **Database access** scope is same as **Service**. +The metrics names are defined in the official [OAL scripts](../../guides/backend-oal-scripts.md) and +[MAL scripts](../../concepts-and-designs/mal.md), the [Event](../../concepts-and-designs/event.md) names can also serve +as the metrics names, all possible event names can be also found in [the Event doc](../../concepts-and-designs/event.md). + +Currently, metrics from the **Service**, **Service Instance**, **Endpoint**, **Service Relation**, **Service Instance Relation**, **Endpoint Relation** scopes could be used in Alarm, and the **Database access** scope is same as **Service**. Submit an issue or a pull request if you want to support any other scopes in alarm.