Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(otelcol): add journald receiver #20

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions otelcol/router/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bin:
SAVE ARTIFACT ${OTELCOL_PATH} otelcol

test:
FROM common+test-image
FROM +base-image
COPY +bin/otelcol /otelcol
DO common+TEST

Expand All @@ -29,7 +29,7 @@ docker:

docker-image:
ARG image
FROM common+base-image
FROM +base-image
COPY --chmod=755 +bin/otelcol /otelcol
DO common+SET_IMAGE_CONFIG
SAVE IMAGE --push ${image}
Expand Down
12 changes: 6 additions & 6 deletions otelcol/router/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ receivers:
listen_address: 0.0.0.0:514
filelog:
include: /var/log/messages
journald:
directory: /run/log/journal
units:
- ssh
priority: info

processors:
memory_limiter:
Expand All @@ -34,10 +39,6 @@ processors:
- key: host.name
value: example
action: insert
resourcedetection:
detectors: [env]
timeout: 2s
override: false

exporters:
loki:
Expand All @@ -61,9 +62,8 @@ service:
processors: [memory_limiter, batch]
exporters: [debug]
logs/local:
receivers: [filelog]
receivers: [filelog, journald]
processors:
- memory_limiter
- batch
- resourcedetection
exporters: [debug]
2 changes: 1 addition & 1 deletion otelcol/router/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ receivers:
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.97.0

exporters:
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.97.0
Expand All @@ -24,7 +25,6 @@ processors:
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.97.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.97.0

replaces:
- github.com/influxdata/go-syslog/v3 => github.com/tosuke-lab/go-syslog/v3 d58f4fc5995b3f6b6940dca0a0da89306292e82a