You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/05/03 01:56:17 UTC

[GitHub] [flink] RocMarshal commented on a diff in pull request #19496: [FLINK-25705][docs]Translate "Metric Reporters" page of "Deployment"

RocMarshal commented on code in PR #19496:
URL: https://github.com/apache/flink/pull/19496#discussion_r863319045


##########
docs/content.zh/docs/deployment/metric_reporters.md:
##########
@@ -24,22 +24,24 @@ specific language governing permissions and limitations
 under the License.
 -->
 
+<a name="metric-reporters"></a>
+
 # Metric Reporters
 
-Flink allows reporting metrics to external systems.
-For more information about Flink's metric system go to the [metric system documentation]({{< ref "docs/ops/metrics" >}}).
+Flink 支持用户将 Flink 的各项运行时指标发送给外部系统。
+了解更多指标方面信息可查看 [metric 系统相关文档]({{< ref "docs/ops/metrics" >}})。
 
-Metrics can be exposed to an external system by configuring one or several reporters in `conf/flink-conf.yaml`. These
-reporters will be instantiated on each job and task manager when they are started.
+你可以通过 `conf/flink-conf.yaml` 文件来配置一种或多种发送器,将运行时指标暴露给外部系统。
+发送器会在 TaskManager、Flink 作业启动时进行实例化。
 
-Below is a list of parameters that are generally applicable to all reporters. All properties are configured by setting `metrics.reporter.<reporter_name>.<property>` in the configuration. Reporters may additionally offer implementation-specific parameters, which are documented in the respective reporter's section. 
+下面列出了所有发送器都适用的参数,可以通过配置文件中的 `metrics.reporter.<reporter_name>.<property>` 项进行配置。有些发送器有自己独特的配置,详见该发送器章节下的具体说明。

Review Comment:
   ```suggestion
   下面列出了所有发送器都适用的参数,可以通过配置文件中的 `metrics.reporter.<reporter_name>.<property>` 项进行配置。有些发送器有自己特有的配置,详见该发送器章节下的具体说明。
   ```



##########
docs/content.zh/docs/deployment/metric_reporters.md:
##########
@@ -237,28 +252,29 @@ metrics.reporter.stsd.port: 8125
 metrics.reporter.stsd.interval: 60 SECONDS
 ```
 
+<a name="datadog"></a>
+
 ### Datadog
 #### (org.apache.flink.metrics.datadog.DatadogHttpReporter)
 
-Type: push/tags
+类型: push/基于 tags 格式
 
-Note any variables in Flink metrics, such as `<host>`, `<job_name>`, `<tm_id>`, `<subtask_index>`, `<task_name>`, and `<operator_name>`,
-will be sent to Datadog as tags. Tags will look like `host:localhost` and `job_name:myjobname`.
+使用 Datadog 时,Flink 运行指标中的任何变量,例如`<host>`、`<job_name>`、 `<tm_id>`、 `<subtask_index>`、`<task_name>`、 `<operator_name>`,都会被当作`host:localhost`、`job_name:myjobname` 这样的 tag 发送。

Review Comment:
   ```suggestion
   使用 Datadog 时,Flink 运行指标中的任何变量,例如 `<host>`、`<job_name>`、 `<tm_id>`、 `<subtask_index>`、`<task_name>`、 `<operator_name>`,都会被当作 `host:localhost`、`job_name:myjobname` 这样的 tag 发送。
   ```



##########
docs/content.zh/docs/deployment/metric_reporters.md:
##########
@@ -163,46 +172,49 @@ 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 "docs/ops/metrics" >}}#list-of-all-variables))都会按照 tag 形式上报给 InfluxDB。
+
+<a name="prometheus"></a>
 
 ### Prometheus
 #### (org.apache.flink.metrics.prometheus.PrometheusReporter)
 
-Type: pull/tags
+类型: pull/基于 tags 格式
 
-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.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
 ```
+Flink 指标类型与 Prometheus 指标类型对应关系如下:
 
-Flink metric types are mapped to Prometheus metric types as follows: 
+| Flink     | Prometheus | 注意事项                                  |
+| --------- |------------|-----------------------------------------|
+| Counter   | Gauge      | Prometheus 的 counter 不支持累加。         |
+| Gauge     | Gauge      | 只支持数字与布尔类型。                      |
+| Histogram | Summary    | 分位数为 .5, .75, .95, .98, .99 和 .999。  |

Review Comment:
   ```suggestion
   | Histogram | Summary    | 分位数为 .5,.75,.95,.98,.99 和 .999。  |
   ```



-- 
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: issues-unsubscribe@flink.apache.org

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