<?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: Is it possible to add a field automatically to events with using lookups in a search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-a-field-automatically-to-events-with-using/m-p/122625#M33063</link>
    <description>&lt;P&gt;If you are only using RegEx for case-(in)sensitivity, you can do this without RegEx by using the &lt;CODE&gt;case_sensitive_match = false&lt;/CODE&gt; directive in &lt;CODE&gt;transforms.conf&lt;/CODE&gt; for your automatic lookup.&lt;/P&gt;</description>
    <pubDate>Sun, 09 Aug 2015 21:36:04 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-08-09T21:36:04Z</dc:date>
    <item>
      <title>Is it possible to add a field automatically to events with using lookups in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-a-field-automatically-to-events-with-using/m-p/122623#M33061</link>
      <description>&lt;P&gt;I am indexing web logs in Splunk and one thing I am trying to do is attempt to match the URI against a list of regexes to categorize the type of request...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=weblog | replace *wp-login.php* with "WordPress Login" in uri_path | replace *wp-content* with "WordPress Content", *wp-include* with "WordPress Include", *wp-comment* with "WordPress Comment" in uri_path | replace *wp-admin* with "WordPress Admin Access" in uri_path |replace *wpad.dat* with "WebProxy AutoDetection" in uri_path | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I would like to do is add a &lt;CODE&gt;request_type field&lt;/CODE&gt; to the events that contains that information.  The problem is that not everything is a &lt;CODE&gt;*&lt;/CODE&gt; wildcard. Some of the &lt;CODE&gt;request_type&lt;/CODE&gt; information I want to capture is more of a regex.  For example:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
/[Mm][aA4][iIl1][1lL][eE3][rR].php&lt;BR /&gt;
/[Mm][aA4][iIl1][eE3][1lL][rR].php&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Is there a way to do this via a lookup table?  I could do it with an external script, but I seem to run into issues when I have more than a couple hundred things to lookup (I'll see results while the list is small, but then as the list grows, the lookup results start to disappear).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=weblog | stats count by uri_path | lookup REQUEST_lookup uri_path OUTPUT request_type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Apr 2015 13:26:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-a-field-automatically-to-events-with-using/m-p/122623#M33061</guid>
      <dc:creator>mjbroekman</dc:creator>
      <dc:date>2015-04-03T13:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a field automatically to events with using lookups in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-a-field-automatically-to-events-with-using/m-p/122624#M33062</link>
      <description>&lt;P&gt;Are the URI's and request types so unique that you actually have to look them up against a list?  Can you give some idea as to what the request types are to you and how they're being determined? I'm not sure what that regex example is supposed to be... you might need to clarify a bit.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2015 00:42:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-a-field-automatically-to-events-with-using/m-p/122624#M33062</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2015-04-04T00:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a field automatically to events with using lookups in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-a-field-automatically-to-events-with-using/m-p/122625#M33063</link>
      <description>&lt;P&gt;If you are only using RegEx for case-(in)sensitivity, you can do this without RegEx by using the &lt;CODE&gt;case_sensitive_match = false&lt;/CODE&gt; directive in &lt;CODE&gt;transforms.conf&lt;/CODE&gt; for your automatic lookup.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2015 21:36:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-add-a-field-automatically-to-events-with-using/m-p/122625#M33063</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-09T21:36:04Z</dc:date>
    </item>
  </channel>
</rss>

