Write a Chain Rule
This topic has information about Chain rules and how to create them in the Cloud SIEM UI.
If you are new to writing rules, see About Cloud SIEM Rules for information about rule expressions and other rule options.
About Chain rules​
A Chain rule is similar to a Threshold rule. A Threshold rule fires when one rule expression is matched at least a certain number times during a specified length of time. In a Chain rule you configure two more rule expressions, and for each expression, the number of matches that are required for the rule to fire a Signal. The interval you define within which the matches must occur applies to all of the rule expressions in the rule.
Watch this micro lesson to learn how to create a Chain rule.
Create a Chain rule​
- Classic UI. In the top menu select Content > Rules.
New UI. In the main Sumo Logic menu, select Cloud SIEM > Rules. You can also click the Go To... menu at the top of the screen and select Rules. - On the Create a Rule page, click Create in the Chain card.Â
- In the rules editor:
- Name. Enter a name for the rule. Signals fired by the rule will have this name.
- Enabled. By default the rule will be enabled. It's good practice to use the slider to disable the rule so that it won’t be applied to incoming Records until you’ve tested it.
Configure “If Triggered” settings​
- When at least ... Record matches expression. Enter two or more rule expressions. For each, select the number of matches that are required.
- For each rule expression, click Test Rule Expression to test it against existing Records in Cloud SIEM. The If Triggered section expands, and Cloud SIEM searches for Records that match the rule expression. If there are no matching Records, you'll see a There aren't any matches for the expression message. If no matches were returned, try changing the time range.
- grouped by.  By default, a chain rule implicitly groups by the entity field you’ll select below when configuring the Then Create a Signal options. You can select additional “group by” fields with the matches grouped by option, so that a Signal is only created if the count for the group is above the threshold count specified above.Â
- in ... order. Choose either:
- any if matches can occur in any order.
- exact if matches must occur in the same order as you have ordered the rule expressions. If you choose this option, you can only have two rule expressions.
- within.... Select the duration within which the rule expression must evaluate to “true” more than the number of times specified in When at least n Record matches expression for the rule to fire a Signal.
- Select Add Tuning Expression if you want to add a rule tuning expression to the rule.
note
If you use Test Rule Expression on a rule that has one or more rule tuning expressions, you can test it without the tuning expressions, or with selected tuning expressions.