<?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: How to add an indexed field in a distributed setup? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-an-indexed-field-in-a-distributed-setup/m-p/19940#M2869</link>
    <description>&lt;P&gt;I was able to get this working.  Here's what my conf files look now:&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/system/local/props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
# TRANSFORMS-location = add_location
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/opt/splunk/etc/system/local/transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# [add_location]
# SOURCE_KEY = location
# REGEX = (.*)
# FORMAT = location::$1
# WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/opt/splunk/etc/system/local/fields.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# [location]
# INDEXED = true
# INDEXED_VALUE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the indexer I'm testing with, I have the following:&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/search/local/inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcp://5514]
connection_host = dns
sourcetype = syslog
no_priority_stripping = true
no_appending_timestamp = true
# location = ny
_meta = location::qcy
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 04 Jan 2011 08:24:44 GMT</pubDate>
    <dc:creator>infrauser</dc:creator>
    <dc:date>2011-01-04T08:24:44Z</dc:date>
    <item>
      <title>How to add an indexed field in a distributed setup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-an-indexed-field-in-a-distributed-setup/m-p/19939#M2868</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;

&lt;P&gt;I'm trying to add an indexed field to a distributed setup, but I can't seem to get it working.  (I'm aware that indexed fields are not typically recommended)&lt;/P&gt;

&lt;P&gt;Here's the scenario:
I have multiple indexers at different locations.  I need to add a field to every message that is processed which includes the site where it came from.&lt;/P&gt;

&lt;P&gt;On my search head (which is distributing the confs to the indexers), I have the following:&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/system/local/props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-location = add_location
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/opt/splunk/etc/system/local/transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[add_location]
SOURCE_KEY = location
REGEX = (.*)
FORMAT = location::$1
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/opt/splunk/etc/system/local/fields.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[location]
INDEXED = true
INDEXED_VALUE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the indexer I'm testing with, I have the following:&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/search/local/inputs.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcp://5514]
connection_host = dns
sourcetype = syslog
no_priority_stripping = true
no_appending_timestamp = true
location = ny
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I found a &lt;A href="http://answers.splunk.com/questions/1453/how-do-i-add-metadata-to-events-coming-from-a-splunk-forwarder/1459#1459" rel="nofollow"&gt;similar question&lt;/A&gt; that I've used as a guide.&lt;/P&gt;

&lt;P&gt;Any ideas?  Are there any logs/commands that I can use to see why the indexed field isn't getting added to the events?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2011 04:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-an-indexed-field-in-a-distributed-setup/m-p/19939#M2868</guid>
      <dc:creator>infrauser</dc:creator>
      <dc:date>2011-01-04T04:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an indexed field in a distributed setup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-an-indexed-field-in-a-distributed-setup/m-p/19940#M2869</link>
      <description>&lt;P&gt;I was able to get this working.  Here's what my conf files look now:&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/system/local/props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
# TRANSFORMS-location = add_location
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/opt/splunk/etc/system/local/transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# [add_location]
# SOURCE_KEY = location
# REGEX = (.*)
# FORMAT = location::$1
# WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/opt/splunk/etc/system/local/fields.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# [location]
# INDEXED = true
# INDEXED_VALUE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the indexer I'm testing with, I have the following:&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/apps/search/local/inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcp://5514]
connection_host = dns
sourcetype = syslog
no_priority_stripping = true
no_appending_timestamp = true
# location = ny
_meta = location::qcy
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Jan 2011 08:24:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-an-indexed-field-in-a-distributed-setup/m-p/19940#M2869</guid>
      <dc:creator>infrauser</dc:creator>
      <dc:date>2011-01-04T08:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to add an indexed field in a distributed setup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-an-indexed-field-in-a-distributed-setup/m-p/19941#M2870</link>
      <description>&lt;P&gt;It should be noted that the field &lt;CODE&gt;splunk_server&lt;/CODE&gt; is included in every event, and this indicates which indexer it came from. You can search or report on this field. If you must have a field by another name and map the splunk_server names to locations, you would be better off using a lookup table to map &lt;CODE&gt;splunk_server&lt;/CODE&gt; names to &lt;CODE&gt;location&lt;/CODE&gt; values.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2011 08:58:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-an-indexed-field-in-a-distributed-setup/m-p/19941#M2870</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-01-04T08:58:57Z</dc:date>
    </item>
  </channel>
</rss>

