diff --git a/docs/content/logging-and-monitoring/prometheus.md b/docs/content/logging-and-monitoring/prometheus.md index fe1dafe9e2..76eec64d48 100644 --- a/docs/content/logging-and-monitoring/prometheus.md +++ b/docs/content/logging-and-monitoring/prometheus.md @@ -50,6 +50,13 @@ The Ingress Controller exports the following metrics: * `controller_ingress_resources_total`. Number of handled Ingress resources. This metric includes the label type, that groups the Ingress resources by their type (regular, [minion or master](/nginx-ingress-controller/configuration/ingress-resources/cross-namespace-configuration)). **Note**: The metric doesn't count minions without a master. * `controller_virtualserver_resources_total`. Number of handled VirtualServer resources. * `controller_virtualserverroute_resources_total`. Number of handled VirtualServerRoute resources. **Note**: The metric counts only VirtualServerRoutes that have a reference from a VirtualServer. + * `location_zone` (upstream services) metrics: + * `location_zone_sent`. Number of bytes sent to clients. + * `location_zone_received`. Number of bytes received from clients. + * `location_zone_requests`. Total number of client requests. + * `location_zone_responses`. Total number of responses sent to clients. + * `location_zone_responses_codes`. Total number of responses sent to clients. + * `location_zone_sent`. Number of bytes sent to clients. * `controller_transportserver_resources_total`. Number of handled TransportServer resources. This metric includes the label type, that groups the TransportServer resources by their type (passthrough, tcp or udp). * Workqueue metrics. **Note**: the workqueue is a queue used by the Ingress Controller to process changes to the relevant resources in the cluster like Ingress resources. The Ingress Controller uses only one queue. The metrics for that queue will have the label `name="taskQueue"` * `workqueue_depth`. Current depth of the workqueue. diff --git a/internal/configs/version1/nginx-plus.ingress.tmpl b/internal/configs/version1/nginx-plus.ingress.tmpl index 60b61acc05..2ceb881fec 100644 --- a/internal/configs/version1/nginx-plus.ingress.tmpl +++ b/internal/configs/version1/nginx-plus.ingress.tmpl @@ -179,6 +179,7 @@ server { {{range $location := $server.Locations}} location {{$location.Path}} { set $service "{{$location.ServiceName}}"; + status_zone "{{ $location.ServiceName }}"; {{with $location.MinionIngress}} # location for minion {{$location.MinionIngress.Namespace}}/{{$location.MinionIngress.Name}} set $resource_name "{{$location.MinionIngress.Name}}"; diff --git a/internal/configs/version2/nginx-plus.virtualserver.tmpl b/internal/configs/version2/nginx-plus.virtualserver.tmpl index c4c4b0e1f3..2a958a53ff 100644 --- a/internal/configs/version2/nginx-plus.virtualserver.tmpl +++ b/internal/configs/version2/nginx-plus.virtualserver.tmpl @@ -337,6 +337,7 @@ server { {{ range $l := $s.Locations }} location {{ $l.Path }} { set $service "{{ $l.ServiceName }}"; + status_zone "{{ $l.ServiceName }}"; {{ if $l.IsVSR }} set $resource_type "virtualserverroute"; set $resource_name "{{ $l.VSRName }}";