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(journaldreceiver): add missing dependencies #577

Merged
merged 11 commits into from
Jun 20, 2022

Conversation

macdewee
Copy link

@macdewee macdewee commented May 17, 2022

It resolves the following error:

otelcol_1           | 2022-06-02T09:28:12.441Z  info    builder/exporters_builder.go:255        Exporter was built.     {"kind": "exporter", "name": "logging"}
otelcol_1           | 2022-06-02T09:28:12.441Z  info    builder/pipelines_builder.go:224        Pipeline was built.     {"kind": "pipeline", "name": "logs"}
otelcol_1           | 2022-06-02T09:28:12.442Z  info    builder/receivers_builder.go:226        Receiver was built.     {"kind": "receiver", "name": "journald", "datatype": "logs"}
otelcol_1           | 2022-06-02T09:28:12.442Z  info    service/telemetry.go:109        Setting up own telemetry...
otelcol_1           | 2022-06-02T09:28:12.465Z  info    service/telemetry.go:129        Serving Prometheus metrics      {"address": ":8888", "level": "basic", "service.instance.id": "dad331ee-30d4-47f1-9511-ce068fa5204f", "service.version": "latest"}
otelcol_1           | 2022-06-02T09:28:12.465Z  info    service/service.go:76   Starting extensions...
otelcol_1           | 2022-06-02T09:28:12.465Z  info    service/service.go:81   Starting exporters...
otelcol_1           | 2022-06-02T09:28:12.465Z  info    builder/exporters_builder.go:40 Exporter is starting... {"kind": "exporter", "name": "logging"}
otelcol_1           | 2022-06-02T09:28:12.465Z  info    builder/exporters_builder.go:48 Exporter started.       {"kind": "exporter", "name": "logging"}
otelcol_1           | 2022-06-02T09:28:12.465Z  info    service/service.go:86   Starting processors...
otelcol_1           | 2022-06-02T09:28:12.465Z  info    builder/pipelines_builder.go:54 Pipeline is starting... {"kind": "pipeline", "name": "logs"}
otelcol_1           | 2022-06-02T09:28:12.465Z  info    builder/pipelines_builder.go:65 Pipeline is started.    {"kind": "pipeline", "name": "logs"}
otelcol_1           | 2022-06-02T09:28:12.465Z  info    service/service.go:91   Starting receivers...
otelcol_1           | 2022-06-02T09:28:12.465Z  info    builder/receivers_builder.go:68 Receiver is starting... {"kind": "receiver", "name": "journald"}
otelcol_1           | 2022-06-02T09:28:12.465Z  info    [email protected]/receiver.go:54   Starting stanza receiver        {"kind": "receiver", "name": "journald"}
otelcol_1           | Error: cannot start receivers: start stanza: start journalctl: exec: "journalctl": executable file not found in $PATH
otelcol_1           | 2022/06/02 09:28:12 collector server run finished with error: cannot start receivers: start stanza: start journalctl: exec: "journalctl": executable file not found in $PATH
2022-02-07-otc-systemd_otelcol_1 exited with code 1

@macdewee macdewee requested a review from a team as a code owner May 17, 2022 11:37
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 17, 2022
@macdewee macdewee force-pushed the drosiek-journalctl branch from 074e65d to ca7ce73 Compare May 17, 2022 11:37
@macdewee macdewee force-pushed the drosiek-journalctl branch from ca7ce73 to 3bff8e4 Compare June 2, 2022 09:17
Copy link
Contributor

@kasia-kujawa kasia-kujawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What error is observed without these dependencies?

@sumo-drosiek
Copy link
Contributor

I updated description

@swiatekm
Copy link

swiatekm commented Jun 2, 2022

How much does this increase the image size?

@sumo-drosiek sumo-drosiek enabled auto-merge (squash) June 2, 2022 09:32
@sumo-drosiek sumo-drosiek disabled auto-merge June 2, 2022 09:33
@sumo-drosiek
Copy link
Contributor

otc-with-journald                                                                     latest                                     d2669ceb06f2   About a minute ago   158MB
otc-without-journald                                                                  latest                                     be29a555fb15   4 months ago         143MB

for public.ecr.aws/sumologic/sumologic-otel-collector:0.0.48-beta.0

so ~15 MB

@sumo-drosiek
Copy link
Contributor

anyway, I need to fix arm image

@macdewee macdewee force-pushed the drosiek-journalctl branch 2 times, most recently from 2f61ca6 to 89ed00c Compare June 3, 2022 11:15
@macdewee macdewee force-pushed the drosiek-journalctl branch from 89ed00c to 57f5d25 Compare June 3, 2022 11:28
@sumo-drosiek sumo-drosiek requested a review from kasia-kujawa June 3, 2022 11:48
@sumo-drosiek
Copy link
Contributor

@kkujawa-sumo please re-review as I changed it slightly 😅

Dockerfile Outdated
Comment on lines 17 to 19
RUN tar czhf journalctl.tar.gz /bin/journalctl $(ldd /bin/journalctl | grep -oP "\/.*? ")
# extract package to /output so it can be take as base for scratch image
RUN mkdir /output && tar xf /journalctl.tar.gz --directory /output
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we compressing these files, if we immediately decompress them in the same build stage?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is copying only required files while preserving paths and meantime skipping symlinks. pretty easy to explain 😂

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe at least leave a comment so it's clear why this exists, if not how it works exactly?

@sumo-drosiek sumo-drosiek merged commit a8f24c7 into SumoLogic:main Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants