title | description | ms.topic | ms.date |
---|---|---|---|
Monitor Azure Batch |
Learn about Azure monitoring services, metrics, diagnostic logs, and other monitoring features for Azure Batch. |
how-to |
08/23/2021 |
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.
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.
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.
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
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.
- Learn about the Batch APIs and tools available for building Batch solutions.
- Learn more about diagnostic logging with Batch.