Muokkaa

Jaa


Container Instances monitoring data reference

This article contains all the monitoring reference information for this service.

See Monitor Container Instances for details on the data you can collect for Container Instances and how to use it.

Metrics

This section lists all the automatically collected platform metrics for this service. These metrics are also part of the global list of all platform metrics supported in Azure Monitor.

For information on metric retention, see Azure Monitor Metrics overview.

Supported metrics for Microsoft.ContainerInstance/containerGroups

The following table lists the metrics available for the Microsoft.ContainerInstance/containerGroups resource type.

  • All columns might not be present in every table.
  • Some columns might be beyond the viewing area of the page. Select Expand table to view all available columns.

Table headings

  • Category - The metrics group or classification.
  • Metric - The metric display name as it appears in the Azure portal.
  • Name in REST API - The metric name as referred to in the REST API.
  • Unit - Unit of measure.
  • Aggregation - The default aggregation type. Valid values: Average (Avg), Minimum (Min), Maximum (Max), Total (Sum), Count.
  • Dimensions - Dimensions available for the metric.
  • Time Grains - Intervals at which the metric is sampled. For example, PT1M indicates that the metric is sampled every minute, PT30M every 30 minutes, PT1H every hour, and so on.
  • DS Export- Whether the metric is exportable to Azure Monitor Logs via diagnostic settings. For information on exporting metrics, see Create diagnostic settings in Azure Monitor.
Metric Name in REST API Unit Aggregation Dimensions Time Grains DS Export
CPU Usage

CPU usage on all cores in millicores.
CpuUsage Count Maximum, Minimum, Average containerName PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H Yes
Memory Usage

Total memory usage in byte.
MemoryUsage Bytes Maximum, Minimum, Average containerName PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H Yes
Network Bytes Received Per Second

The network bytes received per second.
NetworkBytesReceivedPerSecond Bytes Maximum, Minimum, Average <none> PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H Yes
Network Bytes Transmitted Per Second

The network bytes transmitted per second.
NetworkBytesTransmittedPerSecond Bytes Maximum, Minimum, Average <none> PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H Yes

Supported metrics for Microsoft.ContainerInstance/containerScaleSets

The following table lists the metrics available for the Microsoft.ContainerInstance/containerScaleSets resource type.

  • All columns might not be present in every table.
  • Some columns might be beyond the viewing area of the page. Select Expand table to view all available columns.

Table headings

  • Category - The metrics group or classification.
  • Metric - The metric display name as it appears in the Azure portal.
  • Name in REST API - The metric name as referred to in the REST API.
  • Unit - Unit of measure.
  • Aggregation - The default aggregation type. Valid values: Average (Avg), Minimum (Min), Maximum (Max), Total (Sum), Count.
  • Dimensions - Dimensions available for the metric.
  • Time Grains - Intervals at which the metric is sampled. For example, PT1M indicates that the metric is sampled every minute, PT30M every 30 minutes, PT1H every hour, and so on.
  • DS Export- Whether the metric is exportable to Azure Monitor Logs via diagnostic settings. For information on exporting metrics, see Create diagnostic settings in Azure Monitor.
Metric Name in REST API Unit Aggregation Dimensions Time Grains DS Export
Percentage CPU

Average of the CPU percentages consumed by individual Container Groups in this Scale Set
CpuPercentage Percent Average, Minimum, Maximum containerName PT1M Yes
CPU usage

Average of the CPU utilizations in millicores consumed by Container Groups in this Scale Set
CpuUsage MilliCores Total (Sum), Average, Minimum, Maximum containerName PT1M Yes
Memory percentage

Average of the memory percentages consumed ((usedMemory/allocatedMemory) * 100) by Container Groups in this Scale Set
MemoryPercentage Percent Average, Minimum, Maximum containerName PT1M Yes
Memory usage

Total memory used by all the Container Groups in this Scale Set
MemoryUsage Bytes Total (Sum), Average, Minimum, Maximum containerName PT1M Yes

Metric dimensions

For information about what metric dimensions are, see Multi-dimensional metrics.

This service has the following dimensions associated with its metrics.

Dimension Name Description
containerName The name of the container. The name must be between 1 and 63 characters long. It can contain only lowercase letters numbers, and dashes. Dashes can't begin or end the name, and dashes can't be consecutive. The name must be unique in its resource group.

Resource logs

This section lists the types of resource logs you can collect for this service. The section pulls from the list of all resource logs category types supported in Azure Monitor.

Supported resource logs for Microsoft.ContainerInstance/containerGroups

Category Category display name Log table Supports basic log plan Supports ingestion-time transformation Example queries Costs to export
ContainerEvent Container events ContainerEvent

Container Event Customer Logs.

No No Yes
ContainerInstanceLog Standard output logs ContainerInstanceLog

Container Instance Customer Logs.

No No Yes

Azure Monitor Logs tables

This section lists the Azure Monitor Logs tables relevant to this service, which are available for query by Log Analytics using Kusto queries. The tables contain resource log data and possibly more depending on what is collected and routed to them.

Container Instances has two table schemas, a legacy schema for Log Analytics and a new schema that supports diagnostic settings. The diagnostic settings feature is in public preview in the Azure portal. You can use either or both schemas at the same time.

Legacy Log Analytics tables

The following _CL tables represent the legacy Log Analytics integration. Users provide the Log Analytics workspace ID and key in the Container Group payload.

Note

Some of the columns in the following list exist only as part of the schema, and don't have any data emitted in logs. These columns are denoted with a description of 'Empty'.

ContainerInstanceLog_CL

Column Type Description
Computer string Empty
ContainerGroup_s string The name of the container group associated with the record
ContainerID_s string A unique identifier for the container associated with the record
ContainerImage_s string The name of the container image associated with the record
Location_s string The location of the resource associated with the record
Message string If applicable, the message from the container
OSType_s string The name of the operating system the container is based on
RawData string Empty
ResourceGroup string Name of the resource group that the record is associated with
Source_s string Name of the logging component, "LoggingAgent"
SubscriptionId string A unique identifier for the subscription that the record is associated with
TimeGenerated datetime Timestamp when the event was generated by the Azure service processing the request corresponding the event
Type string The name of the table
_ResourceId string A unique identifier for the resource that the record is associated with
_SubscriptionId string A unique identifier for the subscription that the record is associated with

ContainerEvent_CL

Column Type Description
Computer string Empty
ContainerGroupInstanceId_g string A unique identifier for the container group associated with the record
ContainerGroup_s string The name of the container group associated with the record
ContainerName_s string The name of the container associated with the record
Count_d real How many times the event has occurred since the last poll
FirstTimestamp_t datetime The timestamp of the first time the event occurred
Location_s string The location of the resource associated with the record
Message string If applicable, the message from the container
OSType_s string The name of the operating system the container is based on
RawData string Empty
Reason_s string Empty
ResourceGroup string The name of the resource group that the record is associated with
SubscriptionId string A unique identifier for the subscription that the record is associated with
TimeGenerated datetime Timestamp when the event was generated by the Azure service processing the request corresponding the event
Type string The name of the table
_ResourceId string A unique identifier for the resource that the record is associated with
_SubscriptionId string A unique identifier for the subscription that the record is associated with

Azure Monitor Log Analytics tables

The newer tables require use of a diagnostic setting to route information to Log Analytics. The diagnostic settings feature for Container Instances in the Azure portal is in public preview. The table names are similar, but without the _CL, and some columns are different.

Once this feature is enabled for a subscription, diagnostic settings can be applied to a container group. Applying diagnostic settings causes a container group to restart.

For example, here's how you can use New-AzDiagnosticSetting command to apply a diagnostic settings object to a container group.

$log = @()
$log += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category ContainerInstanceLog -RetentionPolicyDay 7 -RetentionPolicyEnabled $true
 
New-AzDiagnosticSetting -Name test-setting -ResourceId <container-group-resource-id> -WorkspaceId <log-analytics-workspace-id> -Log $log

Container Instances

Microsoft.ContainerInstance/containerGroups

Activity log

The linked table lists the operations that can be recorded in the activity log for this service. These operations are a subset of all the possible resource provider operations in the activity log.

For more information on the schema of activity log entries, see Activity Log schema.

The following table lists a subset of the operations that Azure Container Instances may record in the Activity log. For the complete listing, see Microsoft.ContainerInstance resource provider operations.

Operation Description
Microsoft.ContainerInstance/register/action Registers the subscription for the container instance resource provider and enables the creation of container groups.
Microsoft.ContainerInstance/containerGroupProfiles/read Get all container group profiles.
Microsoft.ContainerInstance/containerGroupProfiles/write Create or update a specific container group profile.
Microsoft.ContainerInstance/containerGroupProfiles/delete Delete the specific container group profile.
Microsoft.ContainerInstance/containerGroups/read Get all container groups.
Microsoft.ContainerInstance/containerGroups/write Create or update a specific container group.
Microsoft.ContainerInstance/containerGroups/delete Delete the specific container group.
Microsoft.ContainerInstance/containerGroups/restart/action Restarts a specific container group. This log only captures customer-intiated restarts, not restarts initiated by Azure Container Instances infrastructure.
Microsoft.ContainerInstance/containerGroups/stop/action Stops a specific container group. Compute resources are deallocated and billing stops.
Microsoft.ContainerInstance/containerGroups/start/action Starts a specific container group.
Microsoft.ContainerInstance/containerGroups/containers/exec/action Exec into a specific container.
Microsoft.ContainerInstance/containerGroups/containers/attach/action Attach to the output stream of a container.
Microsoft.ContainerInstance/containerGroups/containers/buildlogs/read Get build logs for a specific container.
Microsoft.ContainerInstance/containerGroups/containers/logs/read Get logs for a specific container.
Microsoft.ContainerInstance/containerGroups/detectors/read List Container Group Detectors
Microsoft.ContainerInstance/containerGroups/operationResults/read Get async operation result
Microsoft.ContainerInstance/containerGroups/outboundNetworkDependenciesEndpoints/read List Container Group Detectors
Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/read Gets the diagnostic setting for the container group.
Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/write Creates or updates the diagnostic setting for the container group.
Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/metricDefinitions/read Gets the available metrics for container group.
Microsoft.ContainerInstance/locations/deleteVirtualNetworkOrSubnets/action Notifies Microsoft.ContainerInstance that virtual network or subnet is being deleted.
Microsoft.ContainerInstance/locations/cachedImages/read Gets the cached images for the subscription in a region.
Microsoft.ContainerInstance/locations/capabilities/read Get the capabilities for a region.
Microsoft.ContainerInstance/locations/operationResults/read Get async operation result
Microsoft.ContainerInstance/locations/operations/read List the operations for Azure Container Instance service.
Microsoft.ContainerInstance/locations/usages/read Get the usage for a specific region.
Microsoft.ContainerInstance/operations/read List the operations for Azure Container Instance service.
Microsoft.ContainerInstance/serviceassociationlinks/delete Delete the service association link created by Azure Container Instance resource provider on a subnet.