You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sentinel/monitor-analytics-rule-integrity.md
+74Lines changed: 74 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,80 @@ The following types of analytics rule audit events are logged in the *SentinelAu
56
56
57
57
For more information, see [SentinelAudit table columns schema](audit-table-reference.md#sentinelaudit-table-columns-schema).
58
58
59
+
### Run queries to detect health and integrity issues
60
+
61
+
For best results, you should build your queries on the **pre-built functions** on these tables, ***_SentinelHealth()*** and ***_SentinelAudit()***, instead of querying the tables directly. These functions ensure the maintenance of your queries' backward compatibility in the event of changes being made to the schema of the tables themselves.
62
+
63
+
As a first step, your queries should filter the tables for data related to analytics rules. Use the `SentinelResourceType` parameter.
64
+
65
+
```kusto
66
+
_SentinelHealth()
67
+
| where SentinelResourceType == "Analytics Rule"
68
+
```
69
+
70
+
If you want, you can further filter the list for a particular kind of analytics rule. Use the `SentinelResourceKind` parameter for this.
71
+
72
+
```kusto
73
+
| where SentinelResourceKind == "Scheduled"
74
+
75
+
# OR
76
+
77
+
| where SentinelResourceKind == "NRT"
78
+
```
79
+
80
+
Here are some sample queries to help you get started:
81
+
82
+
- Find rules that didn't run successfully:
83
+
84
+
```kusto
85
+
_SentinelHealth()
86
+
| where SentinelResourceType == "Analytics Rule"
87
+
| where Status != "Success"
88
+
```
89
+
90
+
- Find rules that have been "[auto-disabled](detect-threats-custom.md#issue-a-scheduled-rule-failed-to-execute-or-appears-with-auto-disabled-added-to-the-name)":
91
+
92
+
```kusto
93
+
_SentinelHealth()
94
+
| where SentinelResourceType == "Analytics Rule"
95
+
| where Reason == "The analytics rule is disabled and was not executed."
96
+
```
97
+
98
+
- Count the rules and runnings that succeeded or failed, by reason:
99
+
100
+
```kusto
101
+
_SentinelHealth()
102
+
| where SentinelResourceType == "Analytics Rule"
103
+
| summarize Occurrence=count(), Unique_rule=dcount(SentinelResourceId) by Status, Reason
104
+
```
105
+
106
+
- Find rule deletion activity:
107
+
108
+
```kusto
109
+
_SentinelAudit()
110
+
| where SentinelResourceType =="Analytic Rule"
111
+
| where Description =="Analytics rule deleted"
112
+
```
113
+
114
+
- Find activity on rules, by rule name and activity name:
115
+
116
+
```kusto
117
+
_SentinelAudit()
118
+
| where SentinelResourceType =="Analytic Rule"
119
+
| summarize Count= count() by RuleName=SentinelResourceName, Activity=Description
120
+
```
121
+
122
+
- Find activity on rules, by caller name (the identity that performed the activity):
0 commit comments