<?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: Windows Event Forwarding custom channels, renaming sources, adding metadata in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404211#M71780</link>
    <description>&lt;P&gt;Yikes, sorry, I fat fingered that one:&lt;/P&gt;

&lt;P&gt;This should work in your inputs.conf:&lt;BR /&gt;
[WinEventLog://WEC-Security] &lt;/P&gt;

&lt;P&gt;Then you would refer to it in props.conf as:&lt;BR /&gt;
[source::WinEventLog:WEC-Security]&lt;/P&gt;

&lt;P&gt;At this stage you can manipulate the source and sourcetype with the standard windows TA transforms if you so choose.&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2019 13:28:41 GMT</pubDate>
    <dc:creator>jcapmany</dc:creator>
    <dc:date>2019-05-15T13:28:41Z</dc:date>
    <item>
      <title>Windows Event Forwarding custom channels, renaming sources, adding metadata</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404207#M71776</link>
      <description>&lt;P&gt;We have a custom Windows Event Forwarding deployment, with specific channels (i.e. not all goes to ForwardedEvents).&lt;BR /&gt;
FWD/Application, FWD/System, and so on. &lt;/P&gt;

&lt;P&gt;We use Splunkforwarder (7.2.1) to get this all into splunk. It reads the sources just fine, with source::WinEventLog:FWD-&lt;STRONG&gt;name of channel&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;Windows TA (5.0) is not very fond of this, as it searches for source::WinEventLog:Security or a known, standard channel name. &lt;/P&gt;

&lt;P&gt;No matter, override [source::WinEventLog:FWD-Security] for example, and apply there the transforms (custom app to override this goes in forwarder, indexers and search head). This works just fine. All transforms are applied.&lt;/P&gt;

&lt;P&gt;Since we like to have the host as the source machine, we add a meta field, wec_host, for troubleshooting purposes.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[set-wef-forwarding-host]
REGEX = (?m)host::(.*)$
SOURCE_KEY = MetaData:Host
FORMAT = wec_host::$1
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Works like a charm. Then, we want to apply another transform to add the original channel it was received from to the metadata, which is present in the source:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[set-wef-channel]
REGEX = WinEventLog:(.*)
SOURCE_KEY = MetaData:Source
FORMAT = wef_channel::$1
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After that, we apply the usual transforms from Windows TA to fix the source and sourcetype:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::WinEventLog:FWD-Security]
TRANSFORMS-t1-add_forwarder_for_wef = set-wef-forwarding-host
**TRANSFORMS-t2-add_channel_for_wef = set-wef-channel**
TRANSFORMS-t3-change_xml_host_for_windows_wef = WinEventXmlHostOverride
TRANSFORMS-t4-fix_source_and_sourcetype = ta-windows-fix-xml-source,ta-windows-fix-sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Taking into account top to bottom, and precedence, checking with btool, it appears the transforms should be applying in the right order, but by the time the &lt;STRONG&gt;set-wef-channel&lt;/STRONG&gt; transform hits, the &lt;STRONG&gt;MetaData:Source&lt;/STRONG&gt; no longer contains &lt;STRONG&gt;WinEventLog:FWD-Security&lt;/STRONG&gt; and is empty as the regex doesn't match.&lt;/P&gt;

&lt;P&gt;What are we missing?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 09:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404207#M71776</guid>
      <dc:creator>jcapmany</dc:creator>
      <dc:date>2019-02-21T09:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Event Forwarding custom channels, renaming sources, adding metadata</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404208#M71777</link>
      <description>&lt;P&gt;We use &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:WinEventLog:Security]
TRANSFORMS-classname = Transforms_stanza
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and it works for Security fine. &lt;/P&gt;

&lt;P&gt;We have the problem at Windows Event Collector: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source:WinEventLog:WEC/Channel1]
TRANSFORMS-classname = ....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;We try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source::../Channel1
or
source::...//Channel1 OR source::..WEC/Channel1 OR source::...\Channel1 OR  source::...Channel1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but no solution! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Some Ideas?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 18:57:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404208#M71777</guid>
      <dc:creator>amielke</dc:creator>
      <dc:date>2019-05-13T18:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Event Forwarding custom channels, renaming sources, adding metadata</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404209#M71778</link>
      <description>&lt;P&gt;Use a dash instead of a backslash:&lt;BR /&gt;
e.g.  [source::WinEventLog:WEC-Channel1] instead of [source:WinEventLog:WEC/Channel1]&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 08:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404209#M71778</guid>
      <dc:creator>jcapmany</dc:creator>
      <dc:date>2019-05-14T08:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Event Forwarding custom channels, renaming sources, adding metadata</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404210#M71779</link>
      <description>&lt;P&gt;The dash doesn't help &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 07:58:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404210#M71779</guid>
      <dc:creator>amielke</dc:creator>
      <dc:date>2019-05-15T07:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Event Forwarding custom channels, renaming sources, adding metadata</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404211#M71780</link>
      <description>&lt;P&gt;Yikes, sorry, I fat fingered that one:&lt;/P&gt;

&lt;P&gt;This should work in your inputs.conf:&lt;BR /&gt;
[WinEventLog://WEC-Security] &lt;/P&gt;

&lt;P&gt;Then you would refer to it in props.conf as:&lt;BR /&gt;
[source::WinEventLog:WEC-Security]&lt;/P&gt;

&lt;P&gt;At this stage you can manipulate the source and sourcetype with the standard windows TA transforms if you so choose.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 13:28:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/404211#M71780</guid>
      <dc:creator>jcapmany</dc:creator>
      <dc:date>2019-05-15T13:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Event Forwarding custom channels, renaming sources, adding metadata</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/516977#M87495</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;I just stumbled over the same issues. Besides remembering the WEC Host name I wanted to have a field with the original (custom) Channel Name. After some playing around I got this config on my indexers and it seems to work fine for me.&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[WinEventLog:ForwardedEvents]
TRANSFORMS-change_host_for_windows_wef = WinEventRememberHost, WinEventHostOverride

[XmlWinEventLog:ForwardedEvents]
TRANSFORMS-change_xml_host_for_windows_wef = WinEventRememberHost, WinEventXmlHostOverride

[(?::){0}WinEventLog:*]
TRANSFORMS-1-SaveOrigChannel = WinEventSetOrigChannelName

[(?::){0}XmlWinEventLog:*]
TRANSFORMS-1-XmlSaveOrigChannel = WinEventSetOrigChannelName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[WinEventHostOverride]
DEST_KEY = MetaData:Host
REGEX = (?m)ComputerName=(.*)?\b
FORMAT = host::$1

[WinEventXmlHostOverride]
DEST_KEY = MetaData:Host
REGEX = &amp;lt;Computer&amp;gt;(.*).*?&amp;lt;\/Computer&amp;gt;
FORMAT = host::$1

[WinEventRememberHost]
SOURCE_KEY = MetaData:Host
REGEX = host::(.+)
FORMAT = host_UF::$1
WRITE_META = true

[WinEventSetOrigChannelName]
REGEX = WinEventLog:(.*)
SOURCE_KEY = MetaData:Source
FORMAT = original_channel::$1
WRITE_META = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 09:29:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Event-Forwarding-custom-channels-renaming-sources-adding/m-p/516977#M87495</guid>
      <dc:creator>Lombi</dc:creator>
      <dc:date>2020-08-31T09:29:01Z</dc:date>
    </item>
  </channel>
</rss>

