azureblog.co.uk
← AZ-104 study plan
AZ-104 · Monitor and maintain Azure resources

Monitor resources in Azure

Read metrics and logs in Azure Monitor, build alerts with action groups, query with KQL, and use Insights and Network Watcher.

  • 20 min
  • 6 concepts
  • Try it yourself
  • 5-question check

Learn

Azure Monitor collects two main kinds of data. Metrics are numbers sampled over time, such as CPU percentage, and are kept for 93 days. Logs are records with many fields, stored in a Log Analytics workspace and queried with KQL.

Alerts watch that data and tell people or systems when something needs attention.

  1. 1

    Interpret metrics in Azure Monitor

    Platform metrics are collected automatically for most resources. Use Metrics explorer to chart them, change the aggregation (average, min, max, sum, count), split by a dimension and pin charts to dashboards.

    Guest OS metrics such as memory inside a VM need the Azure Monitor Agent.

    Remember: Host metrics are free and automatic. Inside the OS needs the agent.

  2. 2

    Configure log settings in Azure Monitor

    The activity log records subscription-level events: who created, changed or deleted what. It's kept for 90 days. Resource logs record what happens inside a resource and aren't collected until you add a diagnostic setting.

    A diagnostic setting sends logs and metrics to a Log Analytics workspace, a storage account, an event hub or a partner solution. For VMs, a data collection rule tells the Azure Monitor Agent what to collect.

    Remember: No diagnostic setting, no resource logs.

  3. 3

    Query and analyze logs in Azure Monitor

    Kusto Query Language (KQL) reads like a pipeline: start with a table, then filter and shape with operators separated by |.

    For example: AzureActivity | where OperationNameValue has "delete" | summarize count() by Caller. Common operators are where, project, summarize, extend, sort by, take and render.

    Remember: Table first, then pipes.

  4. 4

    Set up alert rules, action groups, and alert processing rules in Azure Monitor

    An alert rule has a scope, a condition (metric, log search, activity log, Service Health or resource health) and actions. An action group is a reusable list of who to tell and what to run: email, SMS, push, voice, webhook, Azure Function, Logic App or automation runbook.

    Alert processing rules change fired alerts, for example suppressing them during a maintenance window or adding an action group to every alert in a subscription.

    Remember: Rule = when. Action group = who and what. Processing rule = adjust or silence.

  5. 5

    Configure and interpret monitoring of virtual machines, storage accounts, and networks by using Azure Monitor Insights

    Insights are curated monitoring experiences built on metrics and logs. VM insights shows performance and a map of dependencies between VMs. Storage insights shows capacity, availability, latency and transactions. Network insights shows the health and topology of network resources.

    They're starting points: use them to spot a problem, then drill into Metrics or Logs.

    Remember: VM insights needs the Azure Monitor Agent and a data collection rule.

  6. 6

    Use Azure Network Watcher and Connection Monitor

    Network Watcher is turned on automatically per region. Its diagnostic tools include IP flow verify, Next hop, Connection troubleshoot, packet capture, VPN troubleshoot and topology.

    Connection Monitor continuously tests connectivity and latency between endpoints, such as a VM and a website or on-premises host, and alerts when checks fail.

    Remember: One-off test: Connection troubleshoot. Continuous: Connection Monitor.

From signal to action

  1. SignalA metric, log query result or activity log event.
  2. Alert ruleChecks the condition on a schedule or as events arrive.
  3. Alert firesSeverity 0 (critical) to 4 (verbose).
  4. Processing rulesCan suppress or add actions, such as during maintenance.
  5. Action groupEmails, texts, webhooks, Logic Apps, runbooks.

Try it

Which Azure Monitor feature do you need?

This interactive part needs JavaScript.

In the portal

  • Metrics explorerAzure portal: Monitor > Metrics
  • Add a diagnostic settingAzure portal: your resource > Monitoring > Diagnostic settings > Add diagnostic setting
  • Create an alert ruleAzure portal: Monitor > Alerts > Create > Alert rule
  • Action groupsAzure portal: Monitor > Alerts > Action groups
  • Connection MonitorAzure portal: Network Watcher > Monitoring > Connection monitor

Key terms

Click a card to see the definition.

Check your understanding

5 questions. Score 80% or more and these skills are marked as confident in your AZ-104 study plan.

  1. Where do you look to find who deleted a VM?

  2. A storage account's resource logs aren't appearing in your workspace. What's missing?

  3. What defines who gets notified when an alert fires?

  4. Which KQL operator groups and counts rows?

  5. You need memory usage from inside a Windows VM. What do you need?

Sources

Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.