<?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: Extrating fileds based on matching values from log in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100909#M182801</link>
    <description>&lt;P&gt;What's not working with &lt;CODE&gt;rex&lt;/CODE&gt;? This should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "\[PID: (?&amp;lt;pid&amp;gt;\d+)\]\s+\[Thd: (?&amp;lt;thd&amp;gt;\d+)\]"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 26 Mar 2012 09:59:01 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-03-26T09:59:01Z</dc:date>
    <item>
      <title>Extrating fileds based on matching values from log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100908#M182800</link>
      <description>&lt;P&gt;Hi Want to extract specific fields from a log file. Tried using rex but failed.. need help&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Want to extract matching [PID:
&lt;VALUE&gt; ] and [Thd: &lt;VALUE&gt;] &lt;/VALUE&gt;&lt;/VALUE&gt;&lt;/LI&gt;
&lt;LI&gt;export it to csv file or in any excel format&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Log file EG:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;----------------------------------------
03-09-2012 12:04:52.824 Information  C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe [App: WebMobile]  [PID: 296]  [Thd: 5400]  StockRoomController DisplayScanItem 1234 12345678 33333 00000000-0000-0000-0000-000000000000 Controller 39634671 39634703 32
----------------------------------------
----------------------------------------
03-09-2012 12:04:53.262 Information  C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe [App: WebMobile]  [PID: 296]  [Thd: 5676]  BCK001 UI 1 2 00000000-0000-0000-0000-000000000000 RenderingTime 1331316293215 1331316293246 31
----------------------------------------
----------------------------------------
03-09-2012 12:05:06.855 Information  C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe [App: WebMobile]  [PID: 296]  [Thd: 5036]  BCK001 UI 1 2 ffe7d7cb-c7ae-4056-8393-6e237b7e120b SubmitTime 0 1331316306839 0
----------------------------------------
----------------------------------------
03-09-2012 12:05:08.230 Information  C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe [App: WebMobile]  [PID: 296]  [Thd: 5676]  StockroomDomainManager ReadLoc 1234 12345678 33333 ffe7d7cb-c7ae-4056-8393-6e237b7e120b DataBase 39649906 39650687 781
----------------------------------------
----------------------------------------
03-09-2012 12:05:08.230 Information  C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe [App: WebMobile]  [PID: 296]  [Thd: 5676]  StockroomDomainManager ReadStkrmLocsByProdId_FG 1234 12345678 33333 ffe7d7cb-c7ae-4056-8393-6e237b7e120b DataBase 39649906 39650687 781
----------------------------------------
----------------------------------------
03-09-2012 12:05:08.230 Information  C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe [App: WebMobile]  [PID: 296]  [Thd: 5676]  BackstockApplication GetStkrmLocsByProdId_FG 1234 12345678 33333 ffe7d7cb-c7ae-4056-8393-6e237b7e120b Controller 39649906 39650687 781
----------------------------------------
----------------------------------------
03-09-2012 12:05:08.230 Information  C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe [App: WebMobile]  [PID: 296]  [Thd: 5676]  StockRoomController DisplayScanLocation 1234 12345678 33333 ffe7d7cb-c7ae-4056-8393-6e237b7e120b Controller 39650687 39650687 0
----------------------------------------
----------------------------------------
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Mar 2012 09:30:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100908#M182800</guid>
      <dc:creator>tonan</dc:creator>
      <dc:date>2012-03-26T09:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extrating fileds based on matching values from log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100909#M182801</link>
      <description>&lt;P&gt;What's not working with &lt;CODE&gt;rex&lt;/CODE&gt;? This should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "\[PID: (?&amp;lt;pid&amp;gt;\d+)\]\s+\[Thd: (?&amp;lt;thd&amp;gt;\d+)\]"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Mar 2012 09:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100909#M182801</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-26T09:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extrating fileds based on matching values from log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100910#M182802</link>
      <description>&lt;P&gt;Thankyou Ayn,&lt;/P&gt;

&lt;P&gt;Is there any way to export the values out of the log files for the above two mentioned fields.&lt;/P&gt;

&lt;P&gt;Like the logs have a "PID" and "Thd" value, can we use splunk to filter out that value and then export it to a say csv files or an excel sheet.&lt;/P&gt;

&lt;P&gt;--update&lt;BR /&gt;
I can however select the fields i wish to in the output by selecting the fields under "selected fields" but i am not able to export these values in an excel sheet or say a csv&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2012 11:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100910#M182802</guid>
      <dc:creator>tonan</dc:creator>
      <dc:date>2012-03-26T11:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Extrating fileds based on matching values from log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100911#M182803</link>
      <description>&lt;P&gt;&lt;CODE&gt;... | rex "\[PID: (?&amp;lt;pid&amp;gt;\d+)\]\s+\[Thd: (?&amp;lt;thd&amp;gt;\d+)\]" | fields pid thd | outputcsv exportedfields&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2012 11:10:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fileds-based-on-matching-values-from-log/m-p/100911#M182803</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-26T11:10:45Z</dc:date>
    </item>
  </channel>
</rss>

