Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Boost Red Hat Device Edge observability with OpenTelemetry

May 29, 2025
Pavol Loffay
Related topics:
Edge computingObservability
Related products:
Red Hat OpenShift

Share:

    This article covers Red Hat Device Edge observability with the OpenTelemetry collector. 

    Why is observability a critical feature for edge? 

    With edge deployments, you are probably planning to scale out your environment to thousands or perhaps millions of devices spread across different locations with different accessibility. Simply knowing your device is "down" is not enough information to troubleshoot, analyze performance, and understand the security of your devices. Edge environments are often complex—they can come with resource constraints, unreliable networks, and heterogeneous configurations. 

    Understanding CPU utilization, memory and storage, monitoring for device failures, understanding communication breakdowns, and correlating information together for better understanding of your environment is what we bring into Red Hat Device Edge Management with OpenTelemetry integration. You can read more about edge observability use cases in this blog post: Top 5 edge computing challenges solved by Red Hat OpenShift observability

    The OpenTelemetry collector enables the device to collect, process, and send all telemetry data with a single collector fulfilling all observability needs of the device. In this article, we will create and deploy a bootable container (bootc) with the collector and configure it to send metrics and logs via the OpenTelemetry protocol (OTLP) to another collector running on the Red Hat OpenShift cluster.

    The full source code of the solution can be found on GitHub. This article will describe the most important parts of the solution.

    Red Hat Device Edge bootc image

    The first step is to create a bootable container image with the collector. The collector will be installed from the official opentelemetry-collector RPM and, as a base image, use CentOS with installed flight control agent. The container file also defines opentelemetry-collector.service systemd service, which gets the device ID from the flight control agent and puts it into the collector configuration file as a host.id resource attribute. If you are not running Red Hat Edge Manager, the collector service file can be removed and the build will use the one that comes from the collector RPM:

    FROM quay.io/flightctl-demos/centos-bootc:latest
    ADD etc etc
    RUN dnf install -y opentelemetry-collector
    ADD opentelemetry-collector.service /usr/lib/systemd/system/
    RUN systemctl enable opentelemetry-collector.service
    ## ----------------- IMPORTANT -----------------
    ## We need to add certs (ca.crt, client.crt & client.key) to the local directory etc/opentelemetry-collector/certs
    ## Also we need to add the FlightCTL config.yaml to the local directory etc/flighctl/config.yaml
    ## ---------------------------------------------
    RUN chown -R observability:observability /etc/opentelemetry-collector
    RUN rm -rf /opt && ln -s /var /opt
    RUN [ ! -L /var/run ] && [ -d /var/run ] && rm -rf /var/run && ln -s /run /var/ || ln -s /run /var/run

    Let’s look at the collector configuration:

    receivers:
      hostmetrics:
        collection_interval: 10s
        scrapers:
          cpu:
          load:
          memory:
          network:
          paging:
          processes:
          process:
            mute_process_name_error: true
            mute_process_exe_error: true
            mute_process_io_error: true
            mute_process_user_error: true
            mute_process_cgroup_error: true
            metrics:
              process.cpu.utilization:
                enabled: true
              process.memory.utilization:
                enabled: true
      hostmetrics/disk:
        collection_interval: 1m
        scrapers:
          disk:
          filesystem:
      journald:
        units:
          - flightctl-agent.service
        priority: info
    exporters:
      otlphttp:
        endpoint: https://otlp-http-otel-route-flightctl-observability.<your cluster>
        tls:
          insecure: false
          ca_file: /etc/opentelemetry-collector/certs/ca.crt
          cert_file: /etc/opentelemetry-collector/certs/client.crt
          key_file: /etc/opentelemetry-collector/certs/client.key
      debug:
        verbosity: detailed
    processors:
      batch: {}
      resource:
        attributes:
        - action: insert
          key: host.id
          value: demo-device1
      memory_limiter:
        check_interval: 10s
        limit_percentage: 5
        spike_limit_percentage: 1
    service:
      pipelines:
        metrics:
          receivers: [hostmetrics,hostmetrics/disk]
          processors: [memory_limiter, resource, batch]
          exporters: [debug, otlphttp]
        logs:
          receivers: [journald]
          processors: [memory_limiter, resource, batch]
          exporters: [debug, otlphttp]

    This configuration collects host metrics and systemd info logs for the flightctl-agent.service service. The configuration also enables the batching before the data is sent and enables memory limiter to avoid overloading the collector’s pipeline. The memory limiter is configured to use 5% of the host available memory and allow spikes of 1%.

    The collector exports data via the OTLP/HTTP with mTLS to another collector and prints all telemetry data to stdout via the debug exporter. Do not forget to update the exporter endpoint with the collector endpoint from the next section.

    Before building the image, remember to provide the TLS certificates as they are mentioned in the Containerfile. The instructions for generating certificates are in the readme. If you are running Red Hat Edge Manager, also add the FlightCTL configuration file.

    Start the image

    With the following commands we will build the bootc image, create the qcow2 disk image, and deploy it with libvirt.

    Before we start, we need to create a config.json that defines the user for the virtual machine disk image:

    {
      "blueprint": {
        "customizations": {
          "user": [
            {
              "name": "user",
              "password": "password",
              "groups": [
                "wheel"
              ]
            }
          ]
        }
      }
    }

    Here are the commands needed to build and deploy this image:

    # Build bootc image
    $ sudo podman build -t quay.io/user/otel-collector-centos:latest -f demos/otel-collector/bootc/Containerfile demos/otel-collector/bootc/
    # Create qcow2 disk image for QEMU
    $ mkdir -p output sudo podman run --rm -it --privileged --pull=newer \
            --security-opt label=type:unconfined_t \
            -v $(PWD)/config.json:/config.json \
            -v $(PWD)/output:/output \
            -v /var/lib/containers/storage:/var/lib/containers/storage \
            quay.io/centos-bootc/bootc-image-builder:latest \
           --config /config.json \
           quay.io/user/otel-collector-centos:latest
    # Create a virtual machine
    $ sudo virt-install  --name flightctl  --memory 3000  --vcpus 2  --disk output/qcow2/disk.qcow2  --import  --os-variant centos-stream9
    # Start virt manager
    $ virt-manager

    Once the machine starts, we can log in with user@password. You can use the systemctl status opentelemetry-collector.service to check the status of the collector and journalctl -u opentelemetry-collector.serviceto get the logs.

    Deploy back-end collector on OpenShift

    In this section we are going to deploy an OpenTelemetry collector via the Red Hat build of OpenTelemetry operator. The following OpenTelemetry Collector custom resource (CR) configures the collector with OTLP/HTTP receiver and exposes it outside the cluster with an OpenShift route with passthrough TLS. Therefore, the receiver is configured with TLS certificates created from the previous section:

    apiVersion: opentelemetry.io/v1beta1
    kind: OpenTelemetryCollector
    metadata:
      name: otel
      namespace: flightctl-observability
    spec:
      mode: deployment
      replicas: 1
      ingress:
        type: route
        route:
          termination: passthrough
      volumes:
        - name: receiver-ca
          configMap:
            name: otelcol-receiver-ca
        - name: receiver-certs
          secret:
            secretName: otelcol-receiver-certs
      volumeMounts:
        - name: receiver-ca
          mountPath: /etc/opentelemetry-collector-rhde/ca
        - name: receiver-certs
          mountPath: /etc/opentelemetry-collector-rhde/certs
      config:
        exporters:
          debug:
            verbosity: normal
        processors:
        receivers:
          otlp:
            protocols:
              http:
                endpoint: 0.0.0.0:4318
                tls:
                  client_ca_file: /etc/opentelemetry-collector-rhde/ca/ca.crt
                  cert_file: /etc/opentelemetry-collector-rhde/certs/tls.crt
                  key_file: /etc/opentelemetry-collector-rhde/certs/tls.key
        service:
          pipelines:
            logs:
              receivers:
                - otlp
              exporters:
                - debug
            metrics:
              receivers:
                - otlp
              exporters:
                - debug

    The demo repository contains more OpenShift manifests to, for instance, deploy a Cluster Observability Operator that can provision MonitoringStack with Prometheus or deploy Red Hat Advanced Cluster Management observability. There are also configuration files for a Grafana dashboard as shown in Figure 1.

    Configuration files for a Grafana dashboard.
    Figure 1: Grafana dashboard for an edge device.

    If you are running Advanced Cluster Management for Kubernetes and have configured the flight control, the device will show up in the console (Figure 2).

    alt text
    Figure 2: Red Hat Device Edge Manager displayed within the Advanced Cluster Management console after successful configuration.

    Conclusion

    This guide walked through the process of setting up observability for Red Hat Device Edge using OpenTelemetry. By creating a bootable container with the collector, configuring it for data export, and deploying a back-end collector on OpenShift, you gain robust insights into your edge deployments. This setup empowers you to proactively monitor device health, analyze performance metrics, and troubleshoot issues efficiently. Leveraging OpenTelemetry and Red Hat Device Edge ensures that even in complex, distributed edge environments, you maintain critical visibility and control.

    References

    • Demo source code
    • Memory limiter processor
    • OTLP/HTTP exporter
    • Hostmetrics receiver 
    • Journald receiver

    Related Posts

    • Build and manage Red Hat Device Edge images with Ansible

    • A 3-tier application architecture on Red Hat Device Edge

    • What is edge computing and what makes it so different?

    • Developing at the edge: Best practices for edge computing

    • 5 things developers should know about edge computing

    • Deploy computer vision applications at the edge with MicroShift

    Recent Posts

    • How Trilio secures OpenShift virtual machines and containers

    • How to implement observability with Node.js and Llama Stack

    • How to encrypt RHEL images for Azure confidential VMs

    • How to manage RHEL virtual machines with Podman Desktop

    • Speech-to-text with Whisper and Red Hat AI Inference Server

    What’s up next?

    In this learning path, walk through the steps to install Red Hat Device Edge on an NVIDIA Jetson Orin/NVIDIA IGX Orin Developer Kit and explore new features brought by rpm-ostree.

    Start the activity
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue