Skip to content

Commit bef16cf

Browse files
committed
Add query info
1 parent f6d2046 commit bef16cf

File tree

2 files changed

+65
-14
lines changed

2 files changed

+65
-14
lines changed

docs/cse/rules/about-cse-rules.md

Lines changed: 65 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,25 @@ There are several kinds of rules. Each supports a different sort of firing behav
4343
* **First Seen rule**. Fires when behavior by an Entity is encountered that hasn't been seen before. For example, the first time when a user logs in from a new location, or when a new admin account is created. For more information about First Seen rules, see [Write a First Seen Rule](/docs/cse/rules/write-first-seen-rule).
4444
* **Outlier rule**. Fires when behavior by an Entity is encountered that deviates from its baseline activity. For each Outlier rule, Cloud SIEM automatically creates a baseline model of normal behavior. After the baseline learning period is completed, activity that deviates from the mean (normal baseline behavior) creates a Signal. For more information about Outlier rules, see [Write an Outlier Rule](/docs/cse/rules/write-outlier-rule).
4545

46+
## Rule limits
47+
48+
Limits are set on how often a rule fires so that the system is not overloaded. For example, if a rule fires too many signals in an hour, it can cause performance problems for all rule processes. If a rule exceeds a limit, its [rule status](#rule-status) changes from Active to Failed and the rule is disabled.
49+
50+
| Type | Limit |
51+
| :-- | :-- |
52+
| Total allowed custom rules of each [rule type](#rule-types) | 100 <!-- <br/>200 - Tier 2<br/>500 - Tier 3 --> |
53+
| Signals per hour | 50K<!-- - Tier 1<br/>100K - Tier 2<br/>150K - Tier 3 -->|
54+
| Signals per 24 hours | 1M<!-- Tier 1<br/>2M - Tier 2<br/>3M - Tier 3 --> |
55+
| Matched records per day* | 200K<!-- - Tier 1<br/>400K - Tier 2<br/>600K - Tier 3 --> |
56+
| Rule group cardinality per day** | 100K<!-- - Tier 1<br/>200K - Tier 2<br/>300K - Tier 3 --> |
57+
58+
*Applies to all [rule types](#rule-types) except Match rules.
59+
<br/>**Group cardinality is the number of distinct key values in a grouping function of a complex rule type. For instance, if a rule is grouped by email address, the cardinality would be the total number of distinct email addresses.
60+
61+
:::note
62+
Rule limits can be higher if you are in a higher tenant tier level. If you have questions about what your tenant tier level is, contact your Sumo Logic account representative or [contact Sumo Logic Support](https://support.sumologic.com/support/s/).
63+
:::
64+
4665
## Rule status
4766

4867
### View a rule's status
@@ -63,24 +82,56 @@ Following are the different kinds of rule statuses. A rule's status can change d
6382
| **Failed** | The rule exceeded a rule limit and was automatically disabled. | Click the information button <img src={useBaseUrl('img/cse/rule-failed-info-button.png')} alt="Rule failed information button" width="20"/> on the **Failed** label for details about the failure. Depending on the reasons provided in the details, you may need to edit the rule to prevent it from failing again in the future. After addressing the reasons for the failure, enable the rule with the toggle in the UI, or enable the rule with the API. |
6483
| **Warning** | The rule is approaching a rule limit and risks being disabled. | Click the information button <img src={useBaseUrl('img/cse/rule-warning-info-button.png')} alt="Rule warning information button" width="20"/> on the **Warning** label for details about the warning. Depending on the reasons provided in the details, you may need to edit the rule to prevent it from being disabled. |
6584

66-
## Rule limits
85+
### Query for rule status changes
6786

68-
Limits are set on rules so that the system is not overloaded. For example, if a rule fires too many signals in an hour, it can cause performance problems for all rule processes. If a rule exceeds a limit, its [rule status](#rule-status) changes from Active to Failed and the rule is disabled.
87+
You can query audit logs for rule status changes. (For more information about querying audit logs, see [Cloud SIEM Audit Logging](/docs/cse/administration/cse-audit-logging/).)
6988

70-
| Type | Limit |
71-
| :-- | :-- |
72-
| Total allowed custom rules of each [rule type](#rule-types) | 100 <!-- <br/>200 - Tier 2<br/>500 - Tier 3 --> |
73-
| Signals per hour | 50K<!-- - Tier 1<br/>100K - Tier 2<br/>150K - Tier 3 -->|
74-
| Signals per 24 hours | 1M<!-- Tier 1<br/>2M - Tier 2<br/>3M - Tier 3 --> |
75-
| Matched records per day* | 200K<!-- - Tier 1<br/>400K - Tier 2<br/>600K - Tier 3 --> |
76-
| Rule group cardinality per day** | 100K<!-- - Tier 1<br/>200K - Tier 2<br/>300K - Tier 3 --> |
89+
#### Example query for rule status changes
7790

78-
*Applies to all [rule types](#rule-types) except Match rules.
79-
<br/>**Group cardinality is the number of distinct key values in a grouping function of a complex rule type. For instance, if a rule is grouped by email address, the cardinality would be the total number of distinct email addresses.
91+
The following query queries for match rules whose status was changed automatically to `Warning` by the system:
8092

81-
:::note
82-
Rule limits can be higher if you are in a higher tenant tier level. If you have questions about what your tenant tier level is, contact your Sumo Logic account representative or [contact Sumo Logic Support](https://support.sumologic.com/support/s/).
83-
:::
93+
```json
94+
_index=sumologic_system_events _sourceCategory=cseRule
95+
| json field=_raw "templatedMatchRule.status"
96+
| where eventname = "TemplatedMatchRuleUpdated"
97+
| where templatedMatchRule.status = "Warning"
98+
```
99+
100+
You can set up this query for one or multiple rules, with one or multiple statuses.
101+
* To query for other rule types, replace `"templatedMatchRule.status"` with another rule type. For example:
102+
* `"templatedAggregationRule.status"`
103+
* `"templatedChainRule.status"`
104+
* `"templatedFirstSeenRule.status"`
105+
* `"templatedMatchRule.status"`
106+
* `"templatedOutlierRule.status"`
107+
* `"templatedThresholdRule.status"`
108+
* To query for for other statuses, replace `Warning` in the example above with another status. For example:
109+
* `"Active"`
110+
* `"Degraded"`
111+
* `"Disabled"`
112+
* `"Failed"`
113+
* `"Warning"`
114+
115+
#### Example query for disabled rules
116+
117+
If you want to query simply for match rules that are disabled, you could execute a query like this:
118+
119+
```json
120+
(_index=sumologic_audit_events OR _index=sumologic_system_events) _sourceCategory=cseRule
121+
| json field=_raw "templatedMatchRule.enabled"
122+
| where eventname = "TemplatedMatchRuleUpdated"
123+
| where templatedMatchRule.enabled = "false"
124+
```
125+
126+
This query looks for match rules that were manually disabled (`_index=sumologic_audit_events`) or automatically disabled by the system (`_index=sumologic_system_events`).
127+
128+
### Create a monitor to alert on rule status changes
129+
130+
You can [create a monitor](/docs/alerts/monitors/create-monitor/) to generate alerts when rules statuses change. This will alert you when you need to take action.
131+
132+
For example, you could use the [example query for rule status changes](#example-query-for-rule-status-changes) above in your monitor. It will alert when the status of match rules change to `Warning`.
133+
134+
<img src={useBaseUrl('img/cse/example-monitor-for-rule-status-change.png')} alt="Example monitor for rule status change" style={{border: '1px solid gray'}} width="700"/>
84135

85136
## About rule expressions
86137

256 KB
Loading

0 commit comments

Comments
 (0)