快速入门:使用 Azure Monitor 监视 Azure 资源Quickstart: Monitor an Azure resource with Azure Monitor

创建 Azure 资源后,Azure Monitor 即会开始从这些资源中收集数据。Azure Monitor starts collecting data from Azure resources the moment that they're created. 本快速入门中简单演练了为资源自动收集的数据以及如何在 Azure 门户中查看特定资源的数据。This quickstart provides a brief walkthrough of the data that's automatically collected for a resource and how to view it in the Azure portal for a particular resource. 之后,你可以添加配置来收集其他数据,并可以转到 Azure Monitor 菜单中使用相同工具访问为订阅中所有资源收集的数据。Later, you can add configuration to collect additional data and can go to the Azure Monitor menu to use the same tools to access data collected for all the resources in your subscription.

有关监视从 Azure 资源收集的数据的更详细说明,请参阅使用 Azure Monitor 监视 Azure 资源For more detailed descriptions of monitoring data collected from Azure resources see Monitoring Azure resources with Azure Monitor.

登录到 Azure 门户Sign in to Azure portal

https://portal.azure.cn 中登录 Azure 门户。Sign in to the Azure portal at https://portal.azure.cn.

概述页Overview page

许多服务的“概述”页中会包含监视数据,以提供关于操作的快速概览。Many services will include monitoring data on their Overview page as a quick glance to their operation. 这通常会基于 Azure Monitor 指标中存储的平台指标子集。This will typically be based on a subset of platform metrics stored in Azure Monitor Metrics.

  1. 找到订阅中的 Azure 资源。Locate an Azure resource in your subscription.

  2. 转到“概述”页,查看其中是否显示性能数据。Go to the Overview page and note if there's any performance data displayed. 此数据将由 Azure Monitor 提供。This data will be provided by Azure Monitor. 下方的示例是 Azure 存储帐户的“概述”页面,可以看到其中显示有多个指标。The example below is the Overview page for an Azure storage account, and you can see that there are multiple metrics displayed.

    概述页

  3. 单击任何图可在以下介绍的指标资源管理器中打开数据。You can click on any of the graphs to open the data in metrics explorer which is described below.

查看活动日志View the Activity log

活动日志提供订阅中针对各个 Azure 资源操作的见解。The Activity log provides insight into the operations on each Azure resource in the subscription. 其中包含的信息包括资源创建或修改的时间、作业开始的时间或者特定操作发生的时间。This will include such information as when a resource is created or modified, when a job is started, or when a particular operation occurs.

  1. 在资源菜单的顶部,选择“活动日志”。At the top of the menu for your resource, select Activity log.

  2. 当前筛选器设置为与资源相关的事件。The current filter is set to events related to your resource. 如果没有看见任何事件,尝试更改“时间跨度”来扩大时间范围。If you don't see any events, try changing the Timespan to increase the time scope.

    活动日志

  3. 如要查看订阅中其他资源的事件,请更改筛选器中的标准或删除筛选器属性。If you want to see events from other resources in your subscription, either change criteria in the filter or even remove filter properties.

    活动日志

查看指标View metrics

指标是描述资源某方面在特定时间的情况的数字值。Metrics are numerical values that describe some aspect of your resource at a particular time. Azure Monitor 以一分钟为间隔自动从所有 Azure 资源收集平台指标。Azure Monitor automatically collects platform metrics at one minute intervals from all Azure resources. 可以使用指标资源管理器查看这些指标。You can view these metrics using metrics explorer.

  1. 在资源菜单的“监控”部分下,选择“指标” 。Under the Monitoring section of your resource's menu, select Metrics. 这会打开指标资源管理器,其中范围集设置为你的资源。This opens metrics explorer with the scope set to your resource.

  2. 单击“添加指标”,向图表中添加指标。Click Add metric to add a metric to the chart.

    指标资源管理器

  3. 从下拉列表中选择一个指标,然后选择“聚合” 。Select a Metric from the dropdown list and then an Aggregation. 这会定义各个时间间隔期间如何对收集的值进行采样。This defines how the collected values will be sampled over each time interval.

    指标资源管理器

  4. 单击“添加指标”,向图表添加其他指标和聚合组合。Click Add metric to add additional metric and aggregation combinations to the chart.

    指标资源管理器

后续步骤Next steps

在本快速入门中,你查看了活动日志以及由 Azure Monitor 自动收集的 Azure 资源的指标。In this quickstart, you viewed the Activity log and metrics for an Azure resource which are automatically collected by Azure Monitor. 请继续学习下一个快速入门,了解如何将活动日志收集到 Log Analytics 工作区中,并在其中使用 日志查询对其进行分析。Continue to the next quickstart which shows you how to collect the Activity log into a Log Analytics workspace where they can be analyzed using log queries.