Your Azure Administrator Exam (AZ-104) preparation can be significantly enhanced by understanding how to set up alerts and actions in Microsoft Azure. Azure provides several ways to monitor your resources for availability, performance, and usage, alerting you if something goes wrong. This guide will take you through the process of setting up alerts and actions in Azure.
Setting Up Alerts
Azure alerts send you proactive notifications when important conditions are detected in your monitoring data. They enable you to identify and resolve issues before the users of your system encounter them. Here are the steps to set up alerts:
- Sign in to the Azure portal.
- Open the “Monitor” menu in the left-hand navigation bar.
- Choose “Alerts” and then “New alert rule”.
- In the “Scope” section, choose the “Select target” button and select the resource that you want to alert on.
- In the “Condition” section, choose the “Add” button, select the signal type, and set your desired thresholds.
- Select the “Done” button.
- In the “Action Group” section, choose the “Select action group” button and select an action group or create a new one.
- Choose the “Create alert rule” button.
Note that the alerts will only be effective if your resources are being monitored for availability, performance, and usage.
Setting Up Actions
Actions in Azure are defined by action groups. Action groups are user-defined collections of notification preferences grouped together. When an alert fires, all actions in the action group attached to the alert are triggered. Here is how to set up actions:
- Sign in to the Azure portal.
- Open the “Monitor” menu and select “Alerts”.
- Choose “Manage actions”
- Click “New action group”
- Fill in the necessary details like the action group name, short name, subscription, and resource group.
- In the “Actions” section, click “Add action”, name the action, select its type, and fill in the required parameters.
- Click “Ok” and then “Review + create”.
You can create different types of actions in Azure, including sending an email/SMS message, calling a webhook, or launching an Azure function.
Remember, an action group is a collection of notification preferences. Various types of actions available in Azure are:
- Email/SMS/Push/Voice
- ITSM
- Runbook
- Logic App
- Webhook
- Automation Runbook
- Azure Function
- Secure webhook
In many situations, actions and alerts in Azure are used together, with specific alerts triggering actions. This proactive approach can help maintain the health of your Azure environment and detect any issues before they escalate.
For example, you might set an alert for high CPU usage on a particular Azure VM. This alert could trigger an action such as emailing you about high CPU usage and pinpointing potential problems.
In conclusion, learning how to set up alerts and actions in Azure gives you the ability to proactively monitor and respond to potential issues in your Azure environment. This is a crucial skill for anyone preparing for the AZ-104 Microsoft Azure Administrator Exam.
Practice Test
True or False: Azure Monitor can be used to setup alerts.
- True
- False
Answer: True
Explanation: Azure Monitor is a service in Azure that provides performance and availability monitoring for applications and services in your Azure environment.
Which of the following Azure services allows you to create, manage, and respond to alerts?
- a) Azure Functions
- b) Azure Logic Apps
- c) Azure Activity Logs
- d) Azure Monitor
Answer: d) Azure Monitor
Explanation: Azure Monitor, not Azure Functions, Logic Apps, or Activity Logs, allows you to create, manage, and respond to alerts.
True or False: It is possible to set up auto-scaling based on alerts in Azure.
- True
- False
Answer: True
Explanation: Azure provides an auto-scaling feature that can automatically scale your applications based on predefined rules and alerts.
In Azure, you can setup alerts for which of the following?
- a) Metrics
- b) Logs
- c) Activity Logs
- d) All of the above
Answer: d) All of the above
Explanation: You can setup alerts for metrics, logs, and activity logs in Azure.
In Azure, actions can be triggered by which of the following?
- a) Alerts
- b) Metrics
- c) Logs
- d) None of the above
Answer: a) Alerts
Explanation: Actions in Azure can be triggered by alerts, not directly by metrics or logs.
True or False: You can set up email notifications for alerts in Azure.
- True
- False
Answer: True
Explanation: Azure allows you to set up email notifications for alerts as part of your alert rules.
Which of the following is not a type of action group in Azure?
- a) Email/SMS/Push/Voice
- b) ITSM
- c) Logic App
- d) Data Factory
Answer: d) Data Factory
Explanation: In Azure, action groups can be of the types Email/SMS/Push/Voice, ITSM, and Logic App. Data Factory isn’t a type of Azure action group.
True or False: Azure alert remediation tasks can be automated.
- True
- False
Answer: True
Explanation: Azure provides automation capabilities that allow you to automatically start a runbook or Logic App in response to an alert.
How many alert rules can be created per subscription in Azure?
- a) 100
- b) 500
- c) 1000
- d) There is no limit
Answer: c) 1000
Explanation: Each Azure subscription can have up to 1000 alert rules.
True or False: Azure alerts are only active for a specific time of the day.
- True
- False
Answer: False
Explanation: Azure alerts are always active and are not limited to a specific time of the day.
Which of the following can’t be used as an action after an Azure alert is created?
- a) Run a runbook
- b) Send an email
- c) Start a VM
- d) Shut down the entire Azure infrastructure
Answer: d) Shut down the entire Azure infrastructure
Explanation: While alerts can trigger a wide range of actions in Azure like running a runbook, sending email notifications, and starting a VM, shutting down the entire Azure infrastructure is not one of them.
True or False: Azure Alerts can trigger both Azure Functions and Logic Apps.
- True
- False
Answer: True
Explanation: Azure alerts provide mechanisms to invoke an Azure function or execute a Logic App when a specific condition is met.
Can alerts in Azure Monitor use Dynamic thresholds?
- a) Yes
- b) No
Answer: a) Yes
Explanation: Azure Monitor allows you to set alerts with Dynamic thresholds which uses machine learning to automatically adjust threshold values based on patterns in your metric data.
In Azure Monitor, who can add or modify the alert rules?
- a) Only the Azure administrator
- b) Any user, but with the owner’s permission
- c) Any user, but with the administrator’s permission
- d) Any user of the Azure portal
Answer: c) Any user, but with the administrator’s permission
Explanation: While any user can add or modify alert rules on Azure Monitor, they need to have the administrator’s permission to do so.
True or False: You need to pay additional costs for alerts in Azure Monitor.
- True
- False
Answer: True
Explanation: There is a cost associated with the usage of Azure Monitor and its alert feature, which is often addition to the cost of the resources that are being monitored.
Interview Questions
What is Azure Alerts?
Azure Alerts is a service by Microsoft that provides a notification system based on telemetry data. It enables to inform users when Azure services have met specific predefined criteria.
What can Azure Alerts be used for?
Azure Alerts can be used to proactively monitor Azure resources, services, and potential security incidents. They can alert administrators to service issues in real-time so that they can rectify the issues promptly.
Can Azure Alerts be integrated with third-party services?
Yes, Azure Alerts can be fully integrated with third-party services using Webhooks which allow the alert to call an HTTP/HTTPS endpoint.
What are the key components required to create an alert rule in Azure?
The key components required to create an alert rule in Azure include a target resource, condition or threshold, action group, and the alert details.
What is an action group in Azure Alerts?
Action group in Azure Alerts is the set of notification preferences defined by the user. When an alert is triggered, all the actions in an action group associated with that alert are performed.
How can you create an alert in Azure?
Alerts can be created in Azure by following the steps: Go to Azure portal -> Monitor -> Alerts -> New alert rule.
How many action groups can be assigned per alert rule?
You can assign up to 1000 action groups per alert rule.
Does Azure Alerts provide insights on alert activations?
Yes, you can view alert rule history, which provides all details of when an alert was activated, which signals were evaluated true/false, and every evaluation or process that led to that result.
Can you modify an existing alert rule in Azure?
Yes, you can modify an existing alert rule in Azure. You can add new conditions, modify the existing conditions, change the alert rule name, or description, etc.
What type of Azure services can be monitored using Azure Alerts?
With Azure Alerts, you can monitor virtually all Azure services, including but not limited to virtual machines, databases, networking, storage, and Identity and Access Management.
What are the common actions you can configure in an action group?
Common actions you can configure in an Action Group include sending emails, making HTTP/HTTPS calls, sending SMS messages, making voice calls, and executing Azure Functions.
Can Azure Alerts notify users based on query results from Azure Log Analytics?
Yes, Azure Alerts can be set to notify users based on the results of Log Analytics queries.
How can an alert be set to be triggered repeatedly?
An alert can be set to be triggered repeatedly by using the ‘auto resolve’ setting. The alert will be auto resolved when the condition is no longer met, and it can be triggered again if the condition is met after being resolved.
What does the ‘severity’ attribute in Azure Alerts represent?
The ‘severity’ attribute in Azure Alerts is used to indicate the seriousness of the alert. It ranges from Sev 0 (the highest) to Sev 4 (the lowest).
Can I disable Azure Alerts without deleting them?
Yes, Azure Alert rules can be enabled or disabled at your convenience. You can disable them without having to delete them.