Skip to content

Suggestion to allow for conditional ingestor outputs #185

@jblackman

Description

@jblackman

Logstash allows us to wrap an output (or input) in a condition block. Could I propose adding a condition: key to the logstash_parser.outputs array? For example:

instance_groups:
- name: ingestor
  jobs:
  - name: ingestor_syslog
    properties:
      logstash_parser:
        outputs:
        - plugin: foo
          options:
            key: "value"
          condition:  '[syslog_program] == "gorouter"'

and this would produce output config like:

outputs {
  if [syslog_program] == "gorouter" {
    foo {
      key => "value"
    }
  }
}

Happy to create a PR for this. I just want to get some feedback if this is an appropriate way to make the change. An alternative would be to create a output_overrides parameter to allow complete customisability, similar to filter_overrides.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions