Skip to content

Phase 7: Observability (Optional)

This phase installs the optional observability operators and configuration.
Note

In Red Hat OpenShift AI 3.5, the monitoring stack uses the Cluster Observability Operator (COO) and its MonitoringStack CR for metrics collection. User Workload Monitoring (UWM) is no longer required. The RHOAI operator creates its own ServiceMonitors with monitoring.opendatahub.io/scrape labels that the COO-managed Prometheus scrapes.

This phase installs the optional observability operators and configuration:

  1. Tempo Operator - provides the TempoStack CRD that the RHOAI operator’s Monitoring controller requires for distributed tracing. Without this operator, the Monitoring CR cannot provision tracing infrastructure.

  2. Red Hat build of OpenTelemetry Operator - provides the OpenTelemetryCollector CRD that the RHOAI operator’s Monitoring controller requires. Without this operator, the Monitoring CR fails with: “OpenTelemetryCollector operator must be installed for OpenTelemetry configuration”. This blocks the full observability chain: MonitoringStack, ThanosQuerier, Perses, and PrometheusDatasource.

  3. Cluster Observability Operator (COO) - required for the Observability Dashboard tab in the Red Hat OpenShift AI UI. COO provides the Perses CRDs (Perses, PersesDatasource, PersesDashboard) that the RHOAI operator uses to deploy the dashboard backend.

  4. Gateway Telemetry (auto-created) - the RHOAI operator auto-creates a TelemetryPolicy and Istio Telemetry CR when telemetry is enabled on the MaasTenantConfig (3.5) or Tenant (3.4). These add per-model, per-subscription, and per-organization labels to gateway metrics for usage attribution.

  5. Loki Operator + Usage Dashboards (RHOAI 3.5+ only) - log-based per-request usage tracking. The gateway emits structured OTLP access logs with token counts, user identity, and subscription info. Logs are shipped to a LokiStack via an OpenTelemetry Collector. The RHOAI console shows admin and user-scoped usage dashboards under Observe & monitor.

Tip

All file paths and oc apply commands in this guide are relative to the CAI-Field-Manual-MaaS repository root. Make sure you have cloned it and are working from its root directory (see Getting Started).

Important

This guide is not a replacement for the official Red Hat OpenShift AI Models as a Service documentation (3.5 | 3.4). It is a companion resource with opinionated Kustomize manifests and automation scripts to accelerate deployment.

Step 1: Install the Tempo Operator

oc apply -k manifests/07-observability/tempo/

Wait for the operator CSV to reach Succeeded:

oc wait csv -n openshift-tempo-operator \
  -l operators.coreos.com/tempo-product.openshift-tempo-operator="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=300s

Step 2: Install the Red Hat build of OpenTelemetry Operator

oc apply -k manifests/07-observability/opentelemetry/

Wait for the operator CSV to reach Succeeded:

oc wait csv -n openshift-opentelemetry-operator \
  -l operators.coreos.com/opentelemetry-product.openshift-opentelemetry-operator="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=300s

Step 3: Install the Cluster Observability Operator

oc apply -k manifests/07-observability/coo/

Wait for the operator CSV to reach Succeeded:

oc wait csv -n openshift-cluster-observability-operator \
  -l operators.coreos.com/cluster-observability-operator.openshift-cluster-observability="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=300s

Step 4: Enable DSCI Monitoring

Now that all three observability operators are installed, configure the DSCI monitoring section to trigger the operator’s observability cascade (MonitoringStack, ThanosQuerier, Perses, tracing):

oc patch dsci default-dsci --type=merge -p '{
  "spec": {
    "monitoring": {
      "namespace": "redhat-ods-monitoring",
      "metrics": {
        "replicas": 1,
        "storage": {
          "size": "5Gi",
          "retention": "90d"
        }
      },
      "traces": {
        "sampleRatio": "0.1",
        "storage": {
          "backend": "pv",
          "retention": "2160h"
        }
      }
    }
  }
}'
Important

This step is required for the Observability Dashboard tab in the RHOAI UI to show metrics. Without it, the DSCI monitoring section remains empty (metrics: {}) and the dashboard has no data source.

Wait for the DSCI to reconcile:

oc wait --for=jsonpath='{.status.phase}'=Ready dsci/default-dsci --timeout=300s

Step 5: Enable Gateway Telemetry

The RHOAI operator auto-creates a TelemetryPolicy and an Istio Telemetry CR when telemetry is enabled on the MaaS tenant configuration. These add per-model, per-subscription, and per-organization labels to gateway Prometheus metrics. No manual YAML application is needed.

MaasTenantConfig

Patch the MaasTenantConfig to enable telemetry:

oc patch maastenantconfig default-tenant -n models-as-a-service \
  --type=merge -p '{"spec":{"telemetry":{"enabled":true}}}'

The operator creates a TelemetryPolicy with model, subscription, organization_id, and cost_center labels, plus an Istio Telemetry CR for REQUEST_DURATION per subscription. Verify they exist:

oc get telemetrypolicies.extensions.kuadrant.io -n openshift-ingress
oc get telemetry.telemetry.istio.io -n openshift-ingress

Enable per-user metrics, which the MaaS UI Usage tab needs to show per-user activity (RHOAI disables captureUser by default for GDPR compliance):

oc patch maastenantconfig default-tenant -n models-as-a-service \
  --type=merge -p '{"spec":{"telemetry":{"metrics":{"captureUser":true}}}}'

Tenant

Patch the Tenant CR to enable telemetry:

oc patch tenant default-tenant -n models-as-a-service \
  --type=merge -p '{"spec":{"telemetry":{"enabled":true}}}'

Verify the auto-created resources:

oc get telemetrypolicies.extensions.kuadrant.io -n openshift-ingress
oc get telemetry.telemetry.istio.io -n openshift-ingress
Note

The manifests in manifests/07-observability/telemetry/ are kept as a reference. The operator-created resources may differ slightly in label expressions and dimensions. You do not need to apply them manually.

Step 6: Usage Dashboards with Loki (RHOAI 3.5+ Only)

RHOAI 3.5 introduces log-based usage dashboards that provide per-request token consumption, user attribution, and subscription tracking. Unlike the Prometheus-based metrics (which aggregate data), this approach emits structured OTLP access logs from the gateway and stores them in Loki for exact per-call granularity.

When enabled, the RHOAI operator automatically creates:

  • EnvoyFilter maas-model-access-logs - emits OTLP structured access logs from the gateway on every inference request
  • OpenTelemetry Collector usage-logs - collects the access logs and exports them to the LokiStack
  • Tenancy Proxy usage-logs-tenancy-proxy - filters user-scoped usage data so non-admin users only see their own consumption
  • Perses Dashboards - admin (dashboard-4-maas-usage-logs-admin) and user-scoped (dashboard-5-maas-usage-logs) dashboards visible in the RHOAI console under Observe & monitor

Step 6a: Install the Loki Operator

oc apply -k manifests/07-observability/loki/

Wait for the operator CSV:

oc wait csv -n openshift-operators-redhat \
  -l operators.coreos.com/loki-operator.openshift-operators-redhat="" \
  --for=jsonpath='{.status.phase}'=Succeeded --timeout=300s

Step 6b: Deploy S3 Storage for Loki

Loki requires S3-compatible object storage. For non-production deployments, the guide includes a MinIO setup:

oc apply -k manifests/07-observability/usage-logging/

This deploys MinIO in redhat-ods-monitoring, creates a loki bucket, a storage secret, and the LokiStack CR.

Note

The LokiStack manifest uses gp3-csi as default StorageClass (common on AWS). If your cluster uses a different default (e.g. ocs-external-storagecluster-ceph-rbd on OCS), edit manifests/07-observability/usage-logging/lokistack.yaml before applying. For production, replace MinIO with an ObjectBucketClaim (NooBaa/ODF) or a cloud S3 bucket and update minio-secret with the real credentials.

Wait for the LokiStack to be ready:

oc wait lokistack/usage -n redhat-ods-monitoring \
  --for=jsonpath='{.status.conditions[?(@.type=="Ready")].status}'=True --timeout=300s

Step 6c: Enable Usage Logging

Patch the MaaS Config to enable the usage logging pipeline:

oc patch configs.maas.opendatahub.io default --type=merge \
  -p '{"spec":{"usageLogging":true}}'

The RHOAI operator will create the EnvoyFilter, OTEL Collector, Tenancy Proxy, and Perses Dashboards automatically. Verify:

oc get envoyfilter maas-model-access-logs -n openshift-ingress
oc get opentelemetrycollector usage-logs -n redhat-ods-monitoring
oc get persesdashboard -n redhat-ods-monitoring | grep usage-logs

The usage dashboards will appear in the RHOAI console under Observe & monitor > Dashboard, showing per-model token consumption, per-user breakdowns, and subscription usage.

Step 7: Limitador Persistence with Redis (Optional)

By default, Limitador stores rate-limit counters in memory. If the Limitador pod restarts, scales, or gets rescheduled, all counters reset to zero. For example, with a 7-day rate limit window, a pod restart on day 6 gives every user a full quota refresh for the remaining window period. For production deployments, configure Redis as a persistent backend so counters survive pod lifecycle events.

Note

Limitador supports additional storage backends beyond Redis. See the Limitador configuration documentation for details. This guide focuses on Redis.

Step 7a: Deploy Redis (Dev/Test)

oc apply -k manifests/07-observability/redis/

Wait for the Redis deployment:

oc wait --for=condition=available deployment/redis -n redis-limitador --timeout=120s
Warning

This deploys a single-replica, non-HA Redis instance with persistence disabled (no RDB/AOF). Data is stored in memory only and will be lost if the Redis pod itself restarts. This is for development and testing. For production, use a supported Redis-based data store - see the production guidance below.

Step 7b: Configure Limitador for Redis

Patch the Limitador CR to use the Redis secret created by the kustomize manifests:

oc patch limitador limitador -n kuadrant-system --type=merge -p '{
  "spec": {
    "storage": {
      "redis": {
        "configSecretRef": {
          "name": "redis-config"
        }
      }
    }
  }
}'

The Limitador operator will restart the pod automatically.

Step 7c: Verify Redis Connection

Verify the Limitador CR has the Redis storage configured:

oc get limitador limitador -n kuadrant-system -o jsonpath='{.spec.storage}'
# Expected: {"redis":{"configSecretRef":{"name":"redis-config"}}}

Test that counters survive a pod restart. First make a few inference requests (using an existing API key) to populate Redis, then restart Limitador:

# Check Redis has keys (should be > 0 after making requests):
oc exec -n redis-limitador deploy/redis -- redis-cli DBSIZE

# Restart Limitador:
oc delete pod -n kuadrant-system -l app=limitador
oc wait --for=condition=ready pod -n kuadrant-system -l app=limitador --timeout=60s

# Check Redis still has keys after restart:
oc exec -n redis-limitador deploy/redis -- redis-cli DBSIZE

If the DBSIZE is the same before and after the restart, counters survived and Redis persistence is working.

Production Redis guidance

For production deployments, use a supported Redis-based data store instead of the dev instance above. Supported options include Redis Enterprise, Amazon ElastiCache, and Dragonfly.

The configuration is the same - create a Secret with the Redis URL and patch the Limitador CR:

# Example with a production Redis endpoint
oc -n kuadrant-system create secret generic redis-config \
  --from-literal=URL=rediss://user:password@your-redis.example.com:6380 \
  --dry-run=client -o yaml | oc apply -f -

For complete production setup steps, see the Red Hat Connectivity Link - Configure Redis documentation.

Tip

The Track model usage with the OpenShift AI Usage Dashboard article explains how Limitador counters feed the usage dashboard metrics (authorized_calls, rate_limited, authorized_hits). Without Redis, these metrics reset on pod restart. For accurate long-term usage tracking, RHOAI 3.5 also provides logs-based usage dashboards (Step 6 above) which are independent of Limitador counter persistence.

Verification

Check all four observability operators are installed:

oc get csv -n openshift-tempo-operator | grep tempo
# Expected: tempo-operator   Succeeded

oc get csv -n openshift-opentelemetry-operator | grep opentelemetry
# Expected: opentelemetry-operator   Succeeded

oc get csv -n openshift-cluster-observability-operator | grep cluster-observability-operator
# Expected: cluster-observability-operator   Succeeded

oc get csv -n openshift-operators-redhat | grep loki
# Expected: loki-operator   Succeeded

Check the required CRDs are registered:

# Tempo
oc get crd tempostacks.tempo.grafana.com

# OpenTelemetry
oc get crd opentelemetrycollectors.opentelemetry.io

# COO / Perses
oc get crd perses.perses.dev

# Loki
oc get crd lokistacks.loki.grafana.com

Check the TelemetryPolicy exists (auto-created by the operator):

oc get telemetrypolicies.extensions.kuadrant.io -n openshift-ingress

Check the Istio Telemetry exists (auto-created by the operator):

oc get telemetry.telemetry.istio.io -n openshift-ingress
Note

If these resources are missing, verify that spec.telemetry.enabled: true is set on the MaasTenantConfig (3.5) or Tenant (3.4) CR.

Check Redis is running (if deployed):

oc get deployment redis -n redis-limitador
# Expected: READY 1/1

oc get secret redis-config -n kuadrant-system
# Expected: secret exists

oc get limitador limitador -n kuadrant-system -o jsonpath='{.spec.storage}'
# Expected: {"redis":{"configSecretRef":{"name":"redis-config"}}}

oc exec -n redis-limitador deploy/redis -- redis-cli DBSIZE
# Expected: > 0 (after making at least one inference request)

Appendix

Directory Structure

manifests/07-observability/
  tempo/
    kustomization.yaml           # Tempo operator subscription
    namespace.yaml               # openshift-tempo-operator namespace
    operatorgroup.yaml           # Tempo OperatorGroup
    subscription.yaml            # Tempo Subscription
  opentelemetry/
    kustomization.yaml           # OpenTelemetry operator subscription
    namespace.yaml               # openshift-opentelemetry-operator namespace
    operatorgroup.yaml           # OpenTelemetry OperatorGroup
    subscription.yaml            # OpenTelemetry Subscription
  coo/
    kustomization.yaml           # COO operator subscription
    namespace.yaml               # COO namespace
    operatorgroup.yaml           # COO OperatorGroup
    subscription.yaml            # COO Subscription
  loki/
    kustomization.yaml               # Loki operator subscription
    namespace.yaml                   # openshift-operators-redhat namespace
    operatorgroup.yaml               # Loki OperatorGroup
    subscription.yaml                # Loki Subscription
  telemetry/
    gateway-telemetry-policy.yaml    # Kuadrant TelemetryPolicy (reference - auto-created by operator)
    istio-gateway-telemetry.yaml     # Istio Telemetry CR (reference - auto-created by operator)
    kustomization.yaml
  usage-logging/
    kustomization.yaml               # MinIO + LokiStack
    minio.yaml                       # MinIO deployment + bucket job
    minio-secret.yaml                # S3 credentials for Loki
    lokistack.yaml                   # LokiStack CR (edit storageClassName for your cluster)
  redis/
    kustomization.yaml               # Redis dev instance for Limitador persistence
    namespace.yaml                   # redis-limitador namespace
    redis.yaml                       # Redis Deployment + Service (dev-only)
    redis-secret.yaml                # Redis URL secret (in kuadrant-system)
    limitador-patch.yaml             # Limitador CR patch reference (not applied by kustomize)

References

Next step

Proceed to Phase 8: External Models.