<?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: Can Sum multiple | eval &amp;quot;@@@&amp;quot;  as action1| eval &amp;quot;###&amp;quot; as action2 | eval &amp;quot;%%%&amp;quot; as action3 | stats count by user ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156754#M44093</link>
    <description>&lt;P&gt;update ping&lt;/P&gt;</description>
    <pubDate>Thu, 09 Oct 2014 06:14:02 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-10-09T06:14:02Z</dc:date>
    <item>
      <title>Can Sum multiple | eval "@@@"  as action1| eval "###" as action2 | eval "%%%" as action3 | stats count by user ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156751#M44090</link>
      <description>&lt;P&gt;Hello every one &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="abc"  user="12345678" | eval '"@@@" as action1| eval "###" as action2 | eval "$$$$" as actions2 | stats count by userID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are 90 logline contains "@@@".&lt;/P&gt;

&lt;P&gt;There are 90 logline contains "###".&lt;/P&gt;

&lt;P&gt;There are 90 logline contains "$$$$".&lt;/P&gt;

&lt;P&gt;All the "@@@" "### " "$$$$" are in the theRest field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;result
action1      90
action2     190
action3       3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you all in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2014 23:59:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156751#M44090</guid>
      <dc:creator>DavisXie</dc:creator>
      <dc:date>2014-10-08T23:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can Sum multiple | eval "@@@"  as action1| eval "###" as action2 | eval "%%%" as action3 | stats count by user ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156752#M44091</link>
      <description>&lt;P&gt;Hi DavisXie,&lt;/P&gt;

&lt;P&gt;not quiet sure what you want to do, but this is not the way &lt;CODE&gt;eval&lt;/CODE&gt; works. If you want to use &lt;CODE&gt;eval&lt;/CODE&gt; do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="abc"  user="12345678" | eval action1=like(theRest, "created%") | eval action2=like(theRest, "submit%") | eval action3=like(theRest, "quit%") | stats count by user, action1, action2, action3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But usually if you want to get the actions from your events, you would get them into some field first and then do stuff with them. Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="abc"  user="12345678" | rex field=theRest "(?&amp;lt;action&amp;gt;(created)|(submit)|(quit))" | stats count by user, action
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;rex&lt;/CODE&gt; field extraction can later be set as automatic field extraction &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.4/Knowledge/Addfieldsatsearchtime"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.4/Knowledge/Addfieldsatsearchtime&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 05:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156752#M44091</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-10-09T05:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can Sum multiple | eval "@@@"  as action1| eval "###" as action2 | eval "%%%" as action3 | stats count by user ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156753#M44092</link>
      <description>&lt;P&gt;After copying the "There are 90 logline contains "###", forgot to edit the numbers.&lt;/P&gt;

&lt;P&gt;Question &lt;BR /&gt;
host="abc"  user="12345678" | eval '"&lt;EM&gt;created&lt;/EM&gt;" as action1| eval "&lt;EM&gt;submit&lt;/EM&gt;" as action2 | eval "&lt;EM&gt;quit&lt;/EM&gt;" as actions2 | stats count by userID&lt;/P&gt;

&lt;P&gt;There are 90 logline contains "created".&lt;BR /&gt;
There are 190 logline contains "submit".&lt;BR /&gt;
There are  3  logline contains "quit".&lt;/P&gt;

&lt;P&gt;All the "created" "submit" "quit" are in the theRest field.&lt;/P&gt;

&lt;P&gt;result&lt;BR /&gt;
 action1      90&lt;BR /&gt;
 action2     190&lt;BR /&gt;
 action3       3&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 05:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156753#M44092</guid>
      <dc:creator>DavisXie</dc:creator>
      <dc:date>2014-10-09T05:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can Sum multiple | eval "@@@"  as action1| eval "###" as action2 | eval "%%%" as action3 | stats count by user ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156754#M44093</link>
      <description>&lt;P&gt;update ping&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 06:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-Sum-multiple-eval-quot-quot-as-action1-eval-quot-quot-as/m-p/156754#M44093</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-10-09T06:14:02Z</dc:date>
    </item>
  </channel>
</rss>

