yzeng25 commented on a change in pull request #809: URL: https://github.com/apache/apisix-website/pull/809#discussion_r767482767
########## File path: website/blog/2021/12/13/monitor-apisix-ingress-controller-with-prometheus.md ########## @@ -0,0 +1,184 @@ +--- +title: "Monitoring APISIX Ingress Controller with Prometheus" +authors: + - name: "Chao Zhang" + title: "Author" + url: "https://github.com/tokers" + image_url: "https://avatars.githubusercontent.com/u/10428333?v=4" + - name: "Sylvia" + title: "Technical Writer" + url: "https://github.com/SylviaBABY" + image_url: "https://avatars.githubusercontent.com/u/39793568?v=4" +keywords: +- Apache APISIX +- APISIX Ingress Controller +- Prometheus +- Metrics +- Grafana +description: This article introduces the relevant steps of how to use Prometheus to monitor APISIX Ingress Controller and the display effect of some indicators. +tags: [Technology] +--- + +> This article introduces the relevant steps of how to use Prometheus to monitor APISIX Ingress Controller and the display effect of some indicators. + +<!--truncate--> + +Whether in the days of monolithic applications or today's cloud-native era, "monitoring functions" have always played a very important role. A good monitoring system can help engineers quickly understand the status of services running in production environments, and quickly locate problems or warn of anomalies when they occur. + +Apache APISIX Ingress Controller has been enhanced to support Prometheus Metrics in recent releases. In this article, we will introduce how to use Prometheus to collect Metrics data from APISIX Ingress Controller and subsequently visualize it through Grafana. + +## Step 1: Install APISIX Ingress Controller + +First we deploy Apache APISIX, ETCD and APISIX Ingress Controller to the local Kubernetes cluster via [Helm](https://helm.sh/). + +```shell +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. + +```shell +kubectl get all -n ingress-apisix +``` + +## Step 2: Enable the Prometheus Plugin + +In most cases, the monitoring function must involve more than just the APISIX Ingress Controller component. If you need to monitor Apache APISIX at the same time, you can create the following `ApisixClusterConfig` resource. + +### Installing Prometheus and Grafana + +Next, we will enable the Prometheus service through the Prometheus Operator, so you will need to install the Prometheus Operator first. + +>The following command will also install Grafana. Review comment: could you also apply `:::note` here? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
