Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Cloud Container Engine/ User Guide (Ankara Region)/ Observability/ Best Practices/ Monitoring Metrics of NGINX Ingress Controller

Monitoring Metrics of NGINX Ingress Controller

Updated on 2024-12-04 GMT+08:00

You can use Prometheus and Grafana to observe the metrics of NGINX Ingress Controller.

The following uses Prometheus as an example to describe how to view the metrics of NGINX Ingress Controller of a cluster.

  1. Accessing Prometheus

    (Optional) Bind a LoadBalancer Service to Prometheus so that Prometheus can be accessed from external networks.

  2. Monitoring Metrics of NGINX Ingress Controller

    Enable metric collection for NGINX Ingress Controller so that NGINX Ingress Controller metrics are automatically reported.

Prerequisites

  • The cloud native cluster monitoring add-on 3.9.5 or later has been installed in the cluster. For details about this add-on, see Cloud Native Cluster Monitoring.
  • NGINX Ingress Controller 2.5.4 or later has been installed in the cluster, and metric collection has been enabled. For details about this add-on, see Nginx Ingress Controller.

Accessing Prometheus

After the cloud native cluster monitoring add-on is installed, you can deploy workloads and Services. The Prometheus server will be deployed as a StatefulSet in the monitoring namespace.

You can create a public network LoadBalancer Service so that Prometheus can be accessed from external networks.

  1. Log in to the CCE console and click the name of the cluster with Prometheus installed to access the details page. In the navigation pane, choose Services & Ingresses.
  2. Click Create from YAML in the upper right corner to create a public network LoadBalancer Service.

    apiVersion: v1
    kind: Service
    metadata:
      name: prom-lb     # Service name, which is customizable.
      namespace: monitoring
      labels:
        app: prometheus
        component: server
      annotations:
        kubernetes.io/elb.id: 038ff***     # Replace it with the ID of the public network load balancer in the VPC that the cluster belongs to.
    spec:
      ports:
        - name: cce-service-0
          protocol: TCP
          port: 88             # Service port, which is customizable.
          targetPort: 9090     # Default Prometheus port. Retain the default value.
      selector:                # The label selector can be adjusted based on the label of a Prometheus server instance.
        app.kubernetes.io/name: prometheus
        prometheus: server
      type: LoadBalancer

  3. After the Service is created, enter Public IP address of the load balancer:Service port in the address box of the browser to access Prometheus.
  4. Choose Status > Targets to view the targets monitored by Prometheus.

Monitoring Metrics of NGINX Ingress Controller

Log in to Prometheus and click Graph to view the metrics of NGINX Ingress Controller.

Table 1 Metrics of NGINX Ingress Controller

Metric

Type

Description

nginx_ingress_controller_bytes_sent

Basic metric

Number of bytes sent to the client

nginx_ingress_controller_connect_duration_seconds

Basic metric

Duration for connecting to the upstream server

nginx_ingress_controller_header_duration_seconds

Basic metric

Time required for receiving the first header from the upstream server

nginx_ingress_controller_ingress_upstream_latency_seconds

Basic metric

Upstream service latency

nginx_ingress_controller_request_duration_seconds

Basic metric

Time required for processing a request, in milliseconds

nginx_ingress_controller_request_size

Basic metric

Length of a request, including the request line, header, and body

nginx_ingress_controller_requests

Basic metric

Total number of client requests

nginx_ingress_controller_response_duration_seconds

Basic metric

Time required for receiving the response from the upstream server

nginx_ingress_controller_response_size

Basic metric

Length of a response, including the request line, header, and request body

nginx_ingress_controller_nginx_process_connections

Basic metric

Number of client connections in the {active, reading, writing, or waiting} state

nginx_ingress_controller_nginx_process_connections_total

Basic metric

Total number of connections in the {accepted or handled} state

nginx_ingress_controller_nginx_process_cpu_seconds_total

Basic metric

CPU usage, in seconds

nginx_ingress_controller_nginx_process_num_procs

Basic metric

Number of processes

nginx_ingress_controller_nginx_process_oldest_start_time_seconds

Basic metric

Start time, in seconds elapsed since 00:00:00 on January 1, 1970

nginx_ingress_controller_nginx_process_read_bytes_total

Basic metric

Number of bytes read

nginx_ingress_controller_nginx_process_requests_total

Basic metric

Total number of client requests

nginx_ingress_controller_nginx_process_resident_memory_bytes

Basic metric

Number of bytes of resident memory in use

nginx_ingress_controller_nginx_process_virtual_memory_bytes

Basic metric

Number of bytes of virtual memory in use

nginx_ingress_controller_nginx_process_write_bytes_total

Basic metric

Number of bytes written

nginx_ingress_controller_build_info

Basic metric

A metric with a constant '1' labeled with information about the build

nginx_ingress_controller_check_success

Basic metric

Cumulative count of syntax check operations of NGINX Ingress Controller

nginx_ingress_controller_config_hash

Basic metric

Hash value of running NGINX Ingress Controller

nginx_ingress_controller_config_last_reload_successful

Basic metric

Whether the last configuration reload attempt was successful

nginx_ingress_controller_config_last_reload_successful_timestamp_seconds

Basic metric

Timestamp of the last successful configuration reload

nginx_ingress_controller_ssl_certificate_info

Basic metric

All labels associated with a certificate

nginx_ingress_controller_success

Basic metric

Cumulative count of reload operations of NGINX Ingress Controller

nginx_ingress_controller_orphan_ingress

Basic metric

Status of an orphaned ingress (1 indicates an orphaned ingress).

  • namespace: character string used to identify the namespace of the ingress
  • ingress: ingress name
  • type: status of the ingress. The value can be no-service or no-endpoint.

nginx_ingress_controller_admission_config_size

Basic metric

Size of the tested configuration

nginx_ingress_controller_admission_render_duration

Basic metric

Time required for the admission controller to render an ingress

nginx_ingress_controller_admission_render_ingresses

Basic metric

Length of an ingress rendered by the admission controller

nginx_ingress_controller_admission_roundtrip_duration

Basic metric

Complete duration of the admission controller at the time to process a new event (float seconds)

nginx_ingress_controller_admission_tested_duration

Basic metric

Time required for admission controller tests (float seconds)

nginx_ingress_controller_admission_tested_ingresses

Basic metric

Length of an ingress handled by the admission controller

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback