Monitor Batch solutions

Azure Monitor and the Batch service provide a range of services, tools, and APIs to monitor your Batch solutions. This overview article helps you choose a monitoring approach that fits your needs.

Subscription-level monitoring

At the subscription level, which includes Batch accounts, the Azure activity log collects operational event data in several categories.

For Batch accounts specifically, the activity log collects events related to account creation and deletion and key management.

You can view the activity log in the Azure portal, or query for events using the Azure CLI, PowerShell cmdlets, or the Azure Monitor REST API. You can also export the activity log, or configure activity log alerts.

Batch account-level monitoring

Monitor each Batch account using features of Azure Monitor. Azure Monitor collects metrics and optionally resource logs for resources within a Batch account, such as pools, jobs, and tasks. Collect and consume this data manually or programmatically to monitor activities in your Batch account and to diagnose issues. For more information, see Batch metrics, alerts, and logs for diagnostic evaluation and monitoring.

Note

Metrics are available by default in your Batch account without additional configuration, and they have a 30-day rolling history. You must create a diagnostic setting for a Batch account in order to send its resource logs to a Log Analytics workspace, and you may incur additional costs to store or process resource log data.

Batch resource monitoring

In your Batch applications, use the Batch APIs to monitor or query the status of your resources including jobs, tasks, nodes, and pools. For example:

Additional monitoring solutions

Use Application Insights to programmatically monitor the availability, performance, and usage of your Batch jobs and tasks. Application Insights lets you monitor performance counters from compute nodes (VMs) and retrieve custom information for the tasks that run on them.

For an example, see Monitor and debug a Batch .NET application with Application Insights and the accompanying code sample.

Note

You may incur additional costs to use Application Insights. See the pricing information.

Batch Explorer is a free, rich-featured, standalone client tool to help create, debug, and monitor Azure Batch applications. Download an installation package for Mac, Linux, or Windows. Optionally, use Azure Batch Insights to get system statistics for your Batch nodes, such as VM performance counters, in Batch Explorer.

Next steps