Use multiple rules with any (OR logic)

Use multiple rules with any (OR logic)

In this article, you will find the rules document for using multiple rules with any (OR logic).

Before you begin

To learn how to access the rules page, refer to this article.

Use multiple rules with any (OR logic)

Notes
Note: This is a complete rules document. In the rules page, copy this JSON into the editor.

Info
[
  {
    "name": "json1",
    "operator": "any",
    "rules": [
      {
        "conditions": {
          "all": [
            {
              "fact": "duration",
              "operator": "lessThan",
              "value": 2
            }
          ]
        },
        "event": {
          "type": "flagged",
          "params": {
            "reason": "Event is shorter than 2 seconds"
          }
        }
      },
      {
        "conditions": {
          "all": [
            {
              "fact": "labelCount",
              "operator": "equal",
              "value": 0
            }
          ]
        },
        "event": {
          "type": "flagged",
          "params": {
            "reason": "Event has no labels"
          }
        }
      }
    ]
  }
]