title | description | ms.date | ms.custom | ms.topic | author | ms.author | ms.service |
---|---|---|---|---|---|---|---|
Monitoring data reference for Container Instances |
This article contains important reference material you need when you monitor Container Instances. |
02/27/2024 |
horz-monitor |
reference |
tomvcassidy |
tomcassidy |
container-instances |
[!INCLUDE horz-monitor-ref-intro]
See Monitor Container Instances for details on the data you can collect for Container Instances and how to use it.
[!INCLUDE horz-monitor-ref-metrics-intro]
The following table lists the metrics available for the Microsoft.ContainerInstance/containerGroups resource type. [!INCLUDE horz-monitor-ref-metrics-tableheader] [!INCLUDE microsoft-containerinstance-containergroups-metrics-include]
The following table lists the metrics available for the Microsoft.ContainerInstance/containerScaleSets resource type. [!INCLUDE horz-monitor-ref-metrics-tableheader] [!INCLUDE microsoft-containerinstance-containerscalesets-metrics-include]
[!INCLUDE horz-monitor-ref-metrics-dimensions-intro]
[!INCLUDE horz-monitor-ref-metrics-dimensions]
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. |
[!INCLUDE horz-monitor-ref-resource-logs]
[!INCLUDE microsoft-containerinstance-containergroups-logs-include]
[!INCLUDE horz-monitor-ref-logs-tables]
Container Instances has two table schemas, a legacy schema for Log Analytics and a new schema that supports diagnostic settings. Diagnostic settings is in public preview in the Azure portal. You can use either or both schemas at the same time.
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'.
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 |
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 |
The newer tables require use of a diagnostic setting to route information to Log Analytics. Diagnostic settings 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
Microsoft.ContainerInstance/containerGroups
[!INCLUDE horz-monitor-ref-activity-log]
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. |
- See Monitor Container Instances for a description of monitoring Container Instances.
- See Monitor Azure resources with Azure Monitor for details on monitoring Azure resources.