<?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 configure a universal forwarder to add multiple fields to events being forwarded via _meta? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273155#M52437</link>
    <description>&lt;P&gt;Have a look at this&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Knowledge/Addfieldsatsearchtime"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Knowledge/Addfieldsatsearchtime&lt;/A&gt; (recommended)&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Configureindex-timefieldextraction"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Configureindex-timefieldextraction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This gives you to configure adding custom fields. This can be set for a host as well so you can assign custom fields to all data coming from a host/universal forwarder. &lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2016 23:10:00 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-02-08T23:10:00Z</dc:date>
    <item>
      <title>How to configure a universal forwarder to add multiple fields to events being forwarded via _meta?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273154#M52436</link>
      <description>&lt;P&gt;We're trying to find a way to have the universal forwarder send data to the indexer essentially pre-marked with a small number of custom fields (or the like) that we can later search on.   For example, a particular computer might be from project-X and be in a environment of test or prod or development.   Since VMs come and go, we can't do any persistent mapping of which computer has these added characteristics (host-n.n.n.n might be dev today, prod tomorrow), but the 'data' is persistent.&lt;/P&gt;

&lt;P&gt;I stumbled across the _meta construct in inputs.conf, which works well enough for 'one' custom field.   Just like specifying which index to use, I also specify &lt;CODE&gt;_meta = somename::value&lt;/CODE&gt; in inputs.conf.&lt;/P&gt;

&lt;P&gt;The question I have is, how could I have 'multiple' such added fields specified by the universal forwarder? I know there is folklore saying doing this on the forwarder side is somehow evil or something, but we're talking about adding under a half-dozen custom fields (?) for all the events coming from the forwarder computer.&lt;/P&gt;

&lt;P&gt;Any suggestions other than pointers to the impossibly unreadable/abstract/no-examples docs which I've wasted tens of hours on already?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273154#M52436</guid>
      <dc:creator>vinceskahan</dc:creator>
      <dc:date>2020-09-29T08:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a universal forwarder to add multiple fields to events being forwarded via _meta?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273155#M52437</link>
      <description>&lt;P&gt;Have a look at this&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Knowledge/Addfieldsatsearchtime"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Knowledge/Addfieldsatsearchtime&lt;/A&gt; (recommended)&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Configureindex-timefieldextraction"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Configureindex-timefieldextraction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This gives you to configure adding custom fields. This can be set for a host as well so you can assign custom fields to all data coming from a host/universal forwarder. &lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2016 23:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273155#M52437</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-08T23:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a universal forwarder to add multiple fields to events being forwarded via _meta?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273156#M52438</link>
      <description>&lt;P&gt;Not seeing the relevance.  The first link doesn't resolve, and the second one is search-engine-side.   The indexer and search engine do not know what categorization we want to apply to the client computers, but the client forwarder systems 'do'.  We set custom facts in puppet deploying the forwarder configs that we can use to generate the inputs.conf (etc.) on the forwarder from ERB templates.   Again - I am trying to do 'client' side categorization of the data at forwarding time.  Is this somehow not possible in splunk ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 01:23:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273156#M52438</guid>
      <dc:creator>vinceskahan</dc:creator>
      <dc:date>2016-02-09T01:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a universal forwarder to add multiple fields to events being forwarded via _meta?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273157#M52439</link>
      <description>&lt;P&gt;Well, both the options I suggested manipulate based on client (host value coming from forwarder) only. &lt;/P&gt;

&lt;P&gt;However, I can suggest one workaround using which you can send/set multiple values that can be later used for categorization of the data coming from the client. If this doesn't help you get what you want, I hope someone else in the community can provide a better solution.&lt;BR /&gt;
   What you can do is that you can set value of host (this can be set in inputs.conf on UF) to a combination of whatever values you want to assign, say concatenated by colon or something. They will be set on Client (with whatever method you've in place). On indexer side, you extract those categorization fields and put into separate fields which you can use during searching/reporting.&lt;/P&gt;

&lt;P&gt;So, on inputs.conf (on UF)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://foo/bar/something.log]
index=blah
sourcetype=blahblah
host=customPrefix:field1:field2:field3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For index time field extraction, put on indexer, else on Search Head&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf
[host:customPrefix*]
REPORT-extractcustom = customfields    ***for search time field extractions
TRANSFORMS-extractcustom = customfields   ***for index time field extraction

transforms.conf
[customfields]
SOURCE_KEY = MetaData:Host
REGEX = customPrefix:(?&amp;lt;Field1&amp;gt;\w+):(?&amp;lt;Field2&amp;gt;\w+):(?&amp;lt;Field3&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Feb 2016 02:56:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273157#M52439</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-09T02:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a universal forwarder to add multiple fields to events being forwarded via _meta?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273158#M52440</link>
      <description>&lt;P&gt;Found an answer that seems to work....&lt;/P&gt;

&lt;P&gt;_meta = key1::value1 key2::value2&lt;BR /&gt;
(and so on - use double colons to separate key/value, and whitespace to separate multiple key/value pairs from each other)&lt;/P&gt;

&lt;P&gt;tested in inputs.conf on a universalforwarder using current splunk&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 16:29:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-universal-forwarder-to-add-multiple-fields-to/m-p/273158#M52440</guid>
      <dc:creator>vinceskahan</dc:creator>
      <dc:date>2016-03-01T16:29:59Z</dc:date>
    </item>
  </channel>
</rss>

