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

dev box - billing consumed compute queries #249

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Azure Services/Dev Box/Alerts/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Put alerts in this folder
1 change: 1 addition & 0 deletions Azure Services/Dev Box/Queries/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Put queries in this folder
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Author: Microsoft Azure
// Display name: Consumed compute per user Display Name
// Description: Display consumed compute per user in hours
// Categories: Azure Resources
// Resource types: Dev Box
// Topic: Dev Box Billing

//required: Need to export SigninLogs of Entra ID to Log Analytics to have the Display Name (Name and Surname)
DevCenterBillingEventLogs
| where UsageType == "Compute"
| summarize HoursConsumed = sum(Quantity) by UserId
| join kind=leftouter (SigninLogs | where ConditionalAccessStatus =="success" | distinct UserId, Identity) on UserId
| project Identity, HoursConsumed
| render columnchart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Author: Microsoft Azure
// Display name: Consumed compute per user Display Name
// Description: Display consumed compute per user in hours
// Categories: Azure Resources
// Resource types: Dev Box
// Topic: Dev Box Billing

//required: Need to export SigninLogs of Entra ID to Log Analytics to have the Display Name (Name and Surname)
DevCenterBillingEventLogs
| where UsageType == "Compute"
| summarize HoursConsumed = sum(Quantity) by UserId, bin(TimeGenerated, 1h)
| join kind=leftouter (SigninLogs | where ConditionalAccessStatus =="success" | distinct UserId, Identity) on UserId
| project Identity, HoursConsumed, TimeGenerated
| render columnchart with (xcolumn=TimeGenerated, ycolumns=Identity, series=HoursConsumed)
11 changes: 11 additions & 0 deletions Azure Services/Dev Box/Queries/consumed compute per user.kql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Author: Microsoft Azure
// Display name: Consumed compute per user
// Description: Display consumed compute per user in hours
// Categories: Azure Resources
// Resource types: Dev Box
// Topic: Dev Box Billing

DevCenterBillingEventLogs
| where UsageType == "Compute"
| summarize Horas=sum(Quantity) by UserId
| render columnchart
1 change: 1 addition & 0 deletions Azure Services/Dev Box/Workbooks/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Put workbooks in this folder