Blog Post
Public Preview: Auto agent upgrade for Azure Arc-enabled servers
Wanted to share an ARG query here that was developed to help identify which of your servers that have attempted an agent auto upgrade after enabling it and what the status of the latest update attempt was/is. Hope others find this helpful as well.
resources
| where type =~ 'microsoft.hybridcompute/machines'
| extend agentUpgrade = todynamic(properties)['agentUpgrade']
| where isnotempty(agentUpgrade)
and (bag_has_key(agentUpgrade, 'lastAttemptStatus') or bag_has_key(agentUpgrade, 'lastAttempStatus'))
| extend enableAutomaticUpgrade = tobool(agentUpgrade['enableAutomaticUpgrade']),
lastAttemptTimestamp = todatetime(agentUpgrade['lastAttemptTimestamp']),
lastAttemptDesiredVersion = tostring(agentUpgrade['lastAttemptDesiredVersion']),
lastAttemptMessage = tostring(agentUpgrade['lastAttemptMessage']),
lastAttemptStatus = tostring(coalesce(agentUpgrade['lastAttemptStatus'], agentUpgrade['lastAttempStatus']))
| project name,
enableAutomaticUpgrade,
lastAttemptTimestamp,
lastAttemptDesiredVersion,
lastAttemptMessage,
lastAttemptStatus
| order by lastAttemptTimestamp desc nulls last
Below are results from my environment where I have roughly 20+ servers with Arc Agent auto upgrade enabled. As you can see so far it has attempted an update on 8 of my 20+ machines and was successful on upgrading all to version 1.57.
Installed Agent view from one of my machines.