<?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: Field Extractions from the Message field in WinEventLog in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628561#M218340</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239959"&gt;@Skeer-Jamf&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Sounds like you're on the right track now.&lt;BR /&gt;&lt;BR /&gt;Note, if using the Splunk Windows app then it is probably best to not set the sourcetype in inputs.conf and let the default values flow through the system for these Windows events.&amp;nbsp; As you've seen, having the wrong sourcetype value can affect downstream configurations.&lt;BR /&gt;&lt;BR /&gt;The Splunk Windows app needs to be installed on the heavy forwarders and also the search head members (or Splunk Cloud - basically, where you run your search queries from).&amp;nbsp; The app docs say the inputs.conf file should be removed when deployed to the search head/Splunk Cloud.&amp;nbsp; &amp;nbsp;For this type of Windows event sources I don't believe the app needs to be installed on the UF (not 100% sure on that) but no harm if it is.&amp;nbsp; Basically, just need an inputs.conf entry on the UF to forward these Windows Directory Service events (assuming the UF is forwarding data correctly, as expected), e.g.&lt;/P&gt;&lt;PRE&gt;## Application and Services Logs - Directory Service&lt;BR /&gt;[WinEventLog://Directory Service]&lt;BR /&gt;disabled = 1&lt;BR /&gt;renderXml=true&lt;/PRE&gt;&lt;P&gt;If it is working correctly then the sourcetype should actually be getting set to XMLWinEventLog when it is searched and all these event fields will be auto extracted at search time OK.&lt;BR /&gt;&lt;BR /&gt;If the sourcetype is not&amp;nbsp;XMLWinEventLog then the auto extractions will not be working and you need to review each step (UF -&amp;gt; HF -&amp;gt; SC)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 01:43:50 GMT</pubDate>
    <dc:creator>yeahnah</dc:creator>
    <dc:date>2023-01-27T01:43:50Z</dc:date>
    <item>
      <title>How to do field Extractions from the Message field in WinEventLog?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628393#M218273</link>
      <description>&lt;P&gt;So after searching here it seems like a lot of people have trouble parsing/handling WinEventLogs. I want to ask if there is no better way than custom transforms and props?&lt;/P&gt;
&lt;P&gt;That might be a debatable question to some so I'll be more targeted. I'm trying to extract parts of the Message field, here's a sanitized example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'&amp;gt;&amp;lt;System&amp;gt;&amp;lt;Provider Name='Microsoft-Windows-Security-Auditing' Guid='{xxxxx-xxxx-4994-A5BA-3E3B0328C30D}'/&amp;gt;&amp;lt;EventID&amp;gt;4624&amp;lt;/EventID&amp;gt;&amp;lt;Version&amp;gt;2&amp;lt;/Version&amp;gt;&amp;lt;Level&amp;gt;0&amp;lt;/Level&amp;gt;&amp;lt;Task&amp;gt;12544&amp;lt;/Task&amp;gt;&amp;lt;Opcode&amp;gt;0&amp;lt;/Opcode&amp;gt;&amp;lt;Keywords&amp;gt;0x8020000000000000&amp;lt;/Keywords&amp;gt;&amp;lt;TimeCreated SystemTime='2023-01-25T22:35:16.209857600Z'/&amp;gt;&amp;lt;EventRecordID&amp;gt;840762295&amp;lt;/EventRecordID&amp;gt;&amp;lt;Correlation ActivityID='{D610E4E9-2C97-0000-12E5-10D6972CD901}'/&amp;gt;&amp;lt;Execution ProcessID='704' ThreadID='2404'/&amp;gt;&amp;lt;Channel&amp;gt;Security&amp;lt;/Channel&amp;gt;&amp;lt;Computer&amp;gt;dc01.domain.net&amp;lt;/Computer&amp;gt;&amp;lt;Security/&amp;gt;&amp;lt;/System&amp;gt;&amp;lt;EventData&amp;gt;&amp;lt;Data Name='SubjectUserSid'&amp;gt;DOMAIN\okta_service&amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectUserName'&amp;gt;okta_service&amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectDomainName'&amp;gt;DOMAIN&amp;lt;/Data&amp;gt;&amp;lt;Data Name='SubjectLogonId'&amp;gt;0x31198f&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TargetUserSid'&amp;gt;DOMAIN\Bob.Saget&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TargetUserName'&amp;gt;bob.saget&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TargetDomainName'&amp;gt;DOMAIN&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TargetLogonId'&amp;gt;0x1578a0a1&amp;lt;/Data&amp;gt;&amp;lt;Data Name='LogonType'&amp;gt;3&amp;lt;/Data&amp;gt;&amp;lt;Data Name='LogonProcessName'&amp;gt;Advapi &amp;lt;/Data&amp;gt;&amp;lt;Data Name='AuthenticationPackageName'&amp;gt;Negotiate&amp;lt;/Data&amp;gt;&amp;lt;Data Name='WorkstationName'&amp;gt;DC01&amp;lt;/Data&amp;gt;&amp;lt;Data Name='LogonGuid'&amp;gt;{xxxxx-xx-D725-309C-788D104F655D}&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TransmittedServices'&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name='LmPackageName'&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name='KeyLength'&amp;gt;0&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ProcessId'&amp;gt;0x1658&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ProcessName'&amp;gt;C:\Program Files (x86)\Okta\Okta AD Agent\OktaAgentService.exe&amp;lt;/Data&amp;gt;&amp;lt;Data Name='IpAddress'&amp;gt;1.2.3.4&amp;lt;/Data&amp;gt;&amp;lt;Data Name='IpPort'&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ImpersonationLevel'&amp;gt;%%1833&amp;lt;/Data&amp;gt;&amp;lt;Data Name='RestrictedAdminMode'&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TargetOutboundUserName'&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TargetOutboundDomainName'&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name='VirtualAccount'&amp;gt;%%1843&amp;lt;/Data&amp;gt;&amp;lt;Data Name='TargetLinkedLogonId'&amp;gt;0x0&amp;lt;/Data&amp;gt;&amp;lt;Data Name='ElevatedToken'&amp;gt;%%1842&amp;lt;/Data&amp;gt;&amp;lt;/EventData&amp;gt;&amp;lt;/Event&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H6&gt;&amp;nbsp;&lt;/H6&gt;
&lt;P&gt;Namely at the bottom,&amp;nbsp; &amp;nbsp;&amp;lt;Data Name='IpAddress'&amp;gt;1.2.3.4&amp;lt;/Data&amp;gt;&lt;/P&gt;
&lt;P&gt;Now Im still using renderXml = true because when you look at the raw type.. that Message field is just so huge and practically impossible to define a field to me. Unless I'm wrong? Also as per my inputs file, the sourcetype for this is 'generic_single_line'.&lt;/P&gt;
&lt;P&gt;Now I've tried Regex, and Delimiters and both give me errors about either selecting too many fields, or in the case of Delimiters (when I attempts to specify other and '&amp;lt;&amp;gt;', an entirely unholy wall-of-text which this tiny blurb at the end:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;has exceeded the configured depth_limit, consider raising the value in limits.conf.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;Or Im going about this all wrong and raw is the easiest to deal with?&lt;/DIV&gt;
&lt;DIV class=""&gt;Any help would be greatly appreciated!&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Jan 2023 19:15:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628393#M218273</guid>
      <dc:creator>Skeer-Jamf</dc:creator>
      <dc:date>2023-01-26T19:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractions from the Message field in WinEventLog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628415#M218274</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239959"&gt;@Skeer-Jamf&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Splunk provide the &lt;EM&gt;Splunk Add-on for Microsoft Windows&lt;/EM&gt; app (&lt;A href="https://classic.splunkbase.splunk.com/app/742/#/overview" target="_blank" rel="noopener"&gt;https://classic.splunkbase.splunk.com/app/742/#/overview&lt;/A&gt;) which is configured with all the necessary extractions.&lt;BR /&gt;&lt;BR /&gt;You'll need to configure your inputs to match the expected sourcetype for it to work of course.&amp;nbsp; I would not use generic_single_line either.&amp;nbsp; Use what Splunk define in the app.&lt;BR /&gt;&lt;BR /&gt;You could also just pull out the configurations you need from this app and create you own app etc with your own unique sourcetypes etc.&lt;BR /&gt;&lt;BR /&gt;Taking a quick look at the app myself, something like this, defined on the search head, should extract the field you want without to much issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;transforms.conf&lt;/P&gt;&lt;PRE&gt;[eventdata_xml_block]&lt;BR /&gt;REGEX = (?ms)&amp;lt;EventData(?:\s+[^&amp;gt;]+)?&amp;gt;(.*?)&amp;lt;\/EventData&amp;gt;&lt;BR /&gt;FORMAT = EventData_Xml::$1&lt;BR /&gt;MV_ADD = 1&lt;BR /&gt;&lt;BR /&gt;[eventdata_xml_data]&lt;BR /&gt;# Extracts from &amp;lt;Data Name='name'&amp;gt;value&amp;lt;/Data&amp;gt; as name:value. Skips ComplexData tags&lt;BR /&gt;SOURCE_KEY = EventData_Xml&lt;BR /&gt;REGEX = &amp;lt;(\w+)\sName='([^&amp;gt;]*)'\/?&amp;gt;([^&amp;lt;]*)(?:&amp;lt;\/\1&amp;gt;)?&lt;BR /&gt;FORMAT = $2::$3&lt;BR /&gt;MV_ADD = 1&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;PRE&gt;[&amp;lt;your defined sourcetype for the xmlwineventlog&amp;gt;]&lt;BR /&gt;REPORT-xml_eventdata_extract = eventdata_xml_data&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If you want to run this from any app then ensure the config is shared globally.&lt;BR /&gt;&lt;BR /&gt;Anyway, hope this helps you on your way&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 04:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628415#M218274</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-01-26T04:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractions from the Message field in WinEventLog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628457#M218291</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158935"&gt;@yeahnah&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Disclaimer: I hav to apologize, I got myself confused between the WinEventLog://Directory Service and a new monitor stanza I added to ingest the Windows Firewall .log file. The latter is what's using the generic_single_line sourcetype. Apologies! I've built a dashboard using queries from both sources and I guess I just confabulated them together in my head.&lt;/P&gt;&lt;P&gt;I explored the link you posted.. I thought we were using this app, but when I look through the sourcetypes included with that I realized that all the servers inputs.conf files were set to a:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sourcetype = WinEventLogs&lt;/EM&gt;&amp;nbsp; (notice the s) versus singular WinEventLog&lt;/P&gt;&lt;P&gt;So I am correcting that mistake, which I hope was the kicker here &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 12:58:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628457#M218291</guid>
      <dc:creator>Skeer-Jamf</dc:creator>
      <dc:date>2023-01-26T12:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractions from the Message field in WinEventLog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628472#M218296</link>
      <description>&lt;P&gt;So correcting the sourcetype might have done something.. looking at the Security logs for example. Choosing between the two sourcetypes: WinEventLogs and WinEventLog for the past 3 hours, the latter gives me one additional field to select from.&lt;/P&gt;&lt;P&gt;Looking at the WinEventLog://Directory Service however, actually is showing less fields to select from. I really didn't want to have to customize the transforms or props but there might be no choice now.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 13:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628472#M218296</guid>
      <dc:creator>Skeer-Jamf</dc:creator>
      <dc:date>2023-01-26T13:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractions from the Message field in WinEventLog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628475#M218298</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158935"&gt;@yeahnah&lt;/a&gt;&amp;nbsp; So both Props and Transforms are required to effect the change you describe right?&lt;/P&gt;&lt;P&gt;I created both files under $SPLUNKHOME/etc/system/local and bounced the service, Im now waiting for SC to update. By search head I assume you mean either the Heavy Forwarder, or teh Universal? In this case, it's the Universal as I do not have that sort of access to Splunk Cloud.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 14:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628475#M218298</guid>
      <dc:creator>Skeer-Jamf</dc:creator>
      <dc:date>2023-01-26T14:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractions from the Message field in WinEventLog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628489#M218305</link>
      <description>&lt;P&gt;Should I be able to see references to those two bracketed 'variables' in transforms.conf in splunkd.log after restarting the service? Or maybe they are endpoint arguments? If so, I do not see them.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 14:43:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628489#M218305</guid>
      <dc:creator>Skeer-Jamf</dc:creator>
      <dc:date>2023-01-26T14:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extractions from the Message field in WinEventLog</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628561#M218340</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239959"&gt;@Skeer-Jamf&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Sounds like you're on the right track now.&lt;BR /&gt;&lt;BR /&gt;Note, if using the Splunk Windows app then it is probably best to not set the sourcetype in inputs.conf and let the default values flow through the system for these Windows events.&amp;nbsp; As you've seen, having the wrong sourcetype value can affect downstream configurations.&lt;BR /&gt;&lt;BR /&gt;The Splunk Windows app needs to be installed on the heavy forwarders and also the search head members (or Splunk Cloud - basically, where you run your search queries from).&amp;nbsp; The app docs say the inputs.conf file should be removed when deployed to the search head/Splunk Cloud.&amp;nbsp; &amp;nbsp;For this type of Windows event sources I don't believe the app needs to be installed on the UF (not 100% sure on that) but no harm if it is.&amp;nbsp; Basically, just need an inputs.conf entry on the UF to forward these Windows Directory Service events (assuming the UF is forwarding data correctly, as expected), e.g.&lt;/P&gt;&lt;PRE&gt;## Application and Services Logs - Directory Service&lt;BR /&gt;[WinEventLog://Directory Service]&lt;BR /&gt;disabled = 1&lt;BR /&gt;renderXml=true&lt;/PRE&gt;&lt;P&gt;If it is working correctly then the sourcetype should actually be getting set to XMLWinEventLog when it is searched and all these event fields will be auto extracted at search time OK.&lt;BR /&gt;&lt;BR /&gt;If the sourcetype is not&amp;nbsp;XMLWinEventLog then the auto extractions will not be working and you need to review each step (UF -&amp;gt; HF -&amp;gt; SC)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 01:43:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-field-Extractions-from-the-Message-field-in/m-p/628561#M218340</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-01-27T01:43:50Z</dc:date>
    </item>
  </channel>
</rss>

