<?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: Timestamp not being recognized in CSV in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361134#M65874</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;I have applied the configuration via splunk web interface. (Settings -&amp;gt; Source Types -&amp;gt; csv -&amp;gt; TimeStamp). Could you point me where I can change the configurations you specified. &lt;/P&gt;

&lt;P&gt;I am on mac os. So I went to &lt;CODE&gt;/Applications/Splunk/etc/system/local/props.conf&lt;/CODE&gt; and removed the &lt;CODE&gt;DATETIME_CONFIG =&lt;/CODE&gt;, but that didn't change anything. &lt;/P&gt;</description>
    <pubDate>Thu, 08 Feb 2018 13:34:43 GMT</pubDate>
    <dc:creator>skgbanga</dc:creator>
    <dc:date>2018-02-08T13:34:43Z</dc:date>
    <item>
      <title>Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361130#M65870</link>
      <description>&lt;P&gt;Searching for the other answer, I believe this is one of the most common questions, but I couldn't figure out my answer after reading all the others. So here it goes:&lt;/P&gt;

&lt;P&gt;My CSV looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;trig.hwts,delta                    
1517492760549648185,58445
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And after setting the options via splunk web interface, here is what my &lt;CODE&gt;props.conf&lt;/CODE&gt; looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[csv]
DATETIME_CONFIG = 
NO_BINARY_CHECK = true
TIMESTAMP_FIELDS = trig_hwts               
disabled = false                           
TIME_FORMAT = %s%9N                        
TZ = America/Detroit
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that I have specified &lt;CODE&gt;TIMESTAMP_FIELDS&lt;/CODE&gt; as &lt;CODE&gt;trig_hwts&lt;/CODE&gt; (_ instead of the &lt;CODE&gt;.&lt;/CODE&gt;) because that is how splunk recognized this field. (I have tried changing it to &lt;CODE&gt;.&lt;/CODE&gt; as well, but that also didn't work)&lt;/P&gt;

&lt;P&gt;The problem is splunk is not picking &lt;CODE&gt;trig.hwts&lt;/CODE&gt; at all. It keeps showing the time when I uploaded my file to splunk, and not the time in the file. I have restarted my splunk after editing file. &lt;/P&gt;

&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 05:01:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361130#M65870</guid>
      <dc:creator>skgbanga</dc:creator>
      <dc:date>2018-02-08T05:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361131#M65871</link>
      <description>&lt;P&gt;what is your field name in csv&lt;CODE&gt;trig.hwts&lt;/CODE&gt; or  &lt;CODE&gt;trig_hwts&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 08:26:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361131#M65871</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-08T08:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361132#M65872</link>
      <description>&lt;P&gt;Have you applied this configuration on Splunk Indexer or Splunk Search Head ? This configuration should go to Splunk Indexer or Heavy Forwarder whichever comes first.&lt;/P&gt;

&lt;P&gt;I am trying to upload data which you have provided in my lab in standalone instance and it is working fine apart from TZ &amp;amp; DATETIME_CONFIG setting. Can you please remove &lt;CODE&gt;DATETIME_CONFIG =&lt;/CODE&gt; from your configuration and restart splunk ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361132#M65872</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-09-29T18:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361133#M65873</link>
      <description>&lt;P&gt;The name in my csv is &lt;CODE&gt;trig.hwts&lt;/CODE&gt;, but splunks changes that to &lt;CODE&gt;trig_hwts&lt;/CODE&gt; as the field name it recognized. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:29:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361133#M65873</guid>
      <dc:creator>skgbanga</dc:creator>
      <dc:date>2018-02-08T13:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361134#M65874</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;I have applied the configuration via splunk web interface. (Settings -&amp;gt; Source Types -&amp;gt; csv -&amp;gt; TimeStamp). Could you point me where I can change the configurations you specified. &lt;/P&gt;

&lt;P&gt;I am on mac os. So I went to &lt;CODE&gt;/Applications/Splunk/etc/system/local/props.conf&lt;/CODE&gt; and removed the &lt;CODE&gt;DATETIME_CONFIG =&lt;/CODE&gt;, but that didn't change anything. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361134#M65874</guid>
      <dc:creator>skgbanga</dc:creator>
      <dc:date>2018-02-08T13:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361135#M65875</link>
      <description>&lt;P&gt;After changes have you restarted splunk ?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:36:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361135#M65875</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-02-08T13:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361136#M65876</link>
      <description>&lt;P&gt;Also note that I followed these instructions to uploaded the data:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchTutorial/GetthetutorialdataintoSplunk"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchTutorial/GetthetutorialdataintoSplunk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361136#M65876</guid>
      <dc:creator>skgbanga</dc:creator>
      <dc:date>2018-02-08T13:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361137#M65877</link>
      <description>&lt;P&gt;Yes. How are you adding the data and changing the configuration? Maybe I can try to follow your exact steps and then report back?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 13:51:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361137#M65877</guid>
      <dc:creator>skgbanga</dc:creator>
      <dc:date>2018-02-08T13:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361138#M65878</link>
      <description>&lt;P&gt;Steps are:&lt;/P&gt;

&lt;P&gt;1.) Create test1.csv file on desktop.&lt;BR /&gt;
2.) Goto Settings - Add Data -&amp;gt; Upload &lt;BR /&gt;
3.) Select test.csv from your desktop then Click Next&lt;BR /&gt;
4.) Now you can see that Sourcetype is selected as &lt;CODE&gt;csv&lt;/CODE&gt;&lt;BR /&gt;
5.) Click on Timestamp on left hand side which will expand timestamp setting, then select Extraction as Advanced. Now Timezone select timezone America/Detroit , Timestamp format &lt;CODE&gt;%s%9N&lt;/CODE&gt; , Timestamp fields &lt;CODE&gt;trig_hwts&lt;/CODE&gt;&lt;BR /&gt;
6.) After this settings you can see that on right side window, time is recognized correctly.&lt;BR /&gt;
Then click Save As and then Next, Next ....&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:06:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361138#M65878</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-02-08T14:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361139#M65879</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;So any new data that I am adding is being correctly interpreted now. (I tried two ways: .csv and .zip (consisting of a lot of csvs)&lt;/P&gt;

&lt;P&gt;However changing the settings does NOT affect the previous data. Maybe I need to reindex the data or something (but I don't know how to do that)&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 14:57:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361139#M65879</guid>
      <dc:creator>skgbanga</dc:creator>
      <dc:date>2018-02-08T14:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp not being recognized in CSV</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361140#M65880</link>
      <description>&lt;P&gt;Data which is already indexed will not alter. So you need to reindex data, easiet way is remove whole fishbucket if you are monitoring only these CSV files and you want to reindex them all.&lt;/P&gt;

&lt;P&gt;Then &lt;BR /&gt;
1.) Stop splunk on universal forwarder.&lt;BR /&gt;
2.) Remove &lt;CODE&gt;$SPLUNK_HOME/var/lib/splunk/fishbucket&lt;/CODE&gt; directory.&lt;BR /&gt;
3.) Start splunk on universal forwarder.&lt;/P&gt;

&lt;P&gt;This will reindex all data which you have configured on your universal forwarder.&lt;/P&gt;

&lt;P&gt;If you want to reindex specific file then follow below steps.&lt;BR /&gt;
1.) Stop splunk on universal forwarder.&lt;BR /&gt;
2.) Run below command to remove file from fishbucket so that it will reindex again. In below example I have used &lt;CODE&gt;/var/tmp/test1.csv&lt;/CODE&gt; but you need to change this with your actual file name with absolute file path.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/bin/splunk cmd btprobe -d $SPLUNK_HOME/var/lib/splunk/fishbucket/splunk_private_db --file /var/tmp/test1.csv --reset
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;3.) Start splunk on universal forwarder.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 16:27:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-not-being-recognized-in-CSV/m-p/361140#M65880</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-02-08T16:27:35Z</dc:date>
    </item>
  </channel>
</rss>

