<?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: How to edit my search to view all occurrences of an event grouped by a field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251174#M75033</link>
    <description>&lt;P&gt;Insert the list of email to monitor in a lookup and try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup email_lookup.csv | eval count=0 | append [ search yoursearch | stats values(_time) AS _time count by email ] | stats values(_time) AS _time sum(count) AS Total by email
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this way you have for each email the sum of events and the list of timestamps, and 0 for emails without events.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe &lt;/P&gt;</description>
    <pubDate>Tue, 11 Oct 2016 16:28:05 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2016-10-11T16:28:05Z</dc:date>
    <item>
      <title>How to edit my search to view all occurrences of an event grouped by a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251170#M75029</link>
      <description>&lt;P&gt;Every time a user logs in, there is a log statement generated. I am currently running a search for a specific set of users:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=* OR index=_*) Message:LoginActivity:loggedIn email="email1@gmail.com" OR email="email2@gmail.com" OR email="email3@gmail.com"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How would I get a table that shows all of the e-mails, how many times they logged in, and the timestamps of each login? I would envision the table looking something like:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2009i71D628EB7A470675/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 16:03:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251170#M75029</guid>
      <dc:creator>emamedov</dc:creator>
      <dc:date>2016-10-11T16:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to view all occurrences of an event grouped by a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251171#M75030</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | stats count as "Number of Logins" values(_time) as Timestamps by Email
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Oct 2016 16:06:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251171#M75030</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-11T16:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to view all occurrences of an event grouped by a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251172#M75031</link>
      <description>&lt;P&gt;That works to get the e-mails that are in the query. There are multiple OR statements (I am trying to identify if a specific set of users have logged in). Is there any way to include the emails in the conditional statement, and if there are no events, present a 0. The purpose of this would be to see who hasn't logged in.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 16:10:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251172#M75031</guid>
      <dc:creator>emamedov</dc:creator>
      <dc:date>2016-10-11T16:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to view all occurrences of an event grouped by a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251173#M75032</link>
      <description>&lt;P&gt;Where do you get the specific set of users? Is that in a .csv file somewhere? If it is, you can create a &lt;CODE&gt;lookup&lt;/CODE&gt; file of all emails and try something like this (lookup file must have a field called email and data should be identical with index data)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup lookupfilewithemailsids.csv | where NOT [ search (index= OR index=_) Message:LoginActivity:loggedIn email=* | table email ]  | table email | eval count=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Oct 2016 16:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251173#M75032</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-11T16:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to view all occurrences of an event grouped by a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251174#M75033</link>
      <description>&lt;P&gt;Insert the list of email to monitor in a lookup and try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup email_lookup.csv | eval count=0 | append [ search yoursearch | stats values(_time) AS _time count by email ] | stats values(_time) AS _time sum(count) AS Total by email
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this way you have for each email the sum of events and the list of timestamps, and 0 for emails without events.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe &lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 16:28:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-view-all-occurrences-of-an-event/m-p/251174#M75033</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-10-11T16:28:05Z</dc:date>
    </item>
  </channel>
</rss>

