<?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: stats count sum in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350265#M103723</link>
    <description>&lt;P&gt;Thanks, does exactly waht i want&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 08:36:20 GMT</pubDate>
    <dc:creator>kokanne</dc:creator>
    <dc:date>2018-03-15T08:36:20Z</dc:date>
    <item>
      <title>stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350259#M103717</link>
      <description>&lt;P&gt;Why does the following query not display the number of logins and logouts&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="ggg-sec") EventCode=4624 OR EventCode=4634 
    [| inputlookup dfggfdf.csv] 
| stats count sum(EventCode = "4624") as LogIns, sum(EventCode = "4634") as LogOuts by user 
| fields - count 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 08:13:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350259#M103717</guid>
      <dc:creator>kokanne</dc:creator>
      <dc:date>2018-03-15T08:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350260#M103718</link>
      <description>&lt;P&gt;Hey kokanne,&lt;/P&gt;

&lt;P&gt;Try this:&lt;BR /&gt;
     (index="wineventlog-sec") EventCode=4624 OR EventCode=4634 &lt;BR /&gt;
     [| inputlookup sv_externe_leveranciers.csv] &lt;BR /&gt;
    |eval Condition=case(EventCode == 4624,"Logins",EventCode == 4634,"LogOuts") |stats count by Condition,user&lt;BR /&gt;
Let me know if this helps!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:27:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350260#M103718</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2020-09-29T18:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350261#M103719</link>
      <description>&lt;P&gt;Error in 'eval' command: The arguments to the 'case' function are invalid.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 08:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350261#M103719</guid>
      <dc:creator>kokanne</dc:creator>
      <dc:date>2018-03-15T08:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350262#M103720</link>
      <description>&lt;P&gt;I have edited, can you try now!!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 08:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350262#M103720</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2018-03-15T08:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350263#M103721</link>
      <description>&lt;P&gt;Hi @kokanne, &lt;/P&gt;

&lt;P&gt;Can you please try it by replacing &lt;CODE&gt;stats&lt;/CODE&gt; with this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count sum(eval(EventCode = "4624")) as LogIns, sum(eval(EventCode = "4634")) as LogOuts by user 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (index="wineventlog-sec") EventCode=4624 OR EventCode=4634 
     [| inputlookup sv_externe_leveranciers.csv] 
| stats count sum(eval(EventCode = "4624")) as LogIns, sum(eval(EventCode = "4634")) as LogOuts by user 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 08:31:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350263#M103721</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-03-15T08:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350264#M103722</link>
      <description>&lt;P&gt;It works, but I would like instead of a column called "Condition", that the column is called either log in or log out, is that possible, and then also user and the count&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 08:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350264#M103722</guid>
      <dc:creator>kokanne</dc:creator>
      <dc:date>2018-03-15T08:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350265#M103723</link>
      <description>&lt;P&gt;Thanks, does exactly waht i want&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 08:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350265#M103723</guid>
      <dc:creator>kokanne</dc:creator>
      <dc:date>2018-03-15T08:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350266#M103724</link>
      <description>&lt;P&gt;do you know how to speed it up? @kamlesh_vaghela&lt;/P&gt;

&lt;P&gt;it takes 34 minutes to run this query for last 24 hours, i need this to run every month for a monthly report&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 09:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350266#M103724</guid>
      <dc:creator>kokanne</dc:creator>
      <dc:date>2018-03-15T09:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350267#M103725</link>
      <description>&lt;P&gt;is there any reason for using lookup?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 09:40:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350267#M103725</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2018-03-15T09:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350268#M103726</link>
      <description>&lt;P&gt;for the user names&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 09:43:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350268#M103726</guid>
      <dc:creator>kokanne</dc:creator>
      <dc:date>2018-03-15T09:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: stats count sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350269#M103727</link>
      <description>&lt;P&gt;You need to accelerate your report. &lt;BR /&gt;
Mind that setting the schedule and time window for your acceleration should be according to your need.&lt;BR /&gt;
E.g. If you want this report monthly for the last month.&lt;/P&gt;

&lt;P&gt;I think you can probably set the acceleration schedule for last midnight of the day when you want this report. And set the time window of your search also to last month.&lt;/P&gt;

&lt;P&gt;Please upvote if this helps you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 07:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-sum/m-p/350269#M103727</guid>
      <dc:creator>amitm05</dc:creator>
      <dc:date>2018-05-07T07:57:57Z</dc:date>
    </item>
  </channel>
</rss>

