<?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: field extraction very long field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389157#M113448</link>
    <description>&lt;P&gt;What do you mean by "a part of xml". Like, only &lt;STRONG&gt;richiesta&lt;/STRONG&gt; field has xml data and the raw event is just text?&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jul 2018 12:40:32 GMT</pubDate>
    <dc:creator>sudosplunk</dc:creator>
    <dc:date>2018-07-31T12:40:32Z</dc:date>
    <item>
      <title>field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389154#M113445</link>
      <description>&lt;P&gt;I have a log file that sometimes has very long field.&lt;BR /&gt;
A row of my log is:&lt;BR /&gt;
018-07-31 10:22:38.8701 inoutLogger level="ERROR" timestamp="31/07/2018 10:22:38" Elapsed_ms="1218.7727" richiesta='&lt;STRONG&gt;"&amp;lt;?xml version="1.0" encoding="utf-16"?&amp;gt;&amp;lt;my very long xml&amp;gt;"&lt;/STRONG&gt;'&lt;/P&gt;

&lt;P&gt;my props.file is:&lt;BR /&gt;
&lt;EM&gt;NO_BINARY_CHECK = 1&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
TRUNCATE=0&lt;BR /&gt;
pulldown_type = 1&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Sometimes if I make a search of the field "richiesta" I have the field truncated.&lt;/P&gt;

&lt;P&gt;search xxxx | table richiesta&lt;/P&gt;

&lt;P&gt;I obtain only a part of the xml (es. &lt;STRONG&gt;"&amp;lt;?xml version="1.0"&lt;/STRONG&gt;).&lt;/P&gt;

&lt;P&gt;Any suggestion?&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Gianluca&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:45:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389154#M113445</guid>
      <dc:creator>gtonti</dc:creator>
      <dc:date>2020-09-29T20:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389155#M113446</link>
      <description>&lt;P&gt;If you want to extract values at search-time, you use &lt;CODE&gt;spath&lt;/CODE&gt; command like this: &lt;CODE&gt;search xxxx | spath input=richiesta&lt;/CODE&gt;. This strips all xml fields automatically. More info &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.2/SearchReference/Spath"&gt;here&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;If this is not what you're looking, then please provide some sample events and I can help you with regular expressions to extract fields using props.conf.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 12:24:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389155#M113446</guid>
      <dc:creator>sudosplunk</dc:creator>
      <dc:date>2018-07-31T12:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389156#M113447</link>
      <description>&lt;P&gt;hy nittala_surya,&lt;/P&gt;

&lt;P&gt;thank you for your reply. What I am not able to understand is why the field &lt;STRONG&gt;richiesta&lt;/STRONG&gt; contains only a part of the xml. &lt;BR /&gt;
 The spath command is very interesting&lt;/P&gt;

&lt;P&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 12:36:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389156#M113447</guid>
      <dc:creator>gtonti</dc:creator>
      <dc:date>2018-07-31T12:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389157#M113448</link>
      <description>&lt;P&gt;What do you mean by "a part of xml". Like, only &lt;STRONG&gt;richiesta&lt;/STRONG&gt; field has xml data and the raw event is just text?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 12:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389157#M113448</guid>
      <dc:creator>sudosplunk</dc:creator>
      <dc:date>2018-07-31T12:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389158#M113449</link>
      <description>&lt;P&gt;Mi field richiesta in the log file is:&lt;BR /&gt;
 .... richiesta='"&amp;lt;?xml version="1.0" encoding="utf-16"?&amp;gt;&amp;lt;MemoConsulenzaRequest xmlns:xsd="&lt;A href="http://www.w3.org/2001/XMLSchema"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;" xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance%22&amp;gt;&amp;lt;ZSRVEXT&amp;gt;&amp;lt;Username"&gt;http://www.w3.org/2001/XMLSchema-instance"&amp;amp;gt;&amp;amp;lt;ZSRVEXT&amp;amp;gt;&amp;amp;lt;Username&lt;/A&gt; xmlns="&lt;A href="http://www.cadit.it/MW/MWGSSRE%22&amp;gt;ut27537&amp;lt;/Username&amp;gt;&amp;lt;/ZSRVEXT&amp;gt;&amp;lt;/MemoConsulenzaRequest&amp;lt;%22"&gt;http://www.cadit.it/MW/MWGSSRE"&amp;amp;gt;ut27537&amp;amp;lt;/Username&amp;amp;gt;&amp;amp;lt;/ZSRVEXT&amp;amp;gt;&amp;amp;lt;/MemoConsulenzaRequest&amp;amp;lt;"&lt;/A&gt;' .....&lt;/P&gt;

&lt;P&gt;if I query richiesta at search time I obtain only the first part of richiesta  "&amp;lt;?xml version="1.0"&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 12:48:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389158#M113449</guid>
      <dc:creator>gtonti</dc:creator>
      <dc:date>2018-07-31T12:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389159#M113450</link>
      <description>&lt;P&gt;I think the default values of &lt;CODE&gt;[kv]&lt;/CODE&gt; (Key-value) are the reason for truncation. According the &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.2/Admin/Limitsconf#.5Bkv.5D"&gt;limits.conf&lt;/A&gt;, below are the default values. Check if any of these apply to "richiesta".&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;avg_extractor_time = &amp;lt;integer&amp;gt;
* Maximum amount of CPU time, in milliseconds, that the average (over search
  results) execution time of a key-value pair extractor will be allowed to take
  before warning. Once the average becomes larger than this amount of time a
  warning will be issued
* Default: 500 (.5 seconds)

limit = &amp;lt;integer&amp;gt;
* The maximum number of fields that an automatic key-value field extraction
  (auto kv) can generate at search time.
* If search-time field extractions are disabled (KV_MODE=none in props.conf)
  then this setting determines the number of index-time fields that will be
  returned.
* The summary fields 'host', 'index', 'source', 'sourcetype', 'eventtype',
  'linecount', 'splunk_server', and 'splunk_server_group' do not count against
  this limit and will always be returned.
* Increase this setting if, for example, you have indexed data with a large
  number of columns and want to ensure that searches display all fields from
  the data.
* Default: 100

maxchars = &amp;lt;integer&amp;gt;
* Truncate _raw to this size and then do auto KV.
* Default: 10240 characters

maxcols = &amp;lt;integer&amp;gt;
* When non-zero, the point at which kv should stop creating new fields.
* Default: 512

max_extractor_time = &amp;lt;integer&amp;gt;
* Maximum amount of CPU time, in milliseconds, that a key-value pair extractor
  will be allowed to take before warning. If the extractor exceeds this
  execution time on any event a warning will b
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just a note...The longer and more complicated your events, the more you would get out of hand coding the field extractions. The auto extractor, while "correct", does not necessarily produce the most efficient regular expressions for the data. &lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 13:25:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389159#M113450</guid>
      <dc:creator>sudosplunk</dc:creator>
      <dc:date>2018-07-31T13:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389160#M113451</link>
      <description>&lt;P&gt;Take a look at this post.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/41648/linebreakingprocessor-truncating-line-because-limit-of-10000-has-been-exceeded.html"&gt;https://answers.splunk.com/answers/41648/linebreakingprocessor-truncating-line-because-limit-of-10000-has-been-exceeded.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 13:35:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389160#M113451</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2018-07-31T13:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389161#M113452</link>
      <description>&lt;P&gt;Hi kmorris,&lt;/P&gt;

&lt;P&gt;in my props.conf I have already TRUNCATE=0. According to the documentation splunk should never truncate.&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;BR /&gt;
Gianluca&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 14:38:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389161#M113452</guid>
      <dc:creator>gtonti</dc:creator>
      <dc:date>2018-07-31T14:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389162#M113453</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Are you able to see full value of richiesta field in raw log?&lt;/P&gt;

&lt;P&gt;Are you getting truncated value only  while displaying it in table?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 14:51:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389162#M113453</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2018-07-31T14:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389163#M113454</link>
      <description>&lt;P&gt;Hi thambisetty,&lt;/P&gt;

&lt;P&gt;if I make a query "search xxxx | fields richiesta" I see the field truncated even if the raw data is complete&lt;/P&gt;

&lt;P&gt;If I make a similar query "search xxxx |eval len=len(_raw) | eval len_rich=len(richiesta) | table richiesta len len_rich"&lt;/P&gt;

&lt;P&gt;It looks to me the field is truncated when the raw has a length &amp;gt; 10000. It is always truncated when length is &amp;gt; 10000, it is never truncated when the length is less then 10000.&lt;/P&gt;

&lt;P&gt;Bye&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389163#M113454</guid>
      <dc:creator>gtonti</dc:creator>
      <dc:date>2020-09-29T20:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389164#M113455</link>
      <description>&lt;P&gt;Did you define TRUNCATE=0 under same stanza as your sourcetype or source? The reason I am asking this is to see if there are any precedence issues.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 15:21:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389164#M113455</guid>
      <dc:creator>sudosplunk</dc:creator>
      <dc:date>2018-07-31T15:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389165#M113456</link>
      <description>&lt;P&gt;hi nittala_surya,&lt;/P&gt;

&lt;P&gt;my props.conf is&lt;/P&gt;

&lt;P&gt;**[invest-be-inout-crg]&lt;/P&gt;

&lt;H1&gt;BREAK_ONLY_BEFORE=\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}&lt;/H1&gt;

&lt;P&gt;NO_BINARY_CHECK = 1&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
TRUNCATE=0&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
TRANSFORMS-filter_logs = extract_fields-invest-be-inout,extract_fields_Source_Wel**&lt;/P&gt;

&lt;P&gt;in my search query I set sourcetype = invest-be-inout-crg&lt;/P&gt;

&lt;P&gt;so I think the truncate is in the correct place. Is there a way to check in the UI?&lt;/P&gt;

&lt;P&gt;btw I will try TRUNCATE=20000 and I will see if this will solve the problem &lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
regards&lt;BR /&gt;
Gianluca&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:45:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389165#M113456</guid>
      <dc:creator>gtonti</dc:creator>
      <dc:date>2020-09-29T20:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389166#M113457</link>
      <description>&lt;P&gt;That means field value is not extracted as you expected if you can post samle raw event i can help you with regex to extract richiest field value.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 16:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389166#M113457</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2018-07-31T16:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: field extraction very long field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389167#M113458</link>
      <description>&lt;P&gt;hi thambisetti,&lt;/P&gt;

&lt;P&gt;I didn't define a transform because, according to splunk the log is already written in key='value'. It should extract the value automatically.&lt;BR /&gt;
 It is an option that I can consider to write a transform if I don't find a solution.&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Kind regards&lt;BR /&gt;
Gianluca&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 16:27:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/field-extraction-very-long-field/m-p/389167#M113458</guid>
      <dc:creator>gtonti</dc:creator>
      <dc:date>2018-07-31T16:27:49Z</dc:date>
    </item>
  </channel>
</rss>

