<?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: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311741#M93404</link>
    <description>&lt;P&gt;Hey@Venkat_16,&lt;/P&gt;

&lt;P&gt;You can try adding this parameter in props.conf&lt;BR /&gt;
TRUNCATE = 0&lt;/P&gt;

&lt;P&gt;Let me know if this helps!!&lt;/P&gt;</description>
    <pubDate>Wed, 04 Apr 2018 08:23:00 GMT</pubDate>
    <dc:creator>deepashri_123</dc:creator>
    <dc:date>2018-04-04T08:23:00Z</dc:date>
    <item>
      <title>In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311739#M93402</link>
      <description>&lt;P&gt;In our environment, the application writes logs into Windows Events in JSON format under Message section.&lt;BR /&gt;
We need to segregate these application logs and remove the default windows metadata/envelope around it.&lt;BR /&gt;
Please see my config below:&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog://Application]
disabled = 0
start_from = oldest
current_only = 0
checkpointInterval = 5
sourcetype = my_temp_windows_sourcetype
index=my_index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_temp_windows_sourcetype]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n](?=\d{2}/\d{2}/\d{2,4} \d{2}:\d{2}:\d{2} [aApPmM]{2}))
TRANSFORMS-sourcetype_raw = my_windows_event_default,my_windows_event_sourcetype,my_windows_event_raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_windows_event_default]
REGEX = .
FORMAT = sourcetype::WinEventLog:Application
DEST_KEY = MetaData:Sourcetype

[my_windows_event_sourcetype]
REGEX = ImportantKeyWord
FORMAT = sourcetype::my_new_sourcetype
DEST_KEY = MetaData:Sourcetype

[my_windows_event_raw]
REGEX = Message=(.*ImportantKeyWord.*)$
FORMAT = $1
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works fine when the length of the JSON Message is small (&amp;lt;3000 characters). &lt;BR /&gt;
However, for bigger JSON, events are getting truncated.&lt;BR /&gt;
We also see a pattern here, events are truncated at same length (approx 3800-3900). &lt;BR /&gt;
I doubt if the &lt;CODE&gt;REGEX = Message=(.*ImportantKeyWord.*)$&lt;/CODE&gt; here might be causing the truncation?&lt;BR /&gt;
Because, if we try with SED in props.conf, events are not getting truncated, however, that is not I want. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-drop = s/(?ims)[0-9][0-9]\/[0-9][0-9]\/[0-9][0-9][0-9][0-9] [0-9][0-9]\:[0-9][0-9]\:[0-9][0-9].*[\r\n].*Message\=//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want only events with ImportantKeyWord in the Message to be re-written as _raw&lt;/P&gt;

&lt;P&gt;Any suggestions welcome.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 17:59:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311739#M93402</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2018-04-03T17:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311740#M93403</link>
      <description>&lt;P&gt;Have you tried setting &lt;CODE&gt;MAX_EVENTS&lt;/CODE&gt; in &lt;CODE&gt;props.conf&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 19:07:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311740#M93403</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2018-04-03T19:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311741#M93404</link>
      <description>&lt;P&gt;Hey@Venkat_16,&lt;/P&gt;

&lt;P&gt;You can try adding this parameter in props.conf&lt;BR /&gt;
TRUNCATE = 0&lt;/P&gt;

&lt;P&gt;Let me know if this helps!!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 08:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311741#M93404</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2018-04-04T08:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311742#M93405</link>
      <description>&lt;P&gt;Default Truncate limit is 10k, our max length is 7k. Anyways will try and keep you posted.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 08:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311742#M93405</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2018-04-04T08:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311743#M93406</link>
      <description>&lt;P&gt;@cpetterborg - these json are not multiline, however will try and keep you posted.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 08:50:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311743#M93406</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2018-04-04T08:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311744#M93407</link>
      <description>&lt;P&gt;No Luck &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 10:29:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311744#M93407</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2018-04-04T10:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311745#M93408</link>
      <description>&lt;P&gt;No luck &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 10:30:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311745#M93408</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2018-04-04T10:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311746#M93409</link>
      <description>&lt;P&gt;We raised Splunk Ticket and got this resolved by adding "LOOKAHEAD"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_windows_event_raw]
LOOKAHEAD = 10000
REGEX = Message=(.*ImportantKeyWord.*)$
FORMAT = $1
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf#GLOBAL_SETTINGS"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf#GLOBAL_SETTINGS&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LOOKAHEAD = &amp;lt;integer&amp;gt;
* NOTE: This option is valid for all index time transforms, such as
  index-time field creation, or DEST_KEY modifications.
* Optional. Specifies how many characters to search into an event.
* Defaults to 4096.
* You may want to increase this value if you have event line lengths that
  exceed 4096 characters (before linebreaking).
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Apr 2018 10:03:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311746#M93409</guid>
      <dc:creator>Venkat_16</dc:creator>
      <dc:date>2018-04-10T10:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: In Windows Custom Events, why are the bigger JSON events while using REGEX getting truncated?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311747#M93410</link>
      <description>&lt;P&gt;Hi @Venkat_16. I am facing similar kind of issue and adding LOOKAHEAD setting didn't fix. In my case props and transforms are on heavy forwarder.  Does these conf settings needs to go on Indexers as well?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 20:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-Windows-Custom-Events-why-are-the-bigger-JSON-events-while/m-p/311747#M93410</guid>
      <dc:creator>Rob2520</dc:creator>
      <dc:date>2019-04-24T20:17:00Z</dc:date>
    </item>
  </channel>
</rss>

