<?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 create time chart group by time and userId in #Random</title>
    <link>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524425#M60</link>
    <description>&lt;P&gt;You don't need to extract timestamps since Splunk does that for you.&amp;nbsp; The _time field is not available for a timechart because the stats command discarded it.&amp;nbsp; Try this query, instead.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="tim" logGroup="/ecs/sit-ol-service-validator" "logEvents{}.message"="*Validating the User with userID*" 
| spath output=myfield path=logEvents{}.message 
| rex field=myfield "Validating the User with userID:(?&amp;lt;userId&amp;gt;[0-9]+) systemID:" 
| fields userId 
| timechart span=1d count by userId&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 13 Oct 2020 13:52:49 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-10-13T13:52:49Z</dc:date>
    <item>
      <title>How to create time chart group by time and userId</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524385#M59</link>
      <description>&lt;P&gt;I have the below log text&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="multivalue-subcell"&gt;2020-10-12 12:30:22.538 INFO 1 --- [ener-4] c.t.t.o.s.service.recServi : received users : {"userId":"12333","userType":"Normal"}&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;2020-10-12 12:30:22.538 INFO 1 --- [ener-4] c.t.t.o.s.service.recServi : Received usertype is:Normal&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;2020-10-12 12:30:22.540 INFO 1 --- [ener-4] c.t.t.o.s.s.ReceiverPrepaidService : Validating the User with userID:1233 systemID:111wdsa&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;2020-10-12 12:30:22.540 INFO 1 --- [ener-4] c.t.t.o.s.util.Common : The Reason Code is valid for UserId: 12333 userId:12333&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;2020-10-12 12:30:22.577 INFO 1 --- [ener-4] c.t.t.o.s.r.OlServiceValidatorDao : Saving User into DB ..... with User-ID:12333&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;........&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;again same type of lines&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;I need to extract the userId and timestamp from&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;line : Validating the User with userID:1233 systemID:111wdsa&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;I am able to extract userId and group by it with count&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;index="tim" logGroup="/ecs/strr" "logEvents{}.message"="*Validating the User with userID*" | spath output=myfield path=logEvents{}.message | rex field=myfield "(?&amp;lt;=Validating the User with userID*:)(?&amp;lt;userId&amp;gt;[0-9]+)(?= systemID:)"&amp;nbsp;&amp;nbsp;table userId | dedup userId | stats count values(userId) by userId&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;but can not extract the time stamp and create the time chart with userId group by timestamp from all log text&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;Any help would really help ful for us&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Oct 2020 03:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524385#M59</guid>
      <dc:creator>rajarshi2576</dc:creator>
      <dc:date>2020-10-14T03:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create time chart group by time and userId</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524425#M60</link>
      <description>&lt;P&gt;You don't need to extract timestamps since Splunk does that for you.&amp;nbsp; The _time field is not available for a timechart because the stats command discarded it.&amp;nbsp; Try this query, instead.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="tim" logGroup="/ecs/sit-ol-service-validator" "logEvents{}.message"="*Validating the User with userID*" 
| spath output=myfield path=logEvents{}.message 
| rex field=myfield "Validating the User with userID:(?&amp;lt;userId&amp;gt;[0-9]+) systemID:" 
| fields userId 
| timechart span=1d count by userId&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Oct 2020 13:52:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524425#M60</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-10-13T13:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create time chart group by time and userId</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524520#M61</link>
      <description>&lt;P&gt;It returns null as a table column&amp;nbsp; I exclude it by usenull=f&lt;/P&gt;&lt;P&gt;It is giving userId wise count like for Today :&lt;/P&gt;&lt;P&gt;userId1 in below row count 2 userId2 in below count 3.&lt;/P&gt;&lt;P&gt;_time&amp;nbsp; |&amp;nbsp; &amp;nbsp; userId1&amp;nbsp; | userId2 | Null&lt;/P&gt;&lt;P&gt;2020-10-14 | 11&amp;nbsp; &amp;nbsp;| 0&amp;nbsp; &amp;nbsp; &amp;nbsp; | 11&lt;/P&gt;&lt;P&gt;2020-10-13 | 10 |&amp;nbsp; &amp;nbsp;0 |&amp;nbsp; &amp;nbsp; &amp;nbsp; 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I want per day total userId. let say for today total userId: 5 (not individually).&lt;/P&gt;&lt;P&gt;_time |&amp;nbsp; &amp;nbsp; total |&lt;/P&gt;&lt;P&gt;2020-10-14| 11 |&lt;/P&gt;&lt;P&gt;2020-10-13| 12&amp;nbsp; |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope its clear now&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 04:28:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524520#M61</guid>
      <dc:creator>rajarshi2576</dc:creator>
      <dc:date>2020-10-14T04:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create time chart group by time and userId</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524563#M62</link>
      <description>&lt;P&gt;Solved&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="tim" logGroup="/ecs/sit-ol-service-validator" "logEvents{}.message"="*Validating the User with userID*" 
| spath output=myfield path=logEvents{}.message 
| rex field=myfield "Validating the User with userID:(?&amp;lt;userId&amp;gt;[0-9]+) systemID:" 
| fields dc(userId) 
| timechart span=1h dc(userId)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 Oct 2020 09:27:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524563#M62</guid>
      <dc:creator>rajarshi2576</dc:creator>
      <dc:date>2020-10-14T09:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create time chart group by time and userId</title>
      <link>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524622#M63</link>
      <description>&lt;P&gt;If your problem is resolved, then please click the "Accept as Solution" button to help future readers.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 13:28:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Random/How-to-create-time-chart-group-by-time-and-userId/m-p/524622#M63</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-10-14T13:28:39Z</dc:date>
    </item>
  </channel>
</rss>

