<?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: Script Input - Timestamp field extraction from multi key value pair data-set (props.conf, inputs.conf) in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189173#M37701</link>
    <description>&lt;P&gt;I think the problem is time zone, "China Standard Time" is not the correct format of TZ , you can set TZ=CN or TZ=Asia/Shanghai in props.conf &lt;/P&gt;

&lt;P&gt;for example :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%m-%d-%Y %H:%M:%S 
TIME_PREFIX=ctime= 
TZ=CN
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 Jun 2014 09:46:37 GMT</pubDate>
    <dc:creator>dmlee</dc:creator>
    <dc:date>2014-06-05T09:46:37Z</dc:date>
    <item>
      <title>Script Input - Timestamp field extraction from multi key value pair data-set (props.conf, inputs.conf)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189172#M37700</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;

&lt;P&gt;I am using a python script input method to extract data (meta-data and some raw data) from binary and txt files. My script is working fine, I can search extracted data from Splunk's search app. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Issue:-&lt;/STRONG&gt; This script has 'ctime' field, I am trying to match this field to splunk timestamp or _time field but the matching is not working. I am getting timestamp field at Splunk end with NONE value but this suppose to be either ctime field value.&lt;/P&gt;

&lt;P&gt;Following is the detail of configurations and data-set:-&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;1) props.conf:-&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[waterwise]
SHOULD_LINEMERGE = false
CHARSET = UTF-8
LINE_BREAKER = ([\r\n])
TIMESTAMP_FIELDS = ctime
TIME_FORMAT = %m-%d-%Y %H:%M:%S %z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;2) inputs.conf:-&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://$SPLUNK_HOME\bin\scripts\waterwise-data.py]
disabled = false
interval = 300
source = waterwise
sourcetype = waterwise
index = main
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;3) Script out-put data-set (multi key value pair):-&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sensor_data=361, sensor_data=361, sensor_data=360,location=Z:\Documents\rdms-data-test\waterwise\FC_PH\stn_11\data\2011\001\BTRY\STN_11_2011001232949_BTRY_600_15.txt, size=164, atime=06-04-2014 04:51:32, mtime=01-01-2011 15:40:14, ctime=01-01-2011 15:40:14 China Standard Time, project=waterwise, system=FC_PH, station=stn_11, year=2011, day_of_year=001, sensor=BTRY

sensor_data=361, sensor_data=361, sensor_data=361, location=Z:\Documents\rdms-data-test\waterwise\FC_PH\stn_11\data\2011\001\BTRY\STN_11_2011001234012_BTRY_600_15.txt, size=164, atime=06-04-2014 04:51:32, mtime=01-01-2011 15:50:42, ctime=01-01-2011 15:50:42 China Standard Time, project=waterwise, system=FC_PH, station=stn_11, year=2011, day_of_year=001, sensor=BTRY

sensor_data=359, sensor_data=359, location=Z:\Documents\rdms-data-test\waterwise\FC_PH\stn_11\data\2011\001\BTRY\STN_11_2011001235034_BTRY_600_15.txt, size=164, atime=06-04-2014 04:51:32, mtime=01-01-2011 16:01:01, ctime=01-01-2011 16:01:01 China Standard Time, project=waterwise, system=FC_PH, station=stn_11, year=2011, day_of_year=001, sensor=BTRY

location=Z:\Documents\rdms-data-test\waterwise\FC_PH\stn_11\data\2011\001\ORP\STN_11_2011001000056_ORP_SGT.raw, size=52, atime=06-03-2014 07:31:55, mtime=12-31-2010 16:01:32, ctime=12-31-2010 16:01:32 China Standard Time, project=waterwise, system=FC_PH, station=stn_11, year=2011, day_of_year=001, sensor=ORP

location=Z:\Documents\rdms-data-test\waterwise\FC_PH\stn_11\data\2011\001\ORP\STN_11_2011001000156_ORP_SGT.raw, size=52, atime=06-03-2014 07:31:55, mtime=12-31-2010 16:02:32, ctime=12-31-2010 16:02:32 China Standard Time, project=waterwise, system=FC_PH, station=stn_11, year=2011, day_of_year=001, sensor=ORP
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance. I look forward to hearing from you team.&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;Rupesh&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 05:54:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189172#M37700</guid>
      <dc:creator>rupesh_kumar</dc:creator>
      <dc:date>2014-06-05T05:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script Input - Timestamp field extraction from multi key value pair data-set (props.conf, inputs.conf)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189173#M37701</link>
      <description>&lt;P&gt;I think the problem is time zone, "China Standard Time" is not the correct format of TZ , you can set TZ=CN or TZ=Asia/Shanghai in props.conf &lt;/P&gt;

&lt;P&gt;for example :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%m-%d-%Y %H:%M:%S 
TIME_PREFIX=ctime= 
TZ=CN
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Jun 2014 09:46:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189173#M37701</guid>
      <dc:creator>dmlee</dc:creator>
      <dc:date>2014-06-05T09:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script Input - Timestamp field extraction from multi key value pair data-set (props.conf, inputs.conf)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189174#M37702</link>
      <description>&lt;P&gt;Based on the props.conf spec it doesn't look like the TIMESTAMP_FIELDS is the correct declaration for you to use based on the sample output. &lt;BR /&gt;
Further, it looks like the time stamp (crime) in the output is in the middle of the event. Again by the spec, Splunk will only examine the first 150 characters by default.&lt;BR /&gt;
I would try adding TIME_PREFIX and MAX_TIMESTAMP_LOOKAHEAD values to props.conf.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:47:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189174#M37702</guid>
      <dc:creator>alterdego</dc:creator>
      <dc:date>2020-09-28T16:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script Input - Timestamp field extraction from multi key value pair data-set (props.conf, inputs.conf)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189175#M37703</link>
      <description>&lt;P&gt;Thank you Dmlee, yes 'TZ=CN' works for me.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 07:13:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189175#M37703</guid>
      <dc:creator>rupesh_kumar</dc:creator>
      <dc:date>2014-06-06T07:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script Input - Timestamp field extraction from multi key value pair data-set (props.conf, inputs.conf)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189176#M37704</link>
      <description>&lt;P&gt;Thank you Alterdego for your reply. There was problem with time zone.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2014 07:14:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-Input-Timestamp-field-extraction-from-multi-key-value/m-p/189176#M37704</guid>
      <dc:creator>rupesh_kumar</dc:creator>
      <dc:date>2014-06-06T07:14:54Z</dc:date>
    </item>
  </channel>
</rss>

