<?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: Pull out fields embedded in logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90950#M18897</link>
    <description>&lt;P&gt;Thanks!  This worked great inline.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2013 19:24:27 GMT</pubDate>
    <dc:creator>mdavis43</dc:creator>
    <dc:date>2013-10-09T19:24:27Z</dc:date>
    <item>
      <title>Pull out fields embedded in logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90947#M18894</link>
      <description>&lt;P&gt;I'm looking for information about how to pull out field information from inside the log messages.  For example...&lt;/P&gt;

&lt;P&gt;Message=(Error) I/O error on file system 'prodops' operation WRITE inode (Message repeated 4732 times)&lt;/P&gt;

&lt;P&gt;Message=(Error) I/O error on file system 'proxy' operation WRITE inode (Message repeated 4 times)&lt;/P&gt;

&lt;P&gt;Message=(Error) I/O error on file system 'wwtowip' operation WRITE inode &lt;/P&gt;

&lt;P&gt;These come from Windows event logs and I want to be able to sort on how many times these errors happen to each individual filesystem.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 18:19:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90947#M18894</guid>
      <dc:creator>mdavis43</dc:creator>
      <dc:date>2013-10-09T18:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pull out fields embedded in logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90948#M18895</link>
      <description>&lt;P&gt;You should use rex to create a field from within the Message field that you can search on later.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="*security*" | rex field=Message "... error on file system '(?&amp;lt;filesystem&amp;gt;.*)' | stats count by filesystem
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Oct 2013 18:31:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90948#M18895</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-09T18:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pull out fields embedded in logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90949#M18896</link>
      <description>&lt;P&gt;There are a number of ways to extract fields. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/Knowledge/Addfieldsatsearchtime"&gt;Overview of search-time field extractions&lt;/A&gt; is a good resource.&lt;/P&gt;

&lt;P&gt;For the data you have here, you could do this in the &lt;CODE&gt;rex&lt;/CODE&gt; command as well -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| rex "(?&amp;lt;msg&amp;gt;.*?file system)\s*\'(?&amp;lt;file_system&amp;gt;.*?)\' operation (?&amp;lt;operation&amp;gt;.*)(?:\(Message repeated (?&amp;lt;msgcount&amp;gt;\d+)  times\))*"
| fillnull value=1 msgcount
| stats sum(msgcount) as MessageCount by msg file_system 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've probably made some typo in the regular expression... but I hope you get the idea&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 18:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90949#M18896</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-10-09T18:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pull out fields embedded in logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90950#M18897</link>
      <description>&lt;P&gt;Thanks!  This worked great inline.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 19:24:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90950#M18897</guid>
      <dc:creator>mdavis43</dc:creator>
      <dc:date>2013-10-09T19:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Pull out fields embedded in logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90951#M18898</link>
      <description>&lt;P&gt;Thanks, this looks great for long term usage.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 19:24:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pull-out-fields-embedded-in-logs/m-p/90951#M18898</guid>
      <dc:creator>mdavis43</dc:creator>
      <dc:date>2013-10-09T19:24:45Z</dc:date>
    </item>
  </channel>
</rss>

