You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by we...@apache.org on 2021/01/14 13:22:45 UTC

[apisix] branch master updated: docs: update prometheus docs (#3293)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 122cdf7  docs: update prometheus docs (#3293)
122cdf7 is described below

commit 122cdf72ce49b1ea80f576df61146ec9b3df9962
Author: 罗泽轩 <sp...@gmail.com>
AuthorDate: Thu Jan 14 07:22:36 2021 -0600

    docs: update prometheus docs (#3293)
    
    Signed-off-by: spacewander <sp...@gmail.com>
---
 doc/plugins/prometheus.md       | 17 ++++++++++++++++-
 doc/zh-cn/plugins/prometheus.md | 16 ++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/doc/plugins/prometheus.md b/doc/plugins/prometheus.md
index 0a5dbc4..4387348 100644
--- a/doc/plugins/prometheus.md
+++ b/doc/plugins/prometheus.md
@@ -127,11 +127,13 @@ Or you can goto [Grafana official](https://grafana.com/grafana/dashboards/11719)
 * `etcd reachability`: A gauge type with a value of 0 or 1, representing if etcd can be reached by a apisix or not.
 * `Connections`: Various Nginx connection metrics like active, reading, writing, and number of accepted connections.
 * `Batch process entries`: A gauge type, when we use plugins and the plugin used batch process to send data, such as: sys logger, http logger, sls logger, tcp logger, udp logger and zipkin, then the entries which hasn't been sent in batch process will be counted in the metrics.
+* `Latency`: The per service histogram of request time and the overhead added by APISIX (request time - upstream response time).
+* `Info`: the information of APISIX node.
 
 Here is the original metric data of apisix:
 
 ```
-$ curl http://127.0.0.2:9080/apisix/prometheus/metrics
+$ curl http://127.0.0.1:9080/apisix/prometheus/metrics
 # HELP apisix_bandwidth Total bandwidth in bytes consumed per service in Apisix
 # TYPE apisix_bandwidth counter
 apisix_bandwidth{type="egress",service="127.0.0.2"} 183
@@ -168,6 +170,19 @@ apisix_nginx_http_current_connections{state="writing"} 1
 # HELP apisix_nginx_metric_errors_total Number of nginx-lua-prometheus errors
 # TYPE apisix_nginx_metric_errors_total counter
 apisix_nginx_metric_errors_total 0
+# HELP apisix_http_latency HTTP request latency in milliseconds per service in APISIX
+# TYPE apisix_http_latency histogram
+apisix_http_latency_bucket{type="request",service="",consumer="",node="127.0.0.1",le="00001.0"} 1
+apisix_http_latency_bucket{type="request",service="",consumer="",node="127.0.0.1",le="00002.0"} 1
+...
+# HELP apisix_http_overhead HTTP request overhead added by APISIX in milliseconds per service in APISIX
+# TYPE apisix_http_overhead histogram
+apisix_http_overhead_bucket{type="request",service="",consumer="",node="127.0.0.1",le="00001.0"} 1
+apisix_http_overhead_bucket{type="request",service="",consumer="",node="127.0.0.1",le="00002.0"} 1
+...
+# HELP apisix_node_info Info of APISIX node
+# TYPE apisix_node_info gauge
+apisix_node_info{hostname="desktop-2022q8f-wsl"} 1
 ```
 
 ## Disable Plugin
diff --git a/doc/zh-cn/plugins/prometheus.md b/doc/zh-cn/plugins/prometheus.md
index 60e617c..d06db51 100644
--- a/doc/zh-cn/plugins/prometheus.md
+++ b/doc/zh-cn/plugins/prometheus.md
@@ -125,6 +125,9 @@ plugin_attr:
 * `etcd reachability`: apisix 连接 etcd 的可用性,用 0 和 1来表示。
 * `Connections`: 各种的 Nginx 连接指标,如 active(正处理的活动连接数),reading(nginx 读取到客户端的 Header 信息数),writing(nginx 返回给客户端的 Header 信息数),已建立的连接数。.
 * `Batch process entries`: 批处理未发送数据计数器,当你使用了批处理发送插件,比如:sys logger, http logger, sls logger, tcp logger, udp logger and zipkin, 那么你将会在此指标中看到批处理当前尚未发送的数据的数量。
+* `Latency`: 每个服务的请求用时和 APISIX 处理耗时的直方图。
+* `Info`: 当前 APISIX 节点信息。
+
 这里是apisix的原始的指标数据集:
 
 ```
@@ -165,6 +168,19 @@ apisix_nginx_http_current_connections{state="writing"} 1
 # HELP apisix_nginx_metric_errors_total Number of nginx-lua-prometheus errors
 # TYPE apisix_nginx_metric_errors_total counter
 apisix_nginx_metric_errors_total 0
+# HELP apisix_http_latency HTTP request latency in milliseconds per service in APISIX
+# TYPE apisix_http_latency histogram
+apisix_http_latency_bucket{type="request",service="",consumer="",node="127.0.0.1",le="00001.0"} 1
+apisix_http_latency_bucket{type="request",service="",consumer="",node="127.0.0.1",le="00002.0"} 1
+...
+# HELP apisix_http_overhead HTTP request overhead added by APISIX in milliseconds per service in APISIX
+# TYPE apisix_http_overhead histogram
+apisix_http_overhead_bucket{type="request",service="",consumer="",node="127.0.0.1",le="00001.0"} 1
+apisix_http_overhead_bucket{type="request",service="",consumer="",node="127.0.0.1",le="00002.0"} 1
+...
+# HELP apisix_node_info Info of APISIX node
+# TYPE apisix_node_info gauge
+apisix_node_info{hostname="desktop-2022q8f-wsl"} 1
 ```
 
 ## 禁用插件