<?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: How can I keep only first 6k bytes of single line event by transforms.conf in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214884#M63020</link>
    <description>&lt;P&gt;It is easier to use &lt;CODE&gt;SEDCMD&lt;/CODE&gt; like this:&lt;/P&gt;

&lt;H3&gt;props.conf&lt;/H3&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog-cef]
SEDCMD-keepFirst6k = s/^(.{0,6144}).*/\1/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 Sep 2015 22:03:21 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-09-04T22:03:21Z</dc:date>
    <item>
      <title>How can I keep only first 6k bytes of single line event by transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214883#M63019</link>
      <description>&lt;P&gt;How can I keep only first 6k bytes of single line event.&lt;/P&gt;

&lt;P&gt;I have syslog type of data. They are single line and sometimes more than 64k Byte long. &lt;BR /&gt;
But, I need only first 6k bytes of an event. &lt;BR /&gt;
So, I created the following transforms.conf. But, it does not work.&lt;BR /&gt;
I know SEDCMD works to do the same job. &lt;BR /&gt;
But, why does transforms.conf not work? &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[syslog-cef]&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
TRANSFORMS-keep6k = keep6k&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;P&gt;[keep6k]&lt;BR /&gt;
REGEX = ^(.{6144})&lt;BR /&gt;
DEST_KEY = _raw&lt;BR /&gt;
FORMAT = $1&lt;BR /&gt;
Data is not truncated to 6k. &lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 04 Sep 2015 21:45:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214883#M63019</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2015-09-04T21:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I keep only first 6k bytes of single line event by transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214884#M63020</link>
      <description>&lt;P&gt;It is easier to use &lt;CODE&gt;SEDCMD&lt;/CODE&gt; like this:&lt;/P&gt;

&lt;H3&gt;props.conf&lt;/H3&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog-cef]
SEDCMD-keepFirst6k = s/^(.{0,6144}).*/\1/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Sep 2015 22:03:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214884#M63020</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-04T22:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I keep only first 6k bytes of single line event by transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214885#M63021</link>
      <description>&lt;P&gt;Thanks for quick response. &lt;BR /&gt;
If I used SEDCMD with the following regex. This works.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-keepFirst6k = s/^(.{6144})/\1/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm looking for transforms.conf so that I can use the same regex for multiple sourcetypes by calling this transform name.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2015 22:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214885#M63021</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2015-09-04T22:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I keep only first 6k bytes of single line event by transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214886#M63022</link>
      <description>&lt;P&gt;Your initial solution looks fine to me; did you restart all Splunk instances on your Indexers and Heavy Forwarders?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2015 22:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214886#M63022</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-04T22:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I keep only first 6k bytes of single line event by transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214887#M63023</link>
      <description>&lt;P&gt;IMHO, you are gaining nothing except in the case that you decide to change from 6144 character to some other number (in that case you would have to edit every &lt;CODE&gt;props.conf&lt;/CODE&gt; copy).  If you are not planning on doing this, then the &lt;CODE&gt;SEDCMD&lt;/CODE&gt; solution is shorter, better, and has every other benefit.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2015 22:34:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214887#M63023</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-04T22:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I keep only first 6k bytes of single line event by transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214888#M63024</link>
      <description>&lt;P&gt;Hi, woodcok. Thanks you for your advice. Yes, I did restarted. In my test, I used a UF and indexer. But, it is same result even if I have a standalone instance to monitor the same file. &lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2015 23:24:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214888#M63024</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2015-09-06T23:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I keep only first 6k bytes of single line event by transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214889#M63025</link>
      <description>&lt;P&gt;Hi Masa,&lt;/P&gt;

&lt;P&gt;take a look at this answer &lt;A href="http://answers.splunk.com/answers/306418/how-can-i-remove-partial-string-of-single-line-eve-1.html#answer-306465"&gt;http://answers.splunk.com/answers/306418/how-can-i-remove-partial-string-of-single-line-eve-1.html#answer-306465&lt;/A&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 08:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214889#M63025</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-09-07T08:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: How can I keep only first 6k bytes of single line event by transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214890#M63026</link>
      <description>&lt;P&gt;Thanks, MuS. &lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 17:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-keep-only-first-6k-bytes-of-single-line-event-by/m-p/214890#M63026</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2015-09-07T17:17:40Z</dc:date>
    </item>
  </channel>
</rss>

