Cache HIT/MISS Prometheus metrics with NGINX Ingress Controller OSS

Subject: Cache HIT/MISS Prometheus metrics with NGINX Ingress Controller OSS

Hi F5 Community Team,

We are using F5 NGINX Ingress Controller with NGINX Open Source (nginxplus: false) and NGINX cache policies through VirtualServer resources.

We need Prometheus/Grafana visibility for cache status, specifically cache HIT, MISS, and STALE response counters. Our current /metrics endpoint on port 9113 exposes controller, connection, and total HTTP request metrics, but no cache-status metrics.

Could you please confirm:

  1. Can cache_hit_responses, cache_miss_responses, and cache_stale_responses be exposed when using NGINX Open Source?
  2. Or are nginxplus_cache_* metrics available only with NGINX Plus and its license?
  3. If OSS does not support them, is there a recommended supported way to export cache status as Prometheus metrics—other than parsing access logs?

Title: Expose upstream cache HIT/MISS as Prometheus metrics in F5 NGINX Ingress Controller

Question:

Hi F5 community,

We run F5 NGINX Ingress Controller on Kubernetes and have upstream caching enabled for a VirtualServer.

Our NGINX access logs correctly expose the cache result using:

cache_status=$upstream_cache_status

For example, we see HIT and MISS in access logs. However, the Prometheus endpoint on port 9113 only exposes a total request metric:

nginx_ingress_nginx_http_requests_total{class="cms-gec-f5"} 340090

This metric has no labels for cache state, URI, host, status, or upstream.

Is there a supported way to expose upstream-cache metrics such as:

nginx_ingress_upstream_cache_requests_total{
  cache_status="HIT|MISS|BYPASS|EXPIRED|STALE",
  virtualserver="...",
  upstream="..."
}

Questions:

  1. Does F5 NGINX Ingress Controller expose $upstream_cache_status as a native Prometheus metric?
  2. Is this capability available only with NGINX Plus?