<?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: Table format field size in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46253#M11058</link>
    <description>&lt;P&gt;The easiest way is probably to use the Sideview Table module instead of the SimpleResultsTable module.  Table has many significant improvements over SimpleResultsTable, but a tiny one that I honestly never noticed is that SimpleResultsTable forces long values to live on one line, whereas Table doesn't do this... &lt;/P&gt;

&lt;P&gt;&lt;A href="http://sideviewapps.com/apps/sideview-utils/"&gt;http://sideviewapps.com/apps/sideview-utils/&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;To get the Table module you'll need a relatively new version of Sideview Utils - Table only came out in 2.2,  the current version is 2.2.6, and the old version on Splunkbase is 1.3.5&lt;/P&gt;

&lt;P&gt;Assuming that someday someone will want the reverse behavior though, I'll add a requirement to my list to make Table respect the $results.softWrap$ convention,  so if you need to,  you can set softWrap to false upstream and the Table would then behave like SRT. &lt;/P&gt;</description>
    <pubDate>Tue, 27 Nov 2012 17:53:06 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2012-11-27T17:53:06Z</dc:date>
    <item>
      <title>Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46252#M11057</link>
      <description>&lt;P&gt;We are trying to create a table view of some event log messages, however some of the event log messages are very long and require a lot of horizontal scrolling to read. We'd like to be able to view the message field all at once, by doing something like having double or triple height rows or word wrap in some way.&lt;/P&gt;

&lt;P&gt;Is there anyway to do this?&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/newsmaker_1.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2012 17:31:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46252#M11057</guid>
      <dc:creator>lspringer</dc:creator>
      <dc:date>2012-11-27T17:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46253#M11058</link>
      <description>&lt;P&gt;The easiest way is probably to use the Sideview Table module instead of the SimpleResultsTable module.  Table has many significant improvements over SimpleResultsTable, but a tiny one that I honestly never noticed is that SimpleResultsTable forces long values to live on one line, whereas Table doesn't do this... &lt;/P&gt;

&lt;P&gt;&lt;A href="http://sideviewapps.com/apps/sideview-utils/"&gt;http://sideviewapps.com/apps/sideview-utils/&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;To get the Table module you'll need a relatively new version of Sideview Utils - Table only came out in 2.2,  the current version is 2.2.6, and the old version on Splunkbase is 1.3.5&lt;/P&gt;

&lt;P&gt;Assuming that someday someone will want the reverse behavior though, I'll add a requirement to my list to make Table respect the $results.softWrap$ convention,  so if you need to,  you can set softWrap to false upstream and the Table would then behave like SRT. &lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2012 17:53:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46253#M11058</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2012-11-27T17:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46254#M11059</link>
      <description>&lt;P&gt;I have written a macro that takes a very long field and turns it into a multi-valued field where each value is 100 characters or less. It isn't pretty, but it works.&lt;/P&gt;

&lt;P&gt;Here is the macro definition. I just copied it from &lt;STRONG&gt;macros.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[long_line_breaker(1)]
# splits a really long field into multiple parts
args = line_text
definition = eval $line_text$=if(len($line_text$) &amp;lt; 100, $line_text$, replace($line_text$, "(.{100})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 202, $line_text$, replace($line_text$, "(.{202})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 304, $line_text$, replace($line_text$, "(.{304})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 406, $line_text$, replace($line_text$, "(.{406})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 508, $line_text$, replace($line_text$, "(.{508})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 610, $line_text$, replace($line_text$, "(.{610})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 712, $line_text$, replace($line_text$, "(.{712})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 814, $line_text$, replace($line_text$, "(.{814})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 916, $line_text$, replace($line_text$, "(.{916})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;lt; 1018, $line_text$, replace($line_text$, "(.{1018})(.*)", "\1\\n\2")) \
| eval $line_text$=if(len($line_text$) &amp;gt;= 100, split($line_text$,"\n"),$line_text$)
iseval = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I use it in a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| table Message
| `long_line_breaker(Message)`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It works for fields of up to 1100 characters, more or less.&lt;/P&gt;

&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:11:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46254#M11059</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-11-27T19:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46255#M11060</link>
      <description>&lt;P&gt;I've tried this and it works but as you stated it's not very pretty. Thanks...&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2012 20:56:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46255#M11060</guid>
      <dc:creator>lspringer</dc:creator>
      <dc:date>2012-11-27T20:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46256#M11061</link>
      <description>&lt;P&gt;And for the regex masochists..&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;rex max_match=100 field="$field$" "(?&amp;lt;split__regex&amp;gt;.{0,100}(?:\s|$)|[^\s]+)" | rename split__regex as "$field$"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;splits lines into 100 character chunks on whitespace  boundaries unless there's no whitespace for 100 characters, in which case the width will expand to fit.&lt;/P&gt;

&lt;P&gt;The regex to split unconditionally at 100 chars is&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"(?&amp;lt;split__regex&amp;gt;.{0,100}(?:\s|$)|.{100})"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2012 21:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46256#M11061</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2012-11-27T21:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46257#M11062</link>
      <description>&lt;P&gt;Nicer! Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2012 21:10:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46257#M11062</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-11-27T21:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46258#M11063</link>
      <description>&lt;P&gt;I got this to work as expected. jonuwz helped to round this all out. For the sake of documentation, I went to Manager » Advanced search » Search macros, created a new macro.&lt;/P&gt;

&lt;P&gt;Name : line_breaker(1)&lt;BR /&gt;
Definition : rex max_match=100 field="$field$" "(?&lt;SPLIT__REGEX&gt;.{0,100}(?:\s|$)|[^\s]+)" | rename split__regex as "$field$"&lt;BR /&gt;
Argument : field&lt;/SPLIT__REGEX&gt;&lt;/P&gt;

&lt;P&gt;Then I ran the search : host=server01 sourcetype="WinEventLog:Application" | table Message | &lt;CODE&gt;line_breaker(Message)&lt;/CODE&gt;  &lt;/P&gt;

&lt;P&gt;Thanks to both of you for your assistance.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46258#M11063</guid>
      <dc:creator>lspringer</dc:creator>
      <dc:date>2020-09-28T12:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46259#M11064</link>
      <description>&lt;P&gt;That regex is hugely helpful. Never even considered doing it that way.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 23:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46259#M11064</guid>
      <dc:creator>lokuly</dc:creator>
      <dc:date>2013-05-20T23:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Table format field size</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46260#M11065</link>
      <description>&lt;P&gt;Thank you @lspringer  for detailing this&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 15:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-format-field-size/m-p/46260#M11065</guid>
      <dc:creator>DEAD_BEEF</dc:creator>
      <dc:date>2018-09-14T15:54:04Z</dc:date>
    </item>
  </channel>
</rss>

