Need Dimension Value PC in the teams Alert

Markus Schädlich 25 Reputation points
2025-01-03T15:07:04.6+00:00

Hi ,

we want to send the alarm via a logic app to a teams channel.

The logic app was created like this:
https://learn.microsoft.com/de-de/azure/azure-monitor/alerts/alerts-logic-apps?tabs=send-email

this is the template:

User's image

User's image

This is the log analytics alert KQL:

InsightsMetrics
| where Name == 'FreeSpaceMB'
| summarize arg_max(TimeGenerated, *) by Tags, Computer
| extend Drive = tostring(parse_json(Tags)["vm.azm.ms/mountId"])
| extend Size = toreal(parse_json(Tags)["vm.azm.ms/diskSizeMB"])
| project TimeGenerated, Computer, Drive, bin(SizeGB = Size / 1024, 0.1), bin(FreeGB = Val / 1024, 1)
| join kind=inner (InsightsMetrics
    | where Name == "FreeSpacePercentage"
    | summarize arg_max(TimeGenerated, *) by Tags, Computer
    | extend Drive = tostring(parse_json(Tags)["vm.azm.ms/mountId"])
    | project TimeGenerated, Computer, Drive, bin(FreePercent = Val, 1.1))
on Computer, Drive
| project TimeGenerated, Computer, Drive, SizeGB, FreeGB, FreePercent
| order by Computer asc

The Problem is that we can only see the affected ressource log analytics workspace in the alert and not the pc which fired :

User's image

We need the information about the pc like this:

User's image

how can i add these informations to the logic app flow?

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

Your answer

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