<?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 index time with specific field is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/index-time-with-specific-field-is-not-working/m-p/567374#M197718</link>
    <description>&lt;P&gt;We used the rest &lt;STRONG&gt;receivers simple&lt;/STRONG&gt; api to send a body with some fields to index as a urlencoded form.&lt;BR /&gt;Among these there is a field &lt;STRONG&gt;time&lt;/STRONG&gt; field containing a timestamp. We configure the sourcetype as in figure&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-09-16 at 15.27.33.png" style="width: 803px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16025iEE1661B1A7671EE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-09-16 at 15.27.33.png" alt="Screenshot 2021-09-16 at 15.27.33.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The problem is that Splunk is indexing &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;when it receives the data&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; ( &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;as if datetime was CURRENT or it found no fields with time information) .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;An example of the data is &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;name=session_started&amp;amp;params=%7B%22request_id%22%3A+%220af2918a-0125-4573-9a27-bd1a6deef75d%22%2C+%22subject%22%3A+%22mmt-112%22%7D&amp;amp;time=2021-09-16T09%3A24%3A08.355865&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;we thought that the encoded data could be a problem so &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;we changed the format of the body sent to splunk to json&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"name": "session_started", "params": "{\"request_id\": \"0af2918a-0125-4573-9a27-bd1a6deef75d\", \"subject\": \"mmt-112\"}", "time": "2021-09-16T09:24:08.355865"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the &lt;STRONG&gt;_time &lt;/STRONG&gt;was again the time of recevieng.&lt;/P&gt;&lt;P&gt;We tried several tweaks but none of them had success:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;we checked the format of the strptime ("% Y-% m-% dT% H:% M:% S.% 6N") and it is correct, e.g.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;"2021-08-31T18: 15: 20.268841"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;we tried to explicitly set the timezone (our times are in UTC) but nothing has changed&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;No error or warning in the internal log, even if we try to put a non-existent field instead of &lt;STRONG&gt;time. &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;When searching using that sourcetype, the field time is parsed correctly, so the system is reading correctly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any suggestion? What to do? What to try?&lt;/P&gt;&lt;P&gt;A big thanks to the Splunk gurus that will help us!&lt;/P&gt;</description>
    <pubDate>Fri, 17 Sep 2021 08:25:32 GMT</pubDate>
    <dc:creator>fabiofox</dc:creator>
    <dc:date>2021-09-17T08:25:32Z</dc:date>
    <item>
      <title>index time with specific field is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-time-with-specific-field-is-not-working/m-p/567374#M197718</link>
      <description>&lt;P&gt;We used the rest &lt;STRONG&gt;receivers simple&lt;/STRONG&gt; api to send a body with some fields to index as a urlencoded form.&lt;BR /&gt;Among these there is a field &lt;STRONG&gt;time&lt;/STRONG&gt; field containing a timestamp. We configure the sourcetype as in figure&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-09-16 at 15.27.33.png" style="width: 803px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16025iEE1661B1A7671EE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-09-16 at 15.27.33.png" alt="Screenshot 2021-09-16 at 15.27.33.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The problem is that Splunk is indexing &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;when it receives the data&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; ( &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;as if datetime was CURRENT or it found no fields with time information) .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;An example of the data is &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;name=session_started&amp;amp;params=%7B%22request_id%22%3A+%220af2918a-0125-4573-9a27-bd1a6deef75d%22%2C+%22subject%22%3A+%22mmt-112%22%7D&amp;amp;time=2021-09-16T09%3A24%3A08.355865&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;we thought that the encoded data could be a problem so &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;we changed the format of the body sent to splunk to json&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"name": "session_started", "params": "{\"request_id\": \"0af2918a-0125-4573-9a27-bd1a6deef75d\", \"subject\": \"mmt-112\"}", "time": "2021-09-16T09:24:08.355865"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the &lt;STRONG&gt;_time &lt;/STRONG&gt;was again the time of recevieng.&lt;/P&gt;&lt;P&gt;We tried several tweaks but none of them had success:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;we checked the format of the strptime ("% Y-% m-% dT% H:% M:% S.% 6N") and it is correct, e.g.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;"2021-08-31T18: 15: 20.268841"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;we tried to explicitly set the timezone (our times are in UTC) but nothing has changed&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;No error or warning in the internal log, even if we try to put a non-existent field instead of &lt;STRONG&gt;time. &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;When searching using that sourcetype, the field time is parsed correctly, so the system is reading correctly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any suggestion? What to do? What to try?&lt;/P&gt;&lt;P&gt;A big thanks to the Splunk gurus that will help us!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 08:25:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-time-with-specific-field-is-not-working/m-p/567374#M197718</guid>
      <dc:creator>fabiofox</dc:creator>
      <dc:date>2021-09-17T08:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: index time with specific field is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-time-with-specific-field-is-not-working/m-p/567641#M197833</link>
      <description>&lt;P&gt;I used your event string as a test:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{"name": "session_started", "params": "{\"request_id\": \"0af2918a-0125-4573-9a27-bd1a6deef75d\", \"subject\": \"mmt-112\"}", "time": "&lt;/SPAN&gt;&lt;SPAN class="h"&gt;2021-09-16T09:24:08.355865&lt;/SPAN&gt;&lt;SPAN&gt;"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When I tried&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Timestamp Format&amp;nbsp;%Y-%m-%dT%H:%M:%3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Timestamp Prefix&amp;nbsp;time":\s"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it already parsed the correct date and time in splunk&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Azeemering_0-1632134565211.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16062iD1562E4A86E14A56/image-size/large?v=v2&amp;amp;px=999" role="button" title="Azeemering_0-1632134565211.png" alt="Azeemering_0-1632134565211.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 10:43:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-time-with-specific-field-is-not-working/m-p/567641#M197833</guid>
      <dc:creator>Azeemering</dc:creator>
      <dc:date>2021-09-20T10:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: index time with specific field is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-time-with-specific-field-is-not-working/m-p/567836#M197898</link>
      <description>&lt;P&gt;it works! thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 13:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-time-with-specific-field-is-not-working/m-p/567836#M197898</guid>
      <dc:creator>fabiofox</dc:creator>
      <dc:date>2021-09-21T13:04:25Z</dc:date>
    </item>
  </channel>
</rss>

