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

Add gelf output plugin to fluentbit #882

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

alexandrevilain
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #881

Does this PR introduced a user-facing change?

Add gelf output plugin to fluentbit

Additional documentation, usage docs, etc.:


@alexandrevilain alexandrevilain force-pushed the fluentbit-gelf-output branch 2 times, most recently from 4327a36 to 6e21891 Compare August 21, 2023 12:42
Signed-off-by: alexandre.vilain <[email protected]>
Copy link
Member

@wenchajun wenchajun left a comment

Choose a reason for hiding this comment

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

1692669076778
Is the corresponding match field missing?

@alexandrevilain
Copy link
Contributor Author

alexandrevilain commented Aug 22, 2023

Hi @wenchajun ! Thanks for the review.

Is the corresponding match field missing?

I don't think it's missing because it's handled by this part of the code: https://github.com/fluent/fluent-operator/blob/master/apis/fluentbit/v1alpha2/clusteroutput_types.go#L153

If I create the following manifest:

apiVersion: fluentbit.fluent.io/v1alpha2
kind: ClusterOutput
metadata:
  name: test
  labels:
    fluentbit.fluent.io/enabled: "true"
    fluentbit.fluent.io/mode: "fluentbit-only"
spec:
  matchRegex: "*"
  gelf:
    host: 127.0.0.1
    port: 12202
    mode: tls
    tls:
      verify: true

The generated configuration looks like:

[Output]
    Name    gelf
    Match_Regex    *
    Host    gra1.logs.ovh.com
    Port    12202
    Mode    tls
    tls    On
    tls.verify    true

Here it uses matchRegex but it's the same as for match.

I think that it's an error on the GELF output documentation as the "Match" field is part of every output plugin.
But maybe I'm wrong ?

@wenchajun
Copy link
Member

The match field here is generic, it is used to match the tag of the log channel in fluentbit. but I read the official docs of fluentbit that the match field in the plugin is exclusive, so was wondering why it is not added.
Other plugins also have this generic match field.
1692694081271

@benjaminhuo
Copy link
Member

benjaminhuo commented Aug 24, 2023

@patrick-stephens @wanjunlei what do you think?

@patrick-stephens
Copy link

@patrick-stephens @wanjunlei what do you think?

Not sure what you're querying here - all filter+output plugins support match and match_regex.
I think the docs have just included the field explicitly.

@benjaminhuo
Copy link
Member

@patrick-stephens @wanjunlei what do you think?

Not sure what you're querying here - all filter+output plugins support match and match_regex. I think the docs have just included the field explicitly.

Agree, Match & MatchRegex are common attributes of output plugins:
https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file#config_output
https://github.com/fluent/fluent-operator/blob/master/apis/fluentbit/v1alpha2/clusteroutput_types.go#L39

@benjaminhuo benjaminhuo merged commit 3c42ca7 into fluent:master Aug 28, 2023
@alexandrevilain alexandrevilain deleted the fluentbit-gelf-output branch August 28, 2023 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add gelf output plugin for FluentBit
4 participants