Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/SupportInt' into SupportInt
Browse files Browse the repository at this point in the history
  • Loading branch information
YczYanchengzhe committed Sep 2, 2021
2 parents a7447af + 40aeb40 commit e8df3f8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,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)

Expand Down
24 changes: 21 additions & 3 deletions docs/en/setup/backend/backend-meter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -17,14 +18,30 @@ 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.

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).
Expand All @@ -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>
```

Expand Down

0 comments on commit e8df3f8

Please sign in to comment.