Configuring OTEL Event Collection with BlueRock

Overview

When deploying BlueRock without a terraform or CloudFormation template, no OTEL collector information is specified to send events to a collector for event monitoring in a solution such as AWS CloudWatch. This documentation provides instructions to configure and launch the AWS OTEL collector and have BlueRock events sent to AWS CloudWatch via the OTEL Collector.

Instructions

Configure AWS CloudWatch

  1. Login to the AWS Console

  2. Navigate to CloudWatch. Additional documentation for CloudWatch can be found here

  3. Select Log Groups

  4. Create Log Group

  5. Provide a Log Group Name. Note the Log Group Name

  6. Click on the newly created Log Group

  7. Create Log Stream. Note the Log Stream Name

Stage a BlueRock Configuration File

In the current version 1.3, the file needs to be fetched from an https source. There are multiple ways to support this. The below steps walk-through using an S3 bucket as the https source. In an update release, this can be staged on the local instance file system.

  1. Below is a sample config.toml file for BlueRock that runs on startup.

hostid = "hostname"
event_format = "OTEL"
event_url =  "http://internal_ip.address.of.instance:4318"
[ucecache]
k8slistener = false
containerlistener = true
containertype="docker"
  1. Place this file in an S3 bucket or alternate hosting location. If it is in an S3 bucket then the file object needs to be publicly readable.

Configure BlueRock with AWS OTEL Collector

  1. Login into the BlueRock EC2 instance.

  2. Navigate to /opt/bluerock/etc

  3. Type sudo vi config.source

  4. Enter the following in the file modifying the bucket_name and region information below: https://{bucket_name}.s3.{region}.amazonaws.com/config.toml

  5. Save the file

  6. Navigate to the OTEL configuration directory: cd /opt/bluerock/otel

  7. Edit the otel-config.yaml file

  8. Populate the following parameters: log_group_name - enter the log group name from the above CloudWatch configuration steps log_stream_name - enter the log stream name from the above CloudWatch configuration steps region - modify the region as needed

  1. Save the file

  2. Run docker-compose up -d

  3. Run docker ps to verify the otel collector is running

  4. Execute sudo systemctl restart uc-docker.service This will restart the BlueRock UltraControl policy engine and event generator.

You should now see events appear in the CloudWatch Log Group

Last updated