<?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 Force milliseconds into _raw when milliseconds not in  source file time stamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307956#M92406</link>
    <description>&lt;P&gt;When have some queries where milliseconds are important.  There is no difficulty if the ms value is stored in the index so that showing the epoch time. We get when milliseconds are in the original time stamp, but when it is not the original time stamp and the two types are intermixed.  Examples:&lt;BR /&gt;
Works well:&lt;BR /&gt;
Source Time Stamp --  2018-03-29T18:38:51.661Z&lt;BR /&gt;
_time in epoch secs  1522348731.661 -- not decimal and milliseconds&lt;BR /&gt;
Problem:&lt;BR /&gt;
Source Time Stamp -- 2018-03-29T00:00:38+0000,&lt;BR /&gt;
_time in epoch secs 1522281638     -- note NO milliseconds &lt;BR /&gt;
   I need this to show 1522281638.000 &lt;/P&gt;

&lt;P&gt;I would like all _time stamps to include a ms value even if the source does not.&lt;BR /&gt;&lt;BR /&gt;
I have tried SEDCMD  and converted the stored log, but NOT splunk _time .  I assume this is because the time stamp is&lt;BR /&gt;
extracted before the SEDCMD. &lt;/P&gt;

&lt;P&gt;What would be a good method?  Is there a global parameter that will cause the ms value to always be filled to .000 on data with only whole seconds?&lt;/P&gt;</description>
    <pubDate>Thu, 29 Mar 2018 19:01:23 GMT</pubDate>
    <dc:creator>jimdiconectiv</dc:creator>
    <dc:date>2018-03-29T19:01:23Z</dc:date>
    <item>
      <title>Force milliseconds into _raw when milliseconds not in  source file time stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307956#M92406</link>
      <description>&lt;P&gt;When have some queries where milliseconds are important.  There is no difficulty if the ms value is stored in the index so that showing the epoch time. We get when milliseconds are in the original time stamp, but when it is not the original time stamp and the two types are intermixed.  Examples:&lt;BR /&gt;
Works well:&lt;BR /&gt;
Source Time Stamp --  2018-03-29T18:38:51.661Z&lt;BR /&gt;
_time in epoch secs  1522348731.661 -- not decimal and milliseconds&lt;BR /&gt;
Problem:&lt;BR /&gt;
Source Time Stamp -- 2018-03-29T00:00:38+0000,&lt;BR /&gt;
_time in epoch secs 1522281638     -- note NO milliseconds &lt;BR /&gt;
   I need this to show 1522281638.000 &lt;/P&gt;

&lt;P&gt;I would like all _time stamps to include a ms value even if the source does not.&lt;BR /&gt;&lt;BR /&gt;
I have tried SEDCMD  and converted the stored log, but NOT splunk _time .  I assume this is because the time stamp is&lt;BR /&gt;
extracted before the SEDCMD. &lt;/P&gt;

&lt;P&gt;What would be a good method?  Is there a global parameter that will cause the ms value to always be filled to .000 on data with only whole seconds?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 19:01:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307956#M92406</guid>
      <dc:creator>jimdiconectiv</dc:creator>
      <dc:date>2018-03-29T19:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Force milliseconds into _raw when milliseconds not in  source file time stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307957#M92407</link>
      <description>&lt;P&gt;Hey Jim,&lt;/P&gt;

&lt;P&gt;You may need to try something like this &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I had a similar issue where one event would have milliseconds but the other did not, so I create a props.conf for it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT = &amp;lt;strptime-style format&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your case I think it would look something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT =%Y-%m-%dT%H:%M:%S.%q
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can play with this in the GUI to see how it works, if you have a sample log and try Settings&amp;gt;Add Data&amp;gt;Upload&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/4686i4CBEE732E9A41B79/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 22:08:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307957#M92407</guid>
      <dc:creator>hos_2</dc:creator>
      <dc:date>2018-03-29T22:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Force milliseconds into _raw when milliseconds not in  source file time stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307958#M92408</link>
      <description>&lt;P&gt;hos_2 ,&lt;BR /&gt;
I have used time_stamp recognition before, but never in a case where there were intermixed formats like this, one with millisec and one without.  Did you specify a single Format in your case?  Does just showing a format with .%q force all to have millisecs.  I will try it.  Thanks for the reply ! &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:49:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307958#M92408</guid>
      <dc:creator>jimdiconectiv</dc:creator>
      <dc:date>2020-09-29T18:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Force milliseconds into _raw when milliseconds not in  source file time stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307959#M92409</link>
      <description>&lt;P&gt;I believe I had to teach Splunk to recognize the different using Regex and the time_format props.conf settings.&lt;/P&gt;

&lt;P&gt;The Add data GUI in the SH really helped me accomplish this as i could test my regex and time_format settings on the fly and see how it would affect my data before it was ingested.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 22:24:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307959#M92409</guid>
      <dc:creator>hos_2</dc:creator>
      <dc:date>2018-03-29T22:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Force milliseconds into _raw when milliseconds not in  source file time stamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307960#M92410</link>
      <description>&lt;P&gt;I used this Splunk answers when i ran into this problem:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/499990/is-it-possible-to-assign-different-timestamps-base.html"&gt;https://answers.splunk.com/answers/499990/is-it-possible-to-assign-different-timestamps-base.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I forgot to mention I also had to use Transforms&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 22:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Force-milliseconds-into-raw-when-milliseconds-not-in-source-file/m-p/307960#M92410</guid>
      <dc:creator>hos_2</dc:creator>
      <dc:date>2018-03-29T22:28:30Z</dc:date>
    </item>
  </channel>
</rss>

