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/04/19 15:07:10 UTC

[GitHub] [apisix-ingress-controller] Chever-John opened a new pull request, #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Chever-John opened a new pull request, #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973

   <!-- Please answer these questions before submitting a pull request -->
   
   As #953, this PR aims to add an article on "how to access Apache APISIX Prometheus Metrics on k8s"
   
   ### Type of change:
   
   <!-- Please delete options that are not relevant. -->
   
   - [ ] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   <!--
   Please follow the requirements:
   1. Use Draft if the PR is not ready to be reviewed
   2. Test is required for the feat/fix PR, unless you have a good reason
   3. Doc is required for the feat PR
   4. Use a new commit to resolve review instead of `push -f`
   5. Use "request review" to notify the reviewer once you have resolved the review
   -->
   
   * [ ] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix-ingress-controller#community) first**
   


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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853890585


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.

Review Comment:
   Got it~!



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


[GitHub] [apisix-ingress-controller] juzhiyuan commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r869832926


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,170 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes

Review Comment:
   Would better have a description here, could do this in another PR.



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,170 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly. APISIX uses the `prometheus` plugin to expose metrics and integrate with prometheus but uses the `public-api` plugin to enhance its security after version 2.13. For more information, see the `public-api` plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```

Review Comment:
   After enabling plugin, how to apply it to take effect?



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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#issuecomment-1123121133

   a kind reminder  @juzhiyuan @navendu-pottekkat  PTAL, thanks!  the content is correct


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


[GitHub] [apisix-ingress-controller] juzhiyuan commented on pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#issuecomment-1106281807

   Hi, @navendu-pottekkat, please have a review once more when you have time :)


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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r864282952


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,89 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly. APISIX uses the `prometheus` plugin to expose metrics and integrate with prometheus but uses `public-api` plugin to enhance its security after version 2.13. For more information, see `public-api` plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-admin
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 3: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'
+```
+
+Then you will get the metrics you want.

Review Comment:
   Well, if a document cannot be effectively guided, or cannot be reproduced according to the document, then the document will be meaningless



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853657931


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.

Review Comment:
   OK!



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853901740


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix

Review Comment:
   I have bought the Grammarly package and have taken a lot of its advice.
   Thanks for your @tokers great suggestions.



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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853367880


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX Ingress Controller has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect **Prometheus** to collect Apache APISIX Ingress Controller's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix
+```
+
+### Step 2: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX at the same time, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 3: Enable `public-api` Plugin
+
+This is a basic routing setup, please note that further configuration should be done based on your local backend service information. The main solution concept is to use the `public-api` plugin to protect the routes exposed by **Prometheus**. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-test-prometheus
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 4: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'
+```
+
+## Conclusion
+
+This article describes the steps on how to use the `public-api` plugin to protect **Prometheus** and monitor the APISIX Ingress Controller. Currently, only some basic configurations are included, if you want to see some of the metrics displayed with **Grafana**, please refer to this [link](https://apisix.apache.org/zh/blog/2021/12/13/monitor-apisix-ingress-controller-with-prometheus/#). We will continue to polish and upgrade, add more metrics and integrate data surface APISIX metrics to bring you a better monitoring experience.

Review Comment:
   no, this is for monitoring APISIX not APISIX Ingress controller



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853594516


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX Ingress Controller has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect **Prometheus** to collect Apache APISIX Ingress Controller's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix
+```
+
+### Step 2: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX at the same time, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 3: Enable `public-api` Plugin
+
+This is a basic routing setup, please note that further configuration should be done based on your local backend service information. The main solution concept is to use the `public-api` plugin to protect the routes exposed by **Prometheus**. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-test-prometheus
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 4: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'
+```
+
+## Conclusion
+
+This article describes the steps on how to use the `public-api` plugin to protect **Prometheus** and monitor the APISIX Ingress Controller. Currently, only some basic configurations are included, if you want to see some of the metrics displayed with **Grafana**, please refer to this [link](https://apisix.apache.org/zh/blog/2021/12/13/monitor-apisix-ingress-controller-with-prometheus/#). We will continue to polish and upgrade, add more metrics and integrate data surface APISIX metrics to bring you a better monitoring experience.

Review Comment:
   Got it!



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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r855876740


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,97 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. APISIX has been used with the `public-api` plugin to enhance security in recent versions. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by *Prometheus*.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly.
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.

Review Comment:
   plz change the link to en instead of zh
   



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,97 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. APISIX has been used with the `public-api` plugin to enhance security in recent versions. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by *Prometheus*.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly.
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-test-prometheus

Review Comment:
   You can change it to apisix-admin
   



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,97 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. APISIX has been used with the `public-api` plugin to enhance security in recent versions. For more information, see *Prometheus*'s official [website](https://prometheus.io/).

Review Comment:
   I think more content should use the link of APISIX public-api plugin.
   
   Or write APISIX use prometheus plgin to expose metrics and integrate with prometheus, but use public-api to enhance its security (for details, you can look at the description in the prometheus plugin documentation first.



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,97 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. APISIX has been used with the `public-api` plugin to enhance security in recent versions. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by *Prometheus*.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly.
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-test-prometheus
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 3: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'

Review Comment:
   You can show the output contents. 
   
   This way we know what the expected result should be



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r866522269


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,89 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly. APISIX uses the `prometheus` plugin to expose metrics and integrate with prometheus but uses `public-api` plugin to enhance its security after version 2.13. For more information, see `public-api` plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-admin
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 3: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'
+```
+
+Then you will get the metrics you want.

Review Comment:
   I have given the correct command to the expected result.
   Please review it again, sir~
   Thanks again~



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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r869833624


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,170 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly. APISIX uses the `prometheus` plugin to expose metrics and integrate with prometheus but uses the `public-api` plugin to enhance its security after version 2.13. For more information, see the `public-api` plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```

Review Comment:
   ping @Chever-John  PTAL



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,170 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes

Review Comment:
   ping @Chever-John  PTAL



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


[GitHub] [apisix-ingress-controller] Chever-John commented on pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#issuecomment-1103409828

   also cc @navendu-pottekkat


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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#issuecomment-1102778335

   @Chever-John Please resolve the conflicts.


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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853895063


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step 1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix
+```
+
+If you have problems with the installation, you can click on this [link](https://apisix.apache.org/docs/ingress-controller/practices/the-hard-way) to get detailed instructions.

Review Comment:
   Got it~



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853894773


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.

Review Comment:
   Got it~



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853658751


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller

Review Comment:
   Got it!



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r855935336


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,97 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. APISIX has been used with the `public-api` plugin to enhance security in recent versions. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by *Prometheus*.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly.
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.

Review Comment:
   OK~



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,97 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. APISIX has been used with the `public-api` plugin to enhance security in recent versions. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by *Prometheus*.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly.
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-test-prometheus

Review Comment:
   OK~



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r862423817


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,89 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly. APISIX uses the `prometheus` plugin to expose metrics and integrate with prometheus but uses `public-api` plugin to enhance its security after version 2.13. For more information, see `public-api` plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-admin
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 3: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'
+```
+
+Then you will get the metrics you want.

Review Comment:
   sure, actually, i can not reproduce the result at that time.
   let me try again~



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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r854130871


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s

Review Comment:
   ```suggestion
   title: How to access Apache APISIX Prometheus metrics on Kubernetes
   ```
   



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. For more information, see Prometheus's official [website](https://prometheus.io/).

Review Comment:
   APISIX has been used in conjunction with the public-api plugin in order to enhance security in recent versions.



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. For more information, see Prometheus's official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step 1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, etcd, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. And you can check specific status confirmation with the following command.
+
+```sh
+kubectl get all -n ingress-apisix
+```
+
+For more information, see [APISIX Ingress Controller the Hard Way](https://apisix.apache.org/docs/ingress-controller/practices/the-hard-way).
+
+### Step 2: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 3: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by Prometheus. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-test-prometheus
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 4: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'
+```
+
+## Conclusion
+
+This article describes how to use the `public-api` plugin to protect Prometheus and monitor the Apache APISIX. Currently, only some basic configurations include. If you want to see some of the metrics displayed with Grafana, please refer to this [link](https://apisix.apache.org/zh/blog/2021/12/13/monitor-apisix-ingress-controller-with-prometheus/#). We will continue to polish and upgrade, add more metrics and integrate data surface APISIX metrics to improve your monitoring experience.

Review Comment:
   This feature has nothing to do with APISIX Ingress, please remove this link



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. For more information, see Prometheus's official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step 1: Install APISIX Ingress Controller

Review Comment:
   I don't think this part is necessary, just note that it needs to have a working APISIX and APISIX Ingress controller



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix
+```
+
+### Step 2: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX at the same time, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 3: Enable `public-api` Plugin
+
+This is a basic routing setup, please note that further configuration should be done based on your local backend service information. The main solution concept is to use the `public-api` plugin to protect the routes exposed by Prometheus. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml

Review Comment:
   @tokers Sadly, I feel this is out of our control.  We shouldn't be writing data for users during installation, what do you think?



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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r862422760


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,89 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly. APISIX uses the `prometheus` plugin to expose metrics and integrate with prometheus but uses `public-api` plugin to enhance its security after version 2.13. For more information, see `public-api` plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 2: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by *Prometheus*. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-admin
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 3: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'
+```
+
+Then you will get the metrics you want.

Review Comment:
   ?
   
   I don't think this sentence has any real meaning. 
   
   As I pointed out in a previous comment, you need to post the output



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


[GitHub] [apisix-ingress-controller] juzhiyuan merged pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973


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


[GitHub] [apisix-ingress-controller] navendu-pottekkat commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853729577


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step 1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.

Review Comment:
   ```suggestion
   First, we deploy Apache APISIX, etcd, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
   ```



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).

Review Comment:
   Descriptive link text is always better: https://developers.google.com/style/link-text



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step 1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix
+```
+
+If you have problems with the installation, you can click on this [link](https://apisix.apache.org/docs/ingress-controller/practices/the-hard-way) to get detailed instructions.

Review Comment:
   Descriptive link text. See same comment above.



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.

Review Comment:
   All APISIX objects should be capitalized. In this case it should be Plugin.



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


[GitHub] [apisix-ingress-controller] navendu-pottekkat commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853888848


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).

Review Comment:
   Thank Google's team for putting this together. Every guideline in it is solid. I have adopted most, if not all of it for our documentation guideline. There is a technical writing tutorial there which is very good.



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r854255646


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. For more information, see Prometheus's official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step 1: Install APISIX Ingress Controller

Review Comment:
   Solve it~



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


[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#issuecomment-1111982112

   @Chever-John any update?


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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r854249898


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. For more information, see Prometheus's official [website](https://prometheus.io/).

Review Comment:
   Solved it~



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r854241891


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s

Review Comment:
   Solve it~



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853901740


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix

Review Comment:
   I have bought the Grammarly package and have taken a lot of its advice.
   Thanks for your great suggestions.



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix

Review Comment:
   I have bought the Grammarly package and have taken a lot of its advice.
   Thanks for your@tokers great suggestions.



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


[GitHub] [apisix-ingress-controller] tokers commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
tokers commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853655179


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller

Review Comment:
   ```suggestion
   ### Step 1: Install APISIX Ingress Controller
   ```



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix

Review Comment:
   Do we have any dedicated docs to introduce the way we install Apache APSIX Ingress Controller? @tao12345666333 
   
   I don't think show the installation in a lot of docs is a good idea.



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.

Review Comment:
   Add a Prometheus website link.



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix
+```
+
+### Step 2: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX at the same time, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 3: Enable `public-api` Plugin
+
+This is a basic routing setup, please note that further configuration should be done based on your local backend service information. The main solution concept is to use the `public-api` plugin to protect the routes exposed by Prometheus. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml

Review Comment:
   @tao12345666333 I think we can add an option to help users expose the Prometheus endpoint in the helm chart.



##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+

Review Comment:
   I think we don't have to introduce `public-api` here as it's APISIX's feature, we just need to add a link. Duplicated documentation will cause inconsistence.



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853662382


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+

Review Comment:
   Sry, I introduced `public-api` too much!
   
   However, I think there is still some need to introduce `public-api`, indeed, this plugin affects the application of prometheus in APISIX.



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


[GitHub] [apisix-ingress-controller] Chever-John commented on pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#issuecomment-1112721349

   @tao12345666333 Yeah, it will be done today!


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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r869892133


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,170 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly. APISIX uses the `prometheus` plugin to expose metrics and integrate with prometheus but uses the `public-api` plugin to enhance its security after version 2.13. For more information, see the `public-api` plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```

Review Comment:
   > After enabling plugin, how to apply it to take effect?
   
   Just add a command like this `kubectl apply -f xxx.yaml`?
   or you mean the "### Step 3: Collect the Metrics"?



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


[GitHub] [apisix-ingress-controller] juzhiyuan commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r869902284


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,170 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. For more information, see *Prometheus*'s official [website](https://prometheus.io/).
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+Before starting, please make sure that Apache APISIX (version >= 2.13)and APISIX Ingress controller are installed and working correctly. APISIX uses the `prometheus` plugin to expose metrics and integrate with prometheus but uses the `public-api` plugin to enhance its security after version 2.13. For more information, see the `public-api` plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+### Step 1: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```

Review Comment:
   No worry, we could do this later. :) (Because other docs need this to improve SEO & DX as well



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853891320


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step 1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.

Review Comment:
   Got it~



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853658638


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,113 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data.
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (hereinafter referred to as public API) for the plugins. In practical application scenarios, the provided interface is for internal calls, rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the pain points of using the public API. You can set a custom URI for the public API and configure any type of plugin. For more information about `public-api`, see the [public-api](https://apisix.apache.org/docs/apisix/plugins/public-api/) plugin's document.
+
+The main role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: One thing we should note is that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, ETCD, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. Specific status confirmation can be checked with the following command.
+
+```sh
+kubectl get all -n ingress-apisix

Review Comment:
   Yeah, we have!
   "The hard way": https://apisix.apache.org/docs/ingress-controller/practices/the-hard-way



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r853804845


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an important role in system maintenance. A good monitoring system can help engineers quickly understand the status of services running in production environments and can locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. You can learn more about Prometheus by clicking on this [link](https://prometheus.io/).

Review Comment:
   Thank you so much for this great advice!



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r855944320


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,97 @@
+---
+title: How to access Apache APISIX Prometheus metrics on Kubernetes
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+*Prometheus* is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. APISIX has been used with the `public-api` plugin to enhance security in recent versions. For more information, see *Prometheus*'s official [website](https://prometheus.io/).

Review Comment:
   OK~



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


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #973: Doc: add an article on "how to access Apache APISIX Prometheus Metrics on k8s"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #973:
URL: https://github.com/apache/apisix-ingress-controller/pull/973#discussion_r854258039


##########
docs/en/latest/practices/how-to-access-Apache-APISIX-Prometheus-Metrics-on-k8s.md:
##########
@@ -0,0 +1,115 @@
+---
+title: How to access Apache APISIX Prometheus metrics on k8s
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+Observability (monitoring functionality) has always played an essential role in system maintenance. A sound monitoring system can help engineers quickly understand the status of services running in production environments and locate problems or give early warning of anomalies when they occur.
+
+Prometheus is a leading open-source project focused on metrics and alerting that has changed the way the world does monitoring and observability. And Apache APISIX has enhanced its support for Prometheus Metrics in recent releases, adding a new feature for use in conjunction with the `public-api` plugin. This article will introduce how to configure `public-api` to protect Prometheus to collect Apache APISIX 's Metrics data. For more information, see Prometheus's official [website](https://prometheus.io/).
+
+## Initial Knowledge about `public-api`
+
+When users develop custom plugins in Apache APISIX, they can define some APIs (referred to as public API) for the plugins. The provided interface is for internal calls in practical application scenarios rather than being open on the public network for anyone to call.
+
+Therefore, Apache APISIX has designed a `public-api` plugin. With this plugin, you can solve the public API's pain points. You can set a custom URI for the public API and configure any plugin. For more information, see the `public-api` Plugin's official [document](https://apisix.apache.org/docs/apisix/plugins/public-api/).
+
+The primary role of the `public-api` plugin in this document is to protect the URI exposed by Prometheus.
+
+**Note**: We should note that this feature is only available in APISIX version 2.13 and later.
+
+## Begin to access Apache APISIX Prometheus Metrics
+
+### Step 1: Install APISIX Ingress Controller
+
+First, we deploy Apache APISIX, etcd, and APISIX Ingress Controller to a local Kubernetes cluster via Helm.
+
+```sh
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+kubectl create namespace ingress-apisix
+helm install apisix apisix/apisix --namespace ingress-apisix \
+ --set ingress-controller.enabled=true
+```
+
+After installation, please wait until all services are up and running. And you can check specific status confirmation with the following command.
+
+```sh
+kubectl get all -n ingress-apisix
+```
+
+For more information, see [APISIX Ingress Controller the Hard Way](https://apisix.apache.org/docs/ingress-controller/practices/the-hard-way).
+
+### Step 2: Enable Prometheus Plugin
+
+If you need to monitor Apache APISIX simultaneously, you can create the following ApisixClusterConfig resource.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixClusterConfig
+metadata:
+  name: default
+spec:
+  monitoring:
+    prometheus:
+      enable: true
+```
+
+### Step 3: Enable `public-api` Plugin
+
+Let's make a basic routing setup, and please note that further configuration should be done based on your local backend service information. The primary solution concept is to use the `public-api` plugin to protect the routes exposed by Prometheus. For a more detailed configuration, you can refer to the [example](https://apisix.apache.org/zh/docs/apisix/plugins/public-api/#example) section of the `public-api` plugin.
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: prometheus-route
+spec:
+  http:
+  - name: public-api
+    match:
+      hosts:
+      - test.prometheus.org
+      paths:
+      - /apisix/prometheus/metrics
+    backends:
+    ## Please notice that there must be your actual "serviceName" and "servicePort"
+    - serviceName: apisix-test-prometheus
+      servicePort: 9180
+    plugins:
+    - name: public-api
+      enable: true
+```
+
+### Step 4: Collect the Metrics
+
+Now you can then get the indicator parameters by requesting command access.
+
+```sh
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
+
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/headers -H 'Host: test.prometheus.org'
+```
+
+## Conclusion
+
+This article describes how to use the `public-api` plugin to protect Prometheus and monitor the Apache APISIX. Currently, only some basic configurations include. If you want to see some of the metrics displayed with Grafana, please refer to this [link](https://apisix.apache.org/zh/blog/2021/12/13/monitor-apisix-ingress-controller-with-prometheus/#). We will continue to polish and upgrade, add more metrics and integrate data surface APISIX metrics to improve your monitoring experience.

Review Comment:
   Sure, sir~



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