Skip to content

This repo contains OpenTelemetry Collector configuration template for log collection

License

Notifications You must be signed in to change notification settings

CentreonLabs/centreon-otel-col-log-template

Repository files navigation

Centreon OpenTelemetry Collector Log Templates

License: AGPL v3

This repository offers a collection of OpenTelemetry Collector templates designed to parse and structure various log formats into the OpenTelemetry Protocol (OTLP) format. These templates adhere to the OpenTelemetry Semantic Conventions, ensuring best practices for data representation.

How to Use

  1. Download a Template:

Download your desired template into your OpenTelemetry Collector configuration directory (e.g., /etc/otelcol-contrib on Linux):

wget https://raw.githubusercontent.com/CentreonLabs/centreon-otel-col-log-template/refs/heads/main/myfile.yaml -O /etc/otelcol-contrib/myfile.yaml

Replace myfile.yaml with the actual template filename you wish to use.

  1. Update Collector Command:

Modify your OpenTelemetry Collector start command to include the downloaded configuration file:

otelcol-contrib --config /etc/otelcol-contrib/myfile.yaml

Ensure otelcol-contrib is the correct command for your OpenTelemetry Collector installation.

Template Pipelines

Each template includes a pre-configured pipeline designed to process the parsed logs. By default, these pipelines perform the following actions:

  • Batching: Collects logs into batches for efficient export.
  • Resource Attributes: Automatically enriches logs with resource attributes from the host, Kubernetes pod, or container where the logs originated.
  • OTLP Export: Exports data in OTLP format to an exporter named otlphttp/centreon.

For more details on OpenTelemetry Collector pipelines, refer to the official documentation.

Examples:

service:
  pipelines:
    logs:
      receivers: [filelog/mylog]
      processors: [batch,resourcedetection]
      exporters: [otlphttp/centreon]

List of templates

Apache

Centreon

HTTP

MariaDB

  • MariaDB: The log files of MariaDB.

Message / Syslog

Tomcat

  • Tomcat: The Tomcat log file.

PostgreSQL

Redis

  • Redis: Redis log file, with paring role, component, level.

Windows Event Log

  • Windows Event Log: Contains the event log application parsing with locale US and FR for level conversions.

About

This repo contains OpenTelemetry Collector configuration template for log collection

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •