<?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: JSON parsing issue and bad timestamp recognition in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697799#M20093</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;this error is normal the script catch errors. All values are good. The thing is, when i ingest these logs, and I set TIME_PREFIX, I have 2 values for timestamp just for one log not the others&amp;nbsp;whereas they have the same JSON format ...&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2024 06:38:49 GMT</pubDate>
    <dc:creator>tay</dc:creator>
    <dc:date>2024-08-30T06:38:49Z</dc:date>
    <item>
      <title>JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697693#M20085</link>
      <description>&lt;P&gt;Hello Splunkers,&amp;nbsp;&lt;BR /&gt;I have 7 files in JSON format ( the JSON format is the same for each files) , so i applied one parsing for all&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;* On UF *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/opt/splunk/etc/apps/app_name/result/*.json]
INDEXED_EXTRACTIONS=json
EVENT_BREAKER_ENABLE = true
EVENT_BREAKER = ([\r\n]+)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*On IDX*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[sourcetype_name]
SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n]+)
NO_BINARY_CHECK=true
CHARSET=UTF-8
TIME_PREFIX=\"timestamp\"\:\s\"
MAX_TIMESTAMP_LOOKAHEAD=19
TIME_FORMAT=%Y-%m-%dT%H:%M:%S
TRUNCATE=999999&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*on Search Head*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[sourcetype_name]
KV_MODE=none&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parsing works for all files except one&lt;/P&gt;&lt;P&gt;Here is an excerpt, timestamp with none value&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tay_0-1724925413410.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32458i5687A3ACF2F88AC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="tay_0-1724925413410.png" alt="tay_0-1724925413410.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can you help me on this ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 10:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697693#M20085</guid>
      <dc:creator>tay</dc:creator>
      <dc:date>2024-08-29T10:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697700#M20086</link>
      <description>&lt;P&gt;Please provide the affected event and an event that is parsed correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 10:48:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697700#M20086</guid>
      <dc:creator>PaulPanther</dc:creator>
      <dc:date>2024-08-29T10:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697703#M20087</link>
      <description>&lt;P&gt;event without issue " btoolTag = btool_validate_strptime"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "bad_strptime": "%d.%m.%Y %H:%M:%S,%3",
    "conf_file": "props.conf",
    "stanza": "lb:logs",
    "attribute": "TIME_FORMAT",
    "btoolTag": "btool_validate_strptime",
    "timestamp": "2024-08-29T06:00:04",
    "host": "blabla_hostname"
  },
  {
    "bad_strptime": "%y-%m-%d %H:%M:%S%",
    "conf_file": "props.conf",
    "stanza": "iislogs",
    "attribute": "TIME_FORMAT",
    "btoolTag": "btool_validate_strptime",
    "timestamp": "2024-08-29T06:00:04",
    "host": "blabla_hostname"
  }
]&lt;/LI-CODE&gt;&lt;P&gt;affected event&amp;nbsp;" btoolTag = btool_validate_regex"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "bad_regex": "(?i)id_618_(?&amp;lt;eventfield_1&amp;gt;\\\\w*).*i_Media=MEDIA_(?&amp;lt;eventfield_2&amp;gt;\\\\w*).*i_Dnbits=(?&amp;lt;eventfield_3\\\\w*).*cs_PERString=(?&amp;lt;eventfield_4&amp;gt;\\\\w*)",
    "conf_file": "props.conf",
    "stanza": "fansfms:aaio",
    "attribute": "EXTRACT-AoIP_message1",
    "reason": "syntax error in subpattern name (missing terminator?)",
    "btoolTag": "btool_validate_regex",
    "timestamp": "2024-08-29T09:47:46",
    "host": "blabla_hostname"
  },
  {
    "bad_regex": "([\\i\\\\fr\\n]+---splunk-admon-end-of-event---\\r\\n[\\r\\n]*)",
    "conf_file": "props.conf",
    "stanza": "source::(....(config|conf|cfg|inii|cfg|emacs|ini|license|lng|plist|presets|properties|props|vim|wsdl))",
    "attribute": "LINE_BREAKER",
    "reason": "unrecognized character follows \\",
    "btoolTag": "btool_validate_regex",
    "timestamp": "2024-08-29T09:47:46",
    "host": "blabla_hostname"
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 10:56:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697703#M20087</guid>
      <dc:creator>tay</dc:creator>
      <dc:date>2024-08-29T10:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697731#M20089</link>
      <description>&lt;P&gt;I'm curious about this value.&lt;/P&gt;&lt;PRE&gt;"reason": "unrecognized character follows \\",&lt;/PRE&gt;&lt;P&gt;Since the \\ is a literal escape is it reading the remainder of the message as text until the next naturally occurring " on it's own?&amp;nbsp; Can you try changing the "\\" in the text portion of the message to "escape character set".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 15:55:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697731#M20089</guid>
      <dc:creator>dural_yyz24</dc:creator>
      <dc:date>2024-08-29T15:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697799#M20093</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;this error is normal the script catch errors. All values are good. The thing is, when i ingest these logs, and I set TIME_PREFIX, I have 2 values for timestamp just for one log not the others&amp;nbsp;whereas they have the same JSON format ...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 06:38:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697799#M20093</guid>
      <dc:creator>tay</dc:creator>
      <dc:date>2024-08-30T06:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697841#M20099</link>
      <description>&lt;P&gt;When you use indexed extractions, the events are parsed on the UF and are not touched on subsequent components (with some exceptions which we're not getting into here).&lt;/P&gt;&lt;P&gt;So your props on indexers do not have any effect on parsing.&lt;/P&gt;&lt;P&gt;You're interested in TIMESTAMP_FIELDS (along with TIMESTAMP_FORMAT of course) on the UF.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 15:27:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697841#M20099</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-08-30T15:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697929#M20108</link>
      <description>&lt;P&gt;Hi PickleRick,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If I understand correctly, I either do all the parsing on the UF, or I remove everything from the UF and move the parsing to the indexer (IDX)?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 06:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697929#M20108</guid>
      <dc:creator>tay</dc:creator>
      <dc:date>2024-09-02T06:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697944#M20110</link>
      <description>&lt;P&gt;Reference material - &lt;A href="https://community.splunk.com/t5/Getting-Data-In/Diagrams-of-how-indexing-works-in-the-Splunk-platform-the-Masa/m-p/590774" target="_blank"&gt;https://community.splunk.com/t5/Getting-Data-In/Diagrams-of-how-indexing-works-in-the-Splunk-platform-the-Masa/m-p/590774&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Normally (when you're not using indexed extractions), the data is split into chunks, metadata is added _to whole chunks_ and the chunks are sent downstream to HF/indexer for further processing. And first "heavy" (either HF or indexer) component which receives the data does all the heavy lifting and writes data to indexes or sends the parsed data out (and that data is not parsed again - if there are more components in the way parsed data is just forwarded to outputs and that's it).&lt;/P&gt;&lt;P&gt;If you enable indexed extractions your data is parsed into indexed fields (which has its pros but also cons) and gets sent as parsed data which is not parsed again.&lt;/P&gt;&lt;P&gt;(I'm not touching ingest actions topic in here).&lt;/P&gt;&lt;P&gt;So you can either configure timestamp recognition on your UF based on the fields extracted from your json if you want to keep indexed extractions enabled or you can disable indexed extractions and parse json in search time - then you have to let your HF/idx know how to line break and do timestamp recognition. In either case it doesn't hurt to have a full set of settings for the sourcetypes on both layers (UF and HF/idx) - only the ones relevant in specific place are "active".&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 07:50:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697944#M20110</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-09-02T07:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697957#M20111</link>
      <description>&lt;P&gt;Thank you so much for your anwser.&amp;nbsp; It's pretty clear&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;BR /&gt;I'm going to change my conf now.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 09:37:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/697957#M20111</guid>
      <dc:creator>tay</dc:creator>
      <dc:date>2024-09-02T09:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: JSON parsing issue and bad timestamp recognition</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/698028#M20118</link>
      <description>&lt;P&gt;Find the solution, host work as an HF. As my data is cooked once so it takes the parsing configuration of this HF, i need to create an HF seperately for this kind of host&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 06:38:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/JSON-parsing-issue-and-bad-timestamp-recognition/m-p/698028#M20118</guid>
      <dc:creator>tay</dc:creator>
      <dc:date>2024-09-04T06:38:59Z</dc:date>
    </item>
  </channel>
</rss>

