Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

KQL bug in Events queries

Open
#257 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
azure

Research direction

Open Solutions/LogManagement/Queries/Diagnostics/Warning events.kql and inspect line 9, then compare it with Count of warning events.kql and the other referenced query. Update the EventLevelName comparison so it matches the sampled "Warning" value case-insensitively, and confirm the Warning events query returns results.

Written by the indexing model from the issue text.

Description

The query for "Warning events" has a case-sensitive KQL error and does not retrieve any results.

Warning events.kql:9

Events
| where EventLevelName == "warning"  // this does not work
| sort by TimeGenerated desc

Sampled values for the EventLevelName field are "Information", "Warning", "Error".

A likely source of this code sample is the Azure Monitor Reference page for the Event table.

I propose using a case-insensitive match for the field:

Events
| where EventLevelName =~ "Warning" 

The pattern can be found in several query files in this repo, for example:

  1. Azure Services/Virtual machines/Queries/Errors/Error event on computer missing security co critical update.kql
  2. Solutions/LogManagement/Queries/Diagnostics/Count of warning events.kql
  3. Solutions/LogManagement/Queries/Diagnostics/Warning events.kql

Here are screenshots illustrating the values of EventLevelName.

Image
Image

Dominant language
PowerShell
Stars
1.2k
Forks
493
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/AzureMonitorCommunity

All issues in microsoft/AzureMonitorCommunity

Similar issues

More Observability & SRE issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.