https://github.com/epomatti/azure-monitor-alerts
Azure Monitor Alerts
https://github.com/epomatti/azure-monitor-alerts
azure azure-alert azure-alerts azure-monitor azure-security log-analytics monitor terraform
Last synced: 7 months ago
JSON representation
Azure Monitor Alerts
- Host: GitHub
- URL: https://github.com/epomatti/azure-monitor-alerts
- Owner: epomatti
- License: mit
- Created: 2023-11-26T03:04:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-02T01:29:38.000Z (almost 2 years ago)
- Last Synced: 2025-01-17T18:34:55.450Z (9 months ago)
- Topics: azure, azure-alert, azure-alerts, azure-monitor, azure-security, log-analytics, monitor, terraform
- Language: HCL
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure Monitor Alerts
Implementation for Azure Monitor Alerts
Create the infrastructure:
```sh
cp config/sample.tfvars .auto.tfvars
```Create the infrastructure:
```sh
terraform init
terraform apply -auto-approve
```Upload blobs to trigger the alarm:
```sh
az storage blob upload \
--account-name \
--container-name blobs \
--name test.txt \
--file test.txt \
--auth-mode login
```## Management Lock alerts
One option is to create an alert when a **lock** is created.
To achieve that, select the desired scope, and in the Alert Rule, select the **Signal** named **`Add management locks (Management lock)`**.
Alerts can also be sent to sent via push notification to the **Azure mobile app** in the Action Group by identifying the user account email.
```sh
az monitor action-group create --name ContosoWebhookAction \
--resource-group ContosoVMRG \
--action azureapppush test_apppush bob@contoso.com
```