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 2018/10/12 01:17:56 UTC

[incubator-skywalking] 01/01: Set assemble based on assemble setting files.

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch collector-assemble
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git

commit 2adfffd949ff5f6dfabdf584358954d1429a3e91
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Fri Oct 12 09:17:45 2018 +0800

    Set assemble based on assemble setting files.
---
 .../alarm-settings-sample.yml}                     | 24 +++++++++++-----------
 .../{resources => assembly}/alarm-settings.yml     | 15 +++-----------
 .../server-starter/src/main/assembly/assembly.xml  |  5 +++--
 .../src/main/resources/alarm-settings.yml          |  2 +-
 4 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/oap-server/server-starter/src/main/resources/alarm-settings.yml b/oap-server/server-starter/src/main/assembly/alarm-settings-sample.yml
similarity index 70%
copy from oap-server/server-starter/src/main/resources/alarm-settings.yml
copy to oap-server/server-starter/src/main/assembly/alarm-settings-sample.yml
index 55c150e..67a60de 100644
--- a/oap-server/server-starter/src/main/resources/alarm-settings.yml
+++ b/oap-server/server-starter/src/main/assembly/alarm-settings-sample.yml
@@ -17,18 +17,18 @@
 # Sample alarm rules.
 rules:
   # Rule unique name, must be ended with `_rule`.
-#  endpoint_percent_rule:
-#    # Indicator value need to be long, double or int
-#    indicator-name: endpoint_percent
-#    threshold: 75
-#    op: <
-#    # The length of time to evaluate the metric
-#    period: 10
-#    # How many times after the metric match the condition, will trigger alarm
-#    count: 3
-#    # How many times of checks, the alarm keeps silence after alarm triggered, default as same as period.
-#    silence-period: 10
-#    message: Successful rate of endpoint {name} is lower than 75%
+  endpoint_percent_rule:
+    # Indicator value need to be long, double or int
+    indicator-name: endpoint_percent
+    threshold: 75
+    op: <
+    # The length of time to evaluate the metric
+    period: 10
+    # How many times after the metric match the condition, will trigger alarm
+    count: 3
+    # How many times of checks, the alarm keeps silence after alarm triggered, default as same as period.
+    silence-period: 10
+    message: Successful rate of endpoint {name} is lower than 75%
   service_resp_time_rule:
     indicator-name: service_resp_time
     # [Optional] Default, match all services in this indicator
diff --git a/oap-server/server-starter/src/main/resources/alarm-settings.yml b/oap-server/server-starter/src/main/assembly/alarm-settings.yml
similarity index 81%
copy from oap-server/server-starter/src/main/resources/alarm-settings.yml
copy to oap-server/server-starter/src/main/assembly/alarm-settings.yml
index 55c150e..6c69f89 100644
--- a/oap-server/server-starter/src/main/resources/alarm-settings.yml
+++ b/oap-server/server-starter/src/main/assembly/alarm-settings.yml
@@ -16,7 +16,8 @@
 
 # Sample alarm rules.
 rules:
-  # Rule unique name, must be ended with `_rule`.
+# Sample alarm rules.
+#  # Rule unique name, must be ended with `_rule`.
 #  endpoint_percent_rule:
 #    # Indicator value need to be long, double or int
 #    indicator-name: endpoint_percent
@@ -29,18 +30,8 @@ rules:
 #    # How many times of checks, the alarm keeps silence after alarm triggered, default as same as period.
 #    silence-period: 10
 #    message: Successful rate of endpoint {name} is lower than 75%
-  service_resp_time_rule:
-    indicator-name: service_resp_time
-    # [Optional] Default, match all services in this indicator
-    include-names:
-      - dubbox-provider
-      - dubbox-consumer
-    threshold: 1000
-    op: ">"
-    period: 10
-    count: 1
 
-#webhooks:
+webhooks:
 #  - http://127.0.0.1/notify/
 #  - http://127.0.0.1/go-wechat/
 
diff --git a/oap-server/server-starter/src/main/assembly/assembly.xml b/oap-server/server-starter/src/main/assembly/assembly.xml
index 0f234cd..0d27a16 100644
--- a/oap-server/server-starter/src/main/assembly/assembly.xml
+++ b/oap-server/server-starter/src/main/assembly/assembly.xml
@@ -36,13 +36,14 @@
             <outputDirectory>/config</outputDirectory>
             <includes>
                 <include>log4j2.xml</include>
+                <include>application.yml</include>
+                <include>alarm-settings.yml</include>
+                <include>alarm-settings-sample.yml</include>
             </includes>
         </fileSet>
         <fileSet>
             <directory>src/main/resources</directory>
             <includes>
-                <include>application.yml</include>
-                <include>log4j2.xml</include>
                 <include>component-libraries.yml</include>
             </includes>
             <outputDirectory>/config</outputDirectory>
diff --git a/oap-server/server-starter/src/main/resources/alarm-settings.yml b/oap-server/server-starter/src/main/resources/alarm-settings.yml
index 55c150e..9ea6975 100644
--- a/oap-server/server-starter/src/main/resources/alarm-settings.yml
+++ b/oap-server/server-starter/src/main/resources/alarm-settings.yml
@@ -40,7 +40,7 @@ rules:
     period: 10
     count: 1
 
-#webhooks:
+webhooks:
 #  - http://127.0.0.1/notify/
 #  - http://127.0.0.1/go-wechat/