Extension to provide integrations embedded in the configuration file
This extension allows to define integrations embedded in the collector
configuration file. These integrations can be then used with the integration
receiver or the integration processor.
Configuration
integrations
Map with the embedded definition of integrations. The key of the map is the name
of the integration, that can be referenced by other components using
integrations. The value is a string with YAML content defining an integration.
Variables in the integration use the same syntax as other variables, but they need
to be escaped with a double $$
so they are resolved when the integration is
instantiated.
Example
The following configuration defines an integration called "somelog" that is reused
in two pipelines, using the integration receiver and the integration processor.
extensions:
config_integrations:
integrations:
somelog: |
receivers:
filelog:
include: $${var:paths}
start_at: beginning
processors:
transform/resource:
log_statements:
- set(log.attributes["resource"], "$${var:resource}")
pipelines:
logs:
receiver: filelog
processors:
- transform/resource
receivers:
integration:
name: "somelog"
pipelines: "logs"
parameters:
paths: "/var/log/somelog-*.log"
resource: "example"
filelog:
include: "/var/log/otherlog-*.log"
processors:
integration:
name: "somelog"
pipelines: "logs"
parameters:
resource: "other"
exporters: ...
service:
extensions: [file_integrations]
pipelines:
logs/somelog:
receivers: [integration]
exporters: ...
logs/otherlog:
receivers: [filelog]
processors: [integration]
exporters: ...