tencent cloud

Tencent Kubernetes Engine

소식 및 공지 사항
릴리스 노트
제품 릴리스 기록
제품 소개
제품 장점
제품 아키텍처
시나리오
제품 기능
리전 및 가용존
빠른 시작
신규 사용자 가이드
표준 클러스터를 빠르게 생성
Demo
클라우드에서 컨테이너화된 애플리케이션 배포 Check List
TKE 표준 클러스터 가이드
Tencent Kubernetes Engine(TKE)
클러스터 관리
네트워크 관리
스토리지 관리
Worker 노드 소개
Kubernetes Object Management
워크로드
클라우드 네이티브 서비스 가이드
Tencent Managed Service for Prometheus
TKE Serverless 클러스터 가이드
TKE 클러스터 등록 가이드
실습 튜토리얼
Serverless 클러스터
네트워크
로그
모니터링
유지보수
DevOps
탄력적 스케일링
자주 묻는 질문
클러스터
TKE Serverless 클러스터
유지보수
서비스
이미지 레지스트리
원격 터미널
문서Tencent Kubernetes Engine

NginxIngress Log Configuration

포커스 모드
폰트 크기
마지막 업데이트 시간: 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.

도움말 및 지원

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

피드백