Skip to content

Commit 5562837

Browse files
committed
Remove budget and add cost alert samples for common alert schema
1 parent 073a6c6 commit 5562837

File tree

1 file changed

+83
-20
lines changed

1 file changed

+83
-20
lines changed

articles/azure-monitor/alerts/alerts-common-schema-test-action-definitions.md

Lines changed: 83 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -675,30 +675,93 @@ Any alert instance describes the resource that was affected and the cause of the
675675
}
676676
```
677677

678-
#### `monitoringService` = `Budget`
678+
#### `monitoringService` = `CostAlerts`
679+
Actual cost budget
679680

680681
**Sample values**
681682
```json
682683
{
683-
"schemaId":"AIP Budget Notification",
684-
"data":{
685-
"SubscriptionName":"test-subscription",
686-
"SubscriptionId":"11111111-1111-1111-1111-111111111111",
687-
"EnrollmentNumber":"",
688-
"DepartmentName":"test-budgetDepartmentName",
689-
"AccountName":"test-budgetAccountName",
690-
"BillingAccountId":"",
691-
"BillingProfileId":"",
692-
"InvoiceSectionId":"",
693-
"ResourceGroup":"test-RG",
694-
"SpendingAmount":"1111.32",
695-
"BudgetStartDate":"11/17/2021 5:40:29 PM -08:00",
696-
"Budget":"10000",
697-
"Unit":"USD",
698-
"BudgetCreator":"[email protected]",
699-
"BudgetName":"test-budgetName",
700-
"BudgetType":"Cost",
701-
"NotificationThresholdAmount":"8000.0"
684+
"schemaId": "azureMonitorCommonAlertSchema",
685+
"data": {
686+
"essentials": {
687+
"monitoringService": "CostAlerts",
688+
"firedDateTime": "2022-12-07T21:13:20.645Z",
689+
"description": "Your spend for budget Test_actual_cost_budget is now $11,111.00 exceeding your specified threshold $25.00.",
690+
"essentialsVersion": "1.0",
691+
"alertContextVersion": "1.0",
692+
"alertId": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.CostManagement/alerts/Test_Alert",
693+
"alertRule": null,
694+
"severity": null,
695+
"signalType": null,
696+
"monitorCondition": null,
697+
"alertTargetIDs": null,
698+
"configurationItems": [
699+
"budgets"
700+
],
701+
"originAlertId": null
702+
},
703+
"alertContext": {
704+
"AlertCategory": "budgets",
705+
"AlertData": {
706+
"Scope": "/subscriptions/11111111-1111-1111-1111-111111111111/",
707+
"ThresholdType": "Actual",
708+
"BudgetType": "Cost",
709+
"BudgetThreshold": "$50.00",
710+
"NotificationThresholdAmount": "$25.00",
711+
"BudgetName": "Test_actual_cost_budget",
712+
"BudgetId": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Test_actual_cost_budget",
713+
"BudgetStartDate": "2022-11-01",
714+
"BudgetCreator": "[email protected]",
715+
"Unit": "USD",
716+
"SpentAmount": "$11,111.00"
717+
}
718+
}
719+
}
720+
}
721+
```
722+
723+
#### `monitoringService` = `CostAlerts`
724+
Forecasted cost budget
725+
726+
**Sample values**
727+
```json
728+
{
729+
"schemaId": "azureMonitorCommonAlertSchema",
730+
"data": {
731+
"essentials": {
732+
"monitoringService": "CostAlerts",
733+
"firedDateTime": "2022-12-07T21:13:29.576Z",
734+
"description": "The total spend for your budget, Test_forcasted_budget, is forecasted to reach $1111.11 before the end of the period. This amount exceeds your specified budget threshold of $50.00.",
735+
"essentialsVersion": "1.0",
736+
"alertContextVersion": "1.0",
737+
"alertId": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.CostManagement/alerts/Test_Alert",
738+
"alertRule": null,
739+
"severity": null,
740+
"signalType": null,
741+
"monitorCondition": null,
742+
"alertTargetIDs": null,
743+
"configurationItems": [
744+
"budgets"
745+
],
746+
"originAlertId": null
747+
},
748+
"alertContext": {
749+
"AlertCategory": "budgets",
750+
"AlertData": {
751+
"Scope": "/subscriptions/11111111-1111-1111-1111-111111111111/",
752+
"ThresholdType": "Forecasted",
753+
"BudgetType": "Cost",
754+
"BudgetThreshold": "$50.00",
755+
"NotificationThresholdAmount": "$50.00",
756+
"BudgetName": "Test_forcasted_budget",
757+
"BudgetId": "/subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Consumption/budgets/Test_forcasted_budget",
758+
"BudgetStartDate": "2022-11-01",
759+
"BudgetCreator": "[email protected]",
760+
"Unit": "USD",
761+
"SpentAmount": "$999.99",
762+
"ForecastedTotalForPeriod": "$1111.11"
763+
}
764+
}
702765
}
703766
}
704767
```

0 commit comments

Comments
 (0)