<?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 How to use timestamp as x axis in chart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timestamp-as-x-axis-in-chart/m-p/609850#M212073</link>
    <description>&lt;P&gt;Currently I have used a similar query to what is below to plot data on a 24 hour graph.&lt;/P&gt;
&lt;PRE&gt;index=mock_index source=mock_source.log param1 param2 param3&lt;BR /&gt;| rex field=_raw "Latency: (?&amp;lt;latency&amp;gt;[0-9]+)"&lt;BR /&gt;| eval time = mvjoin(mvindex(split(_raw, " "), 0, 1), " ")&lt;BR /&gt;| eval time = strptime(time, "%Y-%m-%d %H:%M:%S,%3N")&lt;BR /&gt;| table time, latency&lt;/PRE&gt;
&lt;P&gt;An example event:&lt;/P&gt;
&lt;PRE&gt;2022-08-16 14:04:34,123 INFO [stuff] Latency: 55 [stuff]&lt;/PRE&gt;
&lt;P&gt;Ideally I would like to get latency averages over 5 minute periods, and display the data to a graph where the x-axis labels 30 minute intervals.&amp;nbsp; Given this goal, is strptime() the best way to manage the timestamps in my events?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 18:47:28 GMT</pubDate>
    <dc:creator>firstname</dc:creator>
    <dc:date>2022-08-17T18:47:28Z</dc:date>
    <item>
      <title>How to use timestamp as x axis in chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timestamp-as-x-axis-in-chart/m-p/609850#M212073</link>
      <description>&lt;P&gt;Currently I have used a similar query to what is below to plot data on a 24 hour graph.&lt;/P&gt;
&lt;PRE&gt;index=mock_index source=mock_source.log param1 param2 param3&lt;BR /&gt;| rex field=_raw "Latency: (?&amp;lt;latency&amp;gt;[0-9]+)"&lt;BR /&gt;| eval time = mvjoin(mvindex(split(_raw, " "), 0, 1), " ")&lt;BR /&gt;| eval time = strptime(time, "%Y-%m-%d %H:%M:%S,%3N")&lt;BR /&gt;| table time, latency&lt;/PRE&gt;
&lt;P&gt;An example event:&lt;/P&gt;
&lt;PRE&gt;2022-08-16 14:04:34,123 INFO [stuff] Latency: 55 [stuff]&lt;/PRE&gt;
&lt;P&gt;Ideally I would like to get latency averages over 5 minute periods, and display the data to a graph where the x-axis labels 30 minute intervals.&amp;nbsp; Given this goal, is strptime() the best way to manage the timestamps in my events?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 18:47:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timestamp-as-x-axis-in-chart/m-p/609850#M212073</guid>
      <dc:creator>firstname</dc:creator>
      <dc:date>2022-08-17T18:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timestamp as x axis in chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timestamp-as-x-axis-in-chart/m-p/609861#M212074</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;why not use just timechart command?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=mock_index source=mock_source.log param1 param2 param3
| rex field=_raw "Latency: (?&amp;lt;latency&amp;gt;[0-9]+)"
| timechart span=5m avg(latency) as latency&lt;/LI-CODE&gt;&lt;P&gt;I expecting that your event's _time is same as your examples date + time.&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 19:58:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timestamp-as-x-axis-in-chart/m-p/609861#M212074</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-08-17T19:58:38Z</dc:date>
    </item>
  </channel>
</rss>

