tencent cloud

Tencent Cloud Observability Platform

Release Notes and Announcements
Release Notes
Product Introduction
Overview
Strengths
Basic Features
Basic Concepts
Use Cases
Use Limits
Purchase Guide
Tencent Cloud Product Monitoring
Application Performance Management
Mobile App Performance Monitoring
Real User Monitoring
Cloud Automated Testing
Prometheus Monitoring
Grafana
EventBridge
PTS
Quick Start
Monitoring Overview
Instance Group
Tencent Cloud Product Monitoring
Application Performance Management
Real User Monitoring
Cloud Automated Testing
Performance Testing Service
Prometheus Getting Started
Grafana
Dashboard Creation
EventBridge
Alarm Service
Cloud Product Monitoring
Tencent Cloud Service Metrics
Operation Guide
CVM Agents
Cloud Product Monitoring Integration with Grafana
Troubleshooting
Practical Tutorial
Application Performance Management
Product Introduction
Access Guide
Operation Guide
Practical Tutorial
Parameter Information
FAQs
Mobile App Performance Monitoring
Overview
Operation Guide
Access Guide
Practical Tutorial
Tencent Cloud Real User Monitoring
Product Introduction
Operation Guide
Connection Guide
FAQs
Cloud Automated Testing
Product Introduction
Operation Guide
FAQs
Performance Testing Service
Overview
Operation Guide
Practice Tutorial
JavaScript API List
FAQs
Prometheus Monitoring
Product Introduction
Access Guide
Operation Guide
Practical Tutorial
Terraform
FAQs
Grafana
Product Introduction
Operation Guide
Guide on Grafana Common Features
FAQs
Dashboard
Overview
Operation Guide
Alarm Management
Console Operation Guide
Troubleshooting
FAQs
EventBridge
Product Introduction
Operation Guide
Practical Tutorial
FAQs
Report Management
FAQs
General
Alarm Service
Concepts
Monitoring Charts
CVM Agents
Dynamic Alarm Threshold
CM Connection to Grafana
Documentation Guide
Related Agreements
Application Performance Management Service Level Agreement
APM Privacy Policy
APM Data Processing And Security Agreement
RUM Service Level Agreement
Mobile Performance Monitoring Service Level Agreement
Cloud Automated Testing Service Level Agreement
Prometheus Service Level Agreement
TCMG Service Level Agreements
PTS Service Level Agreement
PTS Use Limits
Cloud Monitor Service Level Agreement
API Documentation
History
Introduction
API Category
Making API Requests
Monitoring Data Query APIs
Alarm APIs
Legacy Alert APIs
Notification Template APIs
TMP APIs
Grafana Service APIs
Event Center APIs
TencentCloud Managed Service for Prometheus APIs
Monitoring APIs
Data Types
Error Codes
Glossary

Nginx Ingress Controller Exporter Integration

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-09-17 19:07:49

Scenarios

To check whether the Nginx Ingress Controller is running normally and to troubleshoot issues, you need to monitor the running status of the Nginx Ingress Controller when using the Nginx Ingress Controller. Tencent Cloud Observability Platform (TCOP) provides an out-of-the-box Grafana monitoring dashboard for the Nginx Ingress Controller through TencentCloud Managed Service for Prometheus (TMP). This document describes how to use Prometheus to monitor the Nginx Ingress Controller.

Integration Methods

Prerequisites

A Kubernetes cluster of Tencent Cloud Tencent Kubernetes Engine (TKE) has been created in the region and Virtual Private Cloud (VPC) of the corresponding Prometheus instance, and a namespace has been created for the cluster.
The self-built Nginx Ingress has been successfully deployed in the Kubernetes cluster.
In the TMP console, select the corresponding Prometheus instance, then choose Data Collection > Integrate with TKE to find the corresponding Kubernetes cluster and complete the cluster association. See the guide on associating with a cluster.

Directions

Step 1: Confirming Nginx Ingress Exposure Metrics

1. Use the community Helm repository for installation. In this case, you need to confirm that the metrics configuration item is set up in values.yaml to enable metrics. The specific configurations are as follows:
controller:
metrics:
port: 10254
portName: metrics
2. Create an Nginx Ingress workload on your own.
2.1 In this case, you need to add the following configuration items to the port settings spec.template.spec.containers[0].ports in the workload ingress-nginx-controller:
- containerPort: 10254
name: metrics
protocol: TCP
The effect after configurations is as shown below:

2.2 If you use the ingress-nginx-controller image version v1.12.0 or higher, you also need to add the metrics configuration item in the startup parameters to enable metrics, and add the configuration item --enable-metrics=true in the parameter settings spec.template.spec.containers[0].args of the workload ingress-nginx-controller. The effect after configurations is as shown below:

2.3 Restart the workload ingress-nginx-controller to apply the latest configurations.

Step 2: Adding a Collection Task

1. Log in to the TMP console and select the corresponding Prometheus instance to go to the management page.
2. In Data Collection > Integrate with TKE, select the associated cluster, then choose Data Collection Configuration > Customize Monitoring Configuration to add collection tasks.
Method 1
Method 2
Add PodMonitors via service discovery to define a Prometheus collection task, choose Via YAML > PodMonitors, enter the YAML configurations, then click OK, as shown below:

The YAML configuration example is as follows.
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: ingress-nginx-monitor # Enter a unique name.
namespace: prom-xxxxxxxx # Enter the namespace corresponding to the Prometheus instance ID or where ingress-nginx-controller resides.
spec:
podMetricsEndpoints:
- interval: 30s
port: metrics # Enter the portName corresponding to metrics in values.yaml in Step 1.
path: /metrics
honorLabels: true
relabelings:
- action: labeldrop
regex: endpoint
namespaceSelector: # Select the namespace where the ingress-nginx-controller pod to be monitored resides.
matchNames:
- ingress-nginx
selector: # Enter the Label value of the pod to be monitored to locate the target pod.
matchLabels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/component: controller
Add Prometheus native job configurations through the page editing capability of the console. Select On this page, and enter each configuration item as prompted. After configurations, click OK. The specific example is shown below:
Monitoring Type: Select PodMonitors.
Collection Task: Enter a unique name.
Namespace: Select the namespace where ingress-nginx-controller resides.
Workload Type: Select the load type of ingress-nginx-controller.
Workload: Select the load name of ingress-nginx-controller.
targetPort: Enter the port number set in Step 1.
metricsPath: Remain as /metrics.


Step 3: Verifying Configurations

1. In the current Prometheus instance, choose Data Collection > Integrate with TKE to select the corresponding cluster, then choose Data Collection Configuration > Custom Monitoring to view collection tasks.
2. Locate the collection tasks added in Step 2 (choose either of the two), then check whether the Metric Collection Rate exceeds 0 and whether the Targets values match the number of ingress-nginx-controller pods and are all in the up status, as shown below:

3. Click Metric Details corresponding to the collection tasks to view the metric collection details. Check if the metric list includes metrics with nginx_ingress as a prefix, as shown below:


Viewing Monitoring Information

Prerequisites

The Prometheus instance has been bound to a Grafana instance.

Directions

1. Log in to the TMP console and select the corresponding Prometheus instance to go to the management page.
2. In Data Collection > Integration Center, locate and click Nginx Ingress Controller for monitoring. Choose Dashboard > Dashboard operation > Install/Upgrade Dashboard, then click Install/Upgrade to enable the Nginx Ingress Controller monitoring dashboard.
3. On the Basic Info page of the instance, find the bound Grafana address, and open and log in to Grafana. Then, find the nginx-ingress related panel in the middleware folder to observe the above-mentioned ingress-nginx-controller dashboards, as shown below:

Nginx Ingress Controller:

Request Handling Performance:




도움말 및 지원

문제 해결에 도움이 되었나요?

피드백