tencent cloud

Tencent Kubernetes Engine

Release Notes and Announcements
Release Notes
Announcements
Release Notes
Product Introduction
Overview
Strengths
Architecture
Scenarios
Features
Concepts
Native Kubernetes Terms
Common High-Risk Operations
Regions and Availability Zones
Service Regions and Service Providers
Open Source Components
Purchase Guide
Purchase Instructions
Purchase a TKE General Cluster
Purchasing Native Nodes
Purchasing a Super Node
Getting Started
Beginner’s Guide
Quickly Creating a Standard Cluster
Examples
Container Application Deployment Check List
Cluster Configuration
General Cluster Overview
Cluster Management
Network Management
Storage Management
Node Management
GPU Resource Management
Remote Terminals
Application Configuration
Workload Management
Service and Configuration Management
Component and Application Management
Auto Scaling
Container Login Methods
Observability Configuration
Ops Observability
Cost Insights and Optimization
Scheduler Configuration
Scheduling Component Overview
Resource Utilization Optimization Scheduling
Business Priority Assurance Scheduling
QoS Awareness Scheduling
Security and Stability
TKE Security Group Settings
Identity Authentication and Authorization
Application Security
Multi-cluster Management
Planned Upgrade
Backup Center
Cloud Native Service Guide
Cloud Service for etcd
TMP
TKE Serverless Cluster Guide
TKE Registered Cluster Guide
Use Cases
Cluster
Serverless Cluster
Scheduling
Security
Service Deployment
Network
Release
Logs
Monitoring
OPS
Terraform
DevOps
Auto Scaling
Containerization
Microservice
Cost Management
Hybrid Cloud
AI
Troubleshooting
Disk Full
High Workload
Memory Fragmentation
Cluster DNS Troubleshooting
Cluster kube-proxy Troubleshooting
Cluster API Server Inaccessibility Troubleshooting
Service and Ingress Inaccessibility Troubleshooting
Common Service & Ingress Errors and Solutions
Engel Ingres appears in Connechtin Reverside
CLB Ingress Creation Error
Troubleshooting for Pod Network Inaccessibility
Pod Status Exception and Handling
Authorizing Tencent Cloud OPS Team for Troubleshooting
CLB Loopback
API Documentation
History
Introduction
API Category
Making API Requests
Elastic Cluster APIs
Resource Reserved Coupon APIs
Cluster APIs
Third-party Node APIs
Relevant APIs for Addon
Network APIs
Node APIs
Node Pool APIs
TKE Edge Cluster APIs
Cloud Native Monitoring APIs
Scaling group APIs
Super Node APIs
Other APIs
Data Types
Error Codes
TKE API 2022-05-01
FAQs
TKE General Cluster
TKE Serverless Cluster
About OPS
Hidden Danger Handling
About Services
Image Repositories
About Remote Terminals
Event FAQs
Resource Management
Service Agreement
TKE Service Level Agreement
TKE Serverless Service Level Agreement
Contact Us
Glossary

NginxIngress Log Configuration

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-06-20 10:16:07
Note:
The NginxIngress addon stopped updating. For details, see Discontinuing Update of NginxIngress Addon.

NginxIngress Log Types

Nginx Controller collects and provides the following logs to users:
Nginx Controller Log: major. The control plane logs, which record the modification of the Nginx Controller control plane. It is mainly used for control plane troubleshooting, for example, due to the incorrect configuration of the Ingress template, the synchronization is not performed.
AccessLog Log: major. User data plane logs, which record the relevant information of user’s layer-7 request. It is mainly used for users to perform data analysis, audit, business troubleshooting, etc.
ErrorLog Log: minor. The internal error log of Nginx.
By default, the AccessLog and Nginx Controller logs will be mixed into the standard output stream, and there will be difficulties for log collection. This document describes how to distinguish log paths and collect logs separately.

Prerequisites

You have enabled Log Collection in Feature Management in the TKE console. For more information, see Enabling Log Collection.

TKE NginxIngress Log Collection

Log collection directions

1. Install NginxIngress Addon for the target cluster.
2. On Services and Routes > NginxIngress page, select an installed add-on to go to its details page.
3. On the Log Monitoring page, click Reset in the upper-right corner of the Log Configuration area.


4. Select or create a logset in the pop-up window, as shown in the figure below:


5. Click Enable.
Note:
For information on CLS billing rules and billing standards, see Billing Overview.

Log collection metrics

The log collection metrics are as follows:
apiVersion: cls.cloud.tencent.com/v1
kind: LogConfig
metadata:
name: nginx-ingress-test
resourceVersion: "7169042"
selfLink: /apis/cls.cloud.tencent.com/v1/logconfigs/nginx-ingress-test
uid: 67c96f86-4160-****-****-f6faf8d544dc
spec:
clsDetail:
extractRule:
beginningRegex: (\\S+)\\s-\\s(\\S+)\\s\\[(\\S+)\\]\\s(\\S+)\\s\\"(\\w+)\\s(\\S+)\\s([^\\"]+)\\"\\s(\\S+)\\s(\\S+)\\s\\"([^"]*)\\"\\s\\"([^"]*)\\"\\s(\\S+)\\s(\\S+)\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s(\\S+)
keys:
- remote_addr
- remote_user
- time_local
- timestamp
- method
- url
- version
- status
- body_bytes_sent
- http_referer
- http_user_agent
- request_length
- request_time
- proxy_upstream_name
- proxy_alternative_upstream_name
- upstream_addr
- upstream_response_length
- upstream_response_time
- upstream_status
- req_id
logRegex: (\\S+)\\s-\\s(\\S+)\\s\\[(\\S+)\\]\\s(\\S+)\\s\\"(\\w+)\\s(\\S+)\\s([^\\"]+)\\"\\s(\\S+)\\s(\\S+)\\s\\"([^"]*)\\"\\s\\"([^"]*)\\"\\s(\\S+)\\s(\\S+)\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s\\[([^\\]]*)\\]\\s(\\S+)
logType: fullregex_log
topicId: 56766bad-368e-****-****-ed77ebcdefa8
inputDetail:
containerFile:
container: controller
filePattern: nginx_access.log
logPath: /var/log/nginx
namespace: default
workload:
kind: deployment
name: nginx-ingress-nginx-controller
type: container_file

NginxIngress log dashboard

TKE will automatically create a standard log dashboard once NginxIngress log collection enabled. You can also configure the chart on the CLS console based on your business needs, as shown in the figure below:




References

If you need to customize log collection rules and indexes, see Custom Nginx Ingress Log.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan