<?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: Working with eventtypes: how to solve duplicated rows into results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14180#M1461</link>
    <description>&lt;P&gt;Hi nik - eval thinks the '::' in the tag is an operator. When you have a field with special characters in an eval expression, surround that field with single quotes or dollar signs. Try this: eval what=mvfilter('tag::eventtype' LIKE "what-%")&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2010 04:15:35 GMT</pubDate>
    <dc:creator>Marklar</dc:creator>
    <dc:date>2010-06-22T04:15:35Z</dc:date>
    <item>
      <title>Working with eventtypes: how to solve duplicated rows into results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14176#M1457</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;

&lt;P&gt;I'm developing for a customer a very simple search. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;tag=mysourcetype tag=myeventtype startdaysago=7 tag= | stats count by _time,User_Name,"tag::eventtype" ....&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;An example could be as follow:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;tag::sourcetype=WINDOWS tag::eventtype=an_action startdaysago=7 tag=groupfoo | stats count by _time,User_Name,"tag::eventtype" ...&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I'm  using several eventtypes to identify :&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;an_action&lt;/STRONG&gt; = there are approximatly 60 eventcode saved as eventype to identify 5 categories of actions&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;groupfoo&lt;/STRONG&gt; =  there are eventtypes to identify those groups.&lt;/P&gt;

&lt;P&gt;Customer wants a simple table where is clear &lt;/P&gt;

&lt;P&gt;WHEN, WHO, WHAT.&lt;/P&gt;

&lt;P&gt;Troubles are regarding WHAT:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;| stats count by _time,User_Name,"tag::eventtype"&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;produces good rows (those regarding &lt;STRONG&gt;action&lt;/STRONG&gt; ) but also I get duplicated results because &lt;STRONG&gt;groupfoo&lt;/STRONG&gt; eventtypes. I mean that also goupfoo is defined as eventtype so for each time I get duplicated results: one (or more)  by the perspective of action and this is what I'm looking for. Another one by the perspective of groupfoo : this is the sum of all the previous rows.&lt;/P&gt;

&lt;P&gt;Using inputlookup command, results aren't better:&lt;/P&gt;

&lt;P&gt;I built a lookup table for all those events I'm interested in, but:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;|input lookup mylookuptable.csv&lt;/STRONG&gt;   ---&amp;gt; works&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;tag::sourcetype=WINDOWS  startdaysago=7 tag= [|input lookup mylookuptable.csv | format ]| stats count by _time,User_Name, ...&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;returns 0 events&lt;/P&gt;

&lt;P&gt;Where I wrong?&lt;/P&gt;

&lt;P&gt;Thanks in advance for your time and for any suggestions you would gently provide&lt;/P&gt;

&lt;P&gt;Nik&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2010 15:04:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14176#M1457</guid>
      <dc:creator>nik_splunk</dc:creator>
      <dc:date>2010-05-25T15:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Working with eventtypes: how to solve duplicated rows into results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14177#M1458</link>
      <description>&lt;P&gt;Hi Nik,&lt;/P&gt;

&lt;P&gt;I don't think that this is because of the output of the initial search, whether you use tag= or the inputlookup. Splunk will not emit the same event twice to the rest of the search string. The issue is probably that stats count will emit two rows if the tag::eventtype is a multivalued field (that is, there are two tags for the eventtype in the same event).&lt;/P&gt;

&lt;P&gt;The easiest thing to do here is to use the mvcombine command to flatten the tag::eventtype into a single valued field. You may want to filter out the tags to be those that match your "whats." For example, you may want to have the search be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag::sourcetype=WINDOWS tag::eventtype=an_action startdaysago=7 tag=groupfoo | eval what=mvfilter(tag::eventtype LIKE "what-%") | mvcombine what | stats count by _time,User_Name,what ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Jun 2010 03:48:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14177#M1458</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2010-06-05T03:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Working with eventtypes: how to solve duplicated rows into results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14178#M1459</link>
      <description>&lt;P&gt;Hi Stephen,&lt;/P&gt;

&lt;P&gt;thanks so much for your time: I really appreciate your support and your professionalism.&lt;/P&gt;

&lt;P&gt;Have a good day!&lt;/P&gt;

&lt;P&gt;nik&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jun 2010 18:11:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14178#M1459</guid>
      <dc:creator>nik_splunk</dc:creator>
      <dc:date>2010-06-06T18:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Working with eventtypes: how to solve duplicated rows into results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14179#M1460</link>
      <description>&lt;P&gt;piping&lt;/P&gt;

&lt;P&gt;eval what=mvfilter(tag::eventtype LIKE "what-%") exits with this error&lt;/P&gt;

&lt;P&gt;Error in 'eval' command: Malformed expression - ) expected.&lt;/P&gt;

&lt;P&gt;Any IDEA? Tks&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2010 22:08:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14179#M1460</guid>
      <dc:creator>nik_splunk</dc:creator>
      <dc:date>2010-06-21T22:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Working with eventtypes: how to solve duplicated rows into results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14180#M1461</link>
      <description>&lt;P&gt;Hi nik - eval thinks the '::' in the tag is an operator. When you have a field with special characters in an eval expression, surround that field with single quotes or dollar signs. Try this: eval what=mvfilter('tag::eventtype' LIKE "what-%")&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2010 04:15:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14180#M1461</guid>
      <dc:creator>Marklar</dc:creator>
      <dc:date>2010-06-22T04:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Working with eventtypes: how to solve duplicated rows into results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14181#M1462</link>
      <description>&lt;P&gt;Hello Marklar, sorry for my 'silly' question but  You're absolutely right..Thanks a lot !&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2010 15:10:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Working-with-eventtypes-how-to-solve-duplicated-rows-into/m-p/14181#M1462</guid>
      <dc:creator>nik_splunk</dc:creator>
      <dc:date>2010-06-23T15:10:30Z</dc:date>
    </item>
  </channel>
</rss>

