diff --git a/modules/deploy/pages/console/kubernetes/deploy.adoc b/modules/deploy/pages/console/kubernetes/deploy.adoc index 091359c4ff..ca7a522894 100644 --- a/modules/deploy/pages/console/kubernetes/deploy.adoc +++ b/modules/deploy/pages/console/kubernetes/deploy.adoc @@ -390,6 +390,8 @@ spec: == Monitoring +Configure metrics exposure and Prometheus scraping for Redpanda Console. + Enable monitoring for Redpanda Console: [,yaml] @@ -401,6 +403,88 @@ config: port: 9090 ---- +=== Prometheus ServiceMonitor + +If you use the https://github.com/prometheus-operator/prometheus-operator[Prometheus Operator^], deploy a `ServiceMonitor` resource alongside Redpanda Console. Prometheus then discovers and scrapes Console metrics from the `/admin/metrics` endpoint. + +[tabs] +====== +Operator:: ++ +-- + +To enable the ServiceMonitor in the Console custom resource, set `monitoring.enabled` to `true`: + +[,yaml] +---- +apiVersion: cluster.redpanda.com/v1alpha2 +kind: Console +metadata: + name: redpanda-console + namespace: redpanda +spec: + monitoring: + enabled: true <1> + scrapeInterval: "30s" <2> + labels: <3> + release: kube-prometheus-stack + cluster: + clusterRef: + name: redpanda +---- + +<1> Set to `true` to create a `ServiceMonitor` resource. Default: `false`. +<2> How often Prometheus scrapes the metrics endpoint. Default: `1m`. +<3> Additional labels to apply to the `ServiceMonitor`. Match your Prometheus Operator's `serviceMonitorSelector` by applying the same labels here. + +Apply the Console CR: + +[,bash] +---- +kubectl apply -f console.yaml --namespace redpanda +---- + +-- +Helm:: ++ +-- + +To enable the ServiceMonitor in the Console Helm chart, add the following to your `console-values.yaml`: + +[,yaml] +---- +monitoring: + enabled: true <1> + scrapeInterval: "30s" <2> + labels: {} <3> +---- + +<1> Set to `true` to create a `ServiceMonitor` resource. Default: `false`. +<2> How often Prometheus scrapes the metrics endpoint. Default: `1m`. +<3> Additional labels to apply to the `ServiceMonitor`. Match your Prometheus Operator's `serviceMonitorSelector` by applying the same labels here. For example: ++ +[,yaml] +---- +monitoring: + enabled: true + labels: + release: kube-prometheus-stack +---- + +If you deploy Redpanda Console as a subchart of the Redpanda Helm chart, configure monitoring under the `console` key. All `monitoring` options are available under this key. + +[,yaml] +---- +console: + monitoring: + enabled: true +---- + +-- +====== + +When the Console server is configured with TLS (`config.server.tls.enabled: true`), the ServiceMonitor uses HTTPS and configures CA validation for scraping. + == Troubleshooting * **Connection refused**: Verify Redpanda broker addresses and network policies