SOLVED

Azure Log analytics

%3CLINGO-SUB%20id%3D%22lingo-sub-815016%22%20slang%3D%22en-US%22%3EAzure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815016%22%20slang%3D%22en-US%22%3EI%20am%20looking%20to%20get%20a%20list%20of%20computer%20names%20and%20all%20the%20add-ins%20on%20that%20computer.%20The%20canned%20query%20for%20this%20returns%20an%20aggregated%20list%20of%20add-ins%20which%20is%20helpful%20at%20viewing%20the%20complexity%20of%20this%20task.%20Beyond%20that%20I%20need%20to%20see%20which%20PC's%20have%20which%20add-ins.%20I%20was%20able%20to%20get%20close%20with%20a%20query%2C%20but%20it%20did%20not%20list%20all%20computers%20in%20the%20environment%20and%20all%20of%20each%20computers%20add-ins.%20I%20suspect%20this%20is%20not%20terribly%20complicated%20for%20someone%20advanced%20with%20this%20query%20language.%20he%20canned%20query%20search%20in%20(UAOfficeAddIn)%20OfficeAddInName%20!%3D%20%22%22%20%7C%20summarize%20AggregatedValue%20%3D%20count(Computer)%20by%20OfficeAddInName%20%7C%20sort%20by%20AggregatedValue%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-815016%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-815202%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815202%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120678%22%20target%3D%22_blank%22%3E%40Robert%20James%20Reber%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESomething%20like%20this%3F%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EUAOfficeAddIn%0A%7C%20where%20OfficeAddInName%20!%3D%20%22%22%0A%7C%20summarize%20AddIn%20%3D%20make_list(OfficeAddInName)%2C%20count()%20by%20Computer%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fportal.loganalytics.io%2FDemo%3Fq%3DH4sIAAAAAAAAAwt19E9Ly0xOdUxJ8czjqlEoz0gtSlVAEvNLzE1VULRVUFICyhaX5uYmFmVWpSqA5RRsFXITs1PjczKLSzTQ9GjqKCTnl%252BaVaGgqJFUqOOfnFpSWpBZxAQCoOWDKcAAAAA%253D%253D%26amp%3Btimespan%3DP1D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGo%20to%20Log%20Analytics%20and%20Run%20Query%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CTABLE%20cellspacing%3D%221%22%20cellpadding%3D%225%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTH%3EComputer%3C%2FTH%3E%0A%3CTH%3EAddIn%3C%2FTH%3E%0A%3CTH%3Ecount_%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EGaryRa-Dsktp.Contoso%3C%2FTD%3E%0A%3CTD%3E%5B%22Microsoft%20SharePoint%20Server%20Colleague%20Import%20Add-in%22%2C%22Microsoft%20VBA%20for%20Outlook%20Addin%22%2C%22OneNote%20Notes%20about%20Outlook%20Items%22%2C%22Microsoft%20Data%20Streamer%20for%20Excel%22%2C%22Inquire%22%2C%22Windows%20Search%20Email%20Indexer%22%2C%22OneNote%20Notes%20about%20PowerPoint%20Presentations%22%2C%22OneNote%20Notes%20about%20Word%20Documents%22%2C%22OneNote%20Linked%20Notes%20Add-In%22%2C%22Microsoft%20Exchange%20Add-in%22%2C%22Microsoft%20Power%20Map%20for%20Excel%22%2C%22Microsoft%20Power%20Pivot%20for%20Excel%22%2C%22Conversation%20History%20Add-in%20for%20Microsoft%20Office%202016%22%2C%22OneNote%20Linked%20Notes%20Add-In%22%2C%22Microsoft%20Power%20View%20for%20Excel%22%2C%22Microsoft%20Access%20Outlook%20Add-in%20for%20Data%20Collection%20and%20Publishing%22%2C%22Outlook%20Social%20Connector%202016%22%2C%22Skype%20Meeting%20Add-in%20for%20Microsoft%20Office%22%5D%3C%2FTD%3E%0A%3CTD%3E18%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EBaFrank-Corp.Contoso%3C%2FTD%3E%0A%3CTD%3E%5B%22Windows%20Search%20Email%20Indexer%22%2C%22QBExcelReportUpdater%22%2C%22QBExcelReportUpdater%22%2C%22Avast%20Add-in%22%5D%3C%2FTD%3E%0A%3CTD%3E4%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EPatriciaSa-Book.Contoso%3C%2FTD%3E%0A%3CTD%3E%5B%22Microsoft%20SharePoint%20Workspace%20Proxy%20for%20Outlook%20Add-in%22%2C%22Microsoft%20Forefront%20Identity%20Manager%20Add-in%22%2C%22Sharing%20Add-in%20for%20Microsoft%20Lync%202010%22%2C%22Business%20Connectivity%20Services%20Add-In%22%2C%22Windows%20Search%20Email%20Indexer%22%2C%22OneNote%20Notes%20about%20Outlook%20Items%22%2C%22Microsoft%20Exchange%20Add-in%22%2C%22Microsoft%20VBA%20for%20Outlook%20Addin%22%2C%22Microsoft%20Visual%20Studio%202008%20Tools%20for%20Office%20Design-Time%20Adaptor%20for%20Excel%202007%22%2C%22Microsoft%20Visual%20Studio%202008%20Tools%20for%20Office%20Design-Time%20Adaptor%20for%20Excel%202003%22%2C%22Microsoft%20Visual%20Studio%202008%20Tools%20for%20Office%20Design-Time%20Adaptor%20for%20Word%202003%22%2C%22Microsoft%20Outlook%20Social%20Connector%22%2C%22Online%20Meeting%20Add-in%20for%20Microsoft%20Lync%202010%22%2C%22Microsoft%20Visual%20Studio%202008%20Tools%20for%20Office%20Design-Time%20Adaptor%20for%20Word%202007%22%5D%3C%2FTD%3E%0A%3CTD%3E14%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ESavannaRh-Dsk.Contoso%3C%2FTD%3E%0A%3CTD%3E%5B%22Microsoft%20Azure%20Information%20Protection%22%2C%22Microsoft%20Azure%20Information%20Protection%22%2C%22Skype%20Meeting%20Add-in%20for%20Microsoft%20Office%202013%22%2C%22Microsoft%20Azure%20Information%20Protection%22%2C%22Microsoft%20Azure%20Information%20Protection%22%2C%22Visual%20Studio%20Tools%20for%20Office%20Design-Time%20Adaptor%20for%20Word%22%2C%22Team%20Foundation%20Add-in%22%2C%22Windows%20Search%20Email%20Indexer%22%2C%22Microsoft%20Power%20Query%20for%20Excel%22%2C%22Visual%20Studio%20Tools%20for%20Office%20Design-Time%20Adaptor%20for%20Excel%22%5D%3C%2FTD%3E%0A%3CTD%3E10%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ERobertHi-Corp.Contoso%3C%2FTD%3E%0A%3CTD%3E%5B%22Load%20Test%20Report%20Addin%22%2C%22Visual%20Studio%20Tools%20for%20Office%20Design-Time%20Adaptor%20for%20Excel%22%2C%22Skype%20Meeting%20Add-in%20for%20Microsoft%20Office%202013%22%2C%22Windows%20Search%20Email%20Indexer%22%2C%22Load%20Test%20Report%20Addin%22%2C%22Team%20Foundation%20Add-in%22%2C%22Visual%20Studio%20Tools%20for%20Office%20Design-Time%20Adaptor%20for%20Word%22%5D%3C%2FTD%3E%0A%3CTD%3E7%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-815234%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815234%22%20slang%3D%22en-US%22%3EI%20think%20I%20have%20a%20query%20now%20that%20does%20work%2C%20but%20I've%20blasted%20through%20the%20rafters.%20The%20query%20is%20capable%20of%20returning%2010%2C000%20records%2C%20and%20I%20have%20surely%20exceeded%20that%20with%20this%20query.%20So%20now%20I%20am%20off%20to%20experiment%20with%20GET%20%3CA%20href%3D%22https%3A%2F%2Fapi.loganalytics.io%2Fv1%2Fworkspaces%2F%7BworkspaceId%7D%2Fquery%3Fquery%3D%7Bquery%7D%26amp%3Btimespan%3D%7Btimespan%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fapi.loganalytics.io%2Fv1%2Fworkspaces%2F%7BworkspaceId%7D%2Fquery%3Fquery%3D%7Bquery%7D%26amp%3Btimespan%3D%7Btimespan%3C%2FA%3E%7D%20which%20can%20handle%20500%2C000%20records.%20This%20is%20the%20basic%20query%20I%20can%20use%20via%20the%20portal%2C%20which%20I%20hope%20transfers%20to%20the%20API%20call.%20search%20in%20(UAOfficeAddIn)%20OfficeAddInName%20!%3D%20%22%22%20%7C%20where%20OfficeAddInName%20!%3D%20%22%22%20It%20does%20list%20every%20detail%20in%20that%20OfficeAddIn%2C%20which%20provides%20each%20individual%20PC%20and%20their%20associated%20add-ins.%20Thanks%20for%20your%20reply%20Clive%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-815303%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815303%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120678%22%20target%3D%22_blank%22%3E%40Robert%20James%20Reber%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20less%20than%2010%2C000%20unique%20computers%2C%20then%20a%20%3CSTRONG%3Esummarize%3C%2FSTRONG%3Eor%20%3CSTRONG%3Epivot%3C%2FSTRONG%3Eshould%20be%20able%20to%20help%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Ereduce%20time%20the%20query%20takes%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3Ereduce%20complexity%3C%2FLI%3E%0A%3CLI%3Eget%20all%20the%20details%20about%20a%20computer%20on%20a%20single%20row%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20UAOfficeAddIn%0A%7C%20where%20OfficeAddInName%20!%3D%20%22%22%0A%7C%20evaluate%20pivot(OfficeAddInName%2C%20count(ComputerID)%2C%20Computer)%0A%7C%20sort%20by%20Computer%20asc%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eor%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EUAOfficeAddIn%0A%7C%20where%20OfficeAddInName%20!%3D%20%22%22%0A%7C%20summarize%20AddIn%20%3D%20make_set(OfficeAddInName)%2C%20version%20%3D%20make_set(OfficeProductVersion)%20%2C%20count()%20by%20Computer%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20more%20than%2010%2C000%20computers%20-%20well%20done%20%3A)%3C%2Fimg%3E%26nbsp%3B%20You%20could%20divide%20the%20query%20by%20Computer%20start%20letter%2C%20and%20get%20A-G%2C%20then%20H-P%20etc...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-815356%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815356%22%20slang%3D%22en-US%22%3EClive%2C%20I%20have%2015%2C000%20PC's.%20I%20tried%20this%20because%20I%20have%20441%20or%20so%20add-ins.%20UAOfficeAddIn%20%7Cwhere%20OfficeAddInName%20!%3D%20%22%20%22%20%7Csummarize%20AddIn%20%3D%20makelist(Computer)%2C%20count(computer)%20by%20OfficeAddInName%20This%20return%20AddInName%2C%20then%20all%20PC's%20with%20that%20add-in%208%2C900%20The%20aggregate%20I%20took%20a%20few%20weeks%20ago%20shows%20~11%2C000%20Pc's%20as%20having%20Microsoft%20Exchange%20add-in.%20While%20this%20query%20shows%208%2C900%20for%20the%20same%20add-in.%20I%20of%20course%20do%20not%20want%20to%20miss%20any%20PC's%20in%20my%20query.%20Do%20you%20think%20I%20captured%20everything%20with%20this%20query%3F%20Or%20have%20I%20been%20bitten%20by%20the%2010%2C000%20record%20limit%20just%20the%20same%3F%20Thanks%20again%20for%20your%20suggestions.%20I%20think%20I%20am%20pretty%20close.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-815438%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-815438%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120678%22%20target%3D%22_blank%22%3E%40Robert%20James%20Reber%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkusto%2Fquery%2Fmakeset-aggfunction%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkusto%2Fquery%2Fmakeset-aggfunction%3C%2FA%3E%26nbsp%3B%20you%20should%20always%20use%20%3CSTRONG%3Emake_set%3C%2FSTRONG%3Eor%20%3CSTRONG%3Emake_list%3C%2FSTRONG%3Ewhich%20have%20replaced%20makeset%20and%20makelist%20as%20the%20older%20functions%20have%20a%20128%20limit.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EMake_set%3C%2FSTRONG%3Eis%20probably%20the%20one%20to%20use%20-%20as%20it%20%22%3CSPAN%3EReturns%20a%3C%2FSPAN%3E%26nbsp%3B%3CCODE%3Edynamic%3C%2FCODE%3E%26nbsp%3B%3CSPAN%3E(JSON)%20array%20of%20the%20set%20of%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CEM%3E%3CSTRONG%3Edistinct%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FFONT%3Evalues%20that%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EExpr%3C%2FEM%3E%3CSPAN%3E%26nbsp%3Btakes%20in%20the%20group.%3C%2FSPAN%3E%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20aim%20here%20is%20to%20get%20the%20row%20(record)%20count%20below%2010%2C000%2C%20then%20you%20know%20you%20have%20all%20the%20data%2C%20if%20you%20have%20441%20then%20all%20should%20be%20ok.%26nbsp%3B%20Also%20look%20out%20for%20the%20500%20column%20limit%2C%20but%20I%20think%20you%20are%20a%20long%20way%20from%20that.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127852i100E284444213B13%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-08-21%20164436.png%22%20title%3D%22Annotation%202019-08-21%20164436.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-818091%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818091%22%20slang%3D%22en-US%22%3EClive%2C%20I%20wonder%20if%20you%20can%20help%20me%20with%20this%20question.%20When%20I%20do%20the%20below%20query%20I%20get%20strange%20results%3F%20In%20other%20words%2C%20if%20I%20set%20my%20timeframe%20for%2024hrs%2C%20or%207%20days%2C%20or%20custom%20(15%20days)%20my%20numbers%20keep%20changing.%20I'm%20not%20sure%20I%20feel%20confident%20with%20any%20of%20these%20number%20right%20now.%20Am%20I%20looking%20at%20Log%20Analytics%20incorrectly%3F%20I%20want%20a%20list%20of%20all%20PC's%20that%20have%20this%20add-in%2C%20which%20will%20be%20in%20excess%20of%2012%2C000%2C%20so%20I%20limit%20my%20scope%20to%20fewer%20geographic%20locations%20as%20you%20suggested%20the%20other%20day%20and%20I%20still%20get%20inconsistent%20numbers%20based%20on%20the%20Time%20Range%20I%20select%3F%20search%20in%20(UAOfficeAddIn)%20OfficeAddInName%20%3D%3D%20%22Microsoft%20VBA%20for%20Outlook%20Addin%22%20%7C%20where%20Computer%20!contains%20%22US%22%20and%20Computer%20!contains%20%22GB%22%20and%20Computer%20!contains%20%22SG%22%20%7Corder%20by%20Computer%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-818109%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818109%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120678%22%20target%3D%22_blank%22%3E%40Robert%20James%20Reber%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAre%20the%20number%20massively%20out%3F%26nbsp%3B%20I%20suspect%20it%20maybe%20run%20to%20run%20differences%2C%20as%20when%20you%20ask%20to%20see%20the%20past%207days%20it%20does%20just%20that%2C%20from%20the%20moment%20you%20run%20the%20query%20to%20the%20same%20time%207days%20ago.%26nbsp%3B%20As%20the%20hours%2Fminutes%20change%20so%20does%20the%20results.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20can%20fix%20that%20with%20a%20fixed%20window%20of%20time%2C%20in%20the%20case%20below%20(line%20%232)%2C%20I%20added%20a%20midnight%20to%20midnight%20clause%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkusto%2Fquery%2Fstartofdayfunction%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Estartofday%3C%2FA%3Efunction%2C%20e.g.%20midnight%207days%20ago%20to%20midnight%20yesterday.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EUAOfficeAddIn%0A%7C%20where%20TimeGenerated%20%26gt%3B%20startofday(ago(7d))%20and%20TimeGenerated%20%26lt%3B%20startofday(now())%0A%7C%20where%20OfficeAddInName%20%3D%3D%20%22Microsoft%20VBA%20for%20Outlook%20Addin%22%20%0A%7C%20where%20Computer%20!contains%20%22US%22%20and%20Computer%20!contains%20%22GB%22%20and%20Computer%20!contains%20%22SG%22%20%0A%7Corder%20by%20Computer%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fportal.loganalytics.io%2FDemo%3Fq%3DH4sIAAAAAAAAA3WOPQ6CQBCFexPvMG7FnsBGTMCCWCgFYr8ys7pRdsywhJB4eAmFEKPte9%252F7KZPcWldRgrj3y8ULuhsJwcnVlJEnMYEQttAEI4Etmj4yV47WqDUYj1%252FcZs557iKtp8rZztHUBHEM6uAq4YZtgHOagGWBvA0P5jsMnPMKpviO62cbSGBVsQ%252FG%252BQZUWajxxS8vS%252F97RTY2s%252BCgX%252FoPs3gDT3DiXg4BAAA%253D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGo%20to%20Log%20Analytics%20and%20Run%20Query%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet%20me%20know%20if%20that%20helps%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20look%20at%20lots%20of%20my%20queries%20on%20my%20%3CA%20href%3D%22https%3A%2F%2Fcloudblogs.microsoft.com%2Findustry-blog%2Fen-gb%2Fcross-industry%2F2019%2F07%2F23%2Fazure-sentinel-meets-azure-log-analytics%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eblog%3C%2FA%3E%2C%20I%20often%20use%20%3CEM%3Estartofday%3C%2FEM%3Efor%20this%20reason%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%2F%2F%20with%20just%20a%20fixed%20startpoint%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3ETimeGenerated%20%26gt%3B%20startofday(ago(%3C%2FSPAN%3E%3CSPAN%3E7%3C%2FSPAN%3E%3CSPAN%3Ed))%3C%2FSPAN%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%2F%2F%20or%20with%20a%20fixed%20start%20and%20end%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3ETimeGenerated%20%26gt%3B%20startofday(ago(%3C%2FSPAN%3E%3CSPAN%3E7%3C%2FSPAN%3E%3CSPAN%3Ed))%20%3C%2FSPAN%3E%3CSPAN%3E%2F%2F%20and%20TimeGenerated%20%26lt%3B%20startofday(now())%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-818139%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818139%22%20slang%3D%22en-US%22%3EThanks%20Clive%2C%20I%20tried%20that%20and%20I%20still%20get%20strange%20outputs.%20I%20do%20see%205%20entries%20for%20one%20PC%20barcode%20that%20lists%202019-08-16T08.00.00.00%20then%202019-08-15T08.00.00.00%20then%202019-08-17T08.00.00.00%20So%20The%20further%20back%20in%20time%20I%20go%2C%20the%20more%20redundancy%20I%20see%20for%20more%20and%20more%20PC's.%20if%20I%20use%20the%2024hour%20default%2C%20I%20do%20not%20see%20an%20entire%20fleet%2C%20which%20should%20be%20around%2015%2C000%20or%20so.%20I%20instead%20get%201%2C594%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-818159%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818159%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F120678%22%20target%3D%22_blank%22%3E%40Robert%20James%20Reber%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20about%20when%20you%20go%20back%20to%20using%20make_set%3F%26nbsp%3B%20So%20you%20only%20get%20one%20row%20of%20data%20per%20computer.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EUAOfficeAddIn%0A%7C%20where%20TimeGenerated%20%26gt%3B%20startofday(ago(7d))%20%20and%20TimeGenerated%20%26lt%3B%20startofday(now())%0A%7C%20where%20OfficeAddInName%20%3D%3D%20%22Microsoft%20VBA%20for%20Outlook%20Addin%22%20%0A%7C%20where%20Computer%20!contains%20%22US%22%20and%20Computer%20!contains%20%22GB%22%20and%20Computer%20!contains%20%22SG%22%20%0A%7C%20summarize%20AddIn%20%3D%20make_set(OfficeAddInName)%2C%20count()%20by%20Computer%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-818264%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818264%22%20slang%3D%22en-US%22%3EMake_set%20worked%20much%20better.%20That%20removed%20the%20redundancy%20and%20I%20can%20go%20back%20pretty%20far.%20So%20this%20leads%20me%20to%20believe%20I%20have%20a%20misconception%20on%20how%20these%20logs%20work.%20If%20my%20time%20duration%20is%2024%20hours%2C%20I%20do%20not%20see%20my%20entire%20workforce.%20If%20I%20go%20back%20in%20time%20say%207%20days%2C%20I%20see%20more.%20So%20these%20logs%20must%20not%20be%20one%20huge%20blob%2C%20but%20more%20so%20smaller%20activity%20logs.%20I%20am%20trying%20to%20resolve%20them%20like%20an%20SCCM%20report%20that%20gathers%20data%20from%20every%20PC%2C%20then%20logs%20the%20add-in%20and%20the%20barcode%20for%20every%20PC.%20I%20can%20then%20report%20that%20every%20PC%20that%20checks%20in%20is%20accounted%20for.%20This%20seems%20to%20be%20more%20dynamic%20in%20nature%20and%20in%20order%20for%20me%20to%20see%20the%20entire%20fleet%2C%20I%20must%20go%20far%20enough%20into%20the%20past%20to%20see%20when%20they%20might%20have%20logged%20on%20or%20used%20that%20add-in%20to%20register%20in%20these%20logs.%20I%20think%20%3F%3F%3F%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-818350%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818350%22%20slang%3D%22en-US%22%3EThanks%20Clive%20for%20all%20your%20help%2C%20I%20took%20all%20your%20suggestions%20and%20bundled%20them%20into%20something%20I%20think%20will%20get%20me%20to%20my%20goal.%20I%20can%20now%20go%20pretty%20far%20into%20the%20past%20and%20that%20make_set%20command%20removes%20the%20redundancy.%20I%20can%20also%20split%20my%20focus%20into%20two%20queries%20and%20marry%20them%20together%20in%20Excel.%20This%20has%20been%20a%20life%20saver%20for%20what%20I%20am%20preparing%20to%20do%2C%20Bob%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-818351%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20Log%20analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-818351%22%20slang%3D%22en-US%22%3ELogs%20are%20created%20a%20row%20at%20a%20time%20based%20on%20timegernated...so%20on%20some%20hours%20or%20days%20you%20may%20get%20more%20or%20less%20logs.%20A%20machine%20that%20is%20off%20wont%20send%20any.%20Pivot%20on%20the%20computer%20name%20which%20is%20unique%20unlike%20time...hence%20the%20consistency%20with%20make-set%3C%2FLINGO-BODY%3E
Highlighted
Contributor
I am looking to get a list of computer names and all the add-ins on that computer. The canned query for this returns an aggregated list of add-ins which is helpful at viewing the complexity of this task. Beyond that I need to see which PC's have which add-ins. I was able to get close with a query, but it did not list all computers in the environment and all of each computers add-ins. I suspect this is not terribly complicated for someone advanced with this query language. he canned query search in (UAOfficeAddIn) OfficeAddInName != "" | summarize AggregatedValue = count(Computer) by OfficeAddInName | sort by AggregatedValue
12 Replies
Highlighted

Hi @Robert James Reber 

 

Something like this?

UAOfficeAddIn
| where OfficeAddInName != ""
| summarize AddIn = make_list(OfficeAddInName), count() by Computer

Go to Log Analytics and Run Query

 

 

Computer AddIn count_
GaryRa-Dsktp.Contoso ["Microsoft SharePoint Server Colleague Import Add-in","Microsoft VBA for Outlook Addin","OneNote Notes about Outlook Items","Microsoft Data Streamer for Excel","Inquire","Windows Search Email Indexer","OneNote Notes about PowerPoint Presentations","OneNote Notes about Word Documents","OneNote Linked Notes Add-In","Microsoft Exchange Add-in","Microsoft Power Map for Excel","Microsoft Power Pivot for Excel","Conversation History Add-in for Microsoft Office 2016","OneNote Linked Notes Add-In","Microsoft Power View for Excel","Microsoft Access Outlook Add-in for Data Collection and Publishing","Outlook Social Connector 2016","Skype Meeting Add-in for Microsoft Office"] 18
BaFrank-Corp.Contoso ["Windows Search Email Indexer","QBExcelReportUpdater","QBExcelReportUpdater","Avast Add-in"] 4
PatriciaSa-Book.Contoso ["Microsoft SharePoint Workspace Proxy for Outlook Add-in","Microsoft Forefront Identity Manager Add-in","Sharing Add-in for Microsoft Lync 2010","Business Connectivity Services Add-In","Windows Search Email Indexer","OneNote Notes about Outlook Items","Microsoft Exchange Add-in","Microsoft VBA for Outlook Addin","Microsoft Visual Studio 2008 Tools for Office Design-Time Adaptor for Excel 2007","Microsoft Visual Studio 2008 Tools for Office Design-Time Adaptor for Excel 2003","Microsoft Visual Studio 2008 Tools for Office Design-Time Adaptor for Word 2003","Microsoft Outlook Social Connector","Online Meeting Add-in for Microsoft Lync 2010","Microsoft Visual Studio 2008 Tools for Office Design-Time Adaptor for Word 2007"] 14
SavannaRh-Dsk.Contoso ["Microsoft Azure Information Protection","Microsoft Azure Information Protection","Skype Meeting Add-in for Microsoft Office 2013","Microsoft Azure Information Protection","Microsoft Azure Information Protection","Visual Studio Tools for Office Design-Time Adaptor for Word","Team Foundation Add-in","Windows Search Email Indexer","Microsoft Power Query for Excel","Visual Studio Tools for Office Design-Time Adaptor for Excel"] 10
RobertHi-Corp.Contoso ["Load Test Report Addin","Visual Studio Tools for Office Design-Time Adaptor for Excel","Skype Meeting Add-in for Microsoft Office 2013","Windows Search Email Indexer","Load Test Report Addin","Team Foundation Add-in","Visual Studio Tools for Office Design-Time Adaptor for Word"] 7

 

Highlighted
I think I have a query now that does work, but I've blasted through the rafters. The query is capable of returning 10,000 records, and I have surely exceeded that with this query. So now I am off to experiment with GET https://api.loganalytics.io/v1/workspaces/{workspaceId}/query?query={query}&timespan={timespan} which can handle 500,000 records. This is the basic query I can use via the portal, which I hope transfers to the API call. search in (UAOfficeAddIn) OfficeAddInName != "" | where OfficeAddInName != "" It does list every detail in that OfficeAddIn, which provides each individual PC and their associated add-ins. Thanks for your reply Clive
Highlighted

@Robert James Reber 

 

If you have less than 10,000 unique computers, then a summarize or pivot should be able to help:

  • reduce time the query takes 
  • reduce complexity
  • get all the details about a computer on a single row

 

 UAOfficeAddIn
| where OfficeAddInName != ""
| evaluate pivot(OfficeAddInName, count(ComputerID), Computer)
| sort by Computer asc

 

or 

 

UAOfficeAddIn
| where OfficeAddInName != ""
| summarize AddIn = make_set(OfficeAddInName), version = make_set(OfficeProductVersion) , count() by Computer

 

 

If you have more than 10,000 computers - well done :)  You could divide the query by Computer start letter, and get A-G, then H-P etc...

Highlighted
Clive, I have 15,000 PC's. I tried this because I have 441 or so add-ins. UAOfficeAddIn |where OfficeAddInName != " " |summarize AddIn = makelist(Computer), count(computer) by OfficeAddInName This return AddInName, then all PC's with that add-in 8,900 The aggregate I took a few weeks ago shows ~11,000 Pc's as having Microsoft Exchange add-in. While this query shows 8,900 for the same add-in. I of course do not want to miss any PC's in my query. Do you think I captured everything with this query? Or have I been bitten by the 10,000 record limit just the same? Thanks again for your suggestions. I think I am pretty close.
Highlighted
Solution

@Robert James Reber 

 

Note: https://docs.microsoft.com/en-us/azure/kusto/query/makeset-aggfunction  you should always use make_set or make_list which have replaced makeset and makelist as the older functions have a 128 limit. 

Make_set is probably the one to use - as it "Returns a dynamic (JSON) array of the set of distinct values that Expr takes in the group."

 

The aim here is to get the row (record) count below 10,000, then you know you have all the data, if you have 441 then all should be ok.  Also look out for the 500 column limit, but I think you are a long way from that.  

 

Annotation 2019-08-21 164436.png

Highlighted
Clive, I wonder if you can help me with this question. When I do the below query I get strange results? In other words, if I set my timeframe for 24hrs, or 7 days, or custom (15 days) my numbers keep changing. I'm not sure I feel confident with any of these number right now. Am I looking at Log Analytics incorrectly? I want a list of all PC's that have this add-in, which will be in excess of 12,000, so I limit my scope to fewer geographic locations as you suggested the other day and I still get inconsistent numbers based on the Time Range I select? search in (UAOfficeAddIn) OfficeAddInName == "Microsoft VBA for Outlook Addin" | where Computer !contains "US" and Computer !contains "GB" and Computer !contains "SG" |order by Computer
Highlighted

@Robert James Reber 

 

Are the number massively out?  I suspect it maybe run to run differences, as when you ask to see the past 7days it does just that, from the moment you run the query to the same time 7days ago.  As the hours/minutes change so does the results. 

 

We can fix that with a fixed window of time, in the case below (line #2), I added a midnight to midnight clause using the startofday function, e.g. midnight 7days ago to midnight yesterday.

 

UAOfficeAddIn
| where TimeGenerated > startofday(ago(7d)) and TimeGenerated < startofday(now())
| where OfficeAddInName == "Microsoft VBA for Outlook Addin" 
| where Computer !contains "US" and Computer !contains "GB" and Computer !contains "SG" 
|order by Computer

 

Go to Log Analytics and Run Query 

 

Let me know if that helps?

 

If you look at lots of my queries on my blog, I often use startofday for this reason 

 

// with just a fixed startpoint 

| where TimeGenerated > startofday(ago(7d)) 
 

// or with a fixed start and end 

| where TimeGenerated > startofday(ago(7d)) // and TimeGenerated < startofday(now())

 

Highlighted
Thanks Clive, I tried that and I still get strange outputs. I do see 5 entries for one PC barcode that lists 2019-08-16T08.00.00.00 then 2019-08-15T08.00.00.00 then 2019-08-17T08.00.00.00 So The further back in time I go, the more redundancy I see for more and more PC's. if I use the 24hour default, I do not see an entire fleet, which should be around 15,000 or so. I instead get 1,594
Highlighted

@Robert James Reber 

 

What about when you go back to using make_set?  So you only get one row of data per computer.

 

UAOfficeAddIn
| where TimeGenerated > startofday(ago(7d))  and TimeGenerated < startofday(now())
| where OfficeAddInName == "Microsoft VBA for Outlook Addin" 
| where Computer !contains "US" and Computer !contains "GB" and Computer !contains "SG" 
| summarize AddIn = make_set(OfficeAddInName), count() by Computer

 

 

 

Highlighted
Make_set worked much better. That removed the redundancy and I can go back pretty far. So this leads me to believe I have a misconception on how these logs work. If my time duration is 24 hours, I do not see my entire workforce. If I go back in time say 7 days, I see more. So these logs must not be one huge blob, but more so smaller activity logs. I am trying to resolve them like an SCCM report that gathers data from every PC, then logs the add-in and the barcode for every PC. I can then report that every PC that checks in is accounted for. This seems to be more dynamic in nature and in order for me to see the entire fleet, I must go far enough into the past to see when they might have logged on or used that add-in to register in these logs. I think ????
Highlighted
Thanks Clive for all your help, I took all your suggestions and bundled them into something I think will get me to my goal. I can now go pretty far into the past and that make_set command removes the redundancy. I can also split my focus into two queries and marry them together in Excel. This has been a life saver for what I am preparing to do, Bob
Highlighted
Logs are created a row at a time based on timegernated...so on some hours or days you may get more or less logs. A machine that is off wont send any. Pivot on the computer name which is unique unlike time...hence the consistency with make-set