wu-sheng commented on a change in pull request #7028:
URL: https://github.com/apache/skywalking/pull/7028#discussion_r640414453



##########
File path: docs/en/concepts-and-designs/event.md
##########
@@ -55,10 +55,49 @@ The end time of the event. This field may be empty if the 
event has not ended ye
 **NOTE:** When reporting an event, you typically call the report function 
twice, the first time for starting of the event and the second time for ending 
of the event, both with the same UUID.
 There are also cases where you would already have both the start time and end 
time. For example, when exporting events from a third-party system, the start 
time and end time are already known so you may simply call the report function 
once.
 
+## How to Configure Alarms for Events
+
+Events are derived from metrics, and can be the source to trigger alarms. For 
example, if a specific event occurs for a
+certain times in a period, alarms can be triggered and sent.
+
+Every event has a default `count = 1`, when `n` events with the same name are 
reported, they are aggregated
+into `count = n` as follows.
+
+```
+Event{name=Unhealthy, source={service=A,instance=a}, ...}
+Event{name=Unhealthy, source={service=A,instance=a}, ...}
+Event{name=Unhealthy, source={service=A,instance=a}, ...}
+Event{name=Unhealthy, source={service=A,instance=a}, ...}
+Event{name=Unhealthy, source={service=A,instance=a}, ...}
+Event{name=Unhealthy, source={service=A,instance=a}, ...}
+```
+
+will be aggregated into
+
+```
+Event{name=Unhealthy, source={service=A,instance=a}, ...} <count = 6>
+```
+
+so you can configure the following alarm rule to trigger alarm when 
`Unhealthy` event occurs more than 5 times within 10
+minutes.
+
+```yaml
+rules:
+  unhealthy_event_rule:
+    metrics-name: Unhealthy
+    threshold: 5

Review comment:
       Then, is 5 a good number of examples here? I think usually event 
threshold should be 1?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to