<?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 Post Processing Search as default in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417125#M5042</link>
    <description>&lt;P&gt;I have multiple logs with the same unique field.&lt;BR /&gt;
for instance:&lt;/P&gt;

&lt;P&gt;Time: 10:00:00 Log-id: 0x1212 Message: ABCD&lt;BR /&gt;
Time: 10:00:11 Log-id: 0x5565 Message: EFG&lt;BR /&gt;
Time: 12:00:00 Log-id: 0x1212 Message: HIJK&lt;BR /&gt;
Time: 10:00:00 Log-id: 0x5565 Message: LMNO&lt;BR /&gt;
Time: 16:05:00 Log-id: 0x1212 Message: PQR&lt;/P&gt;

&lt;P&gt;I would like that &lt;STRONG&gt;for every query&lt;/STRONG&gt; user does, before showing query results, to filter out the results and to return only the latest log (Time field) for each unique log (Log-id field).&lt;/P&gt;

&lt;P&gt;I have many dashboards and search bars and I would like that this will happen &lt;STRONG&gt;automatically&lt;/STRONG&gt; for each query.&lt;BR /&gt;
Is it possible? If so, Can anyone help me with this?&lt;/P&gt;</description>
    <pubDate>Thu, 24 May 2018 08:37:39 GMT</pubDate>
    <dc:creator>shayhibah</dc:creator>
    <dc:date>2018-05-24T08:37:39Z</dc:date>
    <item>
      <title>Post Processing Search as default</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417125#M5042</link>
      <description>&lt;P&gt;I have multiple logs with the same unique field.&lt;BR /&gt;
for instance:&lt;/P&gt;

&lt;P&gt;Time: 10:00:00 Log-id: 0x1212 Message: ABCD&lt;BR /&gt;
Time: 10:00:11 Log-id: 0x5565 Message: EFG&lt;BR /&gt;
Time: 12:00:00 Log-id: 0x1212 Message: HIJK&lt;BR /&gt;
Time: 10:00:00 Log-id: 0x5565 Message: LMNO&lt;BR /&gt;
Time: 16:05:00 Log-id: 0x1212 Message: PQR&lt;/P&gt;

&lt;P&gt;I would like that &lt;STRONG&gt;for every query&lt;/STRONG&gt; user does, before showing query results, to filter out the results and to return only the latest log (Time field) for each unique log (Log-id field).&lt;/P&gt;

&lt;P&gt;I have many dashboards and search bars and I would like that this will happen &lt;STRONG&gt;automatically&lt;/STRONG&gt; for each query.&lt;BR /&gt;
Is it possible? If so, Can anyone help me with this?&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 08:37:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417125#M5042</guid>
      <dc:creator>shayhibah</dc:creator>
      <dc:date>2018-05-24T08:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Post Processing Search as default</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417126#M5043</link>
      <description>&lt;P&gt;@shayhibah, if your raw events are already sorted in reverse chronological with Time order and fields are extracted including &lt;CODE&gt;Log_id&lt;/CODE&gt;, you just need &lt;CODE&gt;dedup&lt;/CODE&gt; based on Log_id field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourBaseSearch&amp;gt;
| dedup Log_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If they are not you would need to create field extraction and sort results in reverse chonological order by &lt;CODE&gt;Time&lt;/CODE&gt;. Refer to the following example with run anywhere search based on your sample data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults
|  eval data="Time: 10:00:00 Log-id: 0x1212 Message: ABCD;Time: 10:00:11 Log-id: 0x5565 Message: EFG;Time: 12:00:00 Log-id: 0x1212 Message: HIJK;Time: 10:00:00 Log-id: 0x5565 Message: LMNO;Time: 16:05:00 Log-id: 0x1212 Message: PQR"
|  makemv data delim=";"
|  mvexpand data
|  rename data as _raw
|  rex "Time: (?&amp;lt;Time&amp;gt;[^\s]+)\sLog-id: (?&amp;lt;Log_id&amp;gt;[^\s]+)\sMessage: (?&amp;lt;Message&amp;gt;.*)"
|  sort - Time
|  dedup Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 May 2018 10:27:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417126#M5043</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-24T10:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Post Processing Search as default</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417127#M5044</link>
      <description>&lt;P&gt;Hi niketnilay,&lt;/P&gt;

&lt;P&gt;First - thank you for your response.&lt;/P&gt;

&lt;P&gt;I do know the dedup command but - I want that it will happen automatically for each query or out-of-the-box dashboard.&lt;BR /&gt;
I dont wanna change every dashboard query or tell the user to add it whenever he send query using search bar.&lt;/P&gt;

&lt;P&gt;Is there any configuration file to define that each query, before return the results to the user, do "dedup" on the result?&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 11:54:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417127#M5044</guid>
      <dc:creator>shayhibah</dc:creator>
      <dc:date>2018-05-24T11:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Post Processing Search as default</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417128#M5045</link>
      <description>&lt;P&gt;Instead of calling a base search you can create a macro and within the macro you can also have dedup command.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 11:58:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417128#M5045</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-24T11:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Post Processing Search as default</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417129#M5046</link>
      <description>&lt;P&gt;May I ask for example? how to connect the macro to some sourcetype I've created?&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 12:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Post-Processing-Search-as-default/m-p/417129#M5046</guid>
      <dc:creator>shayhibah</dc:creator>
      <dc:date>2018-05-24T12:56:41Z</dc:date>
    </item>
  </channel>
</rss>

