Alert Rule webhookdata incorrect ResultCount value
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- azure
- Domain
- observability
Research direction
Start with the supplied webhookdata example, comparing ResultCount with the number of rows under SearchResults.tables[].rows. No repository file, test, or implementation entry point is identified; the issue is complete only when the alert payload reports the actual result count and downstream message processing no longer receives the incorrect value.
Written by the indexing model from the issue text.
Description
Hi, I've been using Alert rules for some time to trigger Teams messages. We process the message using the webhookdata, and evaluate some criteria based on the attribute ResultCount. Ever since the 28th May. the ResultCount has been 2, for all triggered alerts. Regardless of the actual number of results in the webhookdata. This is causing our alert to be broken resulting in messages containing System.Object[] rather than strings.
Partial of the webhookdata to help illustrate, heavily redacted so apologies, just trying to illustrate there are three rows in SearchResults but the ResultCount is 2. I've seen the same ResultCount of 2 where there are 1, 2, 3, 4, 5, 6 rows etc, so it seems ResultCount is broken.
"ResultCount": 2,
"SeverityDescription": "Critical",
"WorkspaceId": "xxxxx-xxxxxx-xxxxx-0aa8889d4e49",
"SearchIntervalDurationMin": "2880",
"AffectedConfigurationItems": [],
"AlertType": "Number of results",
"IncludeSearchResults": true,
"SearchIntervalInMinutes": "2880",
"Threshold": 0,
"Operator": "Greater Than",
"SearchResults": {
"tables": [{
"name": "PrimaryResult",
"columns": [{
"name": "subnet_trim",
"type": "string"
}, {
"name": "Cloud_Identity",
"type": "string"
}, {
"name": "Count",
"type": "long"
}],
"rows": [
["web-plan-investments", "web-QuaiAPI", 8],
["", "paymentsapp", 16],
["", "quaiapp", 42]
]
}],
- Dominant language
- PowerShell
- Stars
- 1.2k
- Forks
- 493
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/AzureMonitorCommunity
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 10/100
All issues in microsoft/AzureMonitorCommunity
Similar issues
-
priority:p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
copse-dev/agent-pane#2933 ·
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100