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(otellogs/systemd): add support for systemd logs to otellogs #2364

Merged
merged 19 commits into from
Jul 12, 2022

Conversation

sumo-drosiek
Copy link
Contributor

@sumo-drosiek sumo-drosiek commented Jun 7, 2022

Description

Add support for journald receiver. This behaves like fluent-bit with one small exception. Units for filtering are taken from different place.

        ## This is not a full equivalent of fluent-bit filtering as fluent-bit filters by `_SYSTEMD_UNIT`
        ## Here is filtering by `UNIT`

Checklist
  • Changelog updated
Testing performed
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in

@sumo-drosiek sumo-drosiek added this to the v3.0 milestone Jun 7, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request contains invalid labels. Please remove all of the following labels: ['do-not-merge/hold']

@sumo-drosiek sumo-drosiek force-pushed the drosiek-fix-systemd branch 3 times, most recently from 107102f to 4067575 Compare June 8, 2022 05:59
Base automatically changed from drosiek-fix-systemd to main June 8, 2022 07:30
@sumo-drosiek sumo-drosiek marked this pull request as ready for review June 29, 2022 12:47
@sumo-drosiek sumo-drosiek requested a review from a team as a code owner June 29, 2022 12:47
@@ -4136,6 +4136,7 @@ metadata:
json_logs:
add_timestamp: true
timestamp_key: timestamp
flatten_body: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

systemd is key value pair, so this option is safe for fluentd. It's necessary for otel, as it sends body as key-value pair. This body would be put inside log key without this option

@@ -4716,7 +4719,7 @@ otellogs:
## Configure image for Opentelemetry Collector
image:
repository: public.ecr.aws/sumologic/sumologic-otel-collector
tag: 0.52.0-sumo-0
tag: 0.53.0-sumo-0
Copy link
Contributor

Choose a reason for hiding this comment

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

You can now update tag to newer version ;)

@andrzej-stencel
Copy link
Contributor

"I have a dream"... that we have a piece of high-level documentation describing collecting systemd logs, a bit like what we now have for collecting Kubernetes events: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/main/deploy/docs/collecting-kubernetes-events.md.

directory: /var/log/journal
## This is not a full equivalent of fluent-bit filtering as fluent-bit filters by `_SYSTEMD_UNIT`
## Here is filtering by `UNIT`
units:
Copy link
Contributor

@andrzej-stencel andrzej-stencel Jul 11, 2022

Choose a reason for hiding this comment

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

Does this list mean that if the user wants to customize this list, they just need to overwrite this property in their values.yaml file? 😱 For example, if they want to exclude a specific unit, they need to replicate this whole list with the one unit excluded.
I don't know what the common use cases are (if there are any). Maybe there are no good reasons to customize this list. In that case, do we need to expose it? This question applies to this whole config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this PR is fluent-bit replacement. There is a lot of improvements we can take, but maybe there should be separate issues, so it will be more organised way to track them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what the common use cases are (if there are any).

I don't think there are any, but we need to have some plan in case they'll appear

@sumo-drosiek
Copy link
Contributor Author

"I have a dream"... that we have a piece of high-level documentation describing collecting systemd logs, a bit like what we now have for collecting Kubernetes events: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/main/deploy/docs/collecting-kubernetes-events.md.

I would love to have this simple option:

sumologic:
  logs:
    systemd:
      enabled: false

but it is not possible now. We need to take it in v3. I think the documentation should be a part of that change too. (For now we do not document any otellogs configuration)

If you think differently I can make some documentation draft as part of this PR :)

@sumo-drosiek
Copy link
Contributor Author

but it is not possible now

TBH, maybe it is, but we need to have some final consensus about which approach to configuration we take

Dominik Rosiek and others added 18 commits July 12, 2022 11:35
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
@sumo-drosiek sumo-drosiek merged commit c9f76d3 into main Jul 12, 2022
@sumo-drosiek sumo-drosiek deleted the drosiek-journald branch July 12, 2022 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants