<?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: Adding a field in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Adding-a-field/m-p/54678#M10620</link>
    <description>&lt;P&gt;Or for that matter lookup files if tags aren't desirable for some reason.&lt;/P&gt;</description>
    <pubDate>Thu, 17 May 2012 17:17:59 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-05-17T17:17:59Z</dc:date>
    <item>
      <title>Adding a field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Adding-a-field/m-p/54676#M10618</link>
      <description>&lt;P&gt;I have about 30 Univ. forwarders on servers dedicated to clientX.  I am currently sending the data to a specific index called clientX via props and transforms.  The servers reside in different environments (dev, qa, prod, etc.).&lt;/P&gt;

&lt;P&gt;I'd like to add a field at index time to indicate which environment the server belongs to, in order to have the ability to query just that environment (i.e. 'index=clientX env=qa')&lt;/P&gt;

&lt;P&gt;Here is a sample of my current configs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf

[host::EHRPITVPDBAP30]
TRANSFORMS-clientX_Host = clientXHost

[host::EHRPITVPDBAP31]
TRANSFORMS-clientX_Host = clientXHost

transforms.conf

[clientXHost]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = clientX
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm assuming I need to do something in transforms.conf to add the field, but am unsure.&lt;/P&gt;

&lt;P&gt;Thanks in advance for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2012 16:46:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Adding-a-field/m-p/54676#M10618</guid>
      <dc:creator>timmy13</dc:creator>
      <dc:date>2012-05-17T16:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Adding-a-field/m-p/54677#M10619</link>
      <description>&lt;P&gt;I think an easier way to do this would be using tags.  If you have a very large number of servers you could use a look up but in this case it would simply be adding the 'client' tag to the server and then you would be able to say 'tag=clientx' in your search.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Tagthehostfield"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Tagthehostfield&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2012 17:16:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Adding-a-field/m-p/54677#M10619</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-05-17T17:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Adding-a-field/m-p/54678#M10620</link>
      <description>&lt;P&gt;Or for that matter lookup files if tags aren't desirable for some reason.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2012 17:17:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Adding-a-field/m-p/54678#M10620</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-05-17T17:17:59Z</dc:date>
    </item>
  </channel>
</rss>

