For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Export metrics to an external system
Send agentgateway metrics to Prometheus, Datadog, Grafana Cloud, or any OTLP-compatible backend by using an OTel Collector or Prometheus Operator ServiceMonitor and PodMonitor resources.
Agentgateway exposes Prometheus-compatible metrics endpoints for both the control plane and data plane. Prometheus is the standard for metrics collection in Kubernetes environments and integrates with dashboarding tools, such as Grafana, and alerting tools, such as Alertmanager.
Choose between one of the following options to export metrics to Prometheus.
Option 1: OTel Collector (recommended)
Use an OpenTelemetry Collector with the Prometheus receiver to scrape the metrics endpoints of the Solo Enterprise for agentgateway control and data plane and push this data to Prometheus by using the Prometheus remote write protocol. This approach works without Prometheus Operator CRDs and does not require any changes to your existing Prometheus configuration beyond enabling the remote write receiver.
The following example installs a standalone OTel Collector that scrapes both the control plane and data plane endpoints and writes to a Prometheus instance. Make sure to set the exporters.prometheusremotewrite.endpoint to the hostname or IP address of your Prometheus instance. For Prometheus to accept remote write data, start it with the --web.enable-remote-write-receiver flag, or use a managed Prometheus service, such as Grafana Cloud or Amazon Managed Service for Prometheus that accepts remote write by default.
helm upgrade --install agentgateway-metrics opentelemetry-collector \
--repo https://open-telemetry.github.io/opentelemetry-helm-charts \
--set mode=deployment \
--set image.repository="otel/opentelemetry-collector-contrib" \
--set command.name="otelcol-contrib" \
--namespace agentgateway-system \
-f - <<EOF
config:
receivers:
prometheus:
config:
scrape_configs:
- job_name: agentgateway-controller
scrape_interval: 15s
static_configs:
- targets:
- enterprise-agentgateway.agentgateway-system:9092
- job_name: agentgateway-proxy
scrape_interval: 15s
static_configs:
- targets:
- agentgateway-proxy.agentgateway-system:15020
exporters:
prometheusremotewrite:
endpoint: http://<your-prometheus-host>:9090/api/v1/write
service:
pipelines:
metrics:
receivers: [prometheus]
processors: [batch]
exporters: [prometheusremotewrite]
EOFNote
If proxy pods run in namespaces other than agentgateway-system, add their endpoints to the static_configs targets list, or use the Kubernetes service discovery receiver (k8s_cluster) to discover them automatically.
Tip
Want a different backend? The OTel Collector approach works with any monitoring backend. Replace the prometheusremotewrite exporter with the exporter your provider expects, such as otlp for OTLP-native backends or a vendor-specific exporter such as datadog. The receiver side that scrapes the control and data plane metrics endpoints stays the same regardless of the backend that you choose. For more exporter options, see the OpenTelemetry Collector contrib exporter list.
Option 2: Prometheus Operator ServiceMonitor and PodMonitor
If your cluster already runs Prometheus with the Prometheus Operator, set monitoring.enabled=true in the Solo Enterprise for agentgateway Helm chart to create a ServiceMonitor resource for the control plane metrics endpoint on port 9092 and a PodMonitor resource for the data plane metrics endpoint on port 15020. Prometheus discovers these resources automatically if the labels on these resources match the label selector that your Prometheus instance uses. The PodMonitor resource uses the scrapeNativeHistograms field, so your cluster must have the Prometheus Operator CRDs version 0.88.0 or later. With an earlier version, the Helm upgrade fails because the API server rejects the PodMonitor.
Review the label selectors that your Prometheus instance uses.
kubectl get prometheus -A -o jsonpath='{.items[*].spec.serviceMonitorSelector}'Upgrade your Solo Enterprise for agentgateway Helm chart to enable the creation of ServiceMonitor and PodMonitor resources.
Make sure to add the label selectors that your instance expects in the
monitoring.serviceMonitor.extraLabels.releasevalue. Note that this value must match the Helm release name of yourkube-prometheus-stackinstallation. The Prometheus Operator uses label selectors to decide which ServiceMonitor and PodMonitor resources to act on. Without a matchingreleaselabel, Prometheus silently ignores the monitors and no scraping occurs.helm upgrade -i enterprise-agentgateway oci://us-docker.pkg.dev/solo-public/enterprise-agentgateway/charts/enterprise-agentgateway \ --reuse-values \ --version v2026.10.2 \ --set monitoring.enabled=true \ --set monitoring.serviceMonitor.extraLabels.release=kube-prometheus-stack \ --set-string licensing.licenseKey=${AGENTGATEWAY_LICENSE_KEY} \ -n agentgateway-systemVerify that the ServiceMonitor and PodMonitor resources are created.
kubectl get servicemonitor,podmonitor -n agentgateway-systemExample output:
NAME AGE servicemonitor.monitoring.coreos.com/enterprise-agentgateway 113s NAME AGE podmonitor.monitoring.coreos.com/enterprise-agentgateway-proxy 113s
Scrape proxy pods in other namespaces
By default, the PodMonitor resource only selects proxy pods in the release namespace for the enterprise-agentgateway GatewayClass. To scrape proxies in other namespaces or for additional GatewayClasses, add these namespaces and GatewayClasses to your Helm values file as shown in the following configuration.
To scrape proxy pods in every namespace, set monitoring.proxy.namespaceSelector to any: true as shown in the following example.
monitoring:
enabled: true
serviceMonitor:
extraLabels:
release: kube-prometheus-stack
proxy:
namespaceSelector:
any: trueTo scrape proxy pods in specific namespaces only, use a matchNames list instead as shown in the following example.
monitoring:
enabled: true
serviceMonitor:
extraLabels:
release: kube-prometheus-stack
proxy:
namespaceSelector:
matchNames:
- namespace-1
- namespace-2By default, the PodMonitor selects proxy pods that belong to the enterprise-agentgateway GatewayClass. If you use multiple GatewayClasses and want to scrape proxy pods for all of them, add each class name to monitoring.proxy.gatewayClassNames.
monitoring:
enabled: true
serviceMonitor:
extraLabels:
release: kube-prometheus-stack
proxy:
namespaceSelector:
matchNames:
- namespace-1
- namespace-2
gatewayClassNames:
- enterprise-agentgateway
- my-other-gatewayclassGrafana dashboard
Note
Grafana is not included in the enterprise agentgateway stack. The Solo UI is the built-in dashboard. The steps in this section are only relevant if you bring your own Grafana deployment and want to load the pre-built agentgateway dashboard into it.
When monitoring.enabled=true is set, the enterprise Helm chart creates a ConfigMap named enterprise-agentgateway-dashboard in the release namespace. The ConfigMap carries the label grafana_dashboard: "1", which the Grafana dashboard sidecar uses to discover and automatically load dashboards.
Configure the Grafana sidecar
The Grafana sidecar only watches for ConfigMaps in its own namespace by default. If Grafana runs in a different namespace than agentgateway-system, configure it to watch the release namespace.
If you installed Grafana as part of kube-prometheus-stack, upgrade the release to add agentgateway-system to the sidecar’s search scope.
helm upgrade kube-prometheus-stack prometheus-community/kube-prometheus-stack \
--reuse-values \
-n <grafana-namespace> \
--set grafana.sidecar.dashboards.searchNamespace=agentgateway-systemTo watch all namespaces instead, set searchNamespace to ALL.
Verify the dashboard
Verify that the dashboard ConfigMap was created in the release namespace.
kubectl get configmap enterprise-agentgateway-dashboard -n agentgateway-systemOpen Grafana and navigate to Dashboards. The agentgateway dashboard appears automatically once the sidecar picks up the ConfigMap. If it does not appear, check the Grafana sidecar logs.
kubectl logs -n <grafana-namespace> -l app.kubernetes.io/name=grafana -c grafana-sc-dashboard