<?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: Filtering by OS in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509158#M142265</link>
    <description>&lt;P&gt;Are you ingesting the WinHostMon data?&lt;/P&gt;&lt;P&gt;Check using this search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype=WinHostMon source=operatingsystem
| stats count by OS host&lt;/LI-CODE&gt;&lt;P&gt;If you're, than this should help&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype=WinHostMon source=operatingsystem 
| stats values(OS) as OS by host
| append 
    [search index=myindex sourcetype=wineventlog source=WinEventLog:Security
| stats VALUES(EventCode) AS EventCode BY host ]
| stats VALUES(*) AS * BY host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 02:24:04 GMT</pubDate>
    <dc:creator>anmolpatel</dc:creator>
    <dc:date>2020-07-15T02:24:04Z</dc:date>
    <item>
      <title>Filtering by OS</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509143#M142261</link>
      <description>&lt;P&gt;I have the outcome of my search results but I want to filter by only OS.&amp;nbsp; I was able to get all the results but need to filter it down to Windows Server OS's.&amp;nbsp; What am I missing?&lt;/P&gt;&lt;P&gt;Current search:&amp;nbsp; index="myindex" "eventcode=NUMBER"&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 21:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509143#M142261</guid>
      <dc:creator>johnfrias</dc:creator>
      <dc:date>2020-07-14T21:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by OS</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509147#M142263</link>
      <description>&lt;P&gt;Can you provide an example of your data, otherwise it's impossible to know how OS is represented as a Splunk field.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 22:29:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509147#M142263</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-07-14T22:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by OS</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509158#M142265</link>
      <description>&lt;P&gt;Are you ingesting the WinHostMon data?&lt;/P&gt;&lt;P&gt;Check using this search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype=WinHostMon source=operatingsystem
| stats count by OS host&lt;/LI-CODE&gt;&lt;P&gt;If you're, than this should help&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype=WinHostMon source=operatingsystem 
| stats values(OS) as OS by host
| append 
    [search index=myindex sourcetype=wineventlog source=WinEventLog:Security
| stats VALUES(EventCode) AS EventCode BY host ]
| stats VALUES(*) AS * BY host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 02:24:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509158#M142265</guid>
      <dc:creator>anmolpatel</dc:creator>
      <dc:date>2020-07-15T02:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by OS</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509295#M142318</link>
      <description>&lt;P&gt;Thanks for your response.&amp;nbsp; The first command against my index didn't populate any data.&amp;nbsp; I did this for any other of my indexes and nothing came up as well.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 13:07:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509295#M142318</guid>
      <dc:creator>johnfrias</dc:creator>
      <dc:date>2020-07-15T13:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering by OS</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509320#M142327</link>
      <description>&lt;P&gt;Splunk can only help if you have the data available to filter. As someone else mentioned, winhostmon data will get OS data into Splunk. I use the Splunk Windows TA to get this data into Splunk. Then when I want to search on a specific class, I use a subsearch&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main EventCode=4624 Logon_Type=2 
[index=windows OS="Microsoft Windows 10*"  |  fields host]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That subsearch looks for all systems with a Windows 10 variant (enterprise, pro, etc) and effectively adds the hostnames as an 'OR' to your base search - basically it becomes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main EventCode=4624 Logon_Type=2 host1 OR host2 OR host3 OR host4&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you don't have OS data in Splunk, but need the data now, you may be able to get creative and use the host name if you have a good naming convention in place - that is, if you know all workstations are running Win 10 Pro, and all workstation names start with WKS, you could simply use something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main host=wks* EventCode=4624 Logon_Type=2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;That last example would just be a bandaid solution though - I wouldn't use that as a long term solution as naming conventions tend to change or systems are named improperly and then you have bad data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 14:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-by-OS/m-p/509320#M142327</guid>
      <dc:creator>danielansell</dc:creator>
      <dc:date>2020-07-15T14:25:55Z</dc:date>
    </item>
  </channel>
</rss>

