<?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: Add a field that includes the length of the field values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65934#M16357</link>
    <description>&lt;P&gt;I believe that you want to take a look at 'calculated fields', which lets you make this 'permanent' in a config file. So no need to put it as part of the search.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/definecalcfields"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/definecalcfields&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-&amp;lt;fieldname&amp;gt; = &amp;lt;eval statement&amp;gt;
* Use this to automatically run the &amp;lt;eval statement&amp;gt; and assign the 
  value of the output to &amp;lt;fieldname&amp;gt;.  This feature is referred to as 'calculated fields'.
* When multiple EVAL-* statements are specified, they behave as if 
  they are run in parallel, rather than in any particular sequence.  
  This means that if you have e.g. EVAL-x=y*2, EVAL-y=100, x will be 
  assigned the original value of y * 2, not the value of y after it is set to 100.
* All field calculations will done after field aliasing but before lookups.  This
  means you can lookup based on the value of a calculated field
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;K&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2013 20:03:10 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-06-17T20:03:10Z</dc:date>
    <item>
      <title>Add a field that includes the length of the field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65933#M16356</link>
      <description>&lt;P&gt;I am using eval foo = mvcount(split(field,"")) to count the number of characters in a field at search time. Is there a place to put such a statement so that the field foo gets created for all events that contain that field?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 19:27:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65933#M16356</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-06-17T19:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field that includes the length of the field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65934#M16357</link>
      <description>&lt;P&gt;I believe that you want to take a look at 'calculated fields', which lets you make this 'permanent' in a config file. So no need to put it as part of the search.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/definecalcfields"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/definecalcfields&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVAL-&amp;lt;fieldname&amp;gt; = &amp;lt;eval statement&amp;gt;
* Use this to automatically run the &amp;lt;eval statement&amp;gt; and assign the 
  value of the output to &amp;lt;fieldname&amp;gt;.  This feature is referred to as 'calculated fields'.
* When multiple EVAL-* statements are specified, they behave as if 
  they are run in parallel, rather than in any particular sequence.  
  This means that if you have e.g. EVAL-x=y*2, EVAL-y=100, x will be 
  assigned the original value of y * 2, not the value of y after it is set to 100.
* All field calculations will done after field aliasing but before lookups.  This
  means you can lookup based on the value of a calculated field
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;K&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 20:03:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65934#M16357</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-06-17T20:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field that includes the length of the field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65935#M16358</link>
      <description>&lt;P&gt;Perfect. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 20:09:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65935#M16358</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-06-17T20:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field that includes the length of the field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65936#M16359</link>
      <description>&lt;P&gt;You are aware of the &lt;CODE&gt;len(x)&lt;/CODE&gt; function for &lt;CODE&gt;eval&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 20:31:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65936#M16359</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-06-17T20:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field that includes the length of the field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65937#M16360</link>
      <description>&lt;P&gt;I was not. Thanks for bring it up. Will change it since it is more simple to use and produces the same results. Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 20:34:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-field-that-includes-the-length-of-the-field-values/m-p/65937#M16360</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-06-17T20:34:36Z</dc:date>
    </item>
  </channel>
</rss>

