<?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 do I pull only specific status entries from a sourcetype at a given time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301917#M174995</link>
    <description>&lt;PRE&gt;index=your_index | table srno status | dedup srno | search status="open"&lt;/PRE&gt;

&lt;P&gt;dedup will give you the latest status of the tickets on which you filter for status that is open&lt;/P&gt;</description>
    <pubDate>Tue, 04 Apr 2017 15:55:33 GMT</pubDate>
    <dc:creator>pradeepkumarg</dc:creator>
    <dc:date>2017-04-04T15:55:33Z</dc:date>
    <item>
      <title>How do I pull only specific status entries from a sourcetype at a given time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301916#M174994</link>
      <description>&lt;P&gt;I have &lt;STRONG&gt;one source-type&lt;/STRONG&gt; with column names &lt;STRONG&gt;srno&lt;/STRONG&gt; for a ticket.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Scenario:&lt;/EM&gt;&lt;/STRONG&gt; Ticket status gets updated per it's life cycle/flow (i.e. first open, Assigned, workInProgress, Fixed, closed). For a same ticket, splunk would have a multiple entries in the source-type, as and when it gets updated. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Question&lt;/EM&gt;&lt;/STRONG&gt;: How do I find only tickets that are open at a given time?&lt;/P&gt;

&lt;P&gt;Example srno = 1, first it gets opened so status is open....while it moves through it's flow, the status gets changed and it is now in "closed" status&lt;BR /&gt;
Similarly srno = 2 is in Assigned status&lt;BR /&gt;
srno = 3 and 4 are in open status.&lt;/P&gt;

&lt;P&gt;Now, I want a query that only gives me srno 3 and 4 at this point as all others were opened before but now in different status so they should not appear in my result. ( In RDBMS world it is easy as there is only one record at a given time and we can have a where clause srno=open, however, splunk source type would have all the entries whenever a ticket gets updated)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;My current approach:&lt;/STRONG&gt;&lt;BR /&gt;
At this point , I first run a query for status!=open (without dedup srno) and download to excel and run a query for status=open (without dedup srno) and download to excel.  Grab results of both downloads and use vlookup in excel to get my desired result.&lt;/P&gt;

&lt;P&gt;does anyone think of any better solution in one query?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 14:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301916#M174994</guid>
      <dc:creator>AShah_2</dc:creator>
      <dc:date>2017-04-04T14:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull only specific status entries from a sourcetype at a given time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301917#M174995</link>
      <description>&lt;PRE&gt;index=your_index | table srno status | dedup srno | search status="open"&lt;/PRE&gt;

&lt;P&gt;dedup will give you the latest status of the tickets on which you filter for status that is open&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 15:55:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301917#M174995</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2017-04-04T15:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull only specific status entries from a sourcetype at a given time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301918#M174996</link>
      <description>&lt;P&gt;An alternative (almost same approach) will be &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=yourindex sourcetype=yoursourcetype | stats latest(status) as status by srno | where status="open"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Apr 2017 16:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301918#M174996</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-04T16:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull only specific status entries from a sourcetype at a given time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301919#M174997</link>
      <description>&lt;P&gt;Hi somesoni2, it helped me fixing my query. Thank you. Everything is right except I got my result by search vs. where you had "where".&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 16:43:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301919#M174997</guid>
      <dc:creator>AShah_2</dc:creator>
      <dc:date>2017-04-04T16:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull only specific status entries from a sourcetype at a given time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301920#M174998</link>
      <description>&lt;P&gt;this is how I made it worked.&lt;BR /&gt;
index=yourindex sourcetype=yoursourcetype | stats latest(status) as sts by srno | search sts!=Closed (I wanted all but closed)&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 16:46:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301920#M174998</guid>
      <dc:creator>AShah_2</dc:creator>
      <dc:date>2017-04-04T16:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull only specific status entries from a sourcetype at a given time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301921#M174999</link>
      <description>&lt;P&gt;Glad it helped.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 16:55:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-pull-only-specific-status-entries-from-a-sourcetype-at/m-p/301921#M174999</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2017-04-04T16:55:01Z</dc:date>
    </item>
  </channel>
</rss>

