<?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: Add field to windows event in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535666#M89835</link>
    <description>&lt;P&gt;Ciao&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;However I think I want to do the first case&amp;nbsp; because I would like the value of the environment variable to be added to all indexed events :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LogName=Application
SourceName=TikTakTok
EventCode=0
EventType=4
Type=Information
ComputerName=Server0001
TaskCategory=None
OpCode=Info
RecordNumber=44767
Keywords=Classic
Message=Service started successfully.
AddedField=$env:Variable&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2021 14:30:01 GMT</pubDate>
    <dc:creator>Policello</dc:creator>
    <dc:date>2021-01-13T14:30:01Z</dc:date>
    <item>
      <title>Add field to windows event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535621#M89825</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is it possible to add fields to the windows event collected by a forwarder ?&lt;/P&gt;&lt;P&gt;I would like to add an environment variable before it is indexed.&lt;/P&gt;&lt;P&gt;Something like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[WinEventLog://Application]
disabled = 0
index=tiktak
whitelist=SourceName="Tiktak*"
addField=Cluster=$OM_CLUSTER_ID$&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 08:53:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535621#M89825</guid>
      <dc:creator>Policello</dc:creator>
      <dc:date>2021-01-13T08:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Add field to windows event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535641#M89829</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230445"&gt;@Policello&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;do you want to add this environment variable to other events or check this variable?&lt;/P&gt;&lt;P&gt;in the first case I don't know how to do,.&lt;/P&gt;&lt;P&gt;In the second one, you could create a script that reads the environment variables and run it in a scripted input.&lt;/P&gt;&lt;P&gt;In other words, you have to :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;create a script (called e.g. env.bat) containing the "set" command and put it in the "bin" folder of an app;&lt;/LI&gt;&lt;LI&gt;create a scripted input in inpus.conf of the same app, like this:&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;[script://../bin/end.bat]
interval=3600
disabled = 0
index=tiktak
sourcetype=env&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;deploy the app to the Forwarder.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 12:26:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535641#M89829</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-13T12:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add field to windows event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535666#M89835</link>
      <description>&lt;P&gt;Ciao&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;However I think I want to do the first case&amp;nbsp; because I would like the value of the environment variable to be added to all indexed events :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LogName=Application
SourceName=TikTakTok
EventCode=0
EventType=4
Type=Information
ComputerName=Server0001
TaskCategory=None
OpCode=Info
RecordNumber=44767
Keywords=Classic
Message=Service started successfully.
AddedField=$env:Variable&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 14:30:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535666#M89835</guid>
      <dc:creator>Policello</dc:creator>
      <dc:date>2021-01-13T14:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Add field to windows event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535800#M89851</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230445"&gt;@Policello&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;for my knowledge, I don't think that's possible, maybe someone else has a different solution!&lt;/P&gt;&lt;P&gt;Verify if the other choice is compatible with your needs.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 09:46:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Add-field-to-windows-event/m-p/535800#M89851</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-14T09:46:48Z</dc:date>
    </item>
  </channel>
</rss>

