This is an old revision of the document!
$ wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.162.0/otelcol-contrib_0.162.0_linux_amd64.deb # dpkg -i otelcol-contrib_0.162.0_linux_amd64.deb
# usermod -aG adm otelcol-contrib # cat /etc/otelcol-contrib/config.yaml
receivers:
filelog/system:
include:
- /var/log/*.log
start_at: end
resource:
service.name: system-logs
filelog/roundcube:
include:
- /var/log/roundcube/*.log
start_at: end
resource:
service.name: roundcube-mail
processors:
batch:
exporters:
otlphttp/loki:
endpoint: "http://192.168.13.10:3100/otlp"
tls:
insecure: true
service:
pipelines:
logs:
receivers: [filelog/system, filelog/roundcube]
processors: [batch]
exporters: [otlphttp/loki]
# otelcol-contrib validate --config /etc/otelcol-contrib/config.yaml