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 2021/09/02 11:09:13 UTC

[skywalking] branch master updated: More document for meter configurations in backend-meter.md (#7637)

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

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d428ec  More document for meter configurations in backend-meter.md (#7637)
7d428ec is described below

commit 7d428ecc2d6409eab3d4060d7c8b2e18339db939
Author: silas.u <41...@users.noreply.github.com>
AuthorDate: Thu Sep 2 19:09:01 2021 +0800

    More document for meter configurations in backend-meter.md (#7637)
---
 CHANGES.md                             |  1 +
 docs/en/setup/backend/backend-meter.md | 24 +++++++++++++++++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 07f248c..eb3fe2f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -64,6 +64,7 @@ Release Notes.
 * Add a section in `Log Collecting And Analysis` doc, introducing the new Python agent log reporter.
 * Add one missing step in `otel-receiver` doc about how to activate the default receiver.
 * Reorganize dynamic configuration doc.
+* Add more description about meter configurations in `backend-meter` doc.
 
 All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/96?closed=1)
 
diff --git a/docs/en/setup/backend/backend-meter.md b/docs/en/setup/backend/backend-meter.md
index 178c043..258ee1d 100644
--- a/docs/en/setup/backend/backend-meter.md
+++ b/docs/en/setup/backend/backend-meter.md
@@ -2,6 +2,7 @@
 The meter receiver accepts the metrics of [meter protocol](https://github.com/apache/skywalking-data-collect-protocol/blob/master/language-agent/Meter.proto) into the [meter system](./../../concepts-and-designs/meter.md).
 
 ## Module definition
+Module definition is defined in `application.yml`, typically located at `$SKYWALKING_BASE_DIR/config/application.yml` by default.
 ```yaml
 receiver-meter:
   selector: ${SW_RECEIVER_METER:default}
@@ -17,6 +18,13 @@ kafka-fetcher:
     bootstrapServers: ${SW_KAFKA_FETCHER_SERVERS:localhost:9092}
 ```
 
+## Meter collection
+
+Metrics named in OAL script could be used in MAL, as described in [Official OAL script](../../guides/backend-oal-scripts.md)
+
+Custom metrics may be collected by Manual Meter API. You may find correct APIs diving into [Server Agents](../service-agent/server-agents.md).
+Custom metrics collected cannot be used directly, they should be configured in `meter-analyzer-config` configuration files, which is described in next part.
+
 ## Configuration file
 The meter receiver is configured via a configuration file. The configuration file defines everything related to receiving 
  from agents, as well as which rule files to load.
@@ -24,7 +32,16 @@ The meter receiver is configured via a configuration file. The configuration fil
 The OAP can load the configuration at bootstrap. If the new configuration is not well-formed, the OAP may fail to start up. The files
 are located at `$CLASSPATH/meter-analyzer-config`.
 
-The file is written in YAML format, defined by the scheme described below. Brackets indicate that a parameter is optional.
+New meter-analyzer-config files is **NOT** enabled by default, you should make meter configuration take effect through section `agent-analyzer` in `application.yml` of skywalking backend.
+```yaml
+ agent-analyzer:
+   selector: ${SW_AGENT_ANALYZER:default}
+   default:
+     # ... take care of other analyzers
+     meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:your-custom-meter-conf-without-ext-name} # The multiple files should be separated by ","
+```
+
+Meter-analyzer-config file is written in YAML format, defined by the scheme described below. Brackets indicate that a parameter is optional.
 
 An example can be found [here](../../../../oap-server/server-bootstrap/src/main/resources/meter-analyzer-config/spring-sleuth.yaml).
 If you're using Spring Sleuth, see [Spring Sleuth Setup](spring-sleuth-setup.md).
@@ -42,9 +59,10 @@ expSuffix: <string>
 metricPrefix: <string>
 # Metrics rule allow you to recompute queries.
 metricsRules:
-  # The name of rule, which combinates with a prefix 'meter_' as the index/table name in storage.
+  # The name of rule, which combinates with a prefix '<metricPrefix>_' as the index/table name in storage.
+  # The name with prefix can also be quoted in UI (Dashboard/Template/Item/Metrics)
   name: <string>
-  # MAL expression.
+  # MAL expression. Raw name of custom metrics collected can be used here
   exp: <string>
 ```