<?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 show text values in a timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230637#M68387</link>
    <description>&lt;P&gt;My comments are &lt;STRONG&gt;not&lt;/STRONG&gt; saved for unknown reason&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2016 13:10:58 GMT</pubDate>
    <dc:creator>edwinmae</dc:creator>
    <dc:date>2016-03-04T13:10:58Z</dc:date>
    <item>
      <title>How to show text values in a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230633#M68383</link>
      <description>&lt;P&gt;I have the following information extracted from the log file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;03.03.2016 04:46:23 : Execution time in minutes: 4,37056666666667
03.03.2016 04:16:17 : Execution time in minutes: 4,2685
03.03.2016 03:46:15 : Execution time in minutes: 4,25025
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I extract new fields (using space), I will get 8 fields, Meaning I am able to filter the time (like 4,37056) for field 8&lt;BR /&gt;
table _time and field8 --&amp;gt; and I'll get the &lt;EM&gt;date/time&lt;/EM&gt; like &lt;CODE&gt;03.03.2016 04:46:23&lt;/CODE&gt; and the &lt;EM&gt;Execution time&lt;/EM&gt; like &lt;CODE&gt;4.37056&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now, when I want to show the &lt;EM&gt;date/time&lt;/EM&gt; and &lt;EM&gt;Execution times&lt;/EM&gt; in, for example, a line graph, it's &lt;STRONG&gt;empty&lt;/STRONG&gt; -- I have the &lt;EM&gt;date/time&lt;/EM&gt; (X-axis) and &lt;EM&gt;Execution time&lt;/EM&gt; (Y-axis) &lt;/P&gt;

&lt;P&gt;Unfortunately the graph is empty ..&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 07:33:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230633#M68383</guid>
      <dc:creator>edwinmae</dc:creator>
      <dc:date>2016-03-03T07:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to show text values in a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230634#M68384</link>
      <description>&lt;P&gt;It would help if you showed the actual Splunk commands.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 23:41:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230634#M68384</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-03T23:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to show text values in a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230635#M68385</link>
      <description>&lt;P&gt;Assuming that you have a field named &lt;CODE&gt;execution_time&lt;/CODE&gt;, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| convert num(execution_time) as exec_time 
| sort _time
| table _time exec_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Although this would probably make a better time chart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| convert num(execution_time) as exec_time 
| timechart avg(exec_time) as Avg_Execution_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Mar 2016 23:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230635#M68385</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-03T23:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to show text values in a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230636#M68386</link>
      <description>&lt;P&gt;Original search:&lt;BR /&gt;
index = xxxxx sourcetype = xxxxx host = xxxxx source = "Log-File" field4 = Execution field5 = time field6 = in field7 = "minutes:" Execution_Time = "*"&lt;/P&gt;

&lt;P&gt;04.03.2016 10:19:47 : Execution time in minutes: 6,77968333333333&lt;BR /&gt;
04.03.2016 09:19:36 : Execution time in minutes: 6,60625&lt;BR /&gt;
04.03.2016 08:48:48 : Execution time in minutes: 5,80391666666667&lt;BR /&gt;
04.03.2016 08:18:33 : Execution time in minutes: 5,5466&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Adding | table _time Execution_Time    &lt;EM&gt;-- this is how it should look in graph -- date/time on the X-as and Execution Time in minutes on the Y-as&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;2016-03-04 10:19:47     6,77968333333333&lt;BR /&gt;
2016-03-04 09:19:36     6,60625&lt;BR /&gt;
2016-03-04 08:48:48     5,80391666666667&lt;BR /&gt;
2016-03-04 08:18:33     5,5466 &lt;/P&gt;

&lt;P&gt;Visualization: X-as and Y-as look OK, but the graph is empty &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;When adding |  convert num(Execution_Time) as exec_time | table _time exec_time&lt;/P&gt;

&lt;P&gt;2016-03-04 10:19:47     677968333333333&lt;BR /&gt;
2016-03-04 09:19:36     660625&lt;BR /&gt;
2016-03-04 08:48:48     580391666666667&lt;BR /&gt;
2016-03-04 08:18:33     55466&lt;BR /&gt;
2016-03-04 07:48:30     54875 &lt;/P&gt;

&lt;P&gt;When I | timechart avg(exec_time) as Avg_Execution_Time I (now) get values in the graph -- unfortunately these are incorrect (=unusable). &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;I am new to Splunk, so all help is appreciated here&lt;/P&gt;

&lt;P&gt;Target is to get these execution times in  minutes in graph with some alerts configured e.g. if 'execution time' &amp;gt; 10 (minutes)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:58:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230636#M68386</guid>
      <dc:creator>edwinmae</dc:creator>
      <dc:date>2020-09-29T08:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to show text values in a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230637#M68387</link>
      <description>&lt;P&gt;My comments are &lt;STRONG&gt;not&lt;/STRONG&gt; saved for unknown reason&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 13:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230637#M68387</guid>
      <dc:creator>edwinmae</dc:creator>
      <dc:date>2016-03-04T13:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to show text values in a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230638#M68388</link>
      <description>&lt;P&gt;Okay, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=log_file
| rex "Execution time in minutes: (?&amp;lt;exec_time&amp;gt;\S+)"
| eval Execution_time = tonumber(replace(exec_time, ",", "." ))
| timechart avg(Execution_time) as Avg_Execution_Time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or substitute the following for the timechart command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| sort _time
| table _time Execution_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem with the earlier answer is that Splunk interpreted the comma in the execution time as a thousands separator. And there was a typo, which I have corrected.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 22:07:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230638#M68388</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-04T22:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to show text values in a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230639#M68389</link>
      <description>&lt;P&gt;The following worked and reflected the correct values in the 'graph':&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "Execution time in minutes: (?\S+)" 
| eval Execution_time = tonumber(replace(exec_time, ",", "." ))
| sort _time
| table _time Execution_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;Also the following did the job&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=Execution_Time mode=sed "s/,/./g" 
| table _time Execution_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Mar 2016 08:00:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230639#M68389</guid>
      <dc:creator>edwinmae</dc:creator>
      <dc:date>2016-03-07T08:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to show text values in a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230640#M68390</link>
      <description>&lt;P&gt;Thanks for your help Iguinn!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 05:17:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-text-values-in-a-timechart/m-p/230640#M68390</guid>
      <dc:creator>edwinmae</dc:creator>
      <dc:date>2016-03-09T05:17:58Z</dc:date>
    </item>
  </channel>
</rss>

