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

[libbeat] Support custom analyzers in fields.yml #28540

Closed
andrewkroh opened this issue Oct 19, 2021 · 3 comments · Fixed by #28926
Closed

[libbeat] Support custom analyzers in fields.yml #28540

andrewkroh opened this issue Oct 19, 2021 · 3 comments · Fixed by #28926
Labels
discuss Issue needs further discussion. enhancement libbeat

Comments

@andrewkroh
Copy link
Member

Describe the enhancement:

Fields.yml fields currently support using the built-in analyzers on text fields. But it's not possible to declare a custom analyzer in fields.yml and have it installed as part of the index settings in the index template.

Describe a specific use case for the enhancement or feature:

Using a custom analyzer or search_analzyer for text fields in fields.yml. This will give users a better experience when searching data indexed by Beats.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@andrewkroh
Copy link
Member Author

Open questions:

  • Where in fields.yml should analyzer be allowed?
  • What is the merge behavior when multiple analyzer blocks are declared in separate files (e.g. error out on analyzer name collisions)? For example, imagine both the zeek module and suricata module declaring a custom_url_analzyer, what happens?

Examples:

- key: powershell
  title: PowerShell module
  description: >
    These are the event fields specific to the module for the Microsoft-Windows-PowerShell/Operational and Windows PowerShell logs.
  release: beta
  analyzer:
    powershell_script_analyzer:
      type: pattern
      pattern: "[\\W&&[^-]]+"
  fields:
    ...

@efd6
Copy link
Contributor

efd6 commented Nov 9, 2021

To address the issue of name collisions, I think that collisions should error out and that packages that define a single location analyzer should namespace the analyzer by their package, essentially as we have here. For the example, suricata_url_analyzer and zeek_url_analyzer.

The docs should probably also advertise any custom analyzer so that users can use them for extending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issue needs further discussion. enhancement libbeat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants