<?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 Subsearch help - windows patching in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252683#M189346</link>
    <description>&lt;P&gt;Hi, I've managed to use a few subsearches in the past with pretty good success but this one is troubling myself and a colleague, our windows event logs are pipped into splunk, it would be great if we could use the following query to find any servers that have not been patched in the last 'x' days, here are the two searches that work independently;&lt;/P&gt;

&lt;P&gt;Last 'x' days&lt;BR /&gt;
index=winevent EventCode=19 Message="Installation Successful*"|transaction host|fields host&lt;BR /&gt;
Specific time window&lt;BR /&gt;
index=winevent EventCode=19 Message="Installation Successful*" earliest="09/01/2015:00:00:00" latest="10/16/2015:00:00:00"| transaction host | table host&lt;/P&gt;

&lt;P&gt;The second search has a date time range in it, to generate a list of all servers that were patched in that window, (found this to be a good way of getting a list of servers that should have been patched). I tried to put them together to make this;&lt;/P&gt;

&lt;P&gt;index=winevent host NOT [search index=winevent EventCode=19 Message="Installation Successful*"|transaction host|fields host] EventCode=19 Message="Installation Successful*" earliest="09/01/2015:00:00:00" latest="10/16/2015:00:00:00"| transaction host | table host&lt;/P&gt;

&lt;P&gt;but it fails, any ideas where I'm going wrong&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 08:00:37 GMT</pubDate>
    <dc:creator>jbeckwith</dc:creator>
    <dc:date>2020-09-29T08:00:37Z</dc:date>
    <item>
      <title>Subsearch help - windows patching</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252683#M189346</link>
      <description>&lt;P&gt;Hi, I've managed to use a few subsearches in the past with pretty good success but this one is troubling myself and a colleague, our windows event logs are pipped into splunk, it would be great if we could use the following query to find any servers that have not been patched in the last 'x' days, here are the two searches that work independently;&lt;/P&gt;

&lt;P&gt;Last 'x' days&lt;BR /&gt;
index=winevent EventCode=19 Message="Installation Successful*"|transaction host|fields host&lt;BR /&gt;
Specific time window&lt;BR /&gt;
index=winevent EventCode=19 Message="Installation Successful*" earliest="09/01/2015:00:00:00" latest="10/16/2015:00:00:00"| transaction host | table host&lt;/P&gt;

&lt;P&gt;The second search has a date time range in it, to generate a list of all servers that were patched in that window, (found this to be a good way of getting a list of servers that should have been patched). I tried to put them together to make this;&lt;/P&gt;

&lt;P&gt;index=winevent host NOT [search index=winevent EventCode=19 Message="Installation Successful*"|transaction host|fields host] EventCode=19 Message="Installation Successful*" earliest="09/01/2015:00:00:00" latest="10/16/2015:00:00:00"| transaction host | table host&lt;/P&gt;

&lt;P&gt;but it fails, any ideas where I'm going wrong&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:00:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252683#M189346</guid>
      <dc:creator>jbeckwith</dc:creator>
      <dc:date>2020-09-29T08:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch help - windows patching</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252684#M189347</link>
      <description>&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=winevent EventCode=19 Message="Installation Successful*" NOT  [index=winevent EventCode=19 Message="Installation Successful*" earliest="09/01/2015:00:00:00" latest="10/16/2015:00:00:00"|dedup host | fields host] | dedup host | fields host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Nov 2015 16:08:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252684#M189347</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-11-30T16:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch help - windows patching</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252685#M189348</link>
      <description>&lt;P&gt;Ah dedup, thank you!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=winevent EventCode=19 Message="Installation Successful*" earliest="09/01/2015:00:00:00" latest="10/30/2015:00:00:00" NOT [search index=winevent EventCode=19 Message="Installation Successful*"|dedup host | fields host] | dedup host | fields host | table host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once I put the query the right way around it works a treat, got my list of servers that haven't been patched in that time window&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 17:31:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252685#M189348</guid>
      <dc:creator>jbeckwith</dc:creator>
      <dc:date>2015-11-30T17:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch help - windows patching</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252686#M189349</link>
      <description>&lt;P&gt;If you're not already, recommend splunking the windowsupdate.log file too. Can do what you're looking for here as well as tell you how many patches are needed etc. &lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 05:25:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252686#M189349</guid>
      <dc:creator>brooklynotss</dc:creator>
      <dc:date>2015-12-01T05:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch help - windows patching</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252687#M189350</link>
      <description>&lt;P&gt;No problem. Do you mind accepting the answer? To help future forum users &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;JP&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 12:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-help-windows-patching/m-p/252687#M189350</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-12-01T12:40:43Z</dc:date>
    </item>
  </channel>
</rss>

