Skip to content

Commit 0090db1

Browse files
committedMar 12, 2021
review comments
1 parent df1febe commit 0090db1

File tree

3 files changed

+37
-216
lines changed

3 files changed

+37
-216
lines changed
 
Loading

‎articles/container-registry/monitor-service-reference.md

Lines changed: 14 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -8,225 +8,91 @@ ms.custom: subject-monitoring
88
ms.service: container-registry
99
ms.date: 03/10/2021
1010
---
11-
<!-- VERSION 2
12-
Template for monitoring data reference article for Azure services. This article is support for the main "Monitor [servicename]" article for the service. -->
13-
14-
<!-- IMPORTANT STEP 1. Do a search and replace of [TODO-replace-with-service-name] with the name of your service. That will make the template easier to read -->
1511

1612
# Monitoring Azure Container Registry data reference
1713

1814
See [Monitor Azure Container Registry](monitor-service.md) for details on collecting and analyzing monitoring data for Azure Container Registry.
1915

2016
## Metrics
2117

22-
<!-- REQUIRED if you support Metrics. If you don't, keep the section but call that out. Some services are only onboarded to logs.
23-
<!-- Please keep headings in this order -->
24-
25-
<!-- 2 options here depending on the level of extra content you have. -->
26-
27-
<!-- OPTION 1 - Minimum - Link to relevant bookmarks in https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported, which is auto generated from the metrics REST API. Not all metrics are published depending on whether your product group wants them to be. If the metric is published, but descriptions are wrong of missing, contact your PM and tell them to update them in the Azure Monitor "shoebox" manifest. If this article is missing metrics that you and the PM know are available, both of you contact azmondocs@microsoft.com.
28-
-->
29-
30-
<!-- Example format. There should be AT LEAST one Resource Provider/Resource Type here.
31-
32-
This section lists all the automatically collected platform metrics collected for Azure Container Registry.
33-
34-
|Metric Type | Resource Provider / Type Namespace<br/> and link to individual metrics |
35-
|-------|-----|
36-
| Container Registry | [Microsoft.ContainerRegistry/registries](/azure/azure-monitor/essentials/metrics-supported#microsoftcontainerregistryregistries) |
37-
38-
39-
40-
41-
<!-- OPTION 2 - Link to the metrics as above, but work in extra information not found in the automated metric-supported reference article. NOTE: YOU WILL NOW HAVE TO MANUALLY MAINTAIN THIS SECTION to make sure it stays in sync with the metrics-supported link. For highly customized example, see [CosmosDB](https://docs.microsoft.com/azure/cosmos-db/monitor-cosmos-db-reference#metrics). They even regroup the metrics into usage type vs. resource provider and type.
42-
-->
43-
44-
<!-- Example format.
45-
46-
Mimic the setup of metrics supported, but add extra information
47-
Question: What is the granularity of the metrics - 1 min?
48-
Question: Do we want to add quick usage blurbs?
49-
50-
-->
5118
### Container Registry metrics
5219

5320
Resource Provider and Type: [Microsoft.ContainerRegistry/registries](/azure/azure-monitor/platform/metrics-supported#microsoftcontainerregistryregistries)
5421

55-
| Metric | Exportable via Diagnostic Settings? | Unit | Aggregation Type | Description | Dimensions | Usage |
56-
|:-------|:-----|:-----|:-----|:------------|:------------------|:----- |
57-
| AgentPoolCPUTime | Yes | Seconds | Total | Total CPU time in seconds used by [ACR tasks](container-registry-tasks-overview.md) running on dedicated [agent pools](tasks-agent-pools.md) | None | |
58-
| RunDuration | Yes | Milliseconds | Total | Total duration in milliseconds of [ACR tasks](container-registry-tasks-overview.md) runs | None | |
59-
| StorageUsed | No | Bytes | Average | Storage used by the container registry: sum of capacity used by shared layers, manifest files, and replica copies in all repositories. | Geo-location | |
60-
| SuccessfulPullCount | Yes | Count | Total | Number of successful pulls of container images and other artifacts from the registry | None | |
61-
| SuccessfulPushCount | Yes | Count | Total | Number of successful pushes of container images and other artifacts to the registry | None | |
62-
| TotalPullCount | Yes | Count | Total | Total number of pulls of container images and other artifacts from the registry | None | |
63-
| TotalPushCount | Yes | Seconds | Total | Total number of pushes of container images and other artifacts to the registry | None | |
64-
65-
22+
| Metric | Exportable via Diagnostic Settings? | Unit | Aggregation Type | Description | Dimensions |
23+
|:-------|:-----|:-----|:------------|:------------------|:----- |
24+
| AgentPoolCPUTime | Yes | Seconds | Total | CPU time used by [ACR tasks](container-registry-tasks-overview.md) running on dedicated [agent pools](tasks-agent-pools.md) | None | |
25+
| RunDuration | Yes | Milliseconds | Total | Duration of [ACR tasks](container-registry-tasks-overview.md) runs | None | |
26+
| StorageUsed | No | Bytes | Average | Storage used by the container registry<br/><br/>Sum of storage for unique and shared layers, manifest files, and replica copies in all repositories<sup>1</sup> | Geo-location | |
27+
| SuccessfulPullCount | Yes | Count | Total | Successful pulls of container images and other artifacts from the registry | None | |
28+
| SuccessfulPushCount | Yes | Count | Total | Successful pushes of container images and other artifacts to the registry | None | |
29+
| TotalPullCount | Yes | Count | Total | Total pulls of container images and other artifacts from the registry | None | |
30+
| TotalPushCount | Yes | Seconds | Total | Total pushes of container images and other artifacts to the registry | None | |
6631

67-
<!-- Add additional explanation of reference information as needed here. Link to other articles such as your Monitor [servicename] article as appropriate. -->
32+
<sup>1</sup>Because of layer sharing, registry storage used may be less than the sum of storage for individual repositories. When you [delete](container-registry-delete.md) a repository or tag, you recover only the storage used by manifest files and the unique layers referenced.
6833

69-
<!-- Keep this text as-is -->
7034
For more information, see a list of [all platform metrics supported in Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported).
7135

72-
73-
7436
## Metric Dimensions
7537

76-
<!-- REQUIRED. Please keep headings in this order -->
77-
<!-- If you have metrics with dimensions, outline it here. If you have no dimensions, say so.
78-
Questions email azmondocs@microsoft.com -->
79-
8038
For more information on what metric dimensions are, see [Multi-dimensional metrics](/azure/azure-monitor/platform/data-platform-metrics#multi-dimensional-metrics).
8139

82-
<!--
83-
[TODO-replace-with-service-name] does not have any metrics that contain dimensions.
84-
85-
*OR*
86-
-->
8740
Azure Container Registry has the following dimensions associated with its metrics.
8841

89-
<!-- See https://docs.microsoft.com/azure/storage/common/monitor-storage-reference#metrics-dimensions for an example. Part is copied below.
90-
91-
**--------------EXAMPLE format when you have dimensions------------------**
92-
93-
Azure Storage supports following dimensions for metrics in Azure Monitor. -->
94-
9542
| Dimension Name | Description |
9643
| ------------------- | ----------------- |
9744
| **Geo-location** | The Azure region for a registry or [geo-replica](container-registry-geo-replication.md). |
9845

9946

10047
## Resource logs
101-
<!-- REQUIRED. Please keep headings in this order -->
10248

10349
This section lists the types of resource logs you can collect for Azure Container Registry.
10450

105-
<!-- List all the resource log types you can have and what they are for -->
106-
10751
For reference, see a list of [all resource logs category types supported in Azure Monitor](/azure/azure-monitor/platform/resource-logs-schema).
10852

109-
110-
111-
<!-- OPTION 1 - Minimum - Link to relevant bookmarks in https://docs.microsoft.com/azure/azure-monitor/platform/resource-logs-categories, which is auto generated from the REST API. Not all resource log types metrics are published depending on whether your product group wants them to be. If the resource log is published, but category display names are wrong or missing, contact your PM and tell them to update them in the Azure Monitor "shoebox" manifest. If this article is missing resource logs that you and the PM know are available, both of you contact azmondocs@microsoft.com.
112-
-->
113-
114-
<!-- Example format. There should be AT LEAST one Resource Provider/Resource Type here. -->
115-
116-
117-
118-
119-
120-
<!-- OPTION 2 - Link to the resource logs as above, but work in extra information not found in the automated metric-supported reference article. NOTE: YOU WILL NOW HAVE TO MANUALLY MAINTAIN THIS SECTION to make sure it stays in sync with the resource-log-categories link. You can group these sections however you want provided you include the proper links back to resource-log-categories article.
121-
-->
122-
123-
<!-- Example format. Add extra information -->
124-
12553
### Container Registries
12654

12755
Resource Provider and Type: [Microsoft.ContainerRegistry/registries](/azure/azure-monitor/essentials/resource-logs-categories#microsoftcontainerregistryregistries)
12856

12957
| Category | Display Name | Details |
13058
|:---------|:-------------|------------------|
13159
| ContainerRegistryLoginEvents | Login Events | Registry authentication events and status, including the incoming identity and IP address |
132-
| ContainerRegistryRepositoryEvents | Repository Events | Operations on images and other artifacts in registry repositories: push, pull, untag, delete (including repository delete), purge tag, and purge manifest |
60+
| ContainerRegistryRepositoryEvents | Repository Events | Operations on images and other artifacts in registry repositories<br/><br/> The following operations are logged: push, pull, untag, delete (including repository delete), purge tag, and purge manifest |
13361
|
13462

13563
## Azure Monitor Logs tables
136-
<!-- REQUIRED. Please keep heading in this order -->
13764

13865
This section refers to all of the Azure Monitor Logs Kusto tables relevant to Azure Container Registry and available for query by Log Analytics.
13966

140-
<!--
141-
------------**OPTION 1 EXAMPLE** --------------------->
142-
143-
<!-- OPTION 1 - Minimum - Link to relevant bookmarks in https://docs.microsoft.com/azure/azure-monitor/reference/tables/tables-resourcetype where your service tables are listed. These files are auto generated from the REST API. If this article is missing tables that you and the PM know are available, both of you contact azmondocs@microsoft.com.
144-
-->
145-
146-
<!-- Example format. There should be AT LEAST one Resource Provider/Resource Type here.
147-
148-
|Resource Type | Notes |
149-
|-------|-----|
150-
| [Virtual Machines](/azure/azure-monitor/reference/tables/tables-resourcetype#virtual-machines) | |
151-
| [Virtual machine scale sets](/azure/azure-monitor/reference/tables/tables-resourcetype#virtual-machine-scale-sets) | |
152-
153-
-->
154-
155-
<!-- OPTION 2 - List out your tables adding additional information on what each table is for. Individually link to each table using the table name. For example, link to [AzureMetrics](https://docs.microsoft.com/azure/azure-monitor/reference/tables/azuremetrics).
156-
157-
NOTE: YOU WILL NOW HAVE TO MANUALLY MAINTAIN THIS SECTION to make sure it stays in sync with the automatically generated list. You can group these sections however you want provided you include the proper links back to the proper tables.
158-
-->
159-
16067
### Container Registry
16168

16269
| Table | Description |
16370
|:---------|:-------------|
164-
| [AzureActivity](/azure/azure-monitor/reference/tables/azureactivity) | <!-- description copied from previous link --> Entries from the Azure Activity log that provides insight into any subscription-level or management group level events that have occurred in Azure. |
165-
| [AzureMetrics](/azure/azure-monitor/reference/tables/azuremetrics) | <!-- description copied from previous link --> Metric data emitted by Azure services that measure their health and performance. |
71+
| [AzureActivity](/azure/azure-monitor/reference/tables/azureactivity) | Entries from the Azure Activity log that provides insight into any subscription-level or management group level events that have occurred in Azure. |
72+
| [AzureMetrics](/azure/azure-monitor/reference/tables/azuremetrics) | Metric data emitted by Azure services that measure their health and performance. |
16673
| [ContainerRegistryLoginEvents](/azure/azure-monitor/reference/tables/containerregistryloginevents) | Azure Container Registry Login Auditing Logs |
16774
| [ContainerRegistryRepositoryEvents](/azure/azure-monitor/reference/tables/containerregistryloginevents) | Azure Container Registry Repository Auditing Logs |
16875

169-
17076
For a reference of all Azure Monitor Logs / Log Analytics tables, see the [Azure Monitor Log Table Reference](/azure/azure-monitor/reference/tables/tables-resourcetype).
17177

172-
173-
To enable diagnostic settings for log collection, see [Collection and routing](monitor-service.md#collection-and-routing).
174-
175-
176-
177-
<!-- If your service uses the AzureDiagnostics table in Azure Monitor Logs / Log Analytics, list what fields you use and what they are for. Azure Diagnostics is over 500 columns wide with all services using the fields that are consistent across Azure Monitor and then adding extra ones just for themselves. If it uses service specific diagnostic table, refers to that table. If it uses both, put both types of information in. Most services in the future will have their own specific table. If you have questions, contact azmondocs@microsoft.com --
178-
179-
### Diagnostics tables
180-
181-
Q: Pretty sure this doesn't apply to ACR
182-
-->
183-
<!--
184-
[TODO-replace-with-service-name] uses the [Azure Diagnostics](https://docs.microsoft.com/azure/azure-monitor/reference/tables/azurediagnostics) table and the [TODO whatever additional] table to store resource log information. The following columns are relevant.
185-
186-
**Azure Diagnostics**
187-
188-
| Property | Description |
189-
|:--- |:---|
190-
| | |
191-
| | |
192-
193-
**[TODO Service-specific table]**
194-
195-
| Property | Description |
196-
|:--- |:---|
197-
| | |
198-
| | |
199-
200-
-->
20178
## Activity log
202-
<!-- REQUIRED. Please keep heading in this order
203-
Need PM input
204-
-->
20579

20680
The following table lists the operations related to Azure Container Registry that may be created in the Activity log.
20781

208-
<!-- Fill in the table with the operations that can be created in the Activity log for the service. -->
20982
| Operation | Description |
21083
|:---|:---|
84+
| TBD - what are some common entries that are useful to customers?| |
21185
| | |
212-
| | |
213-
214-
<!-- NOTE: This information may be hard to find or not listed anywhere. Please ask your PM for at least an incomplete list of what type of messages could be written here. If you can't locate this, contact azmondocs@microsoft.com for help -->
21586

21687
## Schemas
217-
<!-- REQUIRED. Please keep heading in this order -->
21888

21989
The following schemas are in use by Azure Container Registry's resource logs.
22090

221-
<!-- List the schema and their usage. This can be for resource logs, alerts, event hub formats, etc depending on what you think is important.
222-
Q: How to get the schema descriptions added/improved.
223-
-->
22491
| Schema | Description |
22592
|:--- |:---|
22693
| [ContainerRegistryLoginEvents](/azure/azure-monitor/reference/tables/ContainerRegistryLoginEvents) | Schema for registry authentication events and status, including the incoming identity and IP address |
22794
| [ContainerRegistryRepositoryEvents](/azure/azure-monitor/reference/tables/ContainerRegistryRepositoryEvents) | Schema for operations on images and other artifacts in registry repositories |
22895
## See Also
22996

230-
<!-- replace below with the proper link to your main monitoring service article -->
23197
- See [Monitor Azure Container Registry](monitor-service.md) for a description of monitoring an Azure container registry.
23298
- See [Monitoring Azure resources with Azure Monitor](/azure/azure-monitor/insights/monitor-azure-resources) for details on monitoring Azure resources.

‎articles/container-registry/monitor-service.md

Lines changed: 23 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,17 @@ ms.service: container-registry
99
ms.date: 03/10/2021
1010
---
1111

12-
<!-- VERSION 2
13-
Template for the main monitoring article for Azure services. Keep the required sections and add/modify any content for any information specific to your service.
14-
15-
This article should be in the How-To Guides section of your TOC with the name *monitor-[TODO-replace-with-service-name].md* and the TOC title "Monitor [TODO-replace-with-service-name]". Keep the headings in this order.
16-
17-
Put accompanying reference information into an article in the Reference section of your TOC with the name *monitor-[service-name]-reference.md* and the TOC title "Monitoring data". -->
18-
19-
<!-- IMPORTANT STEP 1. Do a search and replace of [TODO-replace-with-service-name] with the name of your service. That will make the template easier to read -->
20-
2112
# Monitor Azure Container Registry
22-
<!-- REQUIRED. Please keep headings in this order -->
23-
<!-- Most services can use this section unchanged. Add to it if there are any unique charges if your service has significant monitoring beyond Azure Monitor. -->
2413

2514
When you have critical applications and business processes relying on Azure resources, you want to monitor those resources for their availability, performance, and operation. This article describes the monitoring data generated by Azure Container Registry and how you can use the features of Azure Monitor to analyze and alert on this data.
2615

27-
<!-- Optional diagram showing monitoring for your service. If you need help creating one, contact robb@microsoft.com -->
28-
2916
## Monitor overview
30-
<!-- REQUIRED. Please keep headings in this order -->
31-
<!-- Most services can use this section unchanged. Edit it if there are any unique charges if your service has significant monitoring beyond Azure Monitor. -->
3217

3318
The **Overview** page in the Azure portal for each registry includes a brief view of recent resource usage and activity, such as storage used and pull requests. This high-level information is useful, but only a small amount of the monitoring data is shown there.
3419

3520
:::image type="content" source="media/monitor-service/metrics-overview.png" alt-text="Registry metrics overview":::
3621

3722
## What is Azure Monitor?
38-
<!-- REQUIRED. Please keep headings in this order -->
39-
<!-- Most services can use this section unchanged. Edit it if there are any unique charges if your service has significant monitoring beyond Azure Monitor. -->
4023

4124
Azure Container Registry creates monitoring data using [Azure Monitor](/azure/azure-monitor/overview), which is a full stack monitoring service in Azure that provides a complete set of features to monitor your Azure resources in addition to resources in other clouds and on-premises.
4225

@@ -50,80 +33,56 @@ Start with the article [Monitoring Azure resources with Azure Monitor](/azure/az
5033

5134
The following sections build on this article by describing the specific data gathered for Azure Container Registry and providing examples for configuring data collection and analyzing this data with Azure tools.
5235

53-
54-
55-
<!-- OPTIONAL SECTION. Only include if your service has and insight associated with it. Examples of insights include
56-
- CosmosDB https://docs.microsoft.com/azure/azure-monitor/insights/cosmosdb-insights-overview
57-
- If you still aren't sure, contact azmondocs@microsoft.com.>
58-
-
59-
60-
## Azure Monitor insights for Azure Container Registry
61-
62-
Some services in Azure have a special focused pre-built monitoring dashboard in the Azure portal that provides a starting point for monitoring your service. These special dashboards are called "insights".
63-
64-
<!-- Give a quick outline of what your "insight page" provides and refer to another article that gives details -->
65-
66-
67-
68-
6936
## Monitoring data
7037

71-
<!-- REQUIRED. Please keep headings in this order -->
7238
Azure Container Registry collects the same kinds of monitoring data as other Azure resources that are described in [Monitoring data from Azure resources](/azure/azure-monitor/insights/monitor-azure-resource#monitoring-data-from-Azure-resources).
7339

7440
See [Monitoring Azure Container Registry data reference](monitor-service-reference.md) for detailed information on the metrics and logs created by Azure Container Registry.
7541

76-
<!-- If your service has additional non-Azure Monitor monitoring data then outline and refer to that here. Also include that information in the data reference as appropriate. -->
77-
7842
## Collection and routing
7943

80-
<!-- REQUIRED. Please keep headings in this order -->
81-
8244
Platform metrics and the Activity log are collected and stored automatically, but can be routed to other locations by using a diagnostic setting.
8345

8446
Resource Logs are not collected and stored until you create a diagnostic setting and route them to one or more locations.
8547

86-
<!-- Include any additional information on collecting logs. The number of things that diagnostics settings control is expanding -->
87-
8848
See [Create diagnostic setting to collect platform logs and metrics in Azure](/azure/azure-monitor/platform/diagnostic-settings) for the detailed process for creating a diagnostic setting using the Azure portal, CLI, or PowerShell. When you create a diagnostic setting, you specify which categories of logs to collect. The categories for Azure Container Registry are listed in [Azure Container Registry monitoring data reference](monitor-service-reference.md#resource-logs).
8949

9050
> [!TIP]
9151
> You can also create registry diagnostic settings by navigating to your registry in the portal. Then, select **Diagnostic settings** under **Monitoring**.
9252
9353

94-
<!-- OPTIONAL: Add specific examples of configuration for this service. For example, CLI and PowerShell commands for creating diagnostic setting. Ideally, customers should set up a policy to automatically turn on collection for services. Azure monitor has Resource Manager template examples you can point to. See https://docs.microsoft.com/azure/azure-monitor/samples/resource-manager-diagnostic-settings. Contact azmondocs@microsoft.com if you have questions. -->
95-
9654
:::image type="content" source="media/monitor-service/diagnostic-settings.png" alt-text="Diagnostic settings for container registry":::
9755

9856
The metrics and logs you can collect are discussed in the following sections.
9957

100-
## Analyzing metrics
101-
102-
<!-- REQUIRED. Please keep headings in this order
103-
If you don't support metrics, say so. Some services may be only onboarded to logs -->
58+
## Analyzing metrics (preview)
10459

10560
You can analyze metrics for an Azure container registry with metrics from other Azure services using metrics explorer by opening **Metrics** from the **Azure Monitor** menu. See [Getting started with Azure Metrics Explorer](/azure/azure-monitor/platform/metrics-getting-started) for details on using this tool.
10661

10762
> [!TIP]
10863
> You can also go to the metrics explorer by navigating to your registry in the portal. Then, select **Metrics (preview)** under **Monitoring**.
10964
110-
<!-- Point to the list of metrics available in your monitor-service-reference article. -->
11165
For a list of the platform metrics collected for Azure Container Registry, see [Monitoring Azure Container Registry data reference metrics](monitor-service-reference.md#metrics)
11266

11367
For reference, you can see a list of [all resource metrics supported in Azure Monitor](/azure/azure-monitor/platform/metrics-supported).
11468

69+
### Azure CLI
70+
71+
The following Azure CLI commands can be used to get information about the Azure Container Registry metrics.
72+
73+
* [az acr show-usage](/cli/azure/acr/#az_acr_show_usage) - Get the storage used by an Azure container registry
74+
* [az monitor metrics list-definitions](/cli/azure/monitor/metrics#az_monitor_metrics_list_definitions) - List metric definitions and dimensions
75+
* [az monitor metrics list](/cli/azure/monitor/metrics#az_monitor_metrics_list) - Retrieve metric values
76+
11577
### REST API
116-
You can also use the Azure Monitor REST API to get information programmatically about the Azure Container Registry metrics.
78+
79+
You can use the Azure Monitor REST API to get information programmatically about the Azure Container Registry metrics.
11780

11881
* [List metric definitions and dimensions](/rest/api/monitor/metricdefinitions/list)
11982
* [Retrieve metric values](/rest/api/monitor/metrics/list)
120-
<!-- Optional: Call out additional information to help your customers. For example, you can include additional information here about how to use metrics explorer specifically for your service. Remember that the UI is subject to change quite often so you will need to maintain these screenshots yourself if you add them in. -->
12183

12284
## Analyzing logs
12385

124-
<!-- REQUIRED. Please keep headings in this order
125-
If you don't support resource logs, say so. Some services may be only onboarded to metrics and the activity log. -->
126-
12786
Data in Azure Monitor Logs is stored in tables where each table has its own set of unique properties.
12887

12988
All resource logs in Azure Monitor have the same fields followed by service-specific fields. The common schema is outlined in [Azure Monitor resource log schema](/azure/azure-monitor/essentials/diagnostic-logs-schema#top-level-resource-logs-schema) The schema for Azure Container Registry resource logs is found in the [Azure Container Registry Data Reference](monitor-service-reference.md#schemas)
@@ -134,21 +93,23 @@ For a list of the types of resource logs collected for Azure Container Registry,
13493

13594
For a list of the tables used by Azure Monitor Logs and queryable by Log Analytics, see [Monitoring Azure Container Reference data reference](monitor-service-reference.md#azure-monitor-logs-tables)
13695

137-
<!-- Optional: Call out additional information to help your customers. For example, you can include additional information here about log usage or what logs are most important. Remember that the UI is subject to change quite often so you will need to maintain these screenshots yourself if you add them in. -->
138-
13996
### Sample Kusto queries
14097

141-
<!-- REQUIRED if you support logs. Please keep headings in this order -->
142-
<!-- Add sample Log Analytics Kusto queries for your service. -->
143-
14498
> [!IMPORTANT]
14599
> When you select **Logs** from the **Azure Container Registry** menu, Log Analytics is opened with the query scope set to the current registry. This means that log queries will only include data from that resource. If you want to run a query that includes data from other registries or data from other Azure services, select **Logs** from the **Azure Monitor** menu. See [Log query scope and time range in Azure Monitor Log Analytics](/azure/azure-monitor/log-query/scope/) for details.
146100
147-
<!-- REQUIRED: Include queries that are helpful for figuring out the health and state of your service. Ideally, use some of these queries in the alerts section. It's possible that some of your queries may be in the Log Analytics UI (sample or example queries). Check if so. -->
101+
For example, the following query retrieves the most recent 24 hours of data from the **ContainerRegistryRepositoryEvents** table:
148102

149-
Following are queries that you can use to help you monitor your registry resource.
103+
```Kusto
104+
ContainerRegistryRepositoryEvents
105+
| where TimeGenerated > ago(1d)
106+
```
150107

151-
<!-- Put in a code section here. -->
108+
The following image shows sample output:
109+
110+
:::image type="content" source="media/monitor-service/azure-monitor-query.png" alt-text="Query log data":::
111+
112+
Following are queries that you can use to help you monitor your registry resource.
152113

153114
### Error events from the last hour
154115

@@ -203,10 +164,6 @@ ContainerRegistryLoginEvents
203164

204165
## Alerts
205166

206-
<!-- SUGGESTED: Include useful alerts on metrics, logs, log conditions or activity log. Ask your PMs if you don't know.
207-
This information is the BIGGEST request we get in Azure Monitor so do not avoid it long term. People don't know what to monitor for best results. Be prescriptive
208-
-->
209-
210167
Azure Monitor alerts proactively notify you when important conditions are found in your monitoring data. They allow you to identify and address issues in your system before your customers notice them. You can set alerts on [metrics](/azure/azure-monitor/platform/alerts-metric-overview), [logs](/azure/azure-monitor/platform/alerts-unified-log), and the [activity log](/azure/azure-monitor/platform/activity-log-alerts). Different types of alerts have benefits and drawbacks.
211168

212169

@@ -223,7 +180,7 @@ The following table lists common and recommended alert rules for Azure Container
223180
| metric | Signal: Storage used<br/>Operator: Greater than<br/>Aggregation type: Average<br/>Threshold value: 5 GB| Alerts if the registry storage used exceeds a specified value.|
224181
| | | |
225182

226-
### Example: Send email alert when registry storage used exceeds a set value
183+
### Example: Send email alert when registry storage used exceeds a value
227184

228185
1. In the Azure portal, navigate to your registry.
229186
1. Select **Metrics (preview)** under **Monitoring**.
@@ -233,7 +190,7 @@ The following table lists common and recommended alert rules for Azure Container
233190
1. In **Condition**, select **Add condition**.
234191
1. In **Signal name**, select **Storage used**.
235192
1. In **Chart period**, select **Over the last 24 hours**.
236-
1. In **Alert logic**, in **Threshold value**, select **5**. In **Unit**, select **GB**.
193+
1. In **Alert logic**, in **Threshold value**, select a value such as *5*. In **Unit**, select a value such as *GB*.
237194
1. Accept default values for the remaining settings, and select **Done**.
238195
1. In **Actions**, select **Add action groups** > **+ Create action group**.
239196
1. Enter details of the action group.
@@ -243,7 +200,5 @@ The following table lists common and recommended alert rules for Azure Container
243200

244201
## Next steps
245202

246-
<!-- Add additional links. You can change the wording of these and add more if useful. -->
247-
248203
- See [Monitoring Azure Container Registry data reference](monitor-service-reference.md) for a reference of the metrics, logs, and other important values created by Azure Container Registry.
249204
- See [Monitoring Azure resources with Azure Monitor](/azure/azure-monitor/insights/monitor-azure-resource) for details on monitoring Azure resources.

0 commit comments

Comments
 (0)
Please sign in to comment.