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 if/then/else support to processors #10744

Merged
merged 3 commits into from
Feb 14, 2019

Commits on Feb 14, 2019

  1. Add if/then/else support to processors

    This allows for a condition to be used with a list of processors and for a list of
    processors to be executed if the condition does not match.
    
    This is a contrived example that adds fields and tags to the event if true, otherwise it drops the event.
    
        processors: [
          {
            "if": {
              "and": [
                {
                  "equals.type": "login"
                },
                {
                  "range.uid.lt": 500
                }
              ]
            },
            "then": [
              {
                "add_fields": {
                  "target": "",
                  "fields": {
                    "uid_type": "reserved"
                  }
                }
              },
              {
                "add_tags": {
                  "tags": [
                    "reserved_user_login"
                  ]
                }
              }
            ],
            "else": {
              "drop_event": null
            }
          }
        ]
    andrewkroh committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    035e1ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a6504a8 View commit details
    Browse the repository at this point in the history
  3. Add nested if test case

    andrewkroh committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    cfd89ea View commit details
    Browse the repository at this point in the history