Log Analytic workspace weird behavior

Mohamed jihad bayali 1,141 Reputation points
2022-10-14T08:25:02.617+00:00

Hello Team,

I hope you're doing fine,

I created recently a dcr to collect Error logs on a virtual Machine, here is the configuration :

250391-image.png

The DCR is writing to a log analytic workspace.

When i try to query the events from the workspace, i'm having this weird result :

250401-image.png

Event level = 2
Event levelname = Warning

Normally, Event level = 2 is error not warning, for a reason it appearing as warning, and i don't know why
Any help? thanks

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Mohamed jihad bayali 1,141 Reputation points
    2022-10-14T08:26:05.59+00:00

    The query that i'm using is :

    Event
    | where Computer == 'ComputerName'

    0 comments No comments

  2. George Moise 2,361 Reputation points Microsoft Employee
    2022-10-14T13:00:55.24+00:00

    Hello @Mohamed jihad bayali ,

    Just tested in my lab and managed to reproduce the same:

    250495-image.png

    0 comments No comments

  3. Mohamed jihad bayali 1,141 Reputation points
    2022-10-14T16:28:49.023+00:00

    Hello George,

    Thank you for taking time to reproduce the issue, and thanks for the feedback,

    That's a weird behavior

    The eventLevel =2 is correct (2 = Error, 3=Warning) but the EventLevelName is wrong.

    I created Alerts using the EventLevel, and not the EventLevelName to bypass the anomaly

    0 comments No comments

  4. Maxim Sergeev 6,586 Reputation points Microsoft Employee
    2022-10-14T16:31:36.817+00:00

    Follow the workaround:

    Event  
    | extend MyEventLevel = case (tostring(EventLevel) == "3", "Warning", tostring(EventLevel) == "4", "Information","Error")  
    | project Source, EventData, EventLevel, MyEventLevel  
    

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.