Forum Discussion

envyforme's avatar
envyforme
Copper Contributor
Dec 26, 2018
Solved

Find Virtual Machines Not Connected to Log Analytics Agent?

Hello!    I've run into another issue in regards to Log Analytics. I'd like to query all the virtual machines inside a certain subscription and determine if they are not joined or not to log analyt...
  • envyforme's avatar
    Dec 26, 2018

    Nevermind! Actually found this out myself doing some more research.

     

    AzureActivity | where TimeGenerated > ago(24h)

    | where SubscriptionId contains "SUB ID HERE ")

    | where ResourceId contains "virtualmachines"

    | distinct Resource |

    join kind= leftanti

    (
             Heartbeat * | distinct Computer 
    ) on $left.Resource == $right.Computer

Resources