Connectivity Link observability
Connectivity Link uses component metrics, Gateway API state metrics, and standard Envoy metrics to build template dashboards and alerts. Envoy is part of OpenShift Service Mesh. In this case, it runs as a gateway deployment.
You can download community-based templates to integrate with Grafana, Prometheus, and Alertmanager deployments. You can also use those templates as starting points that you can change for your specific needs. Use the secure images available in the Red Hat Catalog. For more information, see "Red Hat Connectivity Link".
Connectivity Link includes the following observability capabilities:
-
Metrics: Prometheus metrics for monitoring gateway and policy performance
-
Tracing: Distributed tracing with Red Hat build of OpenTelemetry support for request flows
-
Access Logs: Envoy access logs with request correlation and structured logging
-
Dashboards: Pre-built Grafana dashboards for visualization
Configure your observability monitoring stack
You can prepare your monitoring stack to give yourself insight into your gateways, applications, and APIs by setting up dashboards and alerts on your OpenShift Container Platform cluster.
You must configure your stack on each OpenShift Container Platform cluster that you want to use Connectivity Link on.
The example dashboards and alerts for observing Connectivity Link functionality use low-level CPU and network metrics from the user monitoring stack in OpenShift Container Platform and resource-state metrics from Gateway API and Connectivity Link resources. The user monitoring stack in OpenShift Container Platform is based on the Prometheus open source project.
|
Important
|
The following procedure is an example only and is not intended for production use. |
-
You installed Connectivity Link.
-
You set up metrics, such as
prometheus. -
You installed and configured Grafana on your OpenShift Container Platform cluster.
-
You cloned the Kuadrant Operator GitHub repository.
-
Verify that the user workload monitoring is configured correctly in your OpenShift Container Platform cluster by running the following command:
$ oc get configmap cluster-monitoring-config -n openshift-monitoring -o jsonpath='{.data.config\.yaml}'|grep enableUserWorkloadExample output`enableUserWorkload: true`. -
Install the Connectivity Link, Gateway, and Grafana component metrics and configuration as follows:
$ oc apply -k https://github.com/Kuadrant/kuadrant-operator/config/install/configure/observability?ref=v1.2.0 -
From the root directory of your Kuadrant Operator repository, configure the OpenShift Container Platform
thanos-queryinstance as a data source in Grafana by using the following example:TOKEN="Bearer $(oc whoami -t)" HOST="$(oc -n openshift-monitoring get route thanos-querier -o jsonpath='https://{.status.ingress[].host}')" echo "TOKEN=$TOKEN" > config/observability/openshift/grafana/datasource.env echo "HOST=$HOST" >> config/observability/openshift/grafana/datasource.env oc apply -k config/observability/openshift/grafana -
Configure the example Grafana dashboards by running the following command:
$ oc apply -k https://github.com/Kuadrant/kuadrant-operator/examples/dashboards?ref=v1.4.1
Enable observability monitoring in Connectivity Link
By enabling observability monitoring, you can view context, historical trends, and alerts based on the metrics you configure. After you have configured your monitoring stack, use this step to expose metrics endpoints, deploy monitoring resources, and configure the Envoy gateway.
When you enable observability monitoring, the following events occur:
-
Connectivity Link creates
ServiceMonitorandPodMonitorcustom resource definitions (CRDs) for its components in the namespace where Connectivity Link is. -
A single set of monitors is created in each gateway namespace to scrape metrics from any gateways.
-
Monitors also scrape metrics from the corresponding gateway system namespace, generally the
istio-systemnamespace.
You can delete and re-create monitors as required. Monitors are only ever created or deleted, and not updated or reverted. The following procedure is optional. You can create your own ServiceMonitor or PodMonitor definitions, or configure prometheus metrics directly.
|
Important
|
To use Connectivity Link observability dashboards, you must enable observability on each OpenShift Container Platform cluster that Connectivity Link runs on. |
-
You installed Connectivity Link.
-
You have administrator access to your OpenShift Container Platform cluster.
-
You configured observability metrics.
-
To enable default observability for Connectivity Link and any gateways, set
spec.observability.enableparameter value totruein yourKuadrantcustom resource (CR):ExampleKuadrantCRapiVersion: kuadrant.io/v1beta1 kind: Kuadrant metadata: name: kuadrant-sample spec: observability: enable: true # ...You can also set the
spec.observability.enabletofalseand create your ownServiceMonitororPodMonitordefinitions, or configure Prometheus directly.
-
Check the created monitors by running the following command:
$ oc get servicemonitor,podmonitor -A -l kuadrant.io/observability=true