<?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: timechart not giving expected result in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401670#M42589</link>
    <description>&lt;P&gt;Can you please add in these places too and try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table SOR_NAME FEED_NAME sla_time

|fields SOR_NAME FEED_NAME FILE_ARRIVALTIME FILE_ARRIVALTIME_epoch
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Feb 2019 14:19:01 GMT</pubDate>
    <dc:creator>vnravikumar</dc:creator>
    <dc:date>2019-02-19T14:19:01Z</dc:date>
    <item>
      <title>timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401666#M42585</link>
      <description>&lt;P&gt;hey guys,&lt;/P&gt;

&lt;P&gt;i m planning to draw a trend using timechart command , for some reason the timechart command showing no results but when i used stats or chart command its functioning correct. &lt;/P&gt;

&lt;P&gt;following is the query i m using, can any one help me to get the  correct query&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;| inputlookup SLA.csv  | rex field=SOR_TDQ_FAIL_SLA_THRESHOLD "(?P.&lt;EM&gt;)\,(?.&lt;/EM&gt;)" | eval sla_time = case(date="BUS_DT+1",strftime(now(),"%Y-%m-%d").",".time,date="BUS_DT+0",strftime(relative_time(time(), "-d"),"%Y-%m-%d".",".time)) | eval sla_time=replace (sla_time,","," ") | eval sla_time=sla_time + ":00" | table SOR_NAME FEED_NAME sla_time | dedup SOR_NAME FEED_NAME | join type=outer SOR_NAME FEED_NAME [search index=xxx source=xxx  earliest_time=@d |rex "info\s:\s+{4}\sSTARTED\s+{4}\sJob run_ingest_(?\w+)&lt;EM&gt;(?\d+-\d+-\d+-\d+-\d+-\d+)&lt;/EM&gt;"|rex field=Datafeed_name "^(?\w{2,5})_(?\w+)$" | eval FILE_ARRIVALTIME = strftime(strptime(start_time,"%Y-%m-%d-%H-%M-%S") ,"%Y-%m-%d %H:%M:%S") | eval FILE_ARRIVALTIME_epoch=strptime(FILE_ARRIVALTIME,"%Y-%m-%d %H:%M:%S") |fields SOR_NAME FEED_NAME FILE_ARRIVALTIME FILE_ARRIVALTIME_epoch] | eval now_time=strftime(now(), "%Y-%m-%d %H:%M:%S") | eval now_time_epoch = strptime(now_time,"%Y-%m-%d %H:%M:%S") | eval sla_time_epoch = strptime(sla_time,"%Y-%m-%d %H:%M:%S") | eval time_diff_epoch =sla_time_epoch-FILE_ARRIVALTIME_epoch | fillnull value="0" FILE_ARRIVALTIME_epoch| where FILE_ARRIVALTIME_epoch!=0 |table SOR_NAME FEED_NAME sla_time_epoch FILE_ARRIVALTIME_epoch time_diff_epoch |  eval sla_status=case(time_diff_epoch &amp;gt;= 0 , "Completed",  time_diff_epoch &amp;lt;= 0 , "Missed SLA",1 = 1, "RISK") |timechart count(FEED_NAME) by sla_status&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:22:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401666#M42585</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2020-09-29T23:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401667#M42586</link>
      <description>&lt;P&gt;@vnravikumar  @jkat54 &lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 12:50:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401667#M42586</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2019-02-19T12:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401668#M42587</link>
      <description>&lt;P&gt;Hi  @pench2k19&lt;/P&gt;

&lt;P&gt;Try by adding &lt;CODE&gt;_time&lt;/CODE&gt; in table&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query..... |table SOR_NAME FEED_NAME sla_time_epoch FILE_ARRIVALTIME_epoch time_diff_epoch _time| eval sla_status=case(time_diff_epoch &amp;gt;= 0 , "Completed", time_diff_epoch &amp;lt;= 0 , "Missed SLA",1 = 1, "RISK") |timechart count(FEED_NAME) by sla_status
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Feb 2019 13:36:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401668#M42587</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-02-19T13:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401669#M42588</link>
      <description>&lt;P&gt;no luck @vnravikumar ...i have laready tried that way...&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 14:03:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401669#M42588</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2019-02-19T14:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401670#M42589</link>
      <description>&lt;P&gt;Can you please add in these places too and try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table SOR_NAME FEED_NAME sla_time

|fields SOR_NAME FEED_NAME FILE_ARRIVALTIME FILE_ARRIVALTIME_epoch
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Feb 2019 14:19:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401670#M42589</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-02-19T14:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401671#M42590</link>
      <description>&lt;P&gt;You need to be sure the _time field exists prior to the timechart command and is in epoch format.&lt;/P&gt;

&lt;P&gt;I do not see a _time field in your fields and table commands.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 15:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401671#M42590</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-02-19T15:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401672#M42591</link>
      <description>&lt;P&gt;No results&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 15:10:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401672#M42591</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2019-02-19T15:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401673#M42592</link>
      <description>&lt;P&gt;i have added _time at table and fields command in my query @jkat54 ...but no result&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 08:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401673#M42592</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2019-02-20T08:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: timechart not giving expected result</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401674#M42593</link>
      <description>&lt;P&gt;You need a _time field that is a time in epoch.  You don’t have one because your lookup doesn’t have one.&lt;/P&gt;

&lt;P&gt;So you have to create one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval _time=strptime(start_time,...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Feb 2019 13:39:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/timechart-not-giving-expected-result/m-p/401674#M42593</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-02-20T13:39:55Z</dc:date>
    </item>
  </channel>
</rss>

