<?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 setup a timechart showing three different statuses? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302968#M91174</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;thanks for the quick response.&lt;BR /&gt;
i'm going to add a screenshot&lt;BR /&gt;
As you can see, it only shows the last status, and a timeline showing the duration of the "process". I'd like to see the duration of the other two processes as well. This is my problem.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Apr 2018 10:55:49 GMT</pubDate>
    <dc:creator>ThomasLehenberg</dc:creator>
    <dc:date>2018-04-05T10:55:49Z</dc:date>
    <item>
      <title>How to setup a timechart showing three different statuses?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302965#M91171</link>
      <description>&lt;P&gt;I want to set up a timechart, showing three different status. Now I found this SPL online, which was modified by myself. The problem still is that it only shows the time range of the last STATUS. How can I adapt the other ones to the chart?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
     | eval _raw = "DATETIME:     2017-07-11 08:04:06.99 -0700    STATUS:     STATUS1    MSGTXT:     ENDED - TIME=08.04.06"
     | eval _time = strptime("2017-07-11 08:04:06.99 -0700","%Y-%m-%d %H:%M:%S") 
     | eval _raw = "DATETIME:     2017-07-11 08:04:06.99 -0700    STATUS:     STATUS2    MSGTXT:     ENDED - TIME=08.04.06"
     | eval _time = strptime("2017-07-11 08:00:06.99 -0700","%Y-%m-%d %H:%M:%S")
     | eval _raw = "DATETIME:     2017-07-11 08:04:06.99 -0700    STATUS:     STAU  MSGTXT:     ENDED - TIME=08.04.06"
     | eval _time = strptime("2017-07-11 08:04:06.99 -0700","%Y-%m-%d %H:%M:%S")
     | append [| makeresults 
               | eval _raw = "DATETIME:     2017-07-11 06:53:40.50 -0700   STATUS:     STATUS1    MSGTXT:     STARTED - TIME=06.53.40 "
               | eval _time = strptime("2017-07-11 06:53:40.50 -0700","%Y-%m-%d %H:%M:%S")]
  | append [| makeresults 
               | eval _raw = "DATETIME:     2017-07-11 06:53:40.50 -0700   STATUS:     STATUS2    MSGTXT:     STARTED - TIME=06.53.40 "
               | eval _time = strptime("2017-07-11 06:53:40.50 -0700","%Y-%m-%d %H:%M:%S")
                 | append [| makeresults 
               | eval _raw = "DATETIME:     2017-07-11 06:53:40.50 -0700   STATUS:     STAU    MSGTXT:     STARTED - TIME=06.53.40 "
               | eval _time = strptime("2017-07-11 06:53:40.50 -0700","%Y-%m-%d %H:%M:%S")
     | rex field=_raw "STATUS:\s+(?&amp;lt;STATUS&amp;gt;\w+)\s+"
     | stats min(_time) as _time max(_time) as ENDTIME by STATUS
     | eval duration=ENDTIME-_time
     | table _time STATUS duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Apr 2018 13:08:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302965#M91171</guid>
      <dc:creator>ThomasLehenberg</dc:creator>
      <dc:date>2018-04-04T13:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a timechart showing three different statuses?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302966#M91172</link>
      <description>&lt;P&gt;There are some issues with the SPL you pasted.  But I also don't see a timechart.  What value are you trying to timechart?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 14:23:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302966#M91172</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-04-04T14:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a timechart showing three different statuses?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302967#M91173</link>
      <description>&lt;P&gt;Simple example:&lt;/P&gt;

&lt;P&gt;Lets's say you have 3 events:&lt;/P&gt;

&lt;P&gt;2017-07-11 08:04:07.99 STATUS=STARTED&lt;BR /&gt;
2017-07-11 08:04:08.99 STATUS=ENDED&lt;BR /&gt;
2017-07-11 08:04:09.99 STATUS=RUNNING  &lt;/P&gt;

&lt;P&gt;See: &lt;A href="https://imgur.com/a/7gRrw"&gt;https://imgur.com/a/7gRrw&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can run your spl query:&lt;/P&gt;

&lt;P&gt;source="timechart.txt" sourcetype="sourcetypestatus" | timechart count by STATUS.&lt;BR /&gt;
You will get a table where _time is the first column (X-Axis) and the subsequent columns (STARTED ENDED and RUNNING) provide the Y-Axis values).&lt;/P&gt;

&lt;P&gt;See: &lt;A href="https://imgur.com/a/03yol"&gt;https://imgur.com/a/03yol&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This is the simplest form of timecharting results &lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 10:55:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302967#M91173</guid>
      <dc:creator>Azeemering</dc:creator>
      <dc:date>2018-04-05T10:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a timechart showing three different statuses?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302968#M91174</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;thanks for the quick response.&lt;BR /&gt;
i'm going to add a screenshot&lt;BR /&gt;
As you can see, it only shows the last status, and a timeline showing the duration of the "process". I'd like to see the duration of the other two processes as well. This is my problem.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 10:55:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-setup-a-timechart-showing-three-different-statuses/m-p/302968#M91174</guid>
      <dc:creator>ThomasLehenberg</dc:creator>
      <dc:date>2018-04-05T10:55:49Z</dc:date>
    </item>
  </channel>
</rss>

