<?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 a dynamic field to an inputs.conf file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-a-dynamic-field-to-an-inputs-conf-file/m-p/380091#M68651</link>
    <description>&lt;P&gt;I have logs which are monitored by a Splunk forwarder, but what I want to do is add dynamic fields to an event, which will be generated as a result of any script or command (for example with &lt;CODE&gt;curl&lt;/CODE&gt;). &lt;/P&gt;

&lt;P&gt;I know one way, with scripted input, is to create a script that reads logs and parallel add any value to the result.&lt;/P&gt;

&lt;P&gt;Do we have another more elegant way of doing this? I searched but I couldn't find anything.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Feb 2019 18:18:41 GMT</pubDate>
    <dc:creator>arlington</dc:creator>
    <dc:date>2019-02-12T18:18:41Z</dc:date>
    <item>
      <title>How do I add a dynamic field to an inputs.conf file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-a-dynamic-field-to-an-inputs-conf-file/m-p/380091#M68651</link>
      <description>&lt;P&gt;I have logs which are monitored by a Splunk forwarder, but what I want to do is add dynamic fields to an event, which will be generated as a result of any script or command (for example with &lt;CODE&gt;curl&lt;/CODE&gt;). &lt;/P&gt;

&lt;P&gt;I know one way, with scripted input, is to create a script that reads logs and parallel add any value to the result.&lt;/P&gt;

&lt;P&gt;Do we have another more elegant way of doing this? I searched but I couldn't find anything.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 18:18:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-a-dynamic-field-to-an-inputs-conf-file/m-p/380091#M68651</guid>
      <dc:creator>arlington</dc:creator>
      <dc:date>2019-02-12T18:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a dynamic field to an inputs.conf file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-a-dynamic-field-to-an-inputs-conf-file/m-p/380092#M68652</link>
      <description>&lt;P&gt;Hi @arlington &lt;/P&gt;

&lt;P&gt;The most elegant way to enrich events is to have a script that populates a CSV which is then used as an automatic lookup. A good example is the identity and asset lookups in Enterprise Security that work like this. They are very performant even for huge lookups.&lt;/P&gt;

&lt;P&gt;If you want to enrich an event and your absolutly can't pre-compute the data, then use a script (external) lookup &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.3/Knowledge/Configureexternallookups"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.3/Knowledge/Configureexternallookups&lt;/A&gt; or a custom command: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.3/Search/Writeasearchcommand"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.3/Search/Writeasearchcommand&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;All the best.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 19:11:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-a-dynamic-field-to-an-inputs-conf-file/m-p/380092#M68652</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-12T19:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add a dynamic field to an inputs.conf file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-a-dynamic-field-to-an-inputs-conf-file/m-p/380093#M68653</link>
      <description>&lt;P&gt;Actually what I am trying to do is add Instance ID or any TAG from EC2 instance to my apps event. But still I can't find a proper solution how to do that. Using host field is not reliable to match in lookup, because if instance going to be destroyed it's ip and host name release and will be assigned to newly created instance in future. As Instance ID is unique across whole AWS environmet I would like to use that. But in order to do that need add instance id to all events which I am forwarding with splunkforwarder. Instance ID  are accessible with the curl command inside current running instance.  Any idea on that?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 09:02:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-a-dynamic-field-to-an-inputs-conf-file/m-p/380093#M68653</guid>
      <dc:creator>arlington</dc:creator>
      <dc:date>2019-02-13T09:02:22Z</dc:date>
    </item>
  </channel>
</rss>

