As we all know, Prometheus is the best monitoring tool for container scenarios. However, self-building Prometheus is too expensive for small and medium-sized enterprises with limited Ops manpower, and it is likely to hit performance bottlenecks for large enterprises with rapid business development. Therefore, using Prometheus managed on the cloud has become the first choice for more and more cloud companies. For how to use the managed Prometheus to monitor TKE, see Tencent Kubernetes Engine (TKE).
Step 1. Purchasing an instance
2. Click Create, select the purchase region, storage duration and select the Grafana instance to be associated based on your needs. If there is no Grafana instance, see Creating Instance to create one. You need to create an instance and complete the purchase.
Step 2. Integrate with TKE
1. After creating the instance, click the ID/Name of the target instance in the instance list to enter the instance details page.
2. On the left sidebar, click Integrate with TKE > Associate Cluster.
3. Select the cluster that needs to be associated in the pop-up window. A total of 4 types of clusters are supported: standard cluster, elastic cluster, registered cluster, and edge cluster. The clusters can be across VPCs. If different VPCs are not interconnected, you need to create a public network CLB instance.
4. After associating the cluster, you can manually configure metrics for collection on Cluster Monitoring > Data Collection Configuration, view the default free basic collection metrics, and add or reduce the metrics as needed.
Step 3. View monitoring data in Grafana
1. Click the Grafana icon to the right of the instance in the instance list to enter the Grafana service platform.
2. In the dashboard search list, TKE-related monitoring panels are preset by default, and click a panel name.
Enter the panel page, and you can view the preset monitoring data charts.
Step 4. Configure the alert policy
On the Prometheus instance details page, click Alerting Rule, and you can select a preset template type without manual configuration. For alert notifications, you can select existing notification templates on the TCOP to quickly configure alerts.