<?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 set Host from an extracted field? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248805#M47878</link>
    <description>&lt;P&gt;I have never seen that so I cannot help you there.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2016 20:28:36 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2016-07-07T20:28:36Z</dc:date>
    <item>
      <title>How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248797#M47870</link>
      <description>&lt;P&gt;I have some BlueCoat proxy log files being indexed by Splunk. The indexer and Search Head both have the BlueCoat add-on which extracts a bunch of different fields. When the events are indexed, the Host is set to the name of the Universal Forwarder. I would like to change the Host value in these events to the value of an extracted field named &lt;STRONG&gt;x_bluecoat_proxy_primary_address&lt;/STRONG&gt;. After reading the doc on props and transforms, here's what I've come up with on my indexer:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[bluecoat:proxysg:access:file]
TRANSFORMS-proxyhost = x_bluecoat_proxy_primary_address
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[x_bluecoat_proxy_primary_address]
SOURCE_KEY = field:x_bluecoat_proxy_primary_address
REGEX = (.*)
DEST_KEY = MetaData:Host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is not working, obviously. Can someone clue me into what I'm doing wrong here? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248797#M47870</guid>
      <dc:creator>_smp_</dc:creator>
      <dc:date>2020-09-29T10:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248798#M47871</link>
      <description>&lt;P&gt;I believe you'd need to provide REGEX which can extract the value of x_bluecoat_proxy_primary_address from your raw events. Could you post some sample raw data?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:09:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248798#M47871</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T10:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248799#M47872</link>
      <description>&lt;P&gt;Your &lt;CODE&gt;SOURCE_KEY&lt;/CODE&gt; must be wrong; surely you do not have a field named &lt;CODE&gt;field:x_bluecoat_proxy_primary_address&lt;/CODE&gt;.  What it the field that you need to use and, more importantly, how is this field created?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 19:41:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248799#M47872</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-07T19:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248800#M47873</link>
      <description>&lt;P&gt;Thanks for your response. Here is a raw event:&lt;BR /&gt;
&lt;CODE&gt;2016-07-07 19:39:53 31 172.20.176.110 200 TCP_NC_MISS 202 3848 GET http sync.tidaltv.com 80 /genericusersync.ashx ?dpid=1205/ user521 - - sync.tidaltv.com - "Mozilla/5.0 (Windows NT 6.1; rv:47.0) Gecko/20100101 Firefox/47.0" - OBSERVED  "Web Ads/Analytics" - 192.168.15.21 SG-HTTP-Service&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The BlueCoat TA is extracting 192.168.15.21 into a field named x_bluecoat_proxy_primary_address. This is the value I would like to use for Host. And when I read the doc for transforms, I saw this about SOURCE_KEY:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;If  starts with "field:" or "fields:" the meaning is changed.&lt;BR /&gt;
Instead of looking up a KEY, it instead looks up an already indexed field.&lt;BR /&gt;
For example, if a CSV field name "price" was indexed then&lt;BR /&gt;
"SOURCE_KEY = field:price" causes the REGEX to match against the contents&lt;BR /&gt;
of that field.  It's also possible to list multiple fields here with&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;That's why I tried what I did. But I am really, really confused and frustrated by these config files, so I really have no idea if what I want to do is even possible.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:10:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248800#M47873</guid>
      <dc:creator>_smp_</dc:creator>
      <dc:date>2020-09-29T10:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248801#M47874</link>
      <description>&lt;P&gt;Thank you for your response. I really don't understand Splunk well enough to create fields, and am having a very difficult time understanding these config files. All the fields I see were created by the BlueCoat TA that I have installed. The field that has value I want use for Host is named x_bluecoat_proxy_primary_address. But I'm not sure how to describe to you how it is created - I wish I could.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248801#M47874</guid>
      <dc:creator>_smp_</dc:creator>
      <dc:date>2020-09-29T10:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248802#M47875</link>
      <description>&lt;P&gt;Well, it does say that it works for already indexed field. The x_bluecoat_proxy_primary_address could very well be a search time extracted field, thus it didn't work. There should be a  props.conf entry which is doing this search time field extraction. I would find that out and use the regular expression from that props.conf and use it in your Host Override transform.conf.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:09:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248802#M47875</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T10:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248803#M47876</link>
      <description>&lt;P&gt;Change this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; SOURCE_KEY = field:x_bluecoat_proxy_primary_address
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; SOURCE_KEY = x_bluecoat_proxy_primary_address
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then deploy to the indexers, restart all Splunk instances there, and check only newly arriving data (old events will stay broken).&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 20:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248803#M47876</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-07T20:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248804#M47877</link>
      <description>&lt;P&gt;I got this error starting Splunk:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Undocumented key used in transforms.conf; stanza='x_bluecoat_proxy_primary_address' setting='SOURCE_KEY' key='x_bluecoat_proxy_primary_address'&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:09:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248804#M47877</guid>
      <dc:creator>_smp_</dc:creator>
      <dc:date>2020-09-29T10:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to set Host from an extracted field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248805#M47878</link>
      <description>&lt;P&gt;I have never seen that so I cannot help you there.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 20:28:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-Host-from-an-extracted-field/m-p/248805#M47878</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-07T20:28:36Z</dc:date>
    </item>
  </channel>
</rss>

