<?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: Why do I have a different result using curl or data input? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-have-a-different-result-using-curl-or-data-input/m-p/315642#M59065</link>
    <description>&lt;P&gt;It wasn't initially, I just moved it and tried but I still don't have the right timestamp&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 10:02:34 GMT</pubDate>
    <dc:creator>Clovisa</dc:creator>
    <dc:date>2018-04-06T10:02:34Z</dc:date>
    <item>
      <title>Why do I have a different result using curl or data input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-have-a-different-result-using-curl-or-data-input/m-p/315640#M59063</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I noticed something strange. When I upload the following JSON by the Splunk Web interface, using he json_sales sourcetype described below, the "Date" field is set as timestamp (which is what I want).&lt;BR /&gt;
But when I try to push the same JSON line via HTTP event collector, the timestamp that is set is the indexation time. Where does it come from? How can I set the "Date" field as a timestamp while using HTTP? Thank you!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; JSON

    {"Date":"2018-02-26","Id commande":"L4512XXX","Type":"A","Quantité vendue":"1000","Support de vente":"Livre","Code pays":"FR","Référence":"REFXXX"}

props.conf

[json_sales]
INDEXED_EXTRACTIONS = json
KV_MODE = none
NO_BINARY_CHECK = true
TIMESTAMP_FIELDS = Date
TIME_FORMAT = %Y-%m-%d
category = Structured
disabled = false
pulldown_type = true

cURL

curl -k  &lt;A href="http://splunk:8088/services/collector" target="test_blank"&gt;http://splunk:8088/services/collector&lt;/A&gt; -H "Authorization: Splunk 1c0afd4d-d882-4a2c-9fc2-0f428216XXXX" -d '{"sourcetype": "json_sales", "event": {"Date":"2018-02-26","Id commande":"L4512XXX","Type":"A","Quantité vendue":"1000","Support de vente":"Livre","Code pays":"FR","Référence":"REFXXX"}}'

inputs.conf in splunk_httpinput/local

[http://Vente]
disabled = 0
index = sales
token = 1c0afd4d-d882-4a2c-9fc2-0f428216XXXX
sourcetype = json_sales
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 08:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-have-a-different-result-using-curl-or-data-input/m-p/315640#M59063</guid>
      <dc:creator>Clovisa</dc:creator>
      <dc:date>2018-04-06T08:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I have a different result using curl or data input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-have-a-different-result-using-curl-or-data-input/m-p/315641#M59064</link>
      <description>&lt;P&gt;Is your props.conf file in splunk_httpinput/local path?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 09:10:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-have-a-different-result-using-curl-or-data-input/m-p/315641#M59064</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-04-06T09:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I have a different result using curl or data input?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-have-a-different-result-using-curl-or-data-input/m-p/315642#M59065</link>
      <description>&lt;P&gt;It wasn't initially, I just moved it and tried but I still don't have the right timestamp&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 10:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-have-a-different-result-using-curl-or-data-input/m-p/315642#M59065</guid>
      <dc:creator>Clovisa</dc:creator>
      <dc:date>2018-04-06T10:02:34Z</dc:date>
    </item>
  </channel>
</rss>

