<?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 help... in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181066#M52196</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We log our filesystem utilization to Splunk, and I'd like to extract percentage used field, but the formats for Windows/*Nix are different.  Was wondering if there are any regex experts out there that could take the two examples and create a universal regex that grabs the percent used utilization:&lt;/P&gt;

&lt;P&gt;Nix (percentage is after "Use%")&lt;BR /&gt;
14:42:21 05/05/2015 good    1048593817  [Linux][Baseline][SERVERA][FileSystem][/tmp]    FileSystems\/tmp\Use%=1%    11:33243    0   1&lt;/P&gt;

&lt;P&gt;Windows (percentage is after bracket and before %full):&lt;BR /&gt;
14:56:34 05/05/2015 good    1039182967  [Windows][Baseline][ei0610vwin][DriveSpaceFree][C-MBFree]   93.414% full, 3372MB free, 51197MB total    2:251   93.414  3372&lt;/P&gt;

&lt;P&gt;TIA...&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2015 18:57:39 GMT</pubDate>
    <dc:creator>a212830</dc:creator>
    <dc:date>2015-05-05T18:57:39Z</dc:date>
    <item>
      <title>Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181066#M52196</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We log our filesystem utilization to Splunk, and I'd like to extract percentage used field, but the formats for Windows/*Nix are different.  Was wondering if there are any regex experts out there that could take the two examples and create a universal regex that grabs the percent used utilization:&lt;/P&gt;

&lt;P&gt;Nix (percentage is after "Use%")&lt;BR /&gt;
14:42:21 05/05/2015 good    1048593817  [Linux][Baseline][SERVERA][FileSystem][/tmp]    FileSystems\/tmp\Use%=1%    11:33243    0   1&lt;/P&gt;

&lt;P&gt;Windows (percentage is after bracket and before %full):&lt;BR /&gt;
14:56:34 05/05/2015 good    1039182967  [Windows][Baseline][ei0610vwin][DriveSpaceFree][C-MBFree]   93.414% full, 3372MB free, 51197MB total    2:251   93.414  3372&lt;/P&gt;

&lt;P&gt;TIA...&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 18:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181066#M52196</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-05-05T18:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181067#M52197</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;([\d\.]*)%
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 May 2015 19:06:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181067#M52197</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-05T19:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181068#M52198</link>
      <description>&lt;P&gt;Hello! Here is what you can do. Working  both for &lt;STRONG&gt;Windows/*Nix&lt;/STRONG&gt; filesystems!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.....|rex field=_raw "^[^\n]*Use\%=(?P&amp;amp;lt;tmpuse&amp;amp;gt;\d+)"|rex field=_raw "^(?:[^ \n]* ){1,8}(?P&amp;amp;lt;tmpuse&amp;amp;gt;[0-9.]+)\%\s*full"|table tmpuse
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 21:21:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181068#M52198</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-05T21:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181069#M52199</link>
      <description>&lt;P&gt;This gave me an error - perhaps something was translated when posting?  Is there a way to make this an extract?  &lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 12:06:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181069#M52199</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-05-06T12:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181070#M52200</link>
      <description>&lt;P&gt;Here is what to type. &lt;/P&gt;

&lt;P&gt;|rex field=_raw "^[^\n]&lt;EM&gt;Use\%=(?P&amp;lt;tmpuse&amp;gt;\d+)"|rex field=_raw "^(?:[^ \n]&lt;/EM&gt; ){1,8}(?P&amp;lt;tmpuse&amp;gt;[0-9.]+)\%\s*full"|table tmpuse&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:45:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181070#M52200</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2020-09-28T19:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181071#M52201</link>
      <description>&lt;P&gt;Thanks, not working though.  Comes back blank. &lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 14:21:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181071#M52201</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-05-06T14:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181072#M52202</link>
      <description>&lt;P&gt;The problem is the text editor. replace &lt;CODE&gt;"&amp;amp;lt;"&lt;/CODE&gt; with &lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt; and &lt;CODE&gt;"&amp;amp;gt;"&lt;/CODE&gt;with  &lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt; in the code bellow&lt;BR /&gt;
 &lt;CODE&gt;...|rex field=_raw "^[^\n]Use%=(?P&amp;amp;lt;tmpuse&amp;amp;gt;d+)"|rex field=_raw "^(?:[^ \n] ){1,8}(?P&amp;amp;lt;tmpuse&amp;amp;gt;[0-9.]+)\%s*full"|table tmpuse&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 16:37:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181072#M52202</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-06T16:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181073#M52203</link>
      <description>&lt;P&gt;Tried that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=_raw "^[^\n]Use%=(?P&amp;amp;lt;tmpuse&amp;amp;gt;d+)"|rex field=_raw "^(?:[^ \n] ){1,8}(?P&amp;amp;lt;tmpuse&amp;amp;gt;[0-9.]+)\%s*full"|table tmpuse
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Doesn't work. &lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 01:51:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181073#M52203</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-05-07T01:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181074#M52204</link>
      <description>&lt;P&gt;Always errors in your above code! Escape all &lt;STRONG&gt;%&lt;/STRONG&gt; caracters. And put a star(*) after all  &lt;CODE&gt;"[^ \n]"&lt;/CODE&gt;, and do not forget to replace &lt;CODE&gt;"&amp;amp;lt;"&lt;/CODE&gt; as mentioned earlier.&lt;BR /&gt;
See my first query  above.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 08:01:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181074#M52204</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-07T08:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Extract help...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181075#M52205</link>
      <description>&lt;P&gt;Did you try mine?  Here is the full search:&lt;BR /&gt;
&lt;CODE&gt;... | rex "(?&amp;amp;lt;myPct&amp;amp;gt;[\d\.]*)%" | table myPct&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2015 12:29:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-help/m-p/181075#M52205</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-07T12:29:08Z</dc:date>
    </item>
  </channel>
</rss>

