Forum Discussion

lukebalzrina's avatar
lukebalzrina
Copper Contributor
Jan 04, 2023

Query for Monthly Active Users (MAU)

I'm trying to calculate cost-per-user by referencing this article from Microsoft: Estimating per-user app streaming costs .

The article states, simply, to take your costs incurred for a month and divide that by your Monthly Active users. This makes sense.

The problem I have is trying to do this historically to answer questions such as "What was our AVD cost-per-user last summer?".

I know how to retrieve the Monthly Active Users count from Azure Insights. The problem I'm running into is that Azure Monitor/Insights only works on resources that are still active. I've deleted all of my host pools and resource groups from last summer. I have all the data captured in Log Analytics though.

 

Does anyone know how Azure Insights is calculating the "Monthly Active Users" count? If I knew the logic or query it's using, then I could query my LAW logs from that historical time period.

For now, I can query total sessions for that historical timeframe:

Perf
| where ObjectName contains "Terminal Services" and CounterName == "Total Sessions"
| summarize TotalSessions = max(CounterValue) by bin(TimeGenerated, 1d), Computer
| where TimeGenerated  between(datetime("2022-07-01 12:00:00") .. datetime("2022-9-01 12:00:00"))

This just tells me total sessions though. Getting the MAU count is tougher. Azure Insights is already doing this, albeit in graphical form in Azure Monitor/Insights.

 

How can I query my LAW logs to calculate Monthly Active Users for a historical time period?

Resources