You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "lingsamuel (via GitHub)" <gi...@apache.org> on 2023/03/07 09:19:22 UTC

[GitHub] [apisix-ingress-controller] lingsamuel commented on a diff in pull request #1683: docs: monitoring apisix with helm chart

lingsamuel commented on code in PR #1683:
URL: https://github.com/apache/apisix-ingress-controller/pull/1683#discussion_r1127570344


##########
docs/en/latest/monitoring.md:
##########
@@ -0,0 +1,141 @@
+---
+title: Monitoring APISIX with Helm Chart
+keywords:
+  - APISIX Ingress Controller
+  - Apache APISIX
+  - Prometheus
+  - Grafana
+description: A tutorial on configuring monitoring services for APISIX.
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+APISIX has detailed telemetry data. With helm chart, we can easily configure the monitoring system.
+
+This tutorial will show how to achieve it.
+
+## Install Prometheus and Grafana
+
+To collect metrics and visualize them, we need to install Prometheus and Grafana first.
+
+The APISIX helm chart we will deploy later also contains a `ServiceMonitor` resource, so we should ensure the cluster has its CRD installed. Installing Prometheus Operator will apply the required CRD.
+
+Run the following command to install Prometheus Operator and Grafana:
+
+```bash
+helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
+helm repo update
+
+helm install -n monitoring prometheus prometheus-community/kube-prometheus-stack \
+  --create-namespace \
+  --set 'prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false'
+```
+
+We set option `prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues` to false to force Prometheus to watch all service monitors in the cluster for test purposes.
+
+The default Grafana username and password is `admin` and `prom-operator`.
+
+## Install APISIX
+
+We should enable service monitor to tell Prometheus to collect metrics from APISIX.
+
+Install APISIX via helm chart with `serviceMonitor.enabled=true` option:
+
+```bash
+helm repo add apisix https://charts.apiseven.com
+helm repo update
+
+helm install apisix apisix/apisix --create-namespace --namespace apisix \
+  --set serviceMonitor.enabled=true \
+  --set ingress-controller.enabled=true

Review Comment:
   right, I forgot this



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