<?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 Field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/78367#M19835</link>
    <description>&lt;P&gt;I want to create report for events whose field names haven't been extracted. I have SSH logs of the format "Accepted publickey for user XYZ" , "Accepted publickey for user ABC"   and so on. I want to collect statistics for XYZ and other users. When I test an extraction, I get a javascript error on page which says invalid argument. Even if I save a field extraction, I'm not able to use it in my search. Can someone please tell me how to go about it?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2011 21:34:34 GMT</pubDate>
    <dc:creator>Sheela</dc:creator>
    <dc:date>2011-09-19T21:34:34Z</dc:date>
    <item>
      <title>Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/78367#M19835</link>
      <description>&lt;P&gt;I want to create report for events whose field names haven't been extracted. I have SSH logs of the format "Accepted publickey for user XYZ" , "Accepted publickey for user ABC"   and so on. I want to collect statistics for XYZ and other users. When I test an extraction, I get a javascript error on page which says invalid argument. Even if I save a field extraction, I'm not able to use it in my search. Can someone please tell me how to go about it?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2011 21:34:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/78367#M19835</guid>
      <dc:creator>Sheela</dc:creator>
      <dc:date>2011-09-19T21:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/78368#M19836</link>
      <description>&lt;P&gt;I am not sure why you getting java script error maybe an issue with your browser...&lt;/P&gt;

&lt;P&gt;There are several methods to extract fields:&lt;/P&gt;

&lt;P&gt;First i usually use &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.1/SearchReference/Erex"&gt;erex&lt;/A&gt; to see what regex will catch my field values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | erex user examples="XYZ, ABC" counterexamples="99/2"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then it will give me a regex which i would use in &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.1/SearchReference/Rex"&gt;rex&lt;/A&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=_raw "Accepted\spublickey\sfor\suser\s(?&amp;lt;user&amp;gt;.*[^\s]) "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then I &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.1/Knowledge/Managesearch-timefieldextractions"&gt;Use the Field extractions page in Manager&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Here you will find all the methods to extract fields : &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.1/Knowledge/Aboutfields"&gt;Fields and field extractions&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2011 05:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/78368#M19836</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2011-09-20T05:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/78369#M19837</link>
      <description>&lt;P&gt;That worked perfectly! Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2011 15:43:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction/m-p/78369#M19837</guid>
      <dc:creator>Sheela</dc:creator>
      <dc:date>2011-09-21T15:43:39Z</dc:date>
    </item>
  </channel>
</rss>

