- Print
- DarkLight
- PDF
Monitoring an Azure Container App (ACA)
- Print
- DarkLight
- PDF
Admittedly, ACA is not yet at the level of AKS regarding the number of metrics available in Azure Monitor, nor in terms of insights, such as what is available through Container Insights for AKS. ACA is a black box where Microsoft manages most of the underlying plumbing. Therefore, we think you should focus only on the apps you deploy and nothing else. At this stage, no metric is available for the ACA environment, only for your deployed apps.
The metrics that can be very important to monitor are the Replica Count and the Replica Restart Count. If you expect a specific app to run at least one instance all the time, you could catch downtimes by simply monitoring these two metrics. A replica count of 0 means downtime, while a replica that gets restarted often means instability, such as a memory leak, etc.
In Azure Monitor, you can easily define alerts on these metrics:
{height="" width=""}
Figure 1 – Sample alert on several replicas
In Figure 1, I defined an alert to fire whenever the replica count is below 1. Sure enough, you'll see such alerts appearing whenever this happens:
Figure 2 – Sample alert for a container app
The Log Analytics workspace attached to the ACA environment is another resource that can be used to monitor ACA. It aggregates all logs, as seen in the quick tip of the Troubleshooting an Azure Container App. You can create alerts based on query results performed against system & console logs.