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
Login to the AWS Console
Navigate to CloudWatch. Additional documentation for CloudWatch can be found here
Select Log Groups
Create Log Group
Provide a Log Group Name. Note the Log Group Name
Click on the newly created Log Group
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.
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"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
Login into the BlueRock EC2 instance.
Navigate to
/opt/bluerock/etcType
sudo vi config.sourceEnter the following in the file modifying the
bucket_nameandregioninformation below: https://{bucket_name}.s3.{region}.amazonaws.com/config.tomlSave the file
Navigate to the OTEL configuration directory:
cd /opt/bluerock/otelEdit the
otel-config.yamlfilePopulate 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
Save the file
Run
docker-compose up -dRun
docker psto verify the otel collector is runningExecute
sudo systemctl restart uc-docker.serviceThis will restart the BlueRock UltraControl policy engine and event generator.
You should now see events appear in the CloudWatch Log Group
Last updated