<?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: Tag Logs Based on Host in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Tag-Logs-Based-on-Host/m-p/32038#M5646</link>
    <description>&lt;P&gt;It appears that I will need to utilize the tags.conf file for what I need.  This is somewhat cumbersome since it does not support wildcards or regex. &lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2012 20:37:50 GMT</pubDate>
    <dc:creator>jodros</dc:creator>
    <dc:date>2012-04-20T20:37:50Z</dc:date>
    <item>
      <title>Tag Logs Based on Host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tag-Logs-Based-on-Host/m-p/32037#M5645</link>
      <description>&lt;P&gt;There are several servers with universal forwarders loaded that are sending logs to our Splunk environment.  These servers are all running the same applications, however some are production and some are development.  There is nothing in the logs themselves to differentiate between prod and dev.  The idea I had would be to key in on the Metadata:Host field to make this determination.  However this is not working.  Below is my config.  Let me know what I am doing wrong.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;transforms.conf
[app_dev]
SOURCE_KEY = MetaData:Host
REGEX = (ho*dev)
FORMAT = environment::"dev"

props.conf
[app_dev]
REPORT-app_dev = app_dev
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am able to use actual tags to accomplish this, but was hoping to "tag" logs with a field extraction so that my field could be called "environment" and the values could be either "dev" or "prod".  The code provided above is only for dev, but prod is similar.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2012 14:13:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tag-Logs-Based-on-Host/m-p/32037#M5645</guid>
      <dc:creator>jodros</dc:creator>
      <dc:date>2012-04-20T14:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Tag Logs Based on Host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tag-Logs-Based-on-Host/m-p/32038#M5646</link>
      <description>&lt;P&gt;It appears that I will need to utilize the tags.conf file for what I need.  This is somewhat cumbersome since it does not support wildcards or regex. &lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2012 20:37:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tag-Logs-Based-on-Host/m-p/32038#M5646</guid>
      <dc:creator>jodros</dc:creator>
      <dc:date>2012-04-20T20:37:50Z</dc:date>
    </item>
  </channel>
</rss>

