<?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 to extract these fields and compare the values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255933#M76641</link>
    <description>&lt;P&gt;Give this a try as well&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | eval Quota_Ratio=tonumber(mvindex(split(logical_usage," "),-1))/tonumber(mvindex(split(field13," "),-1))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 May 2016 15:49:09 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-05-17T15:49:09Z</dc:date>
    <item>
      <title>How to extract these fields and compare the values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255931#M76639</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have 2 fields. Field1 is named field13 and Field2 is named logical_usage.&lt;/P&gt;

&lt;P&gt;Field1 contains "hard" : 1099511627776&lt;BR /&gt;
Field2 contains "logical" : 664419&lt;/P&gt;

&lt;P&gt;I tried to extract values after the &lt;CODE&gt;:&lt;/CODE&gt; and after a ratio of the usage. That's for a quota ratio.&lt;/P&gt;

&lt;P&gt;I tried with &lt;CODE&gt;| rex&lt;/CODE&gt;, but I didn't find the right way to do it.&lt;/P&gt;

&lt;P&gt;Thank you for your precious help.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 12:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255931#M76639</guid>
      <dc:creator>marcroyer</dc:creator>
      <dc:date>2016-05-17T12:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields and compare the values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255932#M76640</link>
      <description>&lt;P&gt;This rex command will extract the number.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | rex field=field1 "\:\s*(?&amp;lt;field1value&amp;gt;\d+)" | rex field=field2 "\:\s*(?&amp;lt;field2value&amp;gt;\d+)" | table field1value field2value
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 May 2016 14:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255932#M76640</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-17T14:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields and compare the values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255933#M76641</link>
      <description>&lt;P&gt;Give this a try as well&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | eval Quota_Ratio=tonumber(mvindex(split(logical_usage," "),-1))/tonumber(mvindex(split(field13," "),-1))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 May 2016 15:49:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255933#M76641</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-17T15:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract these fields and compare the values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255934#M76642</link>
      <description>&lt;P&gt;Hi Guys, &lt;/P&gt;

&lt;P&gt;Thank you very much !!! It's working as expected. &lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 17:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-these-fields-and-compare-the-values/m-p/255934#M76642</guid>
      <dc:creator>marcroyer</dc:creator>
      <dc:date>2016-05-17T17:12:31Z</dc:date>
    </item>
  </channel>
</rss>

