For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Control plane metrics
View and reference control plane metrics emitted by the enterprise-agentgateway controller.
The agentgateway control plane exposes Prometheus-compatible metrics on port 9092. The metrics track resource reconciliation counts and XDS synchronization with the proxy.
Control plane metrics cannot be customized. To set up automatic scraping of these metrics with Prometheus, see Enable metrics scraping.
View control plane metrics
Port-forward the control plane deployment.
kubectl port-forward -n agentgateway-system deployment/enterprise-agentgateway 9092:9092Query the metrics endpoint.
curl http://localhost:9092/metricsExample output:
# HELP agentgateway_controller_reconciliations_total Total number of controller reconciliations # TYPE agentgateway_controller_reconciliations_total counter agentgateway_controller_reconciliations_total{controller="gateway",result="error"} 14 agentgateway_controller_reconciliations_total{controller="gateway",result="success"} 62 agentgateway_controller_reconciliations_total{controller="gatewayclass",result="success"} 2Enable metrics scraping for control plane metrics with the OTel stack so that you can export and visualize metrics in monitoring tools, such as Prometheus and Grafana. For more information, see Scrape metrics for querying and visualization.
Control plane metrics reference
Review the metrics that are emitted by the agentgateway control plane.
The agentgateway_controller_reconciliations_total counter has only the controller and result labels. For the gateway controller, the counter includes only Gateways whose GatewayClass the agentgateway controller manages.
| Name | Type | Labels | Help |
|---|---|---|---|
| agentgateway_controller_reconciliations_total | counter | controller, result | Total number of controller reconciliations |
| agentgateway_xds_auth_rq_failure_total | counter | Total number of failed xDS auth requests | |
| agentgateway_xds_auth_rq_success_total | counter | Total number of successful xDS auth requests | |
| agentgateway_xds_auth_rq_total | counter | Total number of xDS auth requests | |
| agentgateway_xds_cert_expiry_seconds | gauge | Expiry timestamp (Unix seconds) of the current xDS serving certificate | |
| agentgateway_xds_cert_rotation_errors_total | counter | Total number of failed xDS certificate rotations | |
| agentgateway_xds_cert_rotation_total | counter | Total number of successful xDS certificate rotations | |
| agentgateway_xds_rejects_total | counter | Total number of xDS responses rejected by agentgateway proxy | |
| agentgateway_xds_warnings_total | counter | Total number of xDS responses with configuration warnings from agentgateway proxy |
Enterprise metrics
The enterprise controller publishes the following metrics on the metrics port, in addition to the control plane metrics.
- The
controllerlabel of theenterprise_agentgateway_controller_*metrics identifies the enterprise controller that emitted the metric:agw-ext-auth,agw-ext-cache,agw-rate-limiter, oragw-waf. - The
enterprise_agentgateway_tokenexchange_*metrics cover the upstream tokens that the STS stores for elicitations. Theeventlabel oftoken_lifecycle_events_totaliscreated,rotated, ordeleted, and theoutcomelabel issuccessorfailed. Therotatedevent counts refresh token rotation specifically, so it stays at zero for providers that return no new refresh token on refresh.
Note
An identity provider that rejects the stored refresh token does not increment a counter. Instead, look for the refresh failed entry in the controller log, and for repeated re-authorization prompts for the same user. A rising token_lifecycle_events_total{event="rotated",outcome="failed"} count means the opposite: the provider returned a rotated token that the controller could not save.
| Name | Type | Labels | Help |
|---|---|---|---|
| enterprise_agentgateway_controller_reconciliations_total | counter | controller, result | Total number of controller reconciliation loops run to align actual resource states with desired states |
| enterprise_agentgateway_externalsecret_desired | gauge | Number of external secret resources observed during the latest reconcile pass | |
| enterprise_agentgateway_externalsecret_last_success_timestamp_seconds | gauge | namespace, name | Unix timestamp of the last successful external secret refresh |
| enterprise_agentgateway_externalsecret_materialized | gauge | Number of external secrets currently materialized and served | |
| enterprise_agentgateway_externalsecret_reconcile_duration_seconds | histogram | External secret materializer reconcile pass duration | |
| enterprise_agentgateway_externalsecret_refresh_duration_seconds | histogram | store, result | External secret provider resolve and fetch duration |
| enterprise_agentgateway_externalsecret_refresh_total | counter | namespace, name, store, result | Total external secret refresh attempts by outcome |
| enterprise_agentgateway_externalsecret_resolve_total | counter | result | Total external secret credential resolver lookups by outcome |
| enterprise_agentgateway_tokenexchange_db_pool_idle_connections | gauge | database_type | Current number of idle token exchange database connections. |
| enterprise_agentgateway_tokenexchange_db_pool_in_use_connections | gauge | database_type | Current number of token exchange database connections in use. |
| enterprise_agentgateway_tokenexchange_db_pool_max_idle_closed_total | counter | database_type | Total token exchange database connections closed due to SetMaxIdleConns. |
| enterprise_agentgateway_tokenexchange_db_pool_max_idle_time_closed_total | counter | database_type | Total token exchange database connections closed due to SetConnMaxIdleTime. |
| enterprise_agentgateway_tokenexchange_db_pool_max_lifetime_closed_total | counter | database_type | Total token exchange database connections closed due to SetConnMaxLifetime. |
| enterprise_agentgateway_tokenexchange_db_pool_max_open_connections | gauge | database_type | Configured maximum number of open token exchange database connections. A value of 0 means unlimited. |
| enterprise_agentgateway_tokenexchange_db_pool_open_connections | gauge | database_type | Current number of established token exchange database connections, both in use and idle. |
| enterprise_agentgateway_tokenexchange_db_pool_wait_count_total | counter | database_type | Total token exchange database pool waits for a connection. |
| enterprise_agentgateway_tokenexchange_db_pool_wait_duration_seconds_total | counter | database_type | Total time spent waiting for token exchange database pool connections. |
| enterprise_agentgateway_tokenexchange_token_dek_cache_evictions_total | counter | reason | Total shared envelope DEK cache evictions by reason. |
| enterprise_agentgateway_tokenexchange_token_dek_cache_requests_total | counter | result | Total shared envelope DEK cache lookups by result. |
| enterprise_agentgateway_tokenexchange_token_lifecycle_events_total | counter | event, outcome | Token lifecycle events by event type and outcome. Per-user / per-resource attribution lives in audit logs. |
| enterprise_agentgateway_tokenexchange_token_maintenance_cycle_duration_seconds | histogram | database_type | Wall time of a single token exchange maintenance cycle. |
| enterprise_agentgateway_tokenexchange_token_maintenance_cycles_total | counter | database_type | Total successful token exchange maintenance cycles. |
| enterprise_agentgateway_tokenexchange_token_maintenance_elicitations_deleted_total | counter | database_type | Total elicitations deleted because they exceeded the elicitation retention or were unusable. |
| enterprise_agentgateway_tokenexchange_token_maintenance_elicitations_reset_total | counter | database_type | Total Completed elicitations reset to Pending because their tokens were removed or invalid. |
| enterprise_agentgateway_tokenexchange_token_maintenance_expired_deleted_total | counter | database_type | Total tokens rows deleted because they were expired beyond the retention window. |
| enterprise_agentgateway_tokenexchange_token_maintenance_failures_total | counter | database_type | Total failed token exchange maintenance cycles. |
| enterprise_agentgateway_tokenexchange_token_maintenance_flow_states_deleted_total | counter | database_type | Total expired OAuth flow states deleted. |
| enterprise_agentgateway_tokenexchange_token_maintenance_invalid_deleted_total | counter | database_type | Total tokens rows deleted because their encrypted envelope data was invalid. |
| enterprise_agentgateway_tokenexchange_token_maintenance_orphans_deleted_total | counter | database_type | Total tokens rows deleted because their elicitation no longer exists. |
| enterprise_agentgateway_tokenexchange_token_refresh_conflicts_total | counter | Total optimistic refresh conflicts that required another decision cycle. | |
| enterprise_agentgateway_tokenexchange_token_refresh_persist_failures_total | counter | Total refreshes where the IdP succeeded but persistence failed. | |
| enterprise_agentgateway_tokenexchange_token_refresh_retries_exhausted_total | counter | Total refresh attempts that exhausted the optimistic retry budget. | |
| enterprise_agentgateway_tokenexchange_token_refresh_served_under_contention_total | counter | Total refresh exhaustion cases where the latest stored token was still safely usable. | |
| enterprise_agentgateway_tokenexchange_token_refresh_singleflight_leader_timeouts_total | counter | Total refresh singleflight leaders that reached the leader timeout. | |
| enterprise_agentgateway_translator_translation_duration_seconds | histogram | name, namespace, translator | Translation duration |
| enterprise_agentgateway_translator_translations_running | gauge | name, namespace, translator | Current number of translations running |
| enterprise_agentgateway_translator_translations_total | counter | name, namespace, translator, result | Total number of translations |