<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>musc@&gt; $daniele.work.ToString()</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/dmuscett/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/dmuscett/feed.xml</link>
    <description>&amp;quot;Corporate&amp;quot; Blog of Daniele Muscetta, Premier Field Engineer.</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:20:35 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>So long and thanks for all the fish</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/so-long-and-thanks-for-all-the-fish</link>
      <pubDate>Tue, 15 Sep 2015 00:03:00 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2015/09/15/so-long-and-thanks-for-all-the-fish/</guid>
      <description><![CDATA[This will be my last post on this blog. I have resigned from Microsoft.&nbsp;The past twelve years...]]></description>
      <content:encoded><![CDATA[<p>This will be my last post on this blog. I have resigned from Microsoft.&nbsp;<p>The past twelve years have been quite a ride, first in the support organization, and then in engineering - working on OpsMgr first, then the prototype of what later became Application Insights, and in the last couple of years in the Advisor 'reset' - which then became Azure Operational Insights and more recently core of&nbsp;<a href="https://www.microsoft.com/OMS">Operations Management Suite</a>.</p><p>The team has done an amazing job so, and I am sure they will continue towards the vision of modernizing management. I am also sure they will continue to be listen to feedback and be customer driven. Not every team at Microsoft gets <a href="https://www.theregister.co.uk/2014/07/28/redmond_in_rapid_rebuild_after_sysadmin_request_stunner/">kudo's from "the Register"</a> for showing customer interest, after all.</p><p>But the time has come for me to focus on different priorities in my life.&nbsp;</p><p>You can still find me at my <a href="https://www.muscetta.com/">personal blog</a>, and on Flickr/Twitter/Facebook/LinkedIn.</p><p>Shanti.</p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Using Wire Data in Operations Management Suite Log Search</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/using-wire-data-in-operations-management-suite-log-search</link>
      <pubDate>Wed, 09 Sep 2015 10:55:41 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2015/09/09/using-wire-data-in-operations-management-suite-log-search/</guid>
      <description><![CDATA[A little while ago we enabled in the OMS Portal the first iteration of a ‘Wire Data’ solution –...]]></description>
      <content:encoded><![CDATA[<p>A little while ago we enabled in the <a href="https://www.microsoft.com/OMS" target="_blank">OMS Portal</a> the first iteration of a ‘Wire Data’ solution – check it out in the Solutions Gallery if you haven’t. We didn’t make it in time to formally announce it on <a href="https://blogs.technet.com/b/momteam/" target="_blank">the ‘momteam’ blog</a>, but <a href="https://cloudadministrator.wordpress.com/2015/08/04/operations-management-suite-wire-data-solution/" target="_blank">Stas has given us coverage anyways</a>. So here’s a slightly more technical post with some insights into how to query this data and how to tweak the solution.</p>  <p>&#160;</p>  <h2>What do we mean by Wire Data?</h2>  <p>The solution uses a custom module for both SCOM and Direct Agent, to hook into the Windows Network Stack and poll statistics from it. The data is then uploaded to OMS (directly from each agent, even in SCOM attach mode).</p>  <p>In OMS Log Search you can then filter and group data to view information about the top agents and top protocols. Or you can look into when certain computers (IP addresses/MAC addresses) communicated with each other, for how long, and how much data was sent--basically, you view metadata about network traffic, all powered by search – like most other solutions. </p>  <p>The data that the solution produces is pretty self explanatory, if you have been using OMS Log Search and are a little bit familiar with TCP/IP and network communications. Our main goal was that this process should be lightweight – we don’t go extremely deep in the network stack to conserve performance. With default settings we err on the side of dropping something – if necessary - rather than completeness / full fidelity of the data at the expense of performance. This said, the Wire Data module defines certain configuration properties (described later in this post) that can be tweaked.</p>  <p>&#160;</p>  <h2>Type=WireData and Type=SecurityEvent : a ‘better together’ use case</h2>  <p>Here I want to illustrate a less obvious use case. </p>  <p>Let’s therefore not spend time on the canned drill down, that currently presents a breakdown of agents, protocols, etc – those should be hopefully self explanatory - and let’s start with one of the ‘Common Queries’ provided, a bit less in view:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7077.image_58C2F024.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7077.image_5F00_58C2F024.png"><img title="Wire Data Solution Canned Drill Down" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Wire Data Solution Canned Drill Down" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4762.image_thumb_78745A9D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4762.image_5F00_thumb_5F00_78745A9D.png" width="640" height="248" /></a></p>  <p>&#160;</p>  <p><strong><font color="#ff0000" size="2">Type=WireData | measure Sum(TotalBytes) by ProcessName </font></strong></p>  <p>this lets me have a peek at an interesting dimension of this data: we often are able to tell which PROCESS the network communication was sent to/from:</p>  <p><em>(in the screenshot I added a ‘Where’ as I had too many…)</em></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4237.image_19F38A2D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4237.image_5F00_19F38A2D.png"><img title="Type=WireData | measure Sum(TotalBytes) by ProcessName" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=WireData | measure Sum(TotalBytes) by ProcessName" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4645.image_thumb_50643C2F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4645.image_5F00_thumb_5F00_50643C2F.png" width="640" height="359" /></a></p>  <p>&#160;</p>  <p>So here I notice that some traffic was sent from a suspiciously-named process ‘DancingPigs.exe’. </p>  <p>If I click it in the results above I get to the next query, which shows me that traffic:&#160; </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1464.image_4DBE112F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1464.image_5F00_4DBE112F.png"><img title="DancingPigs traffic" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="DancingPigs traffic" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4544.image_thumb_5D60ACF1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4544.image_5F00_thumb_5F00_5D60ACF1.png" width="640" height="403" /></a></p>  <p>&#160;</p>  <p>I can see those are a bunch of ‘outbound’ communications over various protocols (HTTPS, SMB, etc). Sounds like a user has executed something he shouldn’t have clicked on?</p>  <p>Since I also have the ‘Security and Audit’ solution in this workspace, I can lookup (thru a SUB-SEARCH – read <a href="https://blogs.msdn.com/b/dmuscett/archive/2015/05/30/operations-management-suite-log-search-how-to-part-viii-the-in-operator-and-subsearches.aspx" target="_blank">my previous post here if you haven’t</a>) those Security Events which have the SAME ProcessName field value (the field on both types has values in the same format) as those Wire Data logs:</p>  <p>&#160;</p>  <p><strong><font color="#ff0000" size="2">Type=SecurityEvent ProcessName IN {Type:WireData &quot;DancingPigs.exe&quot; | distinct ProcessName}</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0383.image_616D8B74.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0383.image_5F00_616D8B74.png"><img title="Type=SecurityEvent ProcessName IN {Type:WireData &quot;DancingPigs.exe&quot; | distinct ProcessName}" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=SecurityEvent ProcessName IN {Type:WireData &quot;DancingPigs.exe&quot; | distinct ProcessName}" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8244.image_thumb_45CB902F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8244.image_5F00_thumb_5F00_45CB902F.png" width="640" height="433" /></a></p>  <p>&#160;</p>  <p>and once I got this information, I can have a look at the Accounts that have started that process, according – again – to the Security Logs:</p>  <p><strong><font color="#ff0000" size="2">Type=SecurityEvent ProcessName IN {Type:WireData &quot;DancingPigs.exe&quot; | distinct ProcessName} | measure count() by Account</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/5432.image_2E33E2BC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/5432.image_5F00_2E33E2BC.png"><img title="Type=SecurityEvent ProcessName IN {Type:WireData &quot;DancingPigs.exe&quot; | distinct ProcessName} | measure count() by Account" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=SecurityEvent ProcessName IN {Type:WireData &quot;DancingPigs.exe&quot; | distinct ProcessName} | measure count() by Account" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3326.image_thumb_2BF9EAB1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3326.image_5F00_thumb_5F00_2BF9EAB1.png" width="640" height="248" /></a></p>  <p>&#160;</p>  <p>Hope the above gave a small demonstration of some interesting use case for this type of data.</p>  <p>&#160;</p>  <h2>How is data collected? Can I tweak collection?</h2>  <p>As wrote also earlier, the solution uses a custom module for both SCOM and Direct Agent, to hook into the Windows Network Stack and poll statistics from it. </p>  <p>Our main goal was that this process should be lightweight and not affect the agent – therefore we don’t go extremely deep in the network stack to be gentle on machine’s performance. With default settings we err on the side of dropping something – if necessary - rather than having full completeness or fidelity at the expense of performance. This said, the Wire Data module defines the following configuration properties:</p>  <table cellspacing="0" cellpadding="0" width="780" border="1"><tbody>     <tr>       <td width="146">         <p><b>Configuration property </b></p>       </td>        <td width="412">         <p><b>Description</b></p>       </td>        <td width="93">         <p><b>Default value</b></p>       </td>        <td width="65">         <p><b>Min value</b></p>       </td>        <td width="62">         <p><b>Max value</b></p>       </td>     </tr>      <tr>       <td width="146">         <p>IntervalSeconds</p>       </td>        <td width="412">         <p>This is upload interval of the Wire Data from agent to the cloud storage. </p>       </td>        <td width="93">         <p>60 seconds </p>       </td>        <td width="65">         <p>1 second </p>       </td>        <td width="62">         <p>3600</p>       </td>     </tr>      <tr>       <td width="146">         <p>SessionPerUpload</p>       </td>        <td width="412">         <p>Max number of sessions to upload. If collected sessions are more than specified value of SessionPerUpload property then those sessions uploaded during next upload interval. </p>       </td>        <td width="93">         <p>1000 </p>       </td>        <td width="65">         <p>1 second </p>       </td>        <td width="62">         <p>262144 (i.e. 256K)</p>       </td>     </tr>      <tr>       <td width="146">         <p>ExpireIntervalSeconds</p>       </td>        <td width="412">         <p>This is to track expire of the session. If the session expired more than value of ExpireIntervalSeconds then those sessions will be discarded and not uploaded to the cloud. </p>       </td>        <td width="93">         <p>1800 </p>       </td>        <td width="65">         <p>1&#160; </p>       </td>        <td width="62">         <p>86400</p>       </td>     </tr>      <tr>       <td width="146">         <p>MaxSessionBuffers</p>       </td>        <td width="412">         <p>Count of maximum number of session buffers for ETW session created by the WireData Data Source/MP to capture messages. </p>       </td>        <td width="93">         <p>32 </p>       </td>        <td width="65">         <p>1 </p>       </td>        <td width="62">         <p>255 </p>       </td>     </tr>      <tr>       <td width="146">         <p>SessionBufferSizeKB</p>       </td>        <td width="412">         <p> Size of ETW session buffer. </p>       </td>        <td width="93">         <p>4096 </p>       </td>        <td width="65">         <p>1 </p>       </td>        <td width="62">         <p>32768 </p>       </td>     </tr>      <tr>       <td width="146">         <p>TruncationLengthByte</p>       </td>        <td width="412">         <p>Indicates Truncation length. 0 value indicates no truncation. Higher the value of this entry indicates those many bytes will be truncated from the Ethernet packet. </p>       </td>        <td width="93">         <p>128 </p>       </td>        <td width="65">         <p>0 </p>       </td>        <td width="62">         <p>2048 </p>       </td>     </tr>      <tr>       <td width="146">         <p>MaxCachedSessions</p>       </td>        <td width="412">         <p>Maximum number of cached sessions </p>       </td>        <td width="93">         <p>16384 </p>       </td>        <td width="65">         <p>100 </p>       </td>        <td width="62">         <p>1048576 </p>       </td>     </tr>      <tr>       <td width="146">         <p>LatencySamplingIntervalSeconds</p>       </td>        <td width="412">         <p>Sampling interval in seconds for latency calculations </p>       </td>        <td width="93">         <p>300 </p>       </td>        <td width="65">         <p>1 </p>       </td>        <td width="62">         <p>86400 </p>       </td>     </tr>      <tr>       <td width="146">         <p>LatencySamplingTimeoutSeconds</p>       </td>        <td width="412">         <p>Timeout interval of latency sampling </p>       </td>        <td width="93">         <p>2 </p>       </td>        <td width="65">         <p>1 </p>       </td>        <td width="62">         <p>1024 </p>       </td>     </tr>      <tr>       <td width="146">         <p>LatencySamplingCount</p>       </td>        <td width="412">         <p>Indicates sampling count for the latency calculations </p>       </td>        <td width="93">         <p>4 </p>       </td>        <td width="65">         <p>1 </p>       </td>        <td width="62">         <p>10 </p>       </td>     </tr>   </tbody></table>  <p>&#160;</p>  <p>Which means, if you have SCOM, can be tweaked thru Overrides (at your own risk – do your own performance measurement to evaluate the impact of tweaking these limits, especially on busy servers with a lot of traffic.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1207.image_26AB0400.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1207.image_5F00_26AB0400.png"><img title="Wire Data Collection Rule Overrides" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Wire Data Collection Rule Overrides" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7357.image_thumb_5F583EBE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7357.image_5F00_thumb_5F00_5F583EBE.png" width="1024" height="449" /></a></p>  <p>&#160;</p>  <p>On behalf of the team, we hope you will enjoy this solution and find it useful. It’s just a first step, ‘getting our toes wet’ into this space of network traffic visibility in OMS. </p>  <p>Please send us feedback and feature requests (or bug reports) as usual <a href="https://aka.ms/opinsightsfeedback" target="_blank">on the UserVoice feedback forum</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Operations Management Suite Log Search How To: Part IX – the DISTINCT command</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/operations-management-suite-log-search-how-to-part-ix-the-distinct-command</link>
      <pubDate>Mon, 29 Jun 2015 01:44:52 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2015/06/29/operations-management-suite-log-search-how-to-part-ix-the-distinct-command/</guid>
      <description><![CDATA[A nifty little addition to our language has been recently pushed out: the DISTINCT command.  Now,...]]></description>
      <content:encoded><![CDATA[<p>A nifty little addition to our language has been recently pushed out: the <strong>DISTINCT</strong> command.</p>  <p>Now, before I continue, if you have just stumbled here but have no previous experience with the search syntax, notice that this is the ninth installment of a Series that walks thru the concepts of Operations Management Suite (formerly <strong>Microsoft Azure Operational Insights</strong>) Search Syntax – while <a href="https://go.microsoft.com/fwlink/?LinkId=394544">the full documentation and syntax reference is here</a>, these posts are meant to guide your first steps with practical examples. I’ll start very simple, and build upon each example, so you can get an understanding of practical use cases for how to use the syntax to extract the insights you need from the data.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-first-steps-how-to-filter-data-part-i.aspx">In my first post</a> I introduced <strong>filtering</strong>, querying by <strong>keyword</strong> or by a <strong>field’s exact value match</strong>, and some <strong>Boolean</strong> operators.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-ii-more-on-filtering-using-boolean-operators-and-the-time-dimension.aspx">In the second post</a> I built upon the concepts of the first one, and introduced some more complex flavors of filters that are possible. Now you should know all you need to <strong><em>extract</em></strong> the data set you need.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-iii-manipulating-results-the-pipeline-and-search-commands.aspx">In the third post</a> I introduced the use of the <strong>pipeline symbol “|”</strong> and how to shape your results with search commands.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/operational-insights-search-how-to-part-iv-introducing-the-measure-command.aspx">In the fourth post</a> I introduced our most powerful command – <strong>measure</strong> �� and used it with just the simplest of the statistical functions: <strong>count()</strong>.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/azure-operational-insights-search-howto-part-v-max-and-min-statistical-functions-with-measure-command.aspx">In the fifth post</a> I expanded on the <strong>measure</strong> command and showed the <strong>Max()</strong> statistical function.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/31/azure-operational-insights-search-how-to-part-vi-measure-avg-and-an-exploration-of-type-perfhourly.aspx">In the sixth post</a> I continued with <strong>measure</strong>’s statistical functions – I showed how <strong>Avg()</strong> is useful with Performance data among other things.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/11/10/azure-operational-insights-search-hot-to-part-vii-measure-sum-and-where-command.aspx">In the seventh post</a> I continued with another of <strong>measure</strong>’s statistical functions – <strong>Sum()</strong> – and introduced the <strong>where</strong> command.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2015/05/30/operations-management-suite-log-search-how-to-part-viii-the-in-operator-and-subsearches.aspx" target="_blank">In the eight post</a> I introduced the<strong> sub-searches</strong> feature that is accessed with the <strong>IN</strong> operator.</p>  <p>&#160;</p>  <p>Today I want to introduce you to <strong>DISTINCT</strong>. As the name hopefully suggests, this command provides the list of distinct values for a field. Sure, the same could be achieved with <strong>measure count()</strong> command as well:</p>  <p>&#160;</p>  <p><strong><font size="3">Type=Event | Measure count() by Computer</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3618.image_1B39D90C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3618.image_5F00_1B39D90C.png"><img title="Type=Event | Measure count() by Computer" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=Event | Measure count() by Computer" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4645.image_thumb_51AA8B0E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4645.image_5F00_thumb_5F00_51AA8B0E.png" width="640" height="345" /></a></p>  <p>&#160;</p>  <p>But if all you are interested in is the just LIST of distinct values and not the count of documents that have that value, then DISTINCT makes for a cleaner/more readable output and shorter syntax</p>  <p><strong><font size="3">Type=Event | Distinct Computer</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8867.image_68003053.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8867.image_5F00_68003053.png"><img title="Type=Event | distinct Computer" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=Event | distinct Computer" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0081.image_thumb_5BFE401F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0081.image_5F00_thumb_5F00_5BFE401F.png" width="640" height="354" /></a></p>  <p>&#160;</p>  <p>This is particularly useful in <a href="https://blogs.msdn.com/b/dmuscett/archive/2015/05/30/operations-management-suite-log-search-how-to-part-viii-the-in-operator-and-subsearches.aspx" target="_blank">sub-searches</a> – where all you want is really a distinct list of ‘something’ to pass in as filter value for an outer search. <em>[Note – if you are confused about this last statement, read the previous post </em><a title="https://blogs.msdn.com/b/dmuscett/archive/2015/05/30/operations-management-suite-log-search-how-to-part-viii-the-in-operator-and-subsearches.aspx" href="https://blogs.msdn.com/b/dmuscett/archive/2015/05/30/operations-management-suite-log-search-how-to-part-viii-the-in-operator-and-subsearches.aspx"><em>https://blogs.msdn.com/b/dmuscett/archive/2015/05/30/operations-management-suite-log-search-how-to-part-viii-the-in-operator-and-subsearches.aspx</em></a><em> ]</em></p>  <p>Happy searching!</p>]]></content:encoded>
    </item>
    <item>
      <title>Operations Management Suite Log Search How To: Part VIII – the IN operator and subsearches</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/operations-management-suite-log-search-how-to-part-viii-the-in-operator-and-subsearches</link>
      <pubDate>Sat, 30 May 2015 06:47:00 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2015/05/30/operations-management-suite-log-search-how-to-part-viii-the-in-operator-and-subsearches/</guid>
      <description><![CDATA[This is the eight installment of a Series that walks thru the concepts of Operations Management...]]></description>
      <content:encoded><![CDATA[<p>This is the eight installment of a Series that walks thru the concepts of Operations Management Suite (formerly <strong>Microsoft Azure Operational Insights</strong>) Search Syntax – while <a href="https://go.microsoft.com/fwlink/?LinkId=394544">the full documentation and syntax reference is here</a>, these posts are meant to guide your first steps with practical examples. I’ll start very simple, and build upon each example, so you can get an understanding of practical use cases for how to use the syntax to extract the insights you need from the data.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-first-steps-how-to-filter-data-part-i.aspx">In my first post</a> I introduced <strong>filtering</strong>, querying by <strong>keyword</strong> or by a <strong>field’s exact value match</strong>, and some <strong>Boolean</strong> operators.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-ii-more-on-filtering-using-boolean-operators-and-the-time-dimension.aspx">In the second post</a> I built upon the concepts of the first one, and introduced some more complex flavors of filters that are possible. Now you should know all you need to <strong><em>extract</em></strong> the data set you need.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-iii-manipulating-results-the-pipeline-and-search-commands.aspx">In the third post</a> I introduced the use of the <strong>pipeline symbol “|”</strong> and how to shape your results with search commands.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/operational-insights-search-how-to-part-iv-introducing-the-measure-command.aspx">In the fourth post</a> I introduced our most powerful command – <strong>measure</strong> – and used it with just the simplest of the statistical functions: <strong>count()</strong>.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/azure-operational-insights-search-howto-part-v-max-and-min-statistical-functions-with-measure-command.aspx">In the fifth post</a> I expanded on the <strong>measure</strong> command and showed the <strong>Max()</strong> statistical function.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/31/azure-operational-insights-search-how-to-part-vi-measure-avg-and-an-exploration-of-type-perfhourly.aspx">In the sixth post</a> I continued with <strong>measure</strong>’s statistical functions – I showed how <strong>Avg()</strong> is useful with Performance data among other things.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/11/10/azure-operational-insights-search-hot-to-part-vii-measure-sum-and-where-command.aspx" target="_blank">In the seventh post</a> I continued with another of <strong>measure</strong>’s statistical functions – <strong>Sum()</strong> – and introduced the <strong>where</strong> command.</p>  <p>&#160;</p>  <p>I am very excited to be writing about an important addition to our search syntax: we recently enabled the ‘IN’ operator (along with ‘NOT IN’), which allows you to use subsearches: a subsearch is a search that includes another search as an argument. They are contained in curly brackets within another &quot;primary&quot; or &quot;outer&quot; search. The result of a subsearch (often a list of distinct results) is then used as an argument in its primary search. </p>  <p>You can use subsearches to match subsets of your data that you cannot describe directly in a search expression, but which can be generated from a search. For example, if you're interested in using one search to find all events from &quot;computers missing security updates&quot; you need to design a subsearch that first identifies that &quot;computers missing security updates&quot; before it finds events belonging to those hosts. </p>  <p>So, we could express ‘computers currently missing security updates” as follows:</p>  <p><strong><font size="3">Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2821.image_5B7E258A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2821.image_5F00_5B7E258A.png"><img title="Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4530.image_thumb_5781B890.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4530.image_5F00_thumb_5F00_5781B890.png" width="640" height="314" /></a></p>  <p>Once we have this list, we can use this search as inner search to feed the list of computers into an outer (primary) search that will look for events for those computers. We do this by enclosing the inner search in curly brackets and feeding its results as possible values for a filter/field in the outer search using the ‘IN’ operator. This query would look like:</p>  <p><strong><font size="3">Type=Event <font style="background-color: rgb(255, 255, 0);">Computer IN </font><font color="#ff0000">{</font>Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer<font color="#ff0000">}</font></font></strong></p>  <p>that’s it! </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3542.image_16DA421D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3542.image_5F00_16DA421D.png"><img title="Type=Event Computer IN {Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer}" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=Event Computer IN {Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer}" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7536.image_thumb_5C815CEC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7536.image_5F00_thumb_5F00_5C815CEC.png" width="640" height="316" /></a></p>  <p>Also notice the time filter I used in the ‘inner’ search: since I am counting on ‘System Update Assessment’ Solution to have a snapshot of all machines every 24 hours, I am making that inner query more lightweight and precise by only making that go back in time a day; the outer search instead still respects the time selection in the user interface, pulling up events from the last 7 days. [Also check <a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-ii-more-on-filtering-using-boolean-operators-and-the-time-dimension.aspx" target="_blank">my previous blog post about time in search</a>]</p>  <p>Another thing to notice is that, since we are really only using the results of the inner search as a filter value for the outer one, you can still apply commands in the outer search, i.e. we can still group the above events with another measure command:</p>  <p><strong><font size="3">Type=Event Computer IN <font color="#ff0000">{</font>Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer<font color="#ff0000">}</font> <font style="background-color: rgb(255, 255, 0);">| measure count() by Source</font></font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2744.image_16B24FF7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2744.image_5F00_16B24FF7.png"><img title="Type=Event Computer IN {Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer} | measure count() by Source" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=Event Computer IN {Type:RequiredUpdate UpdateClassification:&quot;Security Updates&quot; TimeGenerated&gt;NOW-25HOURS | measure count() by Computer} | measure count() by Source" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3386.image_thumb_6A2BB0C1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3386.image_5F00_thumb_5F00_6A2BB0C1.png" width="640" height="316" /></a></p>  <p>&#160;</p>  <p>Generally speaking, you want your inner query to execute fast – we have some service-side timeouts for it – and to return a small amount of results. If the inner query returns more results, we will truncate the result list, which will cause also the outer search to potentially give incorrect results. </p>  <p>Another rule is that the inner search currently needs to provide ‘aggregated’ results – or in other words, it must contain a ‘measure’ command; you cannot currently feed ‘raw’ results into an outer search. </p>  <p>Also, there can be only ONE ‘IN’ operator (and it must be the last filter in the query), and multiple IN operators cannot be OR’d – this essentially prevents running multiple subsearches: the bottom line is that only one sub/inner search is possible for each ‘outer’ search.</p>  <p>&#160;</p>  <p>Even with these limits, this addition enables all new kinds of correlated searches, and allows you to define something similar to ‘groups’ (of computers, or users, of files – whatever the fields in your data contain). Some more examples:</p>  <p>&#160;</p>  <p><strong>All updates missing from machines where Automatic Update setting is disabled</strong></p>  <p>Type=RequiredUpdate Computer IN {Type=UpdateAgent AutomaticUpdateEnabled!=Enabled | Measure count() by Computer} | Measure count() by KBID</p>  <p><strong>All error events from machines running SQL Server (=where SQL Assessment has run)</strong></p>  <p>Type=Event EventLevelName=error Computer IN {Type=SQLAssessmentRecommendation | measure count() by Computer}</p>  <p><strong>All security events from machines that are Domain Controllers (=where AD Assessment has run)</strong></p>  <p>Type=SecurityEvent Computer IN { Type=ADAssessmentRecommendation | measure count() by Computer }</p>  <p><strong>Which other accounts have logged on to the same computers where account BACONLAND\jochan has logged on?</strong></p>  <p>Type=SecurityEvent EventID=4624&#160;&#160; Account!=&quot;BACONLAND\\jochan&quot; Computer IN { Type=SecurityEvent EventID=4624&#160;&#160; Account=&quot;BACONLAND\\jochan&quot; | measure count() by Computer } | measure count() by Account</p>  <p>&#160;</p>  <p>I am sure you will come up with other interesting search scenarios now.</p>  <p>Happy searching!</p>]]></content:encoded>
    </item>
    <item>
      <title>Which machines are reporting to Azure Operational Insights? Where is my data coming from? What data and how much is it?</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/which-machines-are-reporting-to-azure-operational-insights-where-is-my-data-coming-from-what-data-and-how-much-is-it</link>
      <pubDate>Tue, 07 Apr 2015 03:09:04 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2015/04/07/which-machines-are-reporting-to-azure-operational-insights-where-is-my-data-coming-from-what-data-and-how-much-is-it/</guid>
      <description><![CDATA[I am sure you have seen our troubleshooting blog post that helps resolve Operational Insights...]]></description>
      <content:encoded><![CDATA[<p>I am sure you have seen our <a href="https://blogs.technet.com/b/momteam/archive/2014/05/29/advisor-error-3000-unable-to-register-to-the-advisor-service-amp-onboarding-troubleshooting-steps.aspx" target="_blank">troubleshooting blog post</a> that helps resolve Operational Insights connectivity and data flow issues.</p>  <p>This post aims at showing you how you can use Operational Insights Search to see which machines/environments are sending data, get an understanding of what data (and how much of it) is being received by the service in given amounts of time. This should help with both identifying problematic/missing machines (machines whose data is never seen) and derive an understanding of how the amount of data collected has an impact on usage and billing metrics of the service.</p>  <p>The first place to look at is the ‘Servers and Usage’ tile (one of the ‘small’ tiles in the Overview screen):</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4606.image_469079D6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4606.image_5F00_469079D6.png"><img title="Servers and Usage tile on Azure Operational Insights Overview page" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="Servers and Usage tile on Azure Operational Insights Overview page" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2330.image_thumb_4626D792.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2330.image_5F00_thumb_5F00_4626D792.png" width="640" height="459" /></a></p>  <p>This tile shows the amount of data metered during the current metering cycle (which is midnight-to-midnight UTC). If you are already 4 hours into the current day and the count is still on zero, the tile colors red, like in the screenshot above.</p>  <p>Once you drill into the tile in the respective page – you get additional information about your usage and the amount of data that was metered in the last 7 days, a calculated daily average for those 7 days, and a breakdown of data by Intelligence Pack. Some intelligence packs collect a lot more data than other ones, and some are configurable and can be tuned up or down in this sense (i.e. Log Management). In Operations Manager, you can even <a href="https://blogs.technet.com/b/momteam/archive/2014/08/27/anatomy-of-an-event-collection-rule-for-advisor-preview-advanced-targeting.aspx" target="_blank">create some of your own rules</a> being counted as part of those IP’s, with a more granular collection policy.</p>  <p>Note that usage/metering information is tracked as data as received by the service, accumulated, and updated periodically. The information about ‘usage’ on this page can be slightly stale (1 or 2 hours delay). Information is presented in megabytes/gigabytes here, and broken down by the sending ‘intelligence pack’.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8611.image_5E4CD29E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8611.image_5F00_5E4CD29E.png"><img title="Servers and Usage page in Azure Operational Insights" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="Servers and Usage page in Azure Operational Insights" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8078.image_thumb_2630762A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8078.image_5F00_thumb_5F00_2630762A.png" width="640" height="360" /></a></p>  <p><font color="#ff0000"><strong>[Edited May 2015 – the list of management groups and the link to access the list of direct agents, described below, have moved to the ‘Settings’ tile, under ‘Connected Sources’]</strong></font></p>  <p>The other blades in this page show you directly connected agents and Operations Manager management groups that have been registered with Operational Insights. </p>  <p>The list of management groups represents those that are currently registered with the service. You need to register an Operations Manager management group thru the Operations Manager console before it will show up here.</p>  <p>The amount of agents and the ‘data freshness’ status is not actually tracked on our end at this stage, but it is only inferred by the UI based on the presence of data. This is different from the old ‘servers’ page in Advisor (in the Configuration Assessment scenario and screens) that was maintaining a stateful list of all SCOM agents. We don’t actually maintain such a list in the new system – agent management and enrollment is better accomplished from the Operations Manager environment, as machines might naturally come and go there is no need to synchronize them ‘both ways’ as a list in the cloud. We use instead data in Search to see whether data is stamped as belonging to a certain ‘Computer’, and how many and which ones of those we see, to provide counts. Similarly, data freshness uses search: we look at the most recent piece of data for a given management group and report how old that is. We can’t guarantee data for the recent time is complete, just that there is some recent data. More data from the recent period might still being indexed and will show up in the system later.</p>  <p>In the case of management groups, if the last piece of data is older than 2 weeks, we offer a link to ‘remove’ the management groups: this permanently deletes the registration – should that management group ever come back online, its data will be rejected, and you would have to register it again from the Operations Manager console. </p>  <p>Note – for ‘directly connected servers’, we would like to provide an agent management experience that allows to list the agents that have been registered, and eventually remove (de-register) them like you can do with management groups once they are stale. Track this item for that feature <a title="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6949226-implemented-feature-to-remove-managed-management" href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6949226-implemented-feature-to-remove-managed-management">https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6949226-implemented-feature-to-remove-managed-management</a></p>  <p>&#160;</p>  <p>Clicking on either the ‘servers connected directly’ or one of the tiles representing specific Operations Manager management groups takes you to search.</p>  <p>The drill down queries are similar in each case, let’s look at directly connected servers first: Direct agents will be seen as if coming from a fake management group “00000000-0000-0000-0000-000000000001&quot;, with this search:</p>  <p><strong><font size="3">MG:&quot;00000000-0000-0000-0000-000000000001&quot;&#160; | Measure Max(TimeGenerated) as LastData by Computer | Sort Computer</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2538.image_2C79DD69.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2538.image_5F00_2C79DD69.png"><img title="MG:&quot;00000000-0000-0000-0000-000000000001&quot;  | Measure Max(TimeGenerated) as LastData by Computer | Sort Computer" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="MG:&quot;00000000-0000-0000-0000-000000000001&quot;  | Measure Max(TimeGenerated) as LastData by Computer | Sort Computer" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1348.image_thumb_4FCBF370.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1348.image_5F00_thumb_5F00_4FCBF370.png" width="640" height="360" /></a></p>  <p>The default query uses the <a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/operational-insights-search-how-to-part-iv-introducing-the-measure-command.aspx" target="_blank">Measure command</a> to show <a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/azure-operational-insights-search-howto-part-v-max-and-min-statistical-functions-with-measure-command.aspx" target="_blank">the latest indexed piece of data</a> grouped by the field ‘Computer’. Adjusting the time selector to an older period of time might show you more machines that used to report data in the past but might have dropped off. If you never see a machine listed that you expect to see, that’s an indication you need to troubleshoot it.</p>  <p>Note – some log types might not populate the ‘Computer’ field – see requirements for IIS Logs <a title="https://blogs.technet.com/b/momteam/archive/2014/09/19/iis-log-format-requirements-in-system-center-advisor.aspx" href="https://blogs.technet.com/b/momteam/archive/2014/09/19/iis-log-format-requirements-in-system-center-advisor.aspx">https://blogs.technet.com/b/momteam/archive/2014/09/19/iis-log-format-requirements-in-system-center-advisor.aspx</a></p>  <p>By drilling down into one of the computers, you will see all of its data, and you can then get a breakdown by any of the dimensions in the data with the measure count() command. A first easy assessment to understand what volume of data is to get a count of record grouped by each ‘Type’ (or even more simply, peek at the ‘Type’ facet/filter on the left side under ‘narrow your results’):</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2451.OneMachineByType_1CFE7DAD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2451.OneMachineByType_5F00_1CFE7DAD.png"><img title="MG:&quot;00000000-0000-0000-0000-000000000001&quot;  | Measure count() by Type" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="MG:&quot;00000000-0000-0000-0000-000000000001&quot;  | Measure count() by Type" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/5554.OneMachineByType_thumb_40BA35F8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/5554.OneMachineByType_5F00_thumb_5F00_40BA35F8.png" width="640" height="288" /></a></p>  <p>In this screenshot you can see what data my laptop had sent in the first few hours – Security Events and other Windows Events account for the majority of the data, followed by a few configuration changes and just 1 record of each type for those assessment that run infrequently. Exporting this to Excel I can quickly get a percentage and understand what’s the relative ‘weight’ of each Type.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/6866.image_4BE650F3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/6866.image_5F00_4BE650F3.png"><img title="Counts of records by type in Azue Operational Insights with Excel Export" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Counts of records by type in Azue Operational Insights with Excel Export" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1134.image_thumb_7B37C67D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1134.image_5F00_thumb_5F00_7B37C67D.png" width="376" height="246" /></a></p>  <p>Similar to the ‘servers connected directly’ drill-down, each Operations Manager management group has a similar drill down where the actual (real, in this case) management group ID is used to filter the data.</p>  <p>If you don’t want to look at directly connected agents and Operations Manager agents separately, you can run the same Measure command against a star ‘*’ filter – which means ‘all data’:</p>  <p><strong><font size="3">*&#160; | Measure Max(TimeGenerated) as LastData by Computer | Sort Computer</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3531.image_1F5FB1BE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3531.image_5F00_1F5FB1BE.png"><img title="*  | Measure Max(TimeGenerated) as LastData by Computer | Sort Computer" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="*  | Measure Max(TimeGenerated) as LastData by Computer | Sort Computer" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/6131.image_thumb_2296BB08.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/6131.image_5F00_thumb_5F00_2296BB08.png" width="640" height="360" /></a></p>  <p>or get the same breakdown by type for the whole environment, to better understand my overall ‘usage’</p>  <p><strong><font size="3">* | Measure count() by Type</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8244.image_5AD7C2D1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8244.image_5F00_5AD7C2D1.png"><img title="Counts of records by type in Azue Operational Insights with Excel Export" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Counts of records by type in Azue Operational Insights with Excel Export" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8524.image_thumb_5A6E208D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8524.image_5F00_thumb_5F00_5A6E208D.png" width="561" height="303" /></a></p>  <p>this query is, btw, among the seeded ‘Saved Searches’ in the Portal. It’s under the ‘general exploration’ category, and named ‘Distribution of data types’:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7532.image_3740B5DB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7532.image_5F00_3740B5DB.png"><img title="Saved Searches in Azure Operational Insights - &#39;General Exploration&#39; category" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Saved Searches in Azure Operational Insights - &#39;General Exploration&#39; category" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0066.image_thumb_01CD1518.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0066.image_5F00_thumb_5F00_01CD1518.png" width="640" height="360" /></a></p>  <p>Another interesting field you need to know about is ‘SourceSystem’: since Operational Insights can index data send by agents/management groups or ingest directly from Windows Azure Diagnostics (WAD) storage (typically for PaaS or IaaS Azure role instances), this field tracks where the data comes from. You’ll see there are a couple of varieties of ‘Operations Manager’ (‘OpsManager’, ‘OpsMgr’ – depending on intelligence pack/workflow) that essentially mean this data is ‘agent based’ (either directly connected agent or Operations Manager – but the data comes from the agent-style channel). On the contrary, some data for Log Management is tagged with SourceSystem=AzureStorage, to indicate that data is coming from WAD.</p>  <p><strong><font size="3">*&#160; | Measure Max(TimeGenerated) as LastData by SourceSystem</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7230.image_21124C9C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7230.image_5F00_21124C9C.png"><img title="*  | Measure Max(TimeGenerated) as LastData by SourceSystem" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="*  | Measure Max(TimeGenerated) as LastData by SourceSystem" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8686.image_thumb_446462A3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8686.image_5F00_thumb_5F00_446462A3.png" width="640" height="360" /></a></p>  <p>and besides freshness, you can, again, also see quantities with measure count() command</p>  <p><strong><font size="3">*&#160; | Measure count() by SourceSystem</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3223.image_0A77B068.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3223.image_5F00_0A77B068.png"><img title="*  | Measure count() by SourceSystem" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="*  | Measure count() by SourceSystem" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8880.image_thumb_720A2DBB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8880.image_5F00_thumb_5F00_720A2DBB.png" width="640" height="360" /></a></p>  <p>Here you see in my environment, most data is agent-based and only a little is coming from WAD. YMMV.</p>  <p>&#160;</p>  <p>Filtering by SourceSystem=AzureStorage, you can use some of the same techniques above to check what type of data is coming from one type of connection as opposed to the other one.</p>  <p><strong><font size="3">SourceSystem=AzureStorage | measure count() by Computer</font></strong></p> <font size="3"></font>  <p><strong><font size="3">SourceSystem=AzureStorage | measure count() by Type</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8233.image_0625DAF6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8233.image_5F00_0625DAF6.png"><img title="SourceSystem=AzureStorage | measure count() by Type" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="SourceSystem=AzureStorage | measure count() by Type" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1667.image_thumb_78E47344.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1667.image_5F00_thumb_5F00_78E47344.png" width="640" height="360" /></a></p>  <p>&#160;</p>  <p>Last note, records coming from WAD (SourceSystem=AzureStorage) also feature some additional Azure-specific properties, when compared to their agent-based equivalents, i.e. try grouping based on Deployment Id:</p>  <p><strong><font size="3">SourceSystem=AzureStorage | measure count() by AzureDeploymentID</font></strong></p>  <p>Often a few more properties (depending on type) are also present referring to Role, RoleInstance and other Azure concepts.</p>  <p>&#160;</p>  <p>I hope this was useful to understand how to slice and dice your data to understand usage patterns, machines that are not reporting, discover those that are sending the most data, and in general to get a better understanding of what data is flowing in the system. </p>  <p>Happy Searching!</p>]]></content:encoded>
    </item>
    <item>
      <title>Monitoring SQL Backup Failures with Azure Operational Insights Search and Dashboards</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/monitoring-sql-backup-failures-with-azure-operational-insights-search-and-dashboards</link>
      <pubDate>Sat, 21 Feb 2015 13:06:49 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2015/02/21/monitoring-sql-backup-failures-with-azure-operational-insights-search-and-dashboards/</guid>
      <description><![CDATA[Besides the SQL Server Assessment Intelligence Pack, you can also use Log Management functionality...]]></description>
      <content:encoded><![CDATA[<p>Besides the <a href="https://blogs.technet.com/b/momteam/archive/2014/10/23/new-sql-server-assessment-intelligence-pack-in-advisor.aspx" target="_blank">SQL Server Assessment Intelligence Pack</a>, you can also use Log Management functionality to collect the ‘Application’ event log from your SQL Servers and monitor activity from it with search.</p>  <p>For example, this is my simple recipe for finding SQL Backup Failures</p>  <p><font size="4"><strong>Type=Event EventID=3041 EventLog=Application Source=MSSQLSERVER</strong> </font></p>  <p>That’s it. I can see in my workspace I had a few of those back in January:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2671.image_0E322355.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2671.image_5F00_0E322355.png"><img title="Type=Event EventID=3041 EventLog=Application Source=MSSQLSERVER " style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="Type=Event EventID=3041 EventLog=Application Source=MSSQLSERVER " src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/5736.image_thumb_0DC5F060.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/5736.image_5F00_thumb_5F00_0DC5F060.png" width="717" height="350" /></a></p>  <p>&#160;</p>  <p>I can slightly massage the output to get better readability by <strong>selecting</strong> only certain fields piping my results into the <strong>SELECT</strong> command</p>  <p><strong><font size="4">Type=Event EventID=3041 EventLog=Application Source=MSSQLSERVER <font color="#ff0000">| Select Computer,RenderedDescription</font></font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1538.image_4D8FD6E5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1538.image_5F00_4D8FD6E5.png"><img title="Type=Event EventID=3041 EventLog=Application Source=MSSQLSERVER | Select Computer,RenderedDescription" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=Event EventID=3041 EventLog=Application Source=MSSQLSERVER | Select Computer,RenderedDescription" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7080.image_thumb_224B3FDE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7080.image_5F00_thumb_5F00_224B3FDE.png" width="969" height="346" /></a></p>  <p><strong><font color="#ff0000" size="4"></font></strong></p>  <p>Now if you want to keep monitoring this, you can save it in your favorite searches and pin it to <a href="https://blogs.technet.com/b/momteam/archive/2014/10/16/custom-dashboard-in-advisor.aspx" target="_blank">your Dashboard</a>, so you can take a look, even <a href="https://blogs.technet.com/b/momteam/archive/2014/11/24/access-your-operational-insights-on-the-go.aspx" target="_blank">on the go with the Mobile app</a>!</p>  <p>In my case I am investigating an occurrence in the past, so I want to understand why the failure occurred, so the next logical step would be to look for the time when the backup failure occurred, by interacting with the time bars on the top left under ‘narrow your results’ – clicking on the bars and narrowing down till we see the few individual events and a narrow enough time period</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0285.image_131733F6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0285.image_5F00_131733F6.png"><img title="Time Control Narrow your results" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Time Control Narrow your results" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1778.image_thumb_60B36076.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1778.image_5F00_thumb_5F00_60B36076.png" width="488" height="192" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3426.image_207D46FC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3426.image_5F00_207D46FC.png"><img title="Time Control Narrow your results" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Time Control Narrow your results" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/6661.image_thumb_474B5D3C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/6661.image_5F00_thumb_5F00_474B5D3C.png" width="431" height="192" /></a></p>  <p>and now I want to see WHAT ELSE was happening on the same machine, so I add a filter for the ‘Computer’ field, and I remove everything else from my search:</p>  <p><strong><font size="4">Computer=&quot;BaconSCOM.BaconLand.com&quot;</font></strong></p>  <p>This shows me WHAT ELSE I know about that machine around that time frame, and I see, among other things that are always found (i.e. events, securityevents don’t come at regular intervals, but all the times), I see there is ONE configuration change – interesting</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3022.image_62EFE932.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3022.image_5F00_62EFE932.png"><img title="Computer=&quot;BaconSCOM.BaconLand.com&quot;" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Computer=&quot;BaconSCOM.BaconLand.com&quot;" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7802.image_thumb_09BDFF73.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7802.image_5F00_thumb_5F00_09BDFF73.png" width="552" height="386" /></a></p>  <p>&#160;</p>  <p>Let’s drill into that… and we see that someone had installed a Defragmentation tool on the server around the same time as the backup failures!</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2605.image_2CA3E285.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2605.image_5F00_2CA3E285.png"><img title="ConfigurationChange" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="ConfigurationChange" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1641.image_thumb_68637B38.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1641.image_5F00_thumb_5F00_68637B38.png" width="318" height="278" /></a></p>  <p>I think we now understand why the backup failed that day…Operational Insights made it super easy to get to the root cause!</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Operational Insights Search How To: Part VII – Measure Sum() and Where command</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/azure-operational-insights-search-how-to-part-vii-measure-sum-and-where-command</link>
      <pubDate>Sun, 09 Nov 2014 15:41:19 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2014/11/09/azure-operational-insights-search-how-to-part-vii-measure-sum-and-where-command/</guid>
      <description><![CDATA[This is the seventh installment of a Series that walks thru the concepts of Microsoft Azure...]]></description>
      <content:encoded><![CDATA[<p>This is the seventh installment of a Series that walks thru the concepts of <strong>Microsoft Azure Operational Insights</strong> Search Syntax – while <a href="https://go.microsoft.com/fwlink/?LinkId=394544">the full documentation and syntax reference is here</a>, these posts are meant to guide your first steps with practical examples. I’ll start very simple, and build upon each example, so you can get an understanding of practical use cases for how to use the syntax to extract the insights you need from the data.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-first-steps-how-to-filter-data-part-i.aspx">In my first post</a> I introduced <strong>filtering</strong>, querying by <strong>keyword</strong> or by a <strong>field’s exact value match</strong>, and some <strong>Boolean</strong> operators.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-ii-more-on-filtering-using-boolean-operators-and-the-time-dimension.aspx">In the second post</a> I built upon the concepts of the first one, and introduced some more complex flavors of filters that are possible. Now you should know all you need to <strong><em>extract</em></strong> the data set you need.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-iii-manipulating-results-the-pipeline-and-search-commands.aspx">In the third post</a> I introduced the use of the <strong>pipeline symbol “|”</strong> and how to shape your results with search commands.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/operational-insights-search-how-to-part-iv-introducing-the-measure-command.aspx">In the fourth post</a> I introduced our most powerful command – <strong>measure</strong> – and used it with just the simplest of the statistical functions: <strong>count()</strong>.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/azure-operational-insights-search-howto-part-v-max-and-min-statistical-functions-with-measure-command.aspx">In the fifth post</a> I expanded on the <strong>measure</strong> command and showed the Max() statistical function.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/31/azure-operational-insights-search-how-to-part-vi-measure-avg-and-an-exploration-of-type-perfhourly.aspx">in the sixth post</a> I continued with <strong>measure</strong>’s statistical functions – I showed how Avg() is useful with Performance data among other things.</p>  <p>&#160;</p>  <p>By now you should have grasped how ‘<strong>measure’</strong> works, therefore I will not actually spend time on the <strong>Sum()</strong> function, other than this mention – if you want to see an example of its use, refer to this blog post <a title="https://blogs.msdn.com/b/dmuscett/archive/2014/09/20/w3c-iis-logs-search-in-system-center-advisor-limited-preview.aspx" href="https://blogs.msdn.com/b/dmuscett/archive/2014/09/20/w3c-iis-logs-search-in-system-center-advisor-limited-preview.aspx">https://blogs.msdn.com/b/dmuscett/archive/2014/09/20/w3c-iis-logs-search-in-system-center-advisor-limited-preview.aspx</a> where I already showed how to use it to get aggregate amount of traffic download to a given IP from a webserver (IIS logs):</p>  <p><strong>Type=W3CIISLog | Measure Sum(scBytes) by cIP</strong></p>  <p>Interesting/additional thing to notice before we move on: you can use Max() and Min() with numbers, datetimes and strings. with strings, they basically get sorted alphabetically and you get first and last.</p>  <p>You cannot however use Sum() – which does a REAL calculation – with anything but numerical fields. Same applies to Avg().</p>  <p>&#160;</p>  <h2>Where</h2>  <p>The last command we have is <strong>Where</strong>.</p>  <p>Where works like a filter, but it can be applied in the pipeline to further filter ‘aggregated’ results that have been produced by a Measure command – as opposed to ‘raw’ results that get filtered at the beginning of a query.</p>  <p>Given this query:</p>  <p><strong>Type=PerfHourly&#160; CounterName=&quot;% Processor Time&quot;&#160; InstanceName=&quot;_Total&quot; | Measure Avg(SampleValue) as AVGCPU by Computer</strong></p>  <p>I can add another pipe “|” character and the Where command to only get computers whose average CPU is above 80%</p>  <p><strong><font style="background-color: rgb(0, 255, 0);">Type=PerfHourly&#160; CounterName=&quot;% Processor Time&quot;&#160; InstanceName=&quot;_Total&quot; | Measure Avg(SampleValue) as AVGCPU by Computer </font><font style="background-color: rgb(255, 255, 0);">| Where AVGCPU&gt;80</font></strong></p>  <p>You see what this represents?</p>  <p>If you are a system center person, talking in ‘management pack terms’, if this was a rule, <font style="background-color: rgb(0, 255, 0);">the first part would be the ‘data source’</font>, while <font style="background-color: rgb(255, 255, 0);">the where command becomes the condition detection</font>. (see my other dissertation on ‘rules’ and ‘searches’ similarities in this other post <a title="https://blogs.msdn.com/b/dmuscett/archive/2014/11/05/iis-mp-event-alerting-rules-s-opinsights-searches-equivalents.aspx" href="https://blogs.msdn.com/b/dmuscett/archive/2014/11/05/iis-mp-event-alerting-rules-s-opinsights-searches-equivalents.aspx">https://blogs.msdn.com/b/dmuscett/archive/2014/11/05/iis-mp-event-alerting-rules-s-opinsights-searches-equivalents.aspx</a> )</p>  <p>Where’s the write action, you might ask?</p>  <p>Well, if you bind this to a tile in ‘<a href="https://blogs.technet.com/b/momteam/archive/2014/10/16/custom-dashboard-in-advisor.aspx">My Dashboard</a>’, this essentially is a ‘monitor’ that lets you see in real time if machines are under CPU pressure – soon even on your phone – as shown below, in the bottom two tiles, both as a list and as a number: you basically always want the number to be zero and the list to be empty – otherwise it indicates an alert condition, essentially, and you can peek which machines are under pressure:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4505.image_34CD9AE5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4505.image_5F00_34CD9AE5.png"><img title="Azure Operational Insights Mobile App - My Dashboard" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Azure Operational Insights Mobile App - My Dashboard" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3531.image_thumb_617B7620.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3531.image_5F00_thumb_5F00_617B7620.png" width="270" height="480" /></a></p>  <p>&#160;</p>  <p>Welcome to monitoring in the modern world!</p>  <p>For other style of ‘write actions’, consider this idea in our feedback forum for the actual creation of alerts and other notification (email etc) whenever those ‘where’ criteria (really if you think of them, those are ‘thresholds’) are met <a title="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519198-run-saved-search-on-a-schedule-raise-alert-and-or" href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519198-run-saved-search-on-a-schedule-raise-alert-and-or">https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519198-run-saved-search-on-a-schedule-raise-alert-and-or</a> or this other one to kick off an automation runbook in response to a query matchin results <a title="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6658045-add-ability-to-execute-runbook-automation-from-aoi" href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6658045-add-ability-to-execute-runbook-automation-from-aoi">https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6658045-add-ability-to-execute-runbook-automation-from-aoi</a></p>  <p>This concludes the planned ‘HowTo’ series on the search syntax. I hope it was useful and enjoyable. The idea was to let new users read one post a day and having learned the syntax and be productive with it in a week! </p>  <p>As we add more capabilities and commands I will continue it. Please remember the official syntax reference can be found here <a title="https://technet.microsoft.com/en-us/library/dn500940.aspx" href="https://technet.microsoft.com/en-us/library/dn500940.aspx">https://technet.microsoft.com/en-us/library/dn500940.aspx</a> and that Stefan Roth has also produced a handy cheat sheet on his blog <a title="https://stefanroth.net/2014/11/05/microsoft-azure-operational-insights-search-data-explorer-cheat-sheet/" href="https://stefanroth.net/2014/11/05/microsoft-azure-operational-insights-search-data-explorer-cheat-sheet/">https://stefanroth.net/2014/11/05/microsoft-azure-operational-insights-search-data-explorer-cheat-sheet/</a></p>  <p>I will also likely blog some more scenario-focused posts, i.e. same use case and how to go thru more examples of ‘searches in action’.</p>  <p>I also keep updating this other post as I come up with some new useful queries <a title="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-searches-collection.aspx" href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-searches-collection.aspx">https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-searches-collection.aspx</a></p>  <p>Remember the feedback forum is always open for you to vote and ask what you would like us to improve in the service at <a title="https://feedback.azure.com/forums/267889-azure-operational-insights/" href="https://feedback.azure.com/forums/267889-azure-operational-insights/">https://feedback.azure.com/forums/267889-azure-operational-insights/</a></p>  <p>Happy searching!</p>]]></content:encoded>
    </item>
    <item>
      <title>IIS MP Event-Alerting Rules’s OpInsights Searches Equivalents</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/iis-mp-event-alerting-ruless-opinsights-searches-equivalents</link>
      <pubDate>Tue, 04 Nov 2014 20:25:29 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2014/11/04/iis-mp-event-alerting-ruless-opinsights-searches-equivalents/</guid>
      <description><![CDATA[Just for the kicks, the other day I run an Excel export of the IIS8 MP with MPViewer, and then I...]]></description>
      <content:encoded><![CDATA[<p>Just for the kicks, the other day I run an Excel export of the IIS8 MP with <a href="https://blogs.msdn.com/b/dmuscett/archive/2012/02/19/boris-s-tools-updated.aspx">MPViewer</a>, and then I applied a bunch of filters and removed several columns and copied out to notepad all the key info for the Alerting Rules that are based on Windows Events. And then I added field names and constructed equivalent search queries. The whole thing took me about 20 minutes or find&amp;replace-Fu…</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2654.image_131283E2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2654.image_5F00_131283E2.png"><img title="MPViewer&#39;s Excel Export of the IIS2012R2MP - Alerting Rules" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="MPViewer&#39;s Excel Export of the IIS2012R2MP - Alerting Rules" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7801.image_thumb_3834EFB0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7801.image_5F00_thumb_5F00_3834EFB0.png" width="617" height="480" /></a></p>  <p>Why did I do this, you might be asking? Well, you must have realized that, with <a href="https://preview.opinsights.azure.com/">Azure Operational Insights</a>’s Log Management and Search capabilities, you would be able to collect the same event logs (mostly System and Application event logs is what is used by IIS) and using the Search query syntax, get those results – wait, if those were alerting rules, this means when one of those events was seen, it would generate al alert, right? </p>  <p>Well, you must have noticed that in a <a href="https://blogs.technet.com/b/momteam/archive/2014/10/16/custom-dashboard-in-advisor.aspx">dashboard</a> we feature a couple of style of tiles, in particular you can see a time-based distribution of occurrences of search results (those events) – so you can keep under control if and WHEN those errors happen, in a easy to reach way:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1817.image_2BC95D38.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1817.image_5F00_2BC95D38.png"><img title="Time distribution of ASP Errors - Tile in &#39;My Dashboard&#39; @OpInsights" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Time distribution of ASP Errors - Tile in &#39;My Dashboard&#39; @OpInsights" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7217.image_thumb_3689453E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7217.image_5F00_thumb_5F00_3689453E.png" width="359" height="157" /></a></p>  <p>or – if you don’t want those events to ever occur (after all, if they occur, you would alert, right?) you can keep them under control with the numeric tile and set a threshold – if more than ZERO (or more, if you want to tolerate a few – and you can add a time filter to the query to make it act on the most recent time period… this would be your ‘repeated event’ criteria, in ‘management packs’ terms…) then you can color the tile:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/2870.image_26E93A2D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/2870.image_5F00_26E93A2D.png"><img title="Total ASP Errors in the observed time range - Tile in &#39;My Dashboard&#39; @OpInsights" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Total ASP Errors in the observed time range - Tile in &#39;My Dashboard&#39; @OpInsights" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3056.image_thumb_7ACC3D3B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3056.image_5F00_thumb_5F00_7ACC3D3B.png" width="640" height="452" /></a></p>  <p>&#160;</p>  <p>&#160;</p>  <p>In the future, we’d like to enable <a href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519198-run-saved-search-on-a-schedule-raise-alert-and-or">long running or scheduled searches that would produce ‘actions’ – i.e. produce an alert, notify via email</a>, kick off a <a href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6658045-add-ability-to-execute-runbook-automation-from-aoi">runbook</a>…. and <a href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519212-advisor-mobile-app-i-like-to-create-my-own-dashbo">visualize your dashboard on your smartphone</a>! Check out and vote those ideas, and let’s enable monitoring in a modern hybrid world!</p>  <p>&#160;</p>  <p>And now, here’s the searches I produced by running this small experiment – Try them out, and have fun searching! (and you can try repeating the experiment yourself with other MP’s too <img class="wlEmoticon wlEmoticon-smile" style="style" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0116.wlEmoticon-smile_0ECC27CB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0116.wlEmoticon_2D00_smile_5F00_0ECC27CB.png" />)</p>  <p>&#160;</p>  <p><strong>A script has not responded within the configured timeout period</strong>    <br />EventID=2216 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>A server side include file has included itself or the maximum depth of server side includes has been exceeded</strong>    <br />EventID=2221 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>ASP application error occurred</strong>    <br />EventID=500 OR EventID=499 OR EventID=23 OR EventID=22 OR EventID=21 OR EventID=20 OR EventID=19 OR EventID=18 OR EventID=17 OR EventID=16 OR EventID=9 OR EventID=8 OR EventID=7 OR EventID=6 OR EventID=5 Source=&quot;Active Server Pages&quot; EventLog=Application</p>  <p><strong>HTTP control channel for the WWW Service did not open</strong>    <br />EventID=1037 Source=&quot;Microsoft-Windows-IIS-W3SVC&quot; EventLog=System</p>  <p><strong>HTTP Server could not create a client connection object for user</strong>    <br />EventID=2208 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>HTTP Server could not create the main connection socket     <br /></strong>EventID=2206 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>HTTP Server could not initialize its security     <br /></strong>EventID=2201 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>HTTP Server could not initialize the socket library     <br /></strong>EventID=2203 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>HTTP Server was unable to initialize due to a shortage of available memory     <br /></strong>EventID=2204 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>ISAPI application error detected     <br /></strong>EventID=2274 OR EventID=2268 OR EventID=2220 OR EventID=2219 OR EventID=2214 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>Module has an invalid precondition     <br /></strong>EventID=2296 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>Module registration error detected (failed to find RegisterModule entrypoint)     <br /></strong>EventID=2295 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>Module registration error detected (module returned an error during registration)     <br /></strong>EventID=2293 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>Only one type of logging can be enabled at a time     <br /></strong>EventID=1133 Source=&quot;Microsoft-Windows-IIS-W3SVC&quot; EventLog=System</p>  <p><strong>SF_NOTIFY_READ_RAW_DATA filter notification is not supported in IIS 8     <br /></strong>EventID=2261 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>The configuration manager for WAS did not initialize     <br /></strong>EventID=5036 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>The directory specified for caching compressed content is invalid     <br /></strong>EventID=2264 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>The Global Modules list is empty     <br /></strong>EventID=2298 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>The HTTP server encountered an error processing the server side include file     <br /></strong>EventID=2218 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>The server failed to close client connections to URLs during shutdown     <br /></strong>EventID=2258 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>The server was unable to acquire a license for a SSL connection     <br /></strong>EventID=2227 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>The server was unable to allocate a buffer to read a file     <br /></strong>EventID=2233 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>The server was unable to read a file     <br /></strong>EventID=2226 OR EventID=2230 OR EventID=2231 OR EventID=2232 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>WAS detected invalid configuration data     <br /></strong>EventID=5174 OR EventID=5179 OR EventID=5180 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>WAS encountered a failure requesting IIS configuration store change notifications     <br /></strong>EventID=5063 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>WAS encountered an error attempting to configure centralized logging     <br /></strong>EventID=5066 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>WAS encountered an error attempting to look up the built in IIS_IUSRS group     <br /></strong>EventID=5153 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>WAS encountered an error trying to read configuration     <br /></strong>EventID=5172 OR EventID=5173 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>WAS is stopping because it encountered an error     <br /></strong>EventID=5005 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>WAS received a change notification, but was unable to process it correctly     <br /></strong>EventID=5053 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>WAS terminated unexpectedly and the system was not configured to restart it     <br /></strong>EventID=5030 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>  <p><strong>Worker process failed to initialize communication with the W3SVC service and therefore could not be started     <br /></strong>EventID=2281 Source=&quot;Microsoft-Windows-IIS-W3SVC-WP&quot; EventLog=Application</p>  <p><strong>WWW Service did not initialize the HTTP driver and was unable to start     <br /></strong>EventID=1173 Source=&quot;Microsoft-Windows-IIS-W3SVC&quot; EventLog=System</p>  <p><strong>WWW service failed to configure the centralized W3C logging properties     <br /></strong>EventID=1135 OR EventID=1134 Source=&quot;Microsoft-Windows-IIS-W3SVC&quot; EventLog=System</p>  <p><strong>WWW Service failed to configure the HTTP.SYS control channel property     <br /></strong>EventID=1020 Source=&quot;Microsoft-Windows-IIS-W3SVC&quot; EventLog=System</p>  <p><strong>WWW service failed to configure the logging properties for the HTTP control channel     <br /></strong>EventID=1062 Source=&quot;Microsoft-Windows-IIS-W3SVC&quot; EventLog=System</p>  <p><strong>WWW Service failed to copy a change notification for processing     <br /></strong>EventID=1126 Source=&quot;Microsoft-Windows-IIS-W3SVC&quot; EventLog=System</p>  <p><strong>WWW Service failed to enable end point sharing for the HTTP control channel     <br /></strong>EventID=1175&#160;&#160;&#160; Microsoft-Windows-IIS-W3SVC&#160;&#160;&#160; System</p>  <p><strong>WWW service failed to enable global bandwidth throttling     <br /></strong>EventID=1071 OR EventID=1073 Source=&quot;Microsoft-Windows-IIS-W3SVC&quot; EventLog=System</p>  <p><strong>WWW service property failed range validation     <br /></strong>EventID=5067 Source=&quot;Microsoft-Windows-WAS&quot; EventLog=System</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Operational Insights Search How To: Part VI – Measure Avg(), and an exploration of Type=PerfHourly</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/azure-operational-insights-search-how-to-part-vi-measure-avg-and-an-exploration-of-typeperfhourly</link>
      <pubDate>Thu, 30 Oct 2014 22:48:42 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2014/10/30/azure-operational-insights-search-how-to-part-vi-measure-avg-and-an-exploration-of-typeperfhourly/</guid>
      <description><![CDATA[This is the sixth installment of a Series that walks thru the concepts of Microsoft Azure...]]></description>
      <content:encoded><![CDATA[<p>This is the sixth installment of a Series that walks thru the concepts of <strong>Microsoft Azure Operational Insights</strong> Search Syntax – while <a href="https://go.microsoft.com/fwlink/?LinkId=394544">the full documentation and syntax reference is here</a>, these posts are meant to guide your first steps with practical examples. I’ll start very simple, and build upon each example, so you can get an understanding of practical use cases for how to use the syntax to extract the insights you need from the data.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-first-steps-how-to-filter-data-part-i.aspx">In my first post</a> I introduced <strong>filtering</strong>, querying by <strong>keyword</strong> or by a <strong>field’s exact value match</strong>, and some <strong>Boolean</strong> operators.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-ii-more-on-filtering-using-boolean-operators-and-the-time-dimension.aspx">In the second post</a> I built upon the concepts of the first one, and introduced some more complex flavors of filters that are possible. Now you should know all you need to <strong><em>extract</em></strong> the data set you need.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-iii-manipulating-results-the-pipeline-and-search-commands.aspx">In the third post</a> I introduced the use of the <strong>pipeline symbol “|”</strong> and how to shape your results with search commands.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/operational-insights-search-how-to-part-iv-introducing-the-measure-command.aspx">In the fourth post</a> I introduced our most powerful command – <strong>measure</strong> – and used it with just the simplest of the statistical functions: <strong>count()</strong>.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/azure-operational-insights-search-howto-part-v-max-and-min-statistical-functions-with-measure-command.aspx">In the fifth post</a> I expanded on the <strong>measure</strong> command and showed the Max() statistical function. And gave ‘homework’ to try Min() on your own <img class="wlEmoticon wlEmoticon-winkingsmile" style="style" alt="Winking smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/3010.wlEmoticon-winkingsmile_2ECAD913.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/3010.wlEmoticon_2D00_winkingsmile_5F00_2ECAD913.png" /></p>  <p>&#160;</p>  <p>This time, I will show you one other favorite of mine to be used with measure, the <strong>Avg()</strong> statistical function. As you can imagine, this allows you to calculate the <strong>average</strong> value for some field, and group results (as usual with Measure – we discussed this in the <a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/operational-insights-search-how-to-part-iv-introducing-the-measure-command.aspx">4th post</a>) by some (other or same) field.</p>  <p>&#160;</p>  <p>This is useful in a variety of cases, my favorite one being Performance data, but there are other interesting use cases.</p>  <p>Let’s start with Performance data, anyhow, as it probably is the easiest to understand.</p>  <p>Before I do that, let me remind you that – at the time of this writing – we only collect specific fabric-related performance counters for VMM and HyperV hosts as part of the ‘Capacity’ Intelligence Pack.</p>  <p>We are anyhow tracking ideas to collect Custom-defined Performance Counters on our feedback forum – go ahead and vote on them if you would like us to enable that functionality!</p>  <ul>   <li>Collect Custom Performance Counters from Windows Agents <a title="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519061-collect-custom-windows-performance-counters" href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519061-collect-custom-windows-performance-counters">https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519061-collect-custom-windows-performance-counters</a></li>    <li>Collect Custom Performance Metrics from Unix/Linux Agents <a title="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519187-collect-performance-metrics-for-unix-and-linux-ser" href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519187-collect-performance-metrics-for-unix-and-linux-ser">https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519187-collect-performance-metrics-for-unix-and-linux-ser</a></li>    <li>Collect Custom Performance Counters for Azure PaaS Cloud Services from Windows Azure Diagnostics Storage <a title="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519356-collect-custom-performance-counters-from-windows-a" href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519356-collect-custom-performance-counters-from-windows-a">https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519356-collect-custom-performance-counters-from-windows-a</a></li> </ul>  <p>For these ideas, we would also like to understand the granularity of collection you expect to see – the current performance data collected by Capacity Intelligence Pack is only indexed in pre-computed hourly aggregations. What does this mean? It means that for each Computer\Performance Object\Performance Counter Name\Instance Name (as in perfmon) we currently index ONE RECORD in search for each hourly interval (24/day).</p>  <p>Let’s see what this means. If I search for ALL performance data, the most basic query would be</p>  <p><strong>Type=PerfHourly</strong></p>  <p>the first thing you notice is that OpInsights shows you also charts of those performance counters</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/4186.image_5598EF53.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/4186.image_5F00_5598EF53.png"><img title="Type=PerfHourly" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="Type=PerfHourly" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/6746.image_thumb_62FF0259.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/6746.image_5F00_thumb_5F00_62FF0259.png" width="640" height="360" /></a></p>  <p>this is convenient, of course, but let’s scroll to the bottom and look at the actual records that are behind those charts, and how do they look like</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7144.image_179F5E95.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7144.image_5F00_179F5E95.png"><img title="PerfHourly record in OpInsights Search" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="PerfHourly record in OpInsights Search" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1200.image_thumb_5769451A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1200.image_5F00_thumb_5F00_5769451A.png" width="554" height="480" /></a></p>  <p>&#160;</p>  <p>Look at the screenshot above and the two sets of fields I circled in red and notice a few things:</p>  <ul>   <li>the first set lets you identify the Windows Performance Counter Name, Object Name and Instance Name in your query filter. These are the fields you probably will most commonly use as facets/filters. </li>    <li>‘SampleValue’ is the actual value of the counter (more in a second on this…)</li>    <li>Type=Perf<strong>Hourly</strong> = this is an hourly aggregate</li>    <li>TimeGenerated: it is at 21 o’clock. It is the aggregation for that hourly bucket from 20:00 to 21:00</li>    <li>SampleCount - the aggregation was computed using 12 samples (one every 5 minutes)</li>    <li>the minimum, maximum and 95th percentile for the hourly bucket was – in this case for memory for one of my VM’s – always 6144 (megabytes)</li>    <li>‘SampleValue’ – back to it - since this record is a hourly aggregate, ‘SampleValue’ is populated with the AVERAGE for the hourly bucket. </li>    <ul>     <li>this field is what is used to plot the performance charts</li>      <li>we left this name (rather than a more explicit Avg) because this way we can later introduce ‘raw’ (non pre-aggregated) performance data (where ‘SampleValue’ will be the actual value picked from perfmon at a specific time, unprocessed) and by keeping this field name the same, both the per chart as well as the most common queries you’d write will continue to work, unchanged, across ‘raw’ or ‘aggregated’ data.</li>   </ul> </ul>  <p>So after all this explaining of the PerfHourly record ‘shape’, and having read the previous blog posts, you can now understand how to use measure Avg() to aggregate this type of very ‘numerical’ data.</p>  <p>Simple example:</p>  <p><strong>Type=PerfHourly&#160; ObjectName:Processor&#160; InstanceName:_Total&#160; CounterName:&quot;% Processor Time&quot;<font style="background-color: rgb(255, 255, 0);"> | Measure Avg(SampleValue) by Computer</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0675.image_148D00A0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0675.image_5F00_148D00A0.png"><img title="Type=PerfHourly  ObjectName:Processor  InstanceName:_Total  CounterName:&quot;% Processor Time&quot; | Measure Avg(SampleValue) by Computer" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="Type=PerfHourly  ObjectName:Processor  InstanceName:_Total  CounterName:&quot;% Processor Time&quot; | Measure Avg(SampleValue) by Computer" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/6545.image_thumb_1DE8C5D4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/6545.image_5F00_thumb_5F00_1DE8C5D4.png" width="640" height="360" /></a></p>  <p>By now, with all the previous blog posts and examples and filtering and using measure with other functions, this should be clear – we select the CPU Total Time performance counter and we ask an Average by Computer. Easy.</p>  <p>You might notice that, since ‘SampleValue’ is already an average, you are really asking an average of an average. That’s correct with Type=PerfHourly at the moment, but you see where this will be more precise and useful when we’ll have a raw Type=Perf, or similar, not pre-aggregated. For the time being, we suggest always throwing a filter on TimeGenerated (see <a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-ii-more-on-filtering-using-boolean-operators-and-the-time-dimension.aspx">2nd post</a> where we talked about time filters) to restrict the operation to a small/recent dataset – i.e. the last 4 hours, not 7 days! </p>  <p>So our query above becomes</p>  <p><strong>Type=PerfHourly&#160; ObjectName:Processor&#160; InstanceName:_Total&#160; CounterName:&quot;% Processor Time&quot;<font style="background-color: rgb(255, 255, 0);"> <font style="background-color: rgb(0, 255, 0);">TimeGenerated&gt;NOW-4HOURS </font>| Measure Avg(SampleValue) by Computer</font></strong></p>  <p>Try it now. You will see this recent average will generally be higher.</p>  <p>Or with a twist, you could calculate the average of the Maximum hourly values, i.e.</p>  <p><strong>Type=PerfHourly&#160; ObjectName:Processor&#160; InstanceName:_Total&#160; CounterName:&quot;% Processor Time&quot;<font style="background-color: rgb(255, 255, 0);"> <font style="background-color: rgb(0, 255, 0);">TimeGenerated&gt;NOW-4HOURS </font>| Measure Avg(<font style="background-color: rgb(247, 150, 70);">Max</font>) by Computer</font></strong></p>  <p>&#160;</p>  <p>Even more interesting – one of my absolute favorite scenarios – is aggregating/correlating data ACROSS machines, something that was VERY HARD to do with System Center Operations Manager and something I really wanted to simplify.</p>  <p>Let’s imagine we have a set of hosts in some sort of farm where each node is equal to any other one and they just do all the same type of work and load should be roughly balanced… I could get their counters all in one go with the following query and get averages for the entire farm! Let’s start with choosing the computers</p>  <p><strong>Type=PerfHourly AND (Computer=”SERVER1.contoso.com” OR Computer=”SERVER2.contoso.com” OR Computer=”SERVER3.contoso.com”)</strong></p>  <p>(note that today you have to do an OR – but this could become a subsearch in the future, that could be used to express a ‘dynamic group’ – check out and vote this idea on our feedback forum in this regard <a title="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519209-allow-subqueries-in-the-search-language-in-not" href="https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519209-allow-subqueries-in-the-search-language-in-not">https://feedback.azure.com/forums/267889-azure-operational-insights/suggestions/6519209-allow-subqueries-in-the-search-language-in-not</a>&#160;</p>  <p>&#160;</p>  <p>In any case, now that we have the computers, we also only want to select two KPI – % CPU Usage and % Free Disk Space. This part of the query becomes:</p>  <p><strong>Type=PerfHourly&#160; <font style="background-color: rgb(255, 255, 0);">InstanceName:_Total</font>&#160; <font style="background-color: rgb(255, 192, 0);">((ObjectName:Processor AND CounterName:&quot;% Processor Time&quot;)</font> OR <font style="background-color: rgb(255, 192, 0);">(ObjectName=&quot;LogicalDisk&quot; AND CounterName=&quot;% Free Space&quot;))</font> AND TimeGenerated&gt;NOW-4HOURS</strong></p>  <p>If we now put all together – machines and counters:</p>  <p><strong>Type=PerfHourly&#160; <font style="background-color: rgb(255, 255, 0);">InstanceName:_Total</font>&#160; <font style="background-color: rgb(255, 192, 0);">((ObjectName:Processor AND CounterName:&quot;% Processor Time&quot;)</font> OR <font style="background-color: rgb(255, 192, 0);">(ObjectName=&quot;LogicalDisk&quot; AND CounterName=&quot;% Free Space&quot;))</font> AND TimeGenerated&gt;NOW-4HOURS AND (Computer=”SERVER1.contoso.com” OR Computer=”SERVER2.contoso.com” OR Computer=”SERVER3.contoso.com”)</strong></p>  <p>and now that we have this very specific selection, the <strong>measure Avg()</strong> command can tell us the average not by computer, by across the farm, simply by grouping by CounterName:</p>  <p><strong><font style="background-color: rgb(255, 255, 0);"></font></strong><strong>Type=PerfHourly&#160; InstanceName:_Total&#160; ((ObjectName:Processor AND CounterName:&quot;% Processor Time&quot;) OR (ObjectName=&quot;LogicalDisk&quot; AND CounterName=&quot;% Free Space&quot;)) AND TimeGenerated&gt;NOW-4HOURS AND (Computer=”SERVER1.contoso.com” OR Computer=”SERVER2.contoso.com” OR Computer=”SERVER3.contoso.com”)<font style="background-color: rgb(255, 255, 0);"> | Measure Avg(SampleValue) by CounterName</font></strong></p>  <p>which gives me this beautiful compact view over a couple of my farm’s KPI’s – at a glance I know:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/7115.image_48C129E6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/7115.image_5F00_48C129E6.png"><img title="| measure avg(SampleValue) by CounterName" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="| measure avg(SampleValue) by CounterName" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/5700.image_thumb_0480C29A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/5700.image_5F00_thumb_5F00_0480C29A.png" width="640" height="284" /></a></p>  <p>and this, btw, looks great in a <a href="https://blogs.technet.com/b/momteam/archive/2014/10/16/custom-dashboard-in-advisor.aspx">dashboard</a>:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/6064.image_165D5667.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/6064.image_5F00_165D5667.png"><img title="image" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0118.image_thumb_2AE2A5E5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0118.image_5F00_thumb_5F00_2AE2A5E5.png" width="640" height="335" /></a></p>  <p>I am hoping with these examples you are starting to see how easy it is to quickly look at your environment’s data with the use of the search filters and commands.</p>  <p>Till next time, happy searching!</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Operational Insights Search HowTo: Part V – Max() and Min() Statistical functions with Measure command</title>
      <link>https://docs.microsoft.com/archive/blogs/dmuscett/azure-operational-insights-search-howto-part-v-max-and-min-statistical-functions-with-measure-command</link>
      <pubDate>Wed, 29 Oct 2014 13:36:30 GMT</pubDate>
      <dc:creator><![CDATA[Daniele Muscetta]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dmuscett/2014/10/29/azure-operational-insights-search-howto-part-v-max-and-min-statistical-functions-with-measure-command/</guid>
      <description><![CDATA[This is the fifth installment of a Series (I don’t know yet how many posts they will be in the end,...]]></description>
      <content:encoded><![CDATA[<p>This is the fifth installment of a Series (I don’t know yet how many posts they will be in the end, but I had at least 5 in mind at this point… and as I am writing I realize I won’t be done with this one…) that walks thru the concepts of <strong>Microsoft Azure Operational Insights</strong> Search Syntax – while <a href="https://go.microsoft.com/fwlink/?LinkId=394544">the full documentation and syntax reference is here</a>, these posts are meant to guide your first steps with practical examples. I’ll start very simple, and build upon each example, so you can get an understanding of practical use cases for how to use the syntax to extract the insights you need from the data.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-first-steps-how-to-filter-data-part-i.aspx">In my first post</a> I introduced filtering, querying by keyword or by a field’s exact value match, and some Boolean operators.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-ii-more-on-filtering-using-boolean-operators-and-the-time-dimension.aspx">In the second post</a> I built upon the concepts of the first one, and introduced some more complex flavors of filters that are possible. Now you should know all you need to <strong><em>extract</em></strong> the data set you need.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/19/advisor-search-how-to-part-iii-manipulating-results-the-pipeline-and-search-commands.aspx">In the third post</a> I introduced the use of the pipeline symbol “|” and how to shape your results with search commands.</p>  <p><a href="https://blogs.msdn.com/b/dmuscett/archive/2014/10/29/operational-insights-search-how-to-part-iv-introducing-the-measure-command.aspx">In the fourth post</a> I introduced our most powerful command – <strong>measure</strong> – and used it with just the simplest of the statistical functions: <strong>count()</strong>.</p>  <p>&#160;</p>  <p>So let’s continue from where we left, and let’s explore some of the other statistical functions you can use with <strong>measure</strong>.</p>  <h2>Measure Max() and Measure Min()</h2>  <p>There are various scenarios where these are useful. I will only illustrate Max() and will leave Min() as an exercise for the reader – since it does the exact opposite of the other one.</p>  <p>Let’s start with a simple example. If I query for ‘Advisor’ Configuration Assessment Alerts, they have a ‘Severity’ property which is either 0,1 or 2 (meaning info/warning/critical):</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1346.image_5E3318D7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1346.image_5F00_5E3318D7.png"><img title="Type=Alert" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=Alert" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0513.image_thumb_47079E59.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0513.image_5F00_thumb_5F00_47079E59.png" width="640" height="360" /></a></p>  <p>If I want to see what is the HIGHEST value for all of the alerts given a common ‘Computer’ (the ‘group by’ field), I can write</p>  <p><strong>Type=Alert <font style="background-color: rgb(255, 255, 0);">| Measure Max(Severity) by Computer</font></strong></p>  <p>and it will show me that – for the computers that had ‘Alert’ records, most of them have at least a critical one, and the ‘BaconSCOM’ machine has a warning as ‘worst’ severity:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8154.image_719D9C2D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8154.image_5F00_719D9C2D.png"><img title="Type=Alert | Measure Max(Severity) by Computer" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=Alert | Measure Max(Severity) by Computer" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/8475.image_thumb_5E155DEE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/8475.image_5F00_thumb_5F00_5E155DEE.png" width="640" height="360" /></a></p>  <p>This of course works well with NUMBERs, but it can also work with DateTime fields, i.e. it is very useful to check what is the last/most recent timestamp for any piece of data indexed for each computer, i.e.</p>  <p>When was the most recent configuration change reported by change tracking Intelligence Pack for each machine?</p>  <p><strong>Type=ConfigurationChange<font style="background-color: rgb(255, 255, 0);"> | Measure Max(TimeGenerated) by Computer</font></strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/1754.image_5F21B0CB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/1754.image_5F00_5F21B0CB.png"><img title="Type=ConfigurationChange | Measure Max(TimeGenerated) by Computer" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="Type=ConfigurationChange | Measure Max(TimeGenerated) by Computer" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/41/89/metablogapi/0020.image_thumb_1A75168A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-41-89-metablogapi/0020.image_5F00_thumb_5F00_1A75168A.png" width="640" height="360" /></a></p>  <p>&#160;</p>  <p>Hope this got you started on measure Max() – now try measure Min().</p>  <p>In the next Installment we’ll look at the AVG (average) statistical function with the measure command – particularly interesting with performance/capacity data!</p>  <p>Stay tuned for that, and happy searching!</p>]]></content:encoded>
    </item>
  </channel>
</rss>