Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KQL bug in Events queries #257

Open
s4parke opened this issue Jan 6, 2025 · 0 comments
Open

KQL bug in Events queries #257

s4parke opened this issue Jan 6, 2025 · 0 comments

Comments

@s4parke
Copy link

s4parke commented Jan 6, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant