Примечание
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
Сведения о том, как использовать эти запросы в портале Azure, можно найти в учебнике Log Analytics. Сведения о REST API см. в разделе "Запрос".
DevCenter — хранилище DevBox и разбивка по использованию вычислительных ресурсов по полям разработки
Получить общее хранилище и вычислительные единицы за указанный месяц.
let startSearchTime = startofmonth(now());
let endSearchTime = startofmonth(now(), 1); // The second parameter represents the number of months to offset from the input date.
DevCenterBillingEventLogs
| where OperationName == "DevBoxUsage"
and StartTime >= startSearchTime
and StartTime < endSearchTime
| extend DevBoxName = UsageResourceName
| extend DevBoxId = UsageResourceUniqueId
| summarize StorageHours = countif(UsageType == "Storage"),
StorageMeterQuantity = round(sum(iff(UsageType == "Storage", Quantity, 0.0)), 6),
TotalRunningHours = round(sum(iff(UsageType == "Compute", Quantity, 0.0)), 6),
NormalRateComputeHours = round(sum(iff(UsageType == "Compute" and IsOverMonthlyBillingCap == false, Quantity, 0.0)), 6),
DiscountRateComputeHours = round(sum(iff(UsageType == "Compute" and IsOverMonthlyBillingCap == true, Quantity, 0.0)), 6)
by DevBoxName, DevBoxId
| project-reorder DevBoxName, DevBoxId, StorageHours, StorageMeterQuantity, TotalRunningHours, NormalRateComputeHours, DiscountRateComputeHours
DevCenter — разбивка счетчика выставления счетов DevBox по пулу
Получите общее количество единиц измерения по пулу за указанный месяц.
let startSearchTime = startofmonth(now());
let endSearchTime = startofmonth(now(), 1); // The second parameter represents the number of months to offset from the input date.
DevCenterBillingEventLogs
| where OperationName == "DevBoxUsage"
and StartTime >= startSearchTime
and StartTime < endSearchTime
| extend Pool = tolower(BilledResourceId)
| summarize MeterUsage = round(sum(Quantity), 6)
by Pool, MeterId, UsageType