Forum Discussion
danny_grasso
Sep 01, 2021Brass Contributor
Notify when new version of log analytics agent is available
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 W...
- Sep 09, 2021
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
CliveWatson
Sep 02, 2021Former Employee
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
- danny_grassoSep 09, 2021Brass ContributorGetting some odd results! Apart from some very old versions in this environment, it doesn't seem to be detecting 10.20.18053.0 as the latest version. I don't understand what the first part of the query is doing before the Heartbeat command. Has something changed where we can't query the current version available to install?
(Server names removed )
8.0.11072.0 Latest version
10.20.18053.0 Upgrade needed?
10.20.18053.0 Upgrade needed?
10.20.18053.0 Upgrade needed?
10.20.18053.0 Upgrade needed?
10.20.18053.0 Upgrade needed?
10.20.18001.0 Upgrade needed?
8.0.11049.0 Upgrade needed?
10.20.18053.0 Upgrade needed?- CliveWatsonSep 09, 2021Former Employee
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- danny_grassoSep 10, 2021Brass ContributorThanks for helping out with the query info - I was going to spend some more time on it today but you beat me to it! Results look much better.
Really appreciate the assistance!
10.20.18053.0 Latest version
10.20.18053.0 Latest version
10.20.18053.0 Latest version
10.20.18053.0 Latest version
10.20.18053.0 Latest version
10.20.18053.0 Latest version
10.20.18001.0 Upgrade needed?
8.0.11072.0 Upgrade needed?
8.0.11049.0 Upgrade needed?