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 2021/02/02 10:37:38 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #3494: docs: update the docs of the prometheus plugin

spacewander commented on a change in pull request #3494:
URL: https://github.com/apache/apisix/pull/3494#discussion_r568495637



##########
File path: doc/plugins/prometheus.md
##########
@@ -122,12 +122,56 @@ Or you can goto [Grafana official](https://grafana.com/grafana/dashboards/11719)
 
 ### Available metrics
 
-* `Status codes`: HTTP status codes returned by upstream services. These are available per service and across all services.
+* `Status`: HTTP status codes returned by upstream services. These are available per service and across all services.
+
+    Attributes:
+
+    | Name         | Description         |
+    | -------------| --------------------|
+    | code         | The HTTP status code returned by the upstream service. |
+    | route        | The route_id of the request to match the route. If it does not match, the default is `""`. |
+    | matched_uri  | Request to match the uri of the route. If it does not match, the default is `""`. |
+    | matched_host | Request to match the hsot of the route. If it does not match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it does not match, the default is host. |
+    | consumer     | The request matches the consumer_name of the consumer. If it does not match, the default is `""`. |
+    | node         | The request hits the ip of the upstream node. |
+
 * `Bandwidth`: Total Bandwidth (egress/ingress) flowing through apisix. This metric is available per service and as a sum across all services.
+
+    Attributes:
+
+    | Name         | Description |
+    | -------------| ------------- |
+    | type         | The type of bandwidth(egress/ingress). |
+    | route        | The route_id of the request to match the route. If it does not match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it does not match, the default is host. |
+    | consumer     | The request matches the consumer_name of the consumer. If it does not match, the default is `""`. |
+    | node         | The request hits the ip of the upstream node. |

Review comment:
       The subject should be the `ip`, not `the request`.

##########
File path: doc/plugins/prometheus.md
##########
@@ -122,12 +122,56 @@ Or you can goto [Grafana official](https://grafana.com/grafana/dashboards/11719)
 
 ### Available metrics
 
-* `Status codes`: HTTP status codes returned by upstream services. These are available per service and across all services.
+* `Status`: HTTP status codes returned by upstream services. These are available per service and across all services.
+
+    Attributes:
+
+    | Name         | Description         |
+    | -------------| --------------------|
+    | code         | The HTTP status code returned by the upstream service. |
+    | route        | The route_id of the request to match the route. If it does not match, the default is `""`. |
+    | matched_uri  | Request to match the uri of the route. If it does not match, the default is `""`. |
+    | matched_host | Request to match the hsot of the route. If it does not match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it does not match, the default is host. |

Review comment:
       "host" should be `$host`? And we use the default value not because "it does not match", but because there is no service id of the matched route.

##########
File path: doc/plugins/prometheus.md
##########
@@ -122,12 +122,56 @@ Or you can goto [Grafana official](https://grafana.com/grafana/dashboards/11719)
 
 ### Available metrics
 
-* `Status codes`: HTTP status codes returned by upstream services. These are available per service and across all services.
+* `Status`: HTTP status codes returned by upstream services. These are available per service and across all services.
+
+    Attributes:
+
+    | Name         | Description         |
+    | -------------| --------------------|
+    | code         | The HTTP status code returned by the upstream service. |
+    | route        | The route_id of the request to match the route. If it does not match, the default is `""`. |
+    | matched_uri  | Request to match the uri of the route. If it does not match, the default is `""`. |
+    | matched_host | Request to match the hsot of the route. If it does not match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it does not match, the default is host. |
+    | consumer     | The request matches the consumer_name of the consumer. If it does not match, the default is `""`. |
+    | node         | The request hits the ip of the upstream node. |
+
 * `Bandwidth`: Total Bandwidth (egress/ingress) flowing through apisix. This metric is available per service and as a sum across all services.
+
+    Attributes:
+
+    | Name         | Description |
+    | -------------| ------------- |
+    | type         | The type of bandwidth(egress/ingress). |
+    | route        | The route_id of the request to match the route. If it does not match, the default is `""`. |
+    | service      | The request matches the service_id of the route. If it does not match, the default is host. |

Review comment:
       The service_id of the route matched by the request?




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

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