Forum Discussion

az_cloudadmin's avatar
az_cloudadmin
Copper Contributor
Nov 10, 2019

Update management report across subscriptions

Hi Everyone,
If say I have 5 subscriptions under the same tenant, any ideas how can I get a weekly report for the updates applied/missing/required across the subscriptions? I’m looking into getting a weekly report/ dashboard view of the updates.
  • Chris Neale's avatar
    Chris Neale
    Copper Contributor

    az_cloudadmin 

     

    There's an example below on how to construct a query across multiple workspaces.  As you said they are under the same tenant then copy the format below:

     

    union Update, workspace("contosoretail-it").Update, workspace("b459b4u5-912x-46d5-9cb1-p43069212nb4").Update
    | where TimeGenerated >= ago(1h)
    | where UpdateState == "Needed"
    | summarize dcount(Computer) by Classification
    
    
    

     

    from the ms docs

    https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/cross-workspace-query

     

    For the report part as the previous reply said, use function or logic app to trigger running the query at intervals, and use function+sendgrid or e-mail option in logicapp to mail it out.

  • Do you have the query? If you do you can add it to an Azure Monitor workbook for a visualization. You can create a scheduled Logic App if you need it to run weekly...happy to provide examples of both?

    Logic app

    Schedule trigger to Log Analytics Query to Send Email

Resources