<?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 do I add metadata to events coming from a Splunk forwarder? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11596#M634</link>
    <description>&lt;P&gt;We have Splunk running on a server at each of our locations. The NIC on the server has two IPs, one is a unique IP for communications back to our headquarters, the second IP is the same on all servers and is used to communicate with the cash registers running Snare agents to forward their windows events.&lt;/P&gt;

&lt;P&gt;The way that the application that manages the terminal works, every location has a Terminal1, Terminal2, and Terminal3. The hostname and IP addresses are the same at every location. So, when a terminal generates a Windows security log message, we can't tell which location it originated at since the hostname/IP are the same everywhere.&lt;/P&gt;

&lt;P&gt;How can I add some metadata to the UDP input so that we can uniquely identify each terminal?&lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2010 04:31:01 GMT</pubDate>
    <dc:creator>mctester</dc:creator>
    <dc:date>2010-04-16T04:31:01Z</dc:date>
    <item>
      <title>How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11596#M634</link>
      <description>&lt;P&gt;We have Splunk running on a server at each of our locations. The NIC on the server has two IPs, one is a unique IP for communications back to our headquarters, the second IP is the same on all servers and is used to communicate with the cash registers running Snare agents to forward their windows events.&lt;/P&gt;

&lt;P&gt;The way that the application that manages the terminal works, every location has a Terminal1, Terminal2, and Terminal3. The hostname and IP addresses are the same at every location. So, when a terminal generates a Windows security log message, we can't tell which location it originated at since the hostname/IP are the same everywhere.&lt;/P&gt;

&lt;P&gt;How can I add some metadata to the UDP input so that we can uniquely identify each terminal?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2010 04:31:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11596#M634</guid>
      <dc:creator>mctester</dc:creator>
      <dc:date>2010-04-16T04:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11597#M635</link>
      <description>&lt;P&gt;On the forwarder, you can specify a new metadata field in inputs.conf using the '_meta' setting.  For example -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog:Security]
disabled = 0
_meta = Terminal::1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will added to all events coming in from this input source, and will appear as an indexed field on your indexing instance&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2010 04:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11597#M635</guid>
      <dc:creator>Mick</dc:creator>
      <dc:date>2010-04-16T04:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11598#M636</link>
      <description>&lt;P&gt;I believe he's not using a forwarder, but sending via Snare UDP syslog&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2010 06:34:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11598#M636</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-04-16T06:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11599#M637</link>
      <description>&lt;P&gt;If I am understanding correctly, each Splunk instance gets data that looks the same, and when you use distributed search, the results from each place can't be distinguished? If that's so, all you would need to do is display (or search on) the field &lt;CODE&gt;splunk_server&lt;/CODE&gt; to distinguish the events at each location.&lt;/P&gt;

&lt;P&gt;Update:&lt;/P&gt;

&lt;P&gt;So in fact the Splunk instances are forwarders, not indexers. Are they light or heavy? This can be done, but how will be different depending. With a light forwarder, you can just add a key to the input stanza and use a transform on the indexer to write the key to a field. With a heavy forwarder, the transform occurs on the forwarder. You will not not be able to use environment variables in the key value field, unfortunately. This ability is targets for version 4.0.11 however.&lt;/P&gt;

&lt;P&gt;inputs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[udp://1030]
location = mylocation
# in some future release, you should be able to specify location = $HOSTNAME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::udp:1030]
TRANSFORMS-location = addlocation
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[addlocation]
SOURCE_KEY = location
REGEX = (.*)
FORMAT = location::$1
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Will add an indexed field &lt;CODE&gt;location&lt;/CODE&gt; to your data.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2010 06:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11599#M637</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-04-16T06:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11600#M638</link>
      <description>&lt;P&gt;The servers in the stores are forwarding to a central splunk server.  They listen on UDP 1030 for incoming syslog messages from snare agents running on the POS terminals.  The terminals in each store all use the same names (term1, term2, term3).&lt;/P&gt;

&lt;P&gt;The forwarders aren't indexing events.  They are just forwarding.  So, when we look at the splunk_server field, they all appear as the central splunk server.&lt;/P&gt;

&lt;P&gt;The documentation says you can't add metadata to UDP ports.  Since we need to push this change out to 500+ stores, I'd like to use the deployment server.  If we can add metadata to UDP ports, can we use a variable like:&lt;/P&gt;

&lt;P&gt;_meta = $HOSTNAME&lt;/P&gt;

&lt;P&gt;Thx.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2010 07:01:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11600#M638</guid>
      <dc:creator>jambajuice</dc:creator>
      <dc:date>2010-04-16T07:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11601#M639</link>
      <description>&lt;P&gt;what type of forwarder? light or heavy?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2010 15:31:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11601#M639</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-04-16T15:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11602#M640</link>
      <description>&lt;P&gt;They are heavy forwarders, but we could turn them into light forwarders if this will solve the problem.&lt;/P&gt;

&lt;P&gt;We're not using distributed search, just a single central splunk server.&lt;/P&gt;

&lt;P&gt;How do I implement this on a light/heavy forwarder?&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2010 00:57:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11602#M640</guid>
      <dc:creator>jambajuice</dc:creator>
      <dc:date>2010-04-17T00:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11603#M641</link>
      <description>&lt;P&gt;Is the syntax for the props.conf file correct:&lt;/P&gt;

&lt;P&gt;[source::udp:1030]&lt;/P&gt;

&lt;P&gt;rather than&lt;/P&gt;

&lt;P&gt;[source:udp:1030] or [source::udp::1030]&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2010 01:38:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11603#M641</guid>
      <dc:creator>jambajuice</dc:creator>
      <dc:date>2010-05-11T01:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11604#M642</link>
      <description>&lt;P&gt;This works like a charm!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2011 00:53:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11604#M642</guid>
      <dc:creator>Genti</dc:creator>
      <dc:date>2011-06-17T00:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11605#M643</link>
      <description>&lt;P&gt;works great on 6.1.2 but given the date of the reply I'm wondering if it's deprecated now.  Great having one way to do it so thanks !&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 19:51:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11605#M643</guid>
      <dc:creator>vinceskahan</dc:creator>
      <dc:date>2015-12-30T19:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11606#M644</link>
      <description>&lt;P&gt;This still works in recent version of Splunk.  A few versions complained about this as an unknown configuration (not documented in the README), but it should have continued to work throughout various versions.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 23:02:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11606#M644</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2017-03-01T23:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11607#M645</link>
      <description>&lt;P&gt;indeed - I might add (just to document it) that to have multiple metadata tags in your forwarder, just do something like the following space-delimited&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_meta=key1::value1 key2::value2 key3::value3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Mar 2017 23:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/11607#M645</guid>
      <dc:creator>vinceskahan</dc:creator>
      <dc:date>2017-03-01T23:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/676565#M113162</link>
      <description>&lt;P&gt;This does create the field. However, it doesn't seems to be a metatag, as the field is not working with &lt;STRONG&gt;tstats&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;for example:&lt;/P&gt;&lt;P&gt;|tstats count where index=main location=* by sourcetype&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following error appears:&lt;BR /&gt;&lt;SPAN&gt;When used for 'tstats' searches, the 'WHERE' clause can contain only indexed fields. Ensure all fields in the 'WHERE' clause are indexed. Properly indexed fields should appear in fields.conf.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 10:05:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/676565#M113162</guid>
      <dc:creator>jokertothequinn</dc:creator>
      <dc:date>2024-02-05T10:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/676566#M113163</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259045"&gt;@jokertothequinn&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;In order to query custom indexed fields you should add them in fields.conf on search heads;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[location]
INDEXED=true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 10:24:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/676566#M113163</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2024-02-05T10:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add metadata to events coming from a Splunk forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/676569#M113164</link>
      <description>&lt;P&gt;Oh yeah I did that.&lt;BR /&gt;also, I was making use of REPORT instead of TRANSFORM in props.conf&lt;/P&gt;&lt;P&gt;this is what worked:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Props.conf&lt;/P&gt;&lt;P&gt;[source::ping]&lt;BR /&gt;TRANSFORMS-add_static_fields = mystaticFieldValue&lt;/P&gt;&lt;P&gt;Transforms.conf&lt;/P&gt;&lt;P&gt;[mystaticFieldValue]&lt;BR /&gt;SOURCE_KEY = _raw&lt;BR /&gt;WRITE_META = true&lt;BR /&gt;REGEX = (.*)&lt;BR /&gt;FORMAT = item::31&lt;/P&gt;&lt;P&gt;Fields.conf&lt;/P&gt;&lt;P&gt;[item]&lt;BR /&gt;INDEXED = true&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 10:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-metadata-to-events-coming-from-a-Splunk-forwarder/m-p/676569#M113164</guid>
      <dc:creator>jokertothequinn</dc:creator>
      <dc:date>2024-02-05T10:46:49Z</dc:date>
    </item>
  </channel>
</rss>

