🚀 Announcing BYOC and the OpenTelemetry Distribution BuilderRead more

Install BDOT Collector in Docker Compose

Installing a BDOT Collector in Docker Compose has a different flow compared to collectors for Linux, Mac, and Windows.

Install a BDOT Collector

  1. Navigate to the Agents page and select Install Agent

  2. Choose the Linux Platform

  3. Copy the secret-key and opamp-endpoint

  4. Create a docker-compose.yaml and paste this content below

    yaml
    1version: '3.8'
    2services:
    3  bdot-collector:
    4    image: ghcr.io/observiq/bindplane-agent:1.76.3 # Select the image version you prefer
    5    command: ["--config=/etc/otel/storage/config.yaml"]
    6    volumes:
    7      - ./config:/etc/otel/config
    8      - ./storage:/etc/otel/storage
    9    ports:
    10      - "4317:4317"   # OTLP gRPC
    11      - "4318:4318"   # OTLP HTTP
    12      - "13133:13133" # Health check extension
    13      - "55679:55679" # ZPages debugging
    14    environment:
    15      OPAMP_ENDPOINT: <your-opamp-endpoint> # use "wss://app.bindplane.com/v1/opamp" for Bindplane Cloud
    16      OPAMP_SECRET_KEY: <your-secret-key>
    17      OPAMP_LABELS: ephemeral=true
    18      CONFIG_YAML_PATH: /etc/otel/storage/config.yaml
    19      MANAGER_YAML_PATH: /etc/otel/config/manager.yaml
    20      LOGGING_YAML_PATH: /etc/otel/storage/logging.yaml
  5. Create two directories and two files for storage and config.

    text
    1> config
    2    manager.yaml
    3> storage
    4    config.yaml
    5    logging.yaml
    6  docker-compose.yaml
  6. Paste this into your config.yaml file in the storage directory.

    note

    This is just the initial config, and should not be manually edited. Bindplane will push edits to this file remotely via the roll out feature.

    yaml
    1receivers:
    2  nop:
    3processors:
    4  batch:
    5exporters:
    6  nop:
    7service:
    8  pipelines:
    9    metrics:
    10      receivers: [nop]
    11      processors: [batch]
    12      exporters: [nop]
    13  telemetry:
    14    metrics:
    15      level: none
  7. Paste this into your logging.yaml file in the storage directory:

    yaml
    1output: stdout
    2level: info
  8. The manager.yaml that will be auto-updated when creating rolling out a config from Bindplane.

  9. Start the BDOT Collector:

    bash
    1docker compose up -d

Create a configuration for Docker Compose

  1. Navigate to the Configurations and select Create Configuration
  2. Select the Linux Platform and give it a name
  3. Add sources and destinations and create the configuration
  4. Click Add Agents, select the BDOT Collector you created above, and click Apply
  5. Finally, click Start Rollout, and you're done!

Example Installation

This example uses the Host metrics, OTLP logs and metrics, and file logs.

observIQ docs - Install, Upgrade, and Uninstall Agents - image 1

Get the BDOT Collector secret key, installation id, and OpAMP configuration keys from the Collector installation page.

observIQ docs - Install, Upgrade, and Uninstall Agents - image 2

Ensure that the OPAMP_ENDPOINTenvironment variable has the correct value for your server.

yaml
1- name: OPAMP_ENDPOINT
2  value: "ws://your-bindplane-server:3001/v1/opamp" # use "wss://app.bindplane.com/v1/opamp" for Bindplane Cloud

The port should be 3001 for non-TLS, and 443 if TLS is enabled. Similarly, the protocol should be ws (websocket) when TLS is not configured, and wss (secure web socket) when TLS is enabled.

Start Docker Compose with docker compose up -d. Once deployed, your collector will appear on the Agents page, and they will be bound to your configuration.

observIQ docs - Install, Upgrade, and Uninstall Agents - image 3

TLS

BDOT Collectors in Docker Compose can be configured to connect to Bindplane using TLS. If the Bindplane TLS certificate is publicly signed, no action is required. If the certificate is signed by an internal certificate authority, the collector can be configured with a custom certificate authority for verifying the Bindplane certificate.

Your certificate authority file (ca.crt) can be added to a BDOT Collector docker-compose.yaml with the OPAMP_TLS_CA environment variable. The sample below considers you storing the ca.crt in a certs directory and binding the volume to the bdot-collector.

yaml
1# ...
2  bdot-collector:
3    image: ghcr.io/observiq/bindplane-agent:1.76.3
4    command: ["--config=/etc/otel/storage/config.yaml"]
5    volumes:
6      - ./config:/etc/otel/config
7      - ./storage:/etc/otel/storage
8      - ./certs:/etc/otel/certs # Add certs volume
9    ports:
10      - "4317:4317"   # OTLP gRPC
11      - "4318:4318"   # OTLP HTTP
12      - "13133:13133" # Health check extension
13      - "55679:55679" # ZPages debugging
14    environment:
15      OPAMP_ENDPOINT: <your-opamp-endpoint> # use "wss://app.bindplane.com/v1/opamp" for Bindplane Cloud
16      OPAMP_SECRET_KEY: <your-secret-key>
17      OPAMP_LABELS: ephemeral=true
18      CONFIG_YAML_PATH: /etc/otel/storage/config.yaml
19      MANAGER_YAML_PATH: /etc/otel/config/manager.yaml
20      LOGGING_YAML_PATH: /etc/otel/storage/logging.yaml
21      OPAMP_TLS_CA: /etc/otel/certs/ca.crt # use this env var
22      # Alternatively, skip verification
23      OPAMP_TLS_SKIP_VERIFY: false # Set to true to skip TLS verification
24# ...

Using this example, the CA certificate ca.crt will be mounted to /opt/tls/ca.crt. The OpAMP client will be configured to use this certificate authority when validating CA certificates.

Mutual TLS (mTLS)

When using mutual TLS, the same process is used. In this case, a client keypair is provided. This example uses client.crt and client.key.

With these secrets you can modify your BDOT Collector Docker Compose service and add environment variables for the TLS certs and keys.

yaml
1# ...
2  bdot-collector:
3    image: ghcr.io/observiq/bindplane-agent:1.76.2
4    command: ["--config=/etc/otel/storage/config.yaml"]
5    volumes:
6      - ./config:/etc/otel/config
7      - ./storage:/etc/otel/storage
8      - ./certs:/etc/otel/certs # Add certs volume
9    ports:
10      - "4317:4317"   # OTLP gRPC
11      - "4318:4318"   # OTLP HTTP
12      - "13133:13133" # Health check extension
13      - "55679:55679" # ZPages debugging
14    environment:
15      OPAMP_ENDPOINT: <your-opamp-endpoint> # use "wss://app.bindplane.com/v1/opamp" for Bindplane Cloud
16      OPAMP_SECRET_KEY: <your-secret-key>
17      OPAMP_LABELS: ephemeral=true
18      OPAMP_AGENT_NAME: bdot-collector
19      CONFIG_YAML_PATH: /etc/otel/storage/config.yaml
20      MANAGER_YAML_PATH: /etc/otel/config/manager.yaml
21      LOGGING_YAML_PATH: /etc/otel/storage/logging.yaml
22      OPAMP_TLS_CA: /etc/otel/certs/ca.crt
23      OPAMP_TLS_CERT: /etc/otel/certs/client.crt # Add env vars for the client certificate
24      OPAMP_TLS_KEY: /etc/otel/certs/client.key  # and key
25# ...