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

Feature: Flexible antispammer settings #323

Closed
vadimalekseev opened this issue Mar 23, 2023 · 1 comment · Fixed by #324
Closed

Feature: Flexible antispammer settings #323

vadimalekseev opened this issue Mar 23, 2023 · 1 comment · Fixed by #324
Labels
enhancement New feature or request

Comments

@vadimalekseev
Copy link
Collaborator

vadimalekseev commented Mar 23, 2023

Antispammer is the essence of the file.d that makes a decision on the need to parse the input log. It can be useful when any application writes logs at speed faster than File.d can read it.

Let's support flexible antispammer settings. Currently, all events pass through it and we cannot make exceptions . We must begin to separate important logs from the rest and give API to manage this behavior.

The new config will look like this:

pipelines:
  k8s:
    settings:
      antispam_threshold: 1000
      antispam_except:
        - condition: 'prefix'
          value: '{"error":true'
          case_insensitive: true

        - condition: 'contains'
          value: '"error":true'

        - condition: 'suffix'
          value: '"error":true}'
          case_insensitive: false
@vadimalekseev vadimalekseev added the enhancement New feature or request label Mar 23, 2023
@vadimalekseev
Copy link
Collaborator Author

vadimalekseev commented Mar 27, 2023

After discussion with colleagues, they came up with a temporary solution before introducing their own language:

pipelines:
  k8s:
    settings:
      antispam_threshold: 1000
      antispam_except:
        - cond: 'and'
          value:
            - func: 'prefix'
              value: ['{"error":"debug"']
              case_insensitive: true
              invert: true
            - func: 'contains'
              value: ['{"service":"alerts-agent"']
              case_insensitive: false
        - cond: 'and'
          value:
            - func: 'prefix'
              value: ['{"error":"debug"']
              case_insensitive: true
              invert: true

Related with #325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant