<?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 into a timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273663#M82535</link>
    <description>&lt;P&gt;That did the trick! Thanks so much! &lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2017 16:57:10 GMT</pubDate>
    <dc:creator>jpringle03</dc:creator>
    <dc:date>2017-02-02T16:57:10Z</dc:date>
    <item>
      <title>How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273655#M82527</link>
      <description>&lt;P&gt;In a past post someone helped me create the following search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=duo extracted_eventtype=authentication result="SUCCESS" earliest=-90d | eval Period=if(_time&amp;gt;=relative_time(now(),"-7d"),1,2)  | stats max(Period) as periods by username | where periods=1 | chart count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm looking for help with turning this same count into a timechart looking at things a certain amount of time back (in this -7) and then always -90 back and seeing which ones only exist in the -7 timeframe.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 01:30:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273655#M82527</guid>
      <dc:creator>jpringle03</dc:creator>
      <dc:date>2017-02-02T01:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273656#M82528</link>
      <description>&lt;P&gt;Give this a try. Will give you timechart of count of users in last 7 days which have never logged in before (for 7 to 90 day period)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=duo extracted_eventtype=authentication result="SUCCESS" earliest=-7d NOT [search source=duo extracted_eventtype=authentication result="SUCCESS" earliest=-90d latest=-7d | stats count by username | table username] | timechart dc(username) as count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Feb 2017 05:04:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273656#M82528</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-02T05:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273657#M82529</link>
      <description>&lt;P&gt;Since your original query simply has a chart count at the end, and you want it to be a timechart, why not change the end terms to timechart count? You can change the span of 7 days (7d) into something bigger or smaller depending on how you want the view to look. Given that you're going 90 days back, I figured a week span was appropriate.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=duo extracted_eventtype=authentication result="SUCCESS" earliest=-90d | eval Period=if(_time&amp;gt;=relative_time(now(),"-7d"),1,2)  | stats max(Period) as periods by username | where periods=1 | timechart span=7d count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Feb 2017 10:57:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273657#M82529</guid>
      <dc:creator>adayton20</dc:creator>
      <dc:date>2017-02-02T10:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273658#M82530</link>
      <description>&lt;P&gt;This actually just returns no results at all which it shouldn't be doing.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 16:04:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273658#M82530</guid>
      <dc:creator>jpringle03</dc:creator>
      <dc:date>2017-02-02T16:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273659#M82531</link>
      <description>&lt;P&gt;Hey! This did definitely give me some data but it appears to be returning multiple events for the same users within the -7 day period. Is there a way to restrict it to unique count of the term username?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 16:05:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273659#M82531</guid>
      <dc:creator>jpringle03</dc:creator>
      <dc:date>2017-02-02T16:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273660#M82532</link>
      <description>&lt;P&gt;Well you requested a timechart and it is doing unique count. Since the time range is 7 days for timechart there could be duplicate. &lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 16:15:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273660#M82532</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-02T16:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273661#M82533</link>
      <description>&lt;P&gt;Perhaps my request wasn't specific enough or what I'm looking for isn't possible. Still within those 7 days I want it to be unique usernames total that its counting so if "Bob" has never authenticated between -7d and -90 but &lt;EM&gt;does&lt;/EM&gt; authenticate multiple times in -7d it should only count him as one.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 16:25:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273661#M82533</guid>
      <dc:creator>jpringle03</dc:creator>
      <dc:date>2017-02-02T16:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273662#M82534</link>
      <description>&lt;P&gt;Lets give this a try then. Takes the first login time of a users, within last 7 days, so that they will be counted once, all other logic still there.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=duo extracted_eventtype=authentication result="SUCCESS" earliest=-7d NOT [search source=duo extracted_eventtype=authentication result="SUCCESS" earliest=-90d latest=-7d | stats count by username | table username]  | stats min(_time) as _time by username | timechart dc(username) as count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Feb 2017 16:33:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273662#M82534</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-02T16:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search into a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273663#M82535</link>
      <description>&lt;P&gt;That did the trick! Thanks so much! &lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 16:57:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-into-a-timechart/m-p/273663#M82535</guid>
      <dc:creator>jpringle03</dc:creator>
      <dc:date>2017-02-02T16:57:10Z</dc:date>
    </item>
  </channel>
</rss>

