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

Automatic tag generation for ingest pipeline processors #2131

Open
chrisberkhout opened this issue Sep 27, 2024 · 2 comments
Open

Automatic tag generation for ingest pipeline processors #2131

chrisberkhout opened this issue Sep 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@chrisberkhout
Copy link
Contributor

Manually maintaining tag values for processors in ingest pipelines is time consuming and can lead to confusion if processor settings drift away from the meaning captured in a tag value.

Good tag values can be generated automatically by combining the processor name with the values of certain processor options (best chosen based on the processor type), normalizing that, and adding a number if necessary for uniqueness within a pipeline.

An example with a generated tag name:

- set:
    tag: set_destination_ip
    field: destination.ip
    copy_from: parsed_json.ip

A rough POC can be found in tag-processors.py.

This could be made part of elastic-package format, or it could be a separate command.

@chrisberkhout chrisberkhout added the enhancement New feature or request label Sep 27, 2024
@jsoriano
Copy link
Member

jsoriano commented Oct 1, 2024

So the idea is that all processors should have this tag set?

Adding this as part of elastic-package format could make sense, yes.

@chrisberkhout
Copy link
Contributor Author

Yes, that's it.

When error messages include it (like below) it can help to locate the problem.

on_failure:
  - append:
      field: error.message
      value: >
        Processor "{{{ _ingest.on_failure_processor_type }}}"
        with tag "{{{ _ingest.on_failure_processor_tag }}}"
        in pipeline "{{{ _ingest.on_failure_pipeline }}}"
        failed with message "{{{ _ingest.on_failure_message }}}"

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

No branches or pull requests

2 participants