Skip to content

occamshub-dev/occams-otel-collector

Repository files navigation

Occams OTel Collector

OccamsHub logo

Overview

Occams OTel Collector, is an OccamsHub version of the upstream OTel Collector (short for OpenTelemetry Collector) to send telemetry data, Metrics, Logs and Traces to supported backends which includes core, contrib and custom components.

What is the OTel Collector?

Otel Collector is a vendor-agnostic implementation to receive, process and export telemetry data. It removes the need to maintain multiple agents/collectors, and it can act as an agent or a collector.

OTel Collector fig.1: OTEL Collector figure by OpenTelemetry is licensed under CC BY 4.0

OccamsHub's customization of OTel Collector

The OccamsHub OTel Collector distribution (Occams OTel Collector), is a customized version of the OTEL Collector. The distribution is a wrapper around upstream OTel Collector core and contrib repositories with some custom components added. These custom components can be added without changing the core code (fig. 2).

OTel Collector fig.2: Illustrates how OTel Collector can be extended without touching core code

Occams OTel Collector built-in components

This is the list for the included components in this distribution, referencing their upstream repositories:

Receiver Processor Exporter
otlpreceiver otlpreceiver (core) batchprocessor (core) loggingexporter (core)
prometheusreceiver (contrib) memorylimiterprocessor (core) otlpexporter (core)
hostmetricsrecevier (contrib) attributesprocessor (contrib) otlphttpexporter (core)
dockerstatsreceiver (contrib) resourcedetectionprocessor (contrib) fileexporter (contrib)
filelogreceiver (contrib) kafkaexporter (contrib)
jaegerreceiver (contrib) prometheusexporter (contrib)
zipkinreceiver (contrib) jaegerexporter (contrib)
grypereceiver (OccamsHub custom) zipkinexporter (contrib)

Occams OTel Collector custom components

  • Grype Receiver. Periodically scans filesystem path/s for vulnerabilities using Grype, an Open Source vulnerability scanner for container images and filesystems written in Go. It acts as a scrapper, so there is no more input than the configuration.

Usage

Occams OTel Collector is meant to be used as an agent to collect your telemetry data and export it to your preferred backend using any built-in exporter.

Download

To download the binary release, please go to Releases page and download the latest version for OS and architecture of your choice.

Configuration

Configuration is set using a YAML file, as in any other OTel Collector distribution. This settings file will define the data pipelines and the components used on those pipelines. A sample config file otel.yaml is also provided for reference and testing purposes.

If you want to see complete configuration options for specific OccamsHub component, you can find it under Receivers, Processors or Exporters sections.

Run

To start the collector, just provide the configuration file as a parameter, as in the example below.

./occamscol_linux_x86_64 --config otel.yaml

Build

This section is for developers. Users looking to simply run the OTel Collector should check out Usage section.

Dependencies

Compile

In order to build the OTel Collector executable, just run this command:

make build

You will find the binaries under the build path.

build/
├── darwin
│   ├── occamscol_darwin_arm64
│   └── occamscol_darwin_x86_64
├── linux
│   ├── occamscol_linux_arm64
│   └── occamscol_linux_x86_64
└── windows
    └── occamscol_windows_amd64

Customize

Checkout otelcol-builder.yaml file to know which components are built-in by default. If you want to include or exclude components, edit this file and run this command:

make regen build

In case you want to change some OccamsHub component, you will need to add some replaces as this at the end of the otelcol-builder.yaml) file:

replaces:
  - github.com/occamshub-dev/occams-otel-collector/receiver/grypereceiver => ./receiver/grypereceiver

Build docker image

To create a docker image compatible with official OpenTelemetry images, run this command:

IMAGE_NAME=occamshub-otelcol make docker-build

You can change the image name to whatever you want.

Useful links

OccamsHub

External links

Future

  • Add .deb and .rpm packages.
  • Add CI/CD pipeline.
  • Serve docker images for pulling.

License

Copyright 2021 OccamsHub Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.