<?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: Need Help with Timechart in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392017#M21165</link>
    <description>&lt;P&gt;Try "stats first(_time) as _time ..." and remove both the table and the eval line.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jan 2019 11:27:57 GMT</pubDate>
    <dc:creator>whrg</dc:creator>
    <dc:date>2019-01-04T11:27:57Z</dc:date>
    <item>
      <title>Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392010#M21158</link>
      <description>&lt;P&gt;......&lt;BR /&gt;
.....&lt;BR /&gt;
| table log_Time username | where username!="anonymous"&lt;/P&gt;

&lt;P&gt;And the output is as follows&lt;BR /&gt;
&lt;STRONG&gt;log_time                 user&lt;/STRONG&gt;&lt;BR /&gt;
2019-04-01 04:16    EMOLYB&lt;BR /&gt;
2019-04-01 04:13    JACKT67&lt;BR /&gt;
2019-04-01 03:57    SAMYYW&lt;BR /&gt;
2019-04-01 04:26    S8888W&lt;BR /&gt;
2019-04-01 04:36    srcRTtst&lt;BR /&gt;
2019-04-01 04:44    A00007&lt;BR /&gt;
2019-04-01 04:06    sUYTREt&lt;BR /&gt;
2019-04-01 04:40    B665449&lt;/P&gt;

&lt;P&gt;I want to know how many users were logged in a span of 15 min  for last 24 hour in a bar chart.&lt;BR /&gt;
I tried something like this after table command and it doesn't work.&lt;BR /&gt;
| timechart count(username) span=15m   (set time range to last 24 hours). But the visualization doesn't render anything  neither the statistics tab.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 09:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392010#M21158</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2019-01-04T09:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392011#M21159</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Assuming you are indexing data using log_time field ( means _time and log_time are same) please try the below search,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart  span=15m count(user)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392011#M21159</guid>
      <dc:creator>sdchakraborty</dc:creator>
      <dc:date>2020-09-29T22:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392012#M21160</link>
      <description>&lt;P&gt;timechart relies on the _time field. You are missing the _time field. That's why there are no results.&lt;/P&gt;

&lt;P&gt;Check out this thread: &lt;A href="https://answers.splunk.com/answers/145562/how-to-use-a-field-as-timestamp-for-a-timechart.html"&gt;how to use a field as timestamp for a timechart&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;You could create the _time field as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval _time=strptime(log_Time,"%Y-%m-%d %H:%M")
| timechart count(username) span=15m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not sure if it's supposed to be %Y-%m-%d or %Y-%d-%m since your example data is ambiguous.&lt;/P&gt;

&lt;P&gt;Also, I noted that once you wrote "username" and somewhere else "user". The field name should be the same.&lt;/P&gt;

&lt;P&gt;On a side note: You can also count distinct/unique users via dc(username) instead of count(username).&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 10:27:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392012#M21160</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2019-01-04T10:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392013#M21161</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;host=Ra20plpphu* sourcetype="bsa:phua:security" "HttpSession" | rex "(?:\S+\s){3}(?&amp;lt;user&amp;gt;\S+)\s\S+\s(?&amp;lt;session&amp;gt;\S+)\s.*?HttpSession (?:\[[^\]]+\]\s)?(?&amp;lt;action&amp;gt;\S+)?"
 | stats first(_time) as logonTime, latest(action) as action, latest(user) as user by session
 | where action="created"
| table logonTime user | where user!="anonymous"
| eval _time=strptime(logonTime,"%Y-%m-%d %H:%M")
 | timechart count(user) span=15m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It still won't visualize.&lt;BR /&gt;
The idea is to know the number of users active/logged in in a 15 min time span over a period of 24 hour&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 10:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392013#M21161</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2019-01-04T10:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392014#M21162</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;host=Ra20plpphu* sourcetype="bsa:phua:security" "HttpSession" | rex "(?:\S+\s){3}(?&amp;lt;user&amp;gt;\S+)\s\S+\s(?&amp;lt;session&amp;gt;\S+)\s.*?HttpSession (?:\[[^\]]+\]\s)?(?&amp;lt;action&amp;gt;\S+)?"
 | stats first(_time) as logonTime, latest(action) as action, latest(user) as user by session
 | where action="created"
| table logonTime user | where user!="anonymous"
| eval _time=strptime(logonTime,"%Y-%m-%d %H:%M")
 | timechart count(user) span=15m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;still won't work. I don't see visualization from timechart.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 10:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392014#M21162</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2019-01-04T10:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392015#M21163</link>
      <description>&lt;P&gt;there is no "username" field. It needs to be | timechart count(user) span=15m&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 10:48:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392015#M21163</guid>
      <dc:creator>sdchakraborty</dc:creator>
      <dc:date>2019-01-04T10:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392016#M21164</link>
      <description>&lt;P&gt;It was a typo error here. In actual code it is "user".&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 10:51:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392016#M21164</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2019-01-04T10:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392017#M21165</link>
      <description>&lt;P&gt;Try "stats first(_time) as _time ..." and remove both the table and the eval line.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 11:27:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392017#M21165</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2019-01-04T11:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Timechart</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392018#M21166</link>
      <description>&lt;P&gt;Thank you @whrg. This helped.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 11:34:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Need-Help-with-Timechart/m-p/392018#M21166</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2019-01-04T11:34:12Z</dc:date>
    </item>
  </channel>
</rss>

