Monitor Batch solutions
Azure 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.
For an overview of the Azure components and services available to monitor Azure resources, see Monitoring Azure applications and resources.
For Batch accounts specifically, the activity log collects events related to account creation and deletion and key management.
One way to retrieve events from your activity log is to use the Azure portal. Click All services > Activity Log. 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 diagnostic logs for resources scoped at the level of 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 details, see Batch metrics, alerts, and logs for diagnostic evaluation and monitoring.
Metrics are available by default in your Batch account without additional configuration, and they have a 30-day rolling history. You must enable diagnostic logging for a Batch account, and you may incur additional costs to store or process diagnostic 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:
- Count tasks and compute nodes by state
- Create queries to list Batch resources efficiently
- Create task dependencies
- Use a job manager task
- Monitor the task state
- Monitor the node state
- Monitor the pool state
- Monitor pool usage in the account
- Count pool nodes by state
VM performance counters and application monitoring
Application Insights is an Azure service you can use to programmatically monitor the availability, performance, and usage of your Batch jobs and tasks. Easily get performance counters from compute nodes (VMs) and custom information for tasks off of the VMs.
For an example, see Monitor and debug a Batch .NET application with Application Insights and the accompanying code sample.
You may incur additional costs to use Application Insights. See the pricing options.
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 configure your Batch solution to display Application Insights data such as VM performance counters in Batch Explorer.
Send feedback about: