<?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 Display results of search that are not in result of subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515681#M144796</link>
    <description>&lt;P&gt;I have events sent from a configuration management tool that may either contain a status of 'Job Started', or 'Job Completed'. My goal is to write a search that shows me events that are still in progress. My way of doing this is to have a search that looks for events by job ID, where there is a 'Job Started' event for that ID, but no 'Job Completed' event.&lt;BR /&gt;&lt;BR /&gt;Job started search is simple, and I can successfully return a list of job ID's that have an event with the status "Job Started":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=cm_tool event_status="Job Started" 
| table job_id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Similar to the job started search, the job completed search is just as easy:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=cm_tool event_status="Job Completed"
| table job_id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do now, is show in a table only the job_ids that have results returned from the first search, but do not have a completed event as returned in the second search. Effectively, I'd like to see a list of unique job_id's with a started event, but no completed event. I've played around with sub-searches, however I am not having a ton of luck.&lt;BR /&gt;&lt;BR /&gt;How might I go about doing this?&lt;/P&gt;</description>
    <pubDate>Mon, 24 Aug 2020 04:15:09 GMT</pubDate>
    <dc:creator>JARFB</dc:creator>
    <dc:date>2020-08-24T04:15:09Z</dc:date>
    <item>
      <title>Display results of search that are not in result of subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515681#M144796</link>
      <description>&lt;P&gt;I have events sent from a configuration management tool that may either contain a status of 'Job Started', or 'Job Completed'. My goal is to write a search that shows me events that are still in progress. My way of doing this is to have a search that looks for events by job ID, where there is a 'Job Started' event for that ID, but no 'Job Completed' event.&lt;BR /&gt;&lt;BR /&gt;Job started search is simple, and I can successfully return a list of job ID's that have an event with the status "Job Started":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=cm_tool event_status="Job Started" 
| table job_id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Similar to the job started search, the job completed search is just as easy:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=cm_tool event_status="Job Completed"
| table job_id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do now, is show in a table only the job_ids that have results returned from the first search, but do not have a completed event as returned in the second search. Effectively, I'd like to see a list of unique job_id's with a started event, but no completed event. I've played around with sub-searches, however I am not having a ton of luck.&lt;BR /&gt;&lt;BR /&gt;How might I go about doing this?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 04:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515681#M144796</guid>
      <dc:creator>JARFB</dc:creator>
      <dc:date>2020-08-24T04:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Display results of search that are not in result of subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515685#M144798</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225347"&gt;@JARFB&lt;/a&gt;&amp;nbsp;, this should help to get that,&lt;/P&gt;&lt;P&gt;Index=cm_tool event_status=&lt;SPAN&gt; "Job Started"&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp;OR event_status=&lt;SPAN&gt; "Job Completed"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;|stats values(event_status) as event_status by job_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;|&amp;nbsp; eval matches = if(match(event_status,"*Job Completed*"), 1, 0)&lt;BR /&gt;|where match=0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Please upvote my response if this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 05:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515685#M144798</guid>
      <dc:creator>Nisha18789</dc:creator>
      <dc:date>2020-08-24T05:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Display results of search that are not in result of subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515845#M144841</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/215670"&gt;@Nisha18789&lt;/a&gt;&amp;nbsp;- With a minor correction to the last line (match -&amp;gt; matches), this helped get me going. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 17:29:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515845#M144841</guid>
      <dc:creator>JARFB</dc:creator>
      <dc:date>2020-08-24T17:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Display results of search that are not in result of subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515848#M144843</link>
      <description>&lt;P&gt;thats great&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225347"&gt;@JARFB&lt;/a&gt;&amp;nbsp;, sorry for the typo.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 17:45:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-results-of-search-that-are-not-in-result-of-subsearch/m-p/515848#M144843</guid>
      <dc:creator>Nisha18789</dc:creator>
      <dc:date>2020-08-24T17:45:31Z</dc:date>
    </item>
  </channel>
</rss>

