Sep 01 2021
10:31 PM
- last edited on
Apr 08 2022
10:54 AM
by
TechCommunityAP
Sep 01 2021
10:31 PM
- last edited on
Apr 08 2022
10:54 AM
by
TechCommunityAP
Hi Azure Monitor Humans,
I'm wondering if there is a way to determine when the Log Analytics agent or Azure monitor agent is below the current available version.
I.e. if current version of the Windows agent is 10.20.18018.0 but agent version 10.20.18053.0 is available to install from the log analytics workspace, is there a way to create a query to determine this?
Is this something that could be added to the Insights workbook? Although ideally we would like to alert when agents are out of date.
Thanks
Danny
Sep 02 2021 08:44 AM
I had this from a while ago, but never fully tested it...in case it helps?
let max_ = toscalar(Heartbeat
| summarize max(Version));
Heartbeat
| where OSType !="Linux"
| summarize by Version, Computer
| extend isLatest = iif(Version == max_,"Latest version","Upgrade needed?")
| order by isLatest asc
Sep 09 2021 12:24 AM
Sep 09 2021 02:00 AM
Solution
The first part (should) just get the newest version from the Heartbeat table
Heartbeat
| summarize max(Version)
If you run the above on its own, I assume you are not getting "10.20.18053.0" as the latest.
Something like this may solve it (but I need longer to look)
let max_ = toscalar(Heartbeat
| where TimeGenerated > ago(90d)
| summarize by Version , strlen(Version)
| order by strlen(Version) desc, Version desc);
Heartbeat
| where OSType !="Linux"
| summarize by Version, Computer
| extend isLatest = iif(Version == max_,"Latest version","Upgrade needed?")
| order by isLatest asc
Sep 10 2021 01:14 AM
Sep 09 2021 02:00 AM
Solution
The first part (should) just get the newest version from the Heartbeat table
Heartbeat
| summarize max(Version)
If you run the above on its own, I assume you are not getting "10.20.18053.0" as the latest.
Something like this may solve it (but I need longer to look)
let max_ = toscalar(Heartbeat
| where TimeGenerated > ago(90d)
| summarize by Version , strlen(Version)
| order by strlen(Version) desc, Version desc);
Heartbeat
| where OSType !="Linux"
| summarize by Version, Computer
| extend isLatest = iif(Version == max_,"Latest version","Upgrade needed?")
| order by isLatest asc