How can i determine if AKS uses the new Azure Monitor Agent?

Viewed 836

I have onboarded my AKS cluster to Azure Monitor. I.e. assigning a Log Analytics Workspace.

This onboarding process has created pods into my cluster having the name omsagent-xxxx. The pod uses image: mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021

From the Log Analytics Workspace i can query for logs and metrics produced from within my cluster. I assume the logs and metrics gets sent there by the newly created omsagent pods.

According to https://azure.microsoft.com/en-us/updates/were-retiring-the-log-analytics-agent-in-azure-monitor-on-31-august-2024/, the "Log Analytics Agent" is going to be replaced by the new "Azure Monitor Agent".

According to https://docs.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-manage-agent#how-to-upgrade-the-container-insights-agent, the agents are to be upgraded automatically:

"When a new version of the agent is released, the agent is automatically upgraded on your managed Kubernetes clusters hosted on Azure Kubernetes Service (AKS) ..."

How can i determine whether my cluster is using Log Analytics Agent, or the new Azure Monitor Agent?

2 Answers

At this point, We have not found single command line, but we may use Queries to trace the same in later point.

As a workaround you can use i.e., based on limitation, and access you will predict which monitoring tool you are using.

Example: Limitation for Azure Monitoring agent tool.

No support yet for networking scenarios involving private links.

No support yet collecting custom logs (files) or IIS log files.

No support yet for Event Hubs and Storage accounts as destinations

In the documentation there is also shown list of OS’s supported in Azure monitoring. You can try using that and predict that one.

Reference: https://docs.microsoft.com/en-us/azure/azure-monitor/agents/agents-overview

  1. Check the latest available versión of omsagent ciprod10132021 in the AKS Release notes.

  2. Using the next commands get the current running oms versión:

     → kubectl get deployments -n kube-system -o wide
      → kubectl get ds omsagent --namespace=kube-system -o wide
       → kubectl get pods -n kube-system --selector=component=oms-agent -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq –c
       → kubectl get pods -n kube-system --selector=component=oms-agent-win -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c
    
Related