RocMarshal commented on a change in pull request #19023:
URL: https://github.com/apache/flink/pull/19023#discussion_r833278721



##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -153,42 +152,46 @@ metrics.reporter.influxdb.writeTimeout: 60000
 metrics.reporter.influxdb.interval: 60 SECONDS
 ```
 
-The reporter would send metrics using http protocol to the InfluxDB server 
with the specified retention policy (or the default policy specified on the 
server).
-All Flink metrics variables (see [List of all Variables]({{< ref 
"docs/ops/metrics" >}}#list-of-all-variables)) are exported as InfluxDB tags.
+InfluxDB 发送器会使用 http 协议按照将指标发送到 InfluxDB 服务器。指标的保留策略可通过配置指定,或按照 InfluxDB 
服务端的保留策略决定。
+所有的 Flink 运行指标变量(见 [List of all Variables]({{< ref "zh/docs/ops/metrics" 
>}}#list-of-all-variables))都会按照 tag 形式上报给 InfluxDB。

Review comment:
       ```suggestion
   所有的 Flink 运行指标变量(见 [List of all Variables]({{< ref "docs/ops/metrics" 
>}}#list-of-all-variables))都会按照 tag 形式上报给 InfluxDB。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -63,60 +65,57 @@ metrics.reporter.my_other_reporter.host: 192.168.1.1
 metrics.reporter.my_other_reporter.port: 10000
 ```
 
-**Important:** The jar containing the reporter must be accessible when Flink 
is started. Reporters that support the
- `factory.class` property can be loaded as [plugins]({{< ref 
"docs/deployment/filesystems/plugins" >}}). Otherwise the jar must be placed
- in the /lib folder. Reporters that are shipped with Flink (i.e., all 
reporters documented on this page) are available
- by default.
+**注意**:Flink 在启动时必须能访问到发送器所属的 jar 包。支持 `factory.class` 配置的发送器可以被加载为 
[plugins]({{< ref "zh/docs/deployment/filesystems/plugins" >}}),没有该项配置的发送器需要保证 
jar 包在 /lib 目录下。Flink 自带的发送器(文档中已经列出的发送器)无需做其他配置,开箱即用。

Review comment:
       ```suggestion
   **注意**:Flink 在启动时必须能访问到发送器所属的 jar 包。支持 `factory.class` 配置的发送器可以被加载为 
[plugins]({{< ref "docs/deployment/filesystems/plugins" >}}),没有该项配置的发送器需要保证 jar 
包在 /lib 目录下。Flink 自带的发送器(文档中已经列出的发送器)无需做其他配置,开箱即用。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -153,42 +152,46 @@ metrics.reporter.influxdb.writeTimeout: 60000
 metrics.reporter.influxdb.interval: 60 SECONDS
 ```
 
-The reporter would send metrics using http protocol to the InfluxDB server 
with the specified retention policy (or the default policy specified on the 
server).
-All Flink metrics variables (see [List of all Variables]({{< ref 
"docs/ops/metrics" >}}#list-of-all-variables)) are exported as InfluxDB tags.
+InfluxDB 发送器会使用 http 协议按照将指标发送到 InfluxDB 服务器。指标的保留策略可通过配置指定,或按照 InfluxDB 
服务端的保留策略决定。
+所有的 Flink 运行指标变量(见 [List of all Variables]({{< ref "zh/docs/ops/metrics" 
>}}#list-of-all-variables))都会按照 tag 形式上报给 InfluxDB。
+
+<a name="prometheus"></a>
 
 ### Prometheus
 #### (org.apache.flink.metrics.prometheus.PrometheusReporter)
 
-Parameters:
+参数:
 
-- `port` - (optional) the port the Prometheus exporter listens on, defaults to 
[9249](https://github.com/prometheus/prometheus/wiki/Default-port-allocations). 
In order to be able to run several instances of the reporter on one host (e.g. 
when one TaskManager is colocated with the JobManager) it is advisable to use a 
port range like `9250-9260`.
-- `filterLabelValueCharacters` - (optional) Specifies whether to filter label 
value characters. If enabled, all characters not matching \[a-zA-Z0-9:_\] will 
be removed, otherwise no characters will be removed. Before disabling this 
option please ensure that your label values meet the [Prometheus 
requirements](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
+- `port` - (可选的)Prometheus 发送器监听的端口,默认为 
[9249](https://github.com/prometheus/prometheus/wiki/Default-port-allocations)。如果需要在一台机器上运行多个发送器示例进行监控时(比如
 TaskManger 与 JobManager 在一台机器上运行时),建议将端口号配置为 `9250-9260` 这样的区间。
+- `filterLabelValueCharacters` -(可选的)指定是否过滤 label 中的非法字符。如果设置过滤,所有没有按照 
\[a-zA-Z0-9:_\] 匹配的字符都会被过滤掉,如果设置不过滤,则不会有字符被过滤掉。设置不过滤前,请确保你的 label 符合 
[Prometheus 的 lable 
命名规范](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)。
 
-Example configuration:
+配置示例:
 
 ```yaml
 metrics.reporter.prom.class: 
org.apache.flink.metrics.prometheus.PrometheusReporter
 ```
 
-Flink metric types are mapped to Prometheus metric types as follows: 
+Flink 指标类型与 Prometheus 指标类型对应关系如下:
+
+| Flink     | Prometheus | 注意事项                                  |
+| --------- |------------|-----------------------------------------|
+| Counter   | Gauge      | Prometheus 的 counter 不支持累加。         |
+| Gauge     | Gauge      | 只支持数字与布尔类型。                      |
+| Histogram | Summary    | 分位数为 .5, .75, .95, .98, .99 和 .999。  |
+| Meter     | Gauge      | Prometheus 的 gauge 为 meter 的百分比形式。 |
 
-| Flink     | Prometheus | Note                                     |
-| --------- |------------|------------------------------------------|
-| Counter   | Gauge      |Prometheus counters cannot be decremented.|
-| Gauge     | Gauge      |Only numbers and booleans are supported.  |
-| Histogram | Summary    |Quantiles .5, .75, .95, .98, .99 and .999 |
-| Meter     | Gauge      |The gauge exports the meter's rate.       |
+所有的 Flink 运行指标变量(见 [List of all Variables]({{< ref "zh/docs/ops/metrics" 
>}}#list-of-all-variables))都会按照 label 形式上报给 Prometheus。

Review comment:
       ```suggestion
   所有的 Flink 运行指标变量(见 [List of all Variables]({{< ref "docs/ops/metrics" 
>}}#list-of-all-variables))都会按照 label 形式上报给 Prometheus。
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to