<?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 How to add a static field using a lookup file for a partial match in the Universal forwarder? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152217#M30975</link>
    <description>&lt;P&gt;I am new to splunk and trying to add a static field (action) using a lookup file. It needs to be a partial match with the log entry.&lt;BR /&gt;
I would prefer doing it in the forwarder because the indexer is common many projects.&lt;/P&gt;

&lt;P&gt;lookups/lookup-file.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;raw,action
*BoExceptions*,exclude
*No existing PackageTrade is found*,include
*deadLetter | 145 | ExchangeExchange[ExchangePattern:InOnly, BodyType:String]*,exclude
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
max_matches=1
min_matches=1
default_match=exclude
case_sensitive_match=false
match_type=WILDCARD(raw)
[lookup-app-log]
filename=lookup-file.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried the following two approaches.&lt;BR /&gt;
props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
[source::.../server-1-*.log]
sourcetype=luxor-server
LOOKUP-action=lookup-app-log OUTPUT action
[source::.../server-2-*.log]
sourcetype=luxor-gemfire-server
REPORT-action=lookup-app-log
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Dec 2014 22:57:21 GMT</pubDate>
    <dc:creator>varunanand</dc:creator>
    <dc:date>2014-12-16T22:57:21Z</dc:date>
    <item>
      <title>How to add a static field using a lookup file for a partial match in the Universal forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152217#M30975</link>
      <description>&lt;P&gt;I am new to splunk and trying to add a static field (action) using a lookup file. It needs to be a partial match with the log entry.&lt;BR /&gt;
I would prefer doing it in the forwarder because the indexer is common many projects.&lt;/P&gt;

&lt;P&gt;lookups/lookup-file.csv&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;raw,action
*BoExceptions*,exclude
*No existing PackageTrade is found*,include
*deadLetter | 145 | ExchangeExchange[ExchangePattern:InOnly, BodyType:String]*,exclude
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
max_matches=1
min_matches=1
default_match=exclude
case_sensitive_match=false
match_type=WILDCARD(raw)
[lookup-app-log]
filename=lookup-file.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried the following two approaches.&lt;BR /&gt;
props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
[source::.../server-1-*.log]
sourcetype=luxor-server
LOOKUP-action=lookup-app-log OUTPUT action
[source::.../server-2-*.log]
sourcetype=luxor-gemfire-server
REPORT-action=lookup-app-log
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Dec 2014 22:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152217#M30975</guid>
      <dc:creator>varunanand</dc:creator>
      <dc:date>2014-12-16T22:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a static field using a lookup file for a partial match in the Universal forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152218#M30976</link>
      <description>&lt;P&gt;You can't do a lookup on a forwarder. Lookups happen only at search time - forwarders work at input time only.&lt;/P&gt;

&lt;P&gt;Here are some references that may help:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Indexer/Indextimeversussearchtime"&gt;Splunk docs: Index time vs. Search time&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Configurationparametersandthedatapipeline"&gt;Splunk docs: Configuration parameters and the data pipeline&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F"&gt;Splunk wiki: Where do I configure my Splunk settings?&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2014 23:34:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152218#M30976</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-12-16T23:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a static field using a lookup file for a partial match in the Universal forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152219#M30977</link>
      <description>&lt;P&gt;I configured it on the indexer and it still doesn't work. Is the conf right? Also added:&lt;/P&gt;

&lt;P&gt;fields.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[action]
INDEXED_VALUE=false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Dec 2014 01:17:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152219#M30977</guid>
      <dc:creator>varunanand</dc:creator>
      <dc:date>2014-12-17T01:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a static field using a lookup file for a partial match in the Universal forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152220#M30978</link>
      <description>&lt;P&gt;Here is what you need:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;BR /&gt;
     [source::.../server-1-*.log]&lt;BR /&gt;
     sourcetype=luxor-server&lt;BR /&gt;
     LOOKUP-action=lookup-app-log raw as _raw OUTPUT action&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;BR /&gt;
 [lookup-app-log]&lt;BR /&gt;
 filename=lookup-file.csv&lt;BR /&gt;
 max_matches=1&lt;BR /&gt;
 min_matches=1&lt;BR /&gt;
 default_match=exclude&lt;BR /&gt;
 case_sensitive_match=false&lt;BR /&gt;
 match_type=WILDCARD(raw)&lt;/P&gt;

&lt;P&gt;Note that the name of the field in the events is &lt;CODE&gt;_raw&lt;/CODE&gt; not &lt;CODE&gt;raw&lt;/CODE&gt;. That is why you have to specify them both in LOOKUP setting. Also, this lookup may be pretty inefficient. &lt;/P&gt;

&lt;P&gt;If you do not have a large number of entries in the lookup table, you might consider using eventtypes instead. Or a combination of eventtypes and tags.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152220#M30978</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2020-09-28T18:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a static field using a lookup file for a partial match in the Universal forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152221#M30979</link>
      <description>&lt;P&gt;Thanks Iguinn. Solved my issue.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 05:54:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-a-static-field-using-a-lookup-file-for-a-partial/m-p/152221#M30979</guid>
      <dc:creator>varunanand</dc:creator>
      <dc:date>2014-12-18T05:54:56Z</dc:date>
    </item>
  </channel>
</rss>

