Skip to content

Commit

Permalink
Merge pull request #20 from tosuke-homelab/journald-receiver
Browse files Browse the repository at this point in the history
feat(otelcol): add journald receiver
  • Loading branch information
tosuke authored Apr 5, 2024
2 parents 8ae2141 + 311c4f3 commit b058368
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
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

0 comments on commit b058368

Please sign in to comment.