<?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 Search Question: Event Sampling in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392272#M190799</link>
    <description>&lt;P&gt;Does anyone know of a good way to pull one event of a specific eventcode/type when searching for multiple eventcodes?&lt;/P&gt;

&lt;P&gt;It doesn't appear that event sampling can do something like that.&lt;/P&gt;

&lt;P&gt;I was hoping to run a search for all Windows EventCodes and to only return one event of each type.&lt;/P&gt;

&lt;P&gt;Is that possible?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Andrew&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2019 18:16:34 GMT</pubDate>
    <dc:creator>adalbor</dc:creator>
    <dc:date>2019-07-18T18:16:34Z</dc:date>
    <item>
      <title>Search Question: Event Sampling</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392272#M190799</link>
      <description>&lt;P&gt;Does anyone know of a good way to pull one event of a specific eventcode/type when searching for multiple eventcodes?&lt;/P&gt;

&lt;P&gt;It doesn't appear that event sampling can do something like that.&lt;/P&gt;

&lt;P&gt;I was hoping to run a search for all Windows EventCodes and to only return one event of each type.&lt;/P&gt;

&lt;P&gt;Is that possible?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Andrew&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 18:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392272#M190799</guid>
      <dc:creator>adalbor</dc:creator>
      <dc:date>2019-07-18T18:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Search Question: Event Sampling</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392273#M190800</link>
      <description>&lt;P&gt;@adalbor for the community to assist you better can you please add more details? What are the fields you have/are interested in and what is does your current SPL/data looks like?&lt;/P&gt;

&lt;P&gt;Can you try one of the following?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourSearchToPullData&amp;gt;
| dedup EventCode
| table EventCode *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or with stats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourSearchToPullData&amp;gt;
| stats latest(*) as * by EventCode
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jul 2019 02:35:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392273#M190800</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-19T02:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Search Question: Event Sampling</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392274#M190801</link>
      <description>&lt;P&gt;That was too easy! Thank you!&lt;BR /&gt;
I used&lt;BR /&gt;
index=wineventlog&lt;BR /&gt;
 | dedup EventCode&lt;BR /&gt;
 | table EventCode,Message&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 14:05:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392274#M190801</guid>
      <dc:creator>adalbor</dc:creator>
      <dc:date>2019-07-19T14:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Search Question: Event Sampling</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392275#M190802</link>
      <description>&lt;P&gt;@adalbor I have converted my comment to answer. Please accept to mark this question as answered. Also, if you have used dedup also add fields before dedup to retain only the fields you are interested in.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=wineventlog
 | fields EventCode Message
 | dedup EventCode
 | table EventCode Message
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jul 2019 16:31:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Question-Event-Sampling/m-p/392275#M190802</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-19T16:31:41Z</dc:date>
    </item>
  </channel>
</rss>

