Skip to content

Drop Processor

orbenharosh edited this page Feb 12, 2023 · 7 revisions

Drop [drop]

This processor drops log lines, it can be combined with an if statement to remove log lines based on particular events or values, or it can simply be used to throttle the number of documents that are output by sawmill.

  • percentage, default to 100 which is full drop, can be used to throttle

Example

{
  "steps": [
    {
      "if": {
        "condition": {
          "hasValue": {
            "field": "field_name",
            "possibleValues": [
              "value"
            ]
          }
        },
        "then": [
          {
            "drop": {
              "config": {}
            }
          }
        ]
      }
    }
  ]
}

Example

{
  "steps": [
    {
      "if": {
        "condition": {
          "hasValue": {
            "field": "field_name",
            "possibleValues": [
              "value"
            ]
          }
        },
        "then": [
          {
            "drop": {
              "config": {
"percentage": "20"}
            }
          }
        ]
      }
    }
  ]
}
Clone this wiki locally