Enable OpenTelemetry collection with aapctl

Automation orchestrator can forward audit events to an OpenTelemetry collector. You can connect to your own collector or let aapctl install one for you.

Overview

Important:

aapctl is a Technology Preview feature. Technology Preview features provide early access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process. Technology Preview features are not fully supported under Red Hat production SLA and may not be functionally complete. Red Hat does not recommend using Technology Preview features in production. For more information on the support scope for Technology Preview features, see Technology Preview Features Support Scope.

Connect to your own OpenTelemetry collector

Configure the automation-orchestrator-cr.otel.* keys to point at an existing OpenTelemetry Protocol (OTLP)-compatible endpoint:

$ aapctl install ao \
    --set automation-orchestrator-cr.otel.enabled=true \
    --set automation-orchestrator-cr.otel.endpoint=https://collector.example.com:4318/v1/logs

For a collector running inside the cluster, use the cluster-internal DNS name:

$ aapctl install ao \
    --set automation-orchestrator-cr.otel.enabled=true \
    --set automation-orchestrator-cr.otel.endpoint=http://my-collector.observability.svc.cluster.local:4318/v1/logs

See Configure OTLP forwarding for the full set of authentication and TLS options.

Install the OpenTelemetry operator with aapctl

Important:

The aapctl-managed OpenTelemetry operator installation is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product capabilities, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

To install the Red Hat build of the OpenTelemetry operator and deploy a collector alongside automation orchestrator, enable the opentelemetry-operator option. This feature requires the AAPCTL_EXPERIMENTAL environment variable:

$ AAPCTL_EXPERIMENTAL=true aapctl install ao --set opentelemetry-operator.enabled=true

When enabled, aapctl creates 4 additional resources (8 total for install ao, or 12 for install aap-with-ao):

Table 1. Additional OpenTelemetry resources
Resource Kind Namespace Description
openshift-opentelemetry-operator Namespace -- Namespace for the Red Hat OpenTelemetry operator
opentelemetry-product OperatorGroup openshift-opentelemetry-operator Operator Lifecycle Manager (OLM) OperatorGroup
opentelemetry-product Subscription openshift-opentelemetry-operator Installs the Red Hat OpenTelemetry operator
ao-otel OpenTelemetryCollector automation-orchestrator Collector with OTLP receiver and debug exporter

The collector is preconfigured to receive audit events from automation orchestrator. You can customize the collector configuration by editing the OpenTelemetryCollector custom resource after installation.

When aapctl installs the OpenTelemetry operator, it also sets the automation-orchestrator-cr.otel.* fields to connect to the provisioned collector automatically.