<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use Stats and Eval to count how many times &amp;quot;Microsoft&amp;quot; is included in the OS? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Stats-and-Eval-to-count-how-many-times-quot-Microsoft/m-p/184033#M52999</link>
    <description>&lt;P&gt;How could I search these stat fields? I am trying to search  these fields in a drill down. The user can pick all or the name of the OS. I can't figure out how to. I am trying to do it something like this. &lt;/P&gt;

&lt;P&gt;| search values(OS_Detected)=="$OS_Detected$"&lt;/P&gt;

&lt;P&gt;If i just search OS_Detected=$OS_Detected$ I will not return the other events with other info. I am trying really hard to not use a join.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:23:44 GMT</pubDate>
    <dc:creator>mgubser</dc:creator>
    <dc:date>2020-09-28T17:23:44Z</dc:date>
    <item>
      <title>How to use Stats and Eval to count how many times "Microsoft" is included in the OS?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Stats-and-Eval-to-count-how-many-times-quot-Microsoft/m-p/184031#M52997</link>
      <description>&lt;P&gt;I am reading nessus discovery scan logs and the way nessus formats their data is by separating fields by events. They run one test on an IP and get one result so for one IP they could have 30 events one having the Host Name, OS, Device type, etc.. When I use&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Stats values(Computer_Name) values(Device_Type) values(Domain_Name) values(Device_FQDN) values(Device_HostName) values(MAC_Address) values(OS_Detected) values(Computer_Name) by Host 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get all the fields I wanna see by Host(IP). I am unaware on how to search a specific stat to include a phrase as apposed to match it. If I do &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats count(eval(OS_Detected=="Microsoft*")) AS Microsoft
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get a new field Microsoft that is all 0's&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats count(eval(OS_Detected=="Microsoft Windows 7 Enterprise")) AS Microsoft
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get a 1 in that field for the ones that match&lt;/P&gt;

&lt;P&gt;Thanks, Matt&lt;/P&gt;</description>
      <pubDate>Fri, 15 Aug 2014 20:34:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Stats-and-Eval-to-count-how-many-times-quot-Microsoft/m-p/184031#M52997</guid>
      <dc:creator>mgubser</dc:creator>
      <dc:date>2014-08-15T20:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Stats and Eval to count how many times "Microsoft" is included in the OS?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Stats-and-Eval-to-count-how-many-times-quot-Microsoft/m-p/184032#M52998</link>
      <description>&lt;P&gt;Use it like this (your current stats 'count(eval(OS_Detected=="Microsoft*"))' doesn't treat "*" as wildcard but a regular character, hence 0 count)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats count(eval(like(OS_Detected,"Microsoft%")) AS Microsoft
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Aug 2014 20:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Stats-and-Eval-to-count-how-many-times-quot-Microsoft/m-p/184032#M52998</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-15T20:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Stats and Eval to count how many times "Microsoft" is included in the OS?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Stats-and-Eval-to-count-how-many-times-quot-Microsoft/m-p/184033#M52999</link>
      <description>&lt;P&gt;How could I search these stat fields? I am trying to search  these fields in a drill down. The user can pick all or the name of the OS. I can't figure out how to. I am trying to do it something like this. &lt;/P&gt;

&lt;P&gt;| search values(OS_Detected)=="$OS_Detected$"&lt;/P&gt;

&lt;P&gt;If i just search OS_Detected=$OS_Detected$ I will not return the other events with other info. I am trying really hard to not use a join.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:23:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Stats-and-Eval-to-count-how-many-times-quot-Microsoft/m-p/184033#M52999</guid>
      <dc:creator>mgubser</dc:creator>
      <dc:date>2020-09-28T17:23:44Z</dc:date>
    </item>
  </channel>
</rss>

