<?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 can I change the time output from this timechart to show time when there is no event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290820#M87890</link>
    <description>&lt;P&gt;Hey that is perfect, It worked , &lt;BR /&gt;
But just a quick question Why shouldn't the time be formatted before ? And also (eventTime/1000)-25200 , I did this to convert epoch time from milliseconds to seconds and then convert to my time zone, my query was even if I dont convert to seconds , will the span=1s not take care of it ?&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2017 22:27:27 GMT</pubDate>
    <dc:creator>patilsh</dc:creator>
    <dc:date>2017-08-17T22:27:27Z</dc:date>
    <item>
      <title>How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290813#M87883</link>
      <description>&lt;P&gt;This is my code, the data includes a field labeled "callId" (for this particular search there are 3 distinct callId) and the stats are as below:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3390i546856CAEFF46153/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
The yellow highlighted portion is where the first callId ends and the next line is where the new callId starts. Now as seen after 17:50:39, the next call happened at 18:08:57&lt;BR /&gt;
So instead after 17:50:39 I want 17:50:40 with corresponding column as 0, 17:50:41 and so on till it reaches 18:08:57.&lt;/P&gt;

&lt;P&gt;The time is eventTime and not _time and hence I am not able to use timechart with span=1s. So can someone please help how to go about with this?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 21:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290813#M87883</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2017-08-15T21:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290814#M87884</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search
| rename eventTime.$date as eventTime
| eval eventTime=strftime((eventTime/1000)-25200, "%Y-%m-%d %H:%M:%S")
| bucket eventTime span=1s
| stats list(eventData.nearTalk) by eventTime
| makecontinuous eventTime span=1s
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Aug 2017 23:46:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290814#M87884</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-15T23:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290815#M87885</link>
      <description>&lt;P&gt;This doesn't work, I tried this as well.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 19:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290815#M87885</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2017-08-16T19:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290816#M87886</link>
      <description>&lt;P&gt;wouldn't that be ...?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makecontinuous eventTime span=1s 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Aug 2017 21:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290816#M87886</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-16T21:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290817#M87887</link>
      <description>&lt;P&gt;You are quite correct.  I have updated the answer; it should work now.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 23:15:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290817#M87887</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-16T23:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290818#M87888</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index="*******" userId="******" |rename eventTime.$date as eventTime|eval eventTime=strftime((eventTime/1000)-25200, "%Y-%m-%d %H:%M:%S")|bucket eventTime span=1s|stats list(eventData.nearTalk) by eventTime|makecontinuous eventTime span=1s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried the same , this shows total Events(4573) and Statistics (0)&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 00:11:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290818#M87888</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2017-08-17T00:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290819#M87889</link>
      <description>&lt;P&gt;@patilsh - &lt;/P&gt;

&lt;P&gt;I'm not surprised it's not working, because the code never made sense to me.  Formatting a time field into display format before you bucket it and stats it isn't a useful strategy.&lt;/P&gt;

&lt;P&gt;Here's the debug steps... &lt;/P&gt;

&lt;P&gt;First, run this and see if it creates a valid date.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="*******" userId="******"   
| head 5
| rename eventTime.$date as eventTime
| eval eventTime=strftime((eventTime/1000)-25200, "%Y-%m-%d %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If not, then let me know and we'll circle back.  &lt;/P&gt;

&lt;P&gt;If the output eventTime looks good, then try this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="*******" userId="******" 
| rename eventTime.$date as eventTime
| eval eventTime=(eventTime/1000)-25200
| bucket eventTime span=1s
| stats list(eventData.nearTalk) by eventTime
| makecontinuous eventTime span=1s
| eval eventTime=strftime(eventTime, "%Y-%m-%d %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Aug 2017 15:06:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290819#M87889</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-17T15:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290820#M87890</link>
      <description>&lt;P&gt;Hey that is perfect, It worked , &lt;BR /&gt;
But just a quick question Why shouldn't the time be formatted before ? And also (eventTime/1000)-25200 , I did this to convert epoch time from milliseconds to seconds and then convert to my time zone, my query was even if I dont convert to seconds , will the span=1s not take care of it ?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 22:27:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290820#M87890</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2017-08-17T22:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290821#M87891</link>
      <description>&lt;P&gt;@patilsh - once you use strftime, the result field is not a number, it's a bunch of characters.  &lt;CODE&gt;"2" "0" "1" "7" "-"&lt;/CODE&gt; and so on.  It doesn't make send to "span" a character-based field.  You have to do the &lt;CODE&gt;span&lt;/CODE&gt; while the value is still a number.&lt;/P&gt;

&lt;P&gt;As a general case, just always put formatting and "prettying up" at the end, just before output, and it will tend to be more efficient.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 22:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290821#M87891</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-17T22:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290822#M87892</link>
      <description>&lt;P&gt;Makes sense! Thanks a lot!!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 22:59:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290822#M87892</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2017-08-17T22:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290823#M87893</link>
      <description>&lt;P&gt;You can format it anywhere if you use &lt;CODE&gt;fieldformat&lt;/CODE&gt; to do it (which only changes the way that it is displayed) but for efficiency, never do any formatting to be pretty until the very end (much fewer things to format).&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 00:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290823#M87893</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-29T00:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the time output from this timechart to show time when there is no event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290824#M87894</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;When I use make continuous and then convert time, the timestamp has some different value, it is continuous but time is some other value.&lt;/P&gt;

&lt;P&gt;So can you please tell me what could be the possible reason for this.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 03:30:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-change-the-time-output-from-this-timechart-to-show/m-p/290824#M87894</guid>
      <dc:creator>patilsh</dc:creator>
      <dc:date>2017-08-29T03:30:04Z</dc:date>
    </item>
  </channel>
</rss>

