You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/20 04:21:51 UTC

[GitHub] [apisix] nic-chen commented on a diff in pull request #7275: docs: udpate prometheus Chinese doc

nic-chen commented on code in PR #7275:
URL: https://github.com/apache/apisix/pull/7275#discussion_r901241347


##########
docs/zh/latest/plugins/prometheus.md:
##########
@@ -75,70 +102,52 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13
     "upstream": {
         "type": "roundrobin",
         "nodes": {
-            "127.0.0.1:80": 1
+            "127.0.0.1:1980": 1
         }
     }
 }'
 ```
 
-你可以使用 [APISIX Dashboard](https://github.com/apache/apisix-dashboard) 通过 web 界面来完成上面的操作。
+<!-- 你可以使用 [APISIX Dashboard](https://github.com/apache/apisix-dashboard) 通过 web 界面来完成上面的操作。
 
 先增加一个 Route:
 
 ![create a route](../../../assets/images/plugin/prometheus-1.png)
 
 然后在 route 页面中添加 prometheus 插件:
 
-![enable prometheus plugin](../../../assets/images/plugin/prometheus-2.png)
+![enable prometheus plugin](../../../assets/images/plugin/prometheus-2.png) -->
 
-## 如何提取指标数据
+## 提取指标
 
-我们可以从指定的 url 中提取指标数据 `/apisix/prometheus/metrics`:
+你可以从指定的 URL(默认:`/apisix/prometheus/metrics`)中提取指标数据:
 
 ```
 curl -i http://127.0.0.1:9091/apisix/prometheus/metrics
 ```
 
-把该 uri 地址配置到 prometheus 中去,就会自动完成指标数据提取。
+你可以将该 URI 地址添加到 Prometheus 中来提取指标数据,配置示例如下:
 
-例子如下:
-
-```yaml
+```yaml title="./prometheus.yml"
 scrape_configs:
   - job_name: "apisix"
-    scrape_interval: 15s # 这个值会跟 Prometheus QL 中 rate 函数的时间范围有关系,rate 函数中的时间范围应该至少两倍于该值。
+    scrape_interval: 15s # 该值会跟 Prometheus QL 中 rate 函数的时间范围有关系,rate 函数中的时间范围应该至少两倍于该值。
     metrics_path: "/apisix/prometheus/metrics"
     static_configs:
       - targets: ["127.0.0.1:9091"]
 ```
 
-我们也可以在 prometheus 控制台中去检查状态:
+现在你可以在 Prometheus 控制台中检查状态:
 
 ![checking status on prometheus dashboard](../../../assets/images/plugin/prometheus01.png)
 
 ![prometheus apisix in-depth metric view](../../../assets/images/plugin/prometheus02.png)
 
-## 如何修改暴露指标的 uri
+## 使用 Grafana 绘制指标
 
-我们可以在 `conf/config.yaml` 的 `plugin_attr` 修改默认的 uri
+`prometheus` 插件导出的指标可以在 Grafana 进行图形化绘制显示。
 
-| 名称       | 类型   | 默认值                       | 描述           |
-| ---------- | ------ | ---------------------------- | -------------- |
-| export_uri | string | "/apisix/prometheus/metrics" | 暴露指标的 uri |
-
-配置示例:
-
-```yaml
-plugin_attr:
-  prometheus:
-    export_uri: /apisix/metrics
-```
-
-## Grafana 面板
-
-插件导出的指标可以在 Grafana 进行图形化绘制显示。
-
-下载 [Grafana dashboard 元数据](https://github.com/apache/apisix/blob/master/docs/assets/other/json/apisix-grafana-dashboard.json) 并导入到 Grafana 中。
+如果需要进行设置,请下载 [APISIX's Grafana dashboard 元数据](https://github.com/apache/apisix/blob/master/docs/assets/other/json/apisix-grafana-dashboard.json) 并导入到 Grafana 中。
 
 你可以到 [Grafana 官方](https://grafana.com/grafana/dashboards/11719) 下载 `Grafana` 元数据。

Review Comment:
   I don't have this account. Please help to update when you have time. @membphis 
   



-- 
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: notifications-unsubscribe@apisix.apache.org

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