<?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 Extract fields with multiple values in raw data in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61815#M8793</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I need to extract total from Mem and free from buffers/cache. Any idea on how do I do that?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;          total       used       free     shared    buffers     cached
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Mem:          3820       3685        134          0        663       2115&lt;/P&gt;

&lt;P&gt;buffers/cache:       907        2913&lt;/P&gt;

&lt;P&gt;I did try using multikv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;multikv fields total free filter Mem buffers/cache
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it doesn't give the data as expected.&lt;/P&gt;

&lt;P&gt;Data before the perl script was used to strip off few fields&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;             total       used       free     shared    buffers     cached
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Mem:          3820       3666        154          0        658       1980&lt;/P&gt;

&lt;P&gt;-/+ buffers/cache:       1027       2793&lt;/P&gt;

&lt;P&gt;Swap:         2047          0       2047&lt;/P&gt;

&lt;P&gt;Total:        5868       3666       2202&lt;/P&gt;

&lt;P&gt;When I used multikv it was considering ttal as 3820 and -/+ buffers/cache. To avoid this I removed the -/+ , Swap and Total (not needed). Now its not even recognizing when I do multikv fields free filter buffers/cache.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Dec 2012 18:20:00 GMT</pubDate>
    <dc:creator>theouhuios</dc:creator>
    <dc:date>2012-12-12T18:20:00Z</dc:date>
    <item>
      <title>Extract fields with multiple values in raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61815#M8793</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I need to extract total from Mem and free from buffers/cache. Any idea on how do I do that?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;          total       used       free     shared    buffers     cached
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Mem:          3820       3685        134          0        663       2115&lt;/P&gt;

&lt;P&gt;buffers/cache:       907        2913&lt;/P&gt;

&lt;P&gt;I did try using multikv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;multikv fields total free filter Mem buffers/cache
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it doesn't give the data as expected.&lt;/P&gt;

&lt;P&gt;Data before the perl script was used to strip off few fields&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;             total       used       free     shared    buffers     cached
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Mem:          3820       3666        154          0        658       1980&lt;/P&gt;

&lt;P&gt;-/+ buffers/cache:       1027       2793&lt;/P&gt;

&lt;P&gt;Swap:         2047          0       2047&lt;/P&gt;

&lt;P&gt;Total:        5868       3666       2202&lt;/P&gt;

&lt;P&gt;When I used multikv it was considering ttal as 3820 and -/+ buffers/cache. To avoid this I removed the -/+ , Swap and Total (not needed). Now its not even recognizing when I do multikv fields free filter buffers/cache.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2012 18:20:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61815#M8793</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-12-12T18:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with multiple values in raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61816#M8794</link>
      <description>&lt;P&gt;multikv is typically what would work.  What results are you getting from using multikv?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2012 18:29:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61816#M8794</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-12-12T18:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with multiple values in raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61817#M8795</link>
      <description>&lt;P&gt;I actually wrote a perl script to remove few things which weren't needed like -/+ in the output of free -tm command. I did that because of the issues in the multikv. It was considering -/+ buffers/cache as a value to total and this wasn't letting use any calculations.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2012 18:37:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61817#M8795</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-12-12T18:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with multiple values in raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61818#M8796</link>
      <description>&lt;P&gt;Edited my first post with more info.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2012 18:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61818#M8796</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-12-12T18:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with multiple values in raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61819#M8797</link>
      <description>&lt;P&gt;This should work, whether or not you use the Perl script. It will give you two field: &lt;CODE&gt;mem_total&lt;/CODE&gt; and &lt;CODE&gt;cache_free&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| rex "(?m)Mem:\s*(?&amp;lt;mem_total&amp;gt;\d+)\s*cache:\s*\d+\s+(?&amp;lt;cache_free&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Dec 2012 03:15:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61819#M8797</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-12-13T03:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields with multiple values in raw data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61820#M8798</link>
      <description>&lt;P&gt;Nope. Even this isn't working. Should I just input the raw data instead of using a script to modify the data and format? Probably that's messing it up&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 15:05:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Extract-fields-with-multiple-values-in-raw-data/m-p/61820#M8798</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2012-12-13T15:05:02Z</dc:date>
    </item>
  </channel>
</rss>

