<?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: XML Parsing in transforms.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751776#M119363</link>
    <description>&lt;P&gt;First things first - how do you know they are "not working"? How did you confirm it? These might be very basic questins but you don't wanna know how many times I've seen people just searching in fast mode or filtering out fields...&lt;/P&gt;</description>
    <pubDate>Sun, 17 Aug 2025 19:10:07 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-08-17T19:10:07Z</dc:date>
    <item>
      <title>XML Parsing in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751757#M119353</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having some big issues trying to parse certain XML logs into Splunk.&lt;/P&gt;&lt;P&gt;A sample online log which is in the same format as what I see in Splunk _raw logs are as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;Event&amp;gt;&amp;lt;System&amp;gt;&amp;lt;Provider Name="Linux-Sysmon" Guid="{ff032593-a8d3-4f13-****-*******}"/&amp;gt;&amp;lt;EventID&amp;gt;3&amp;lt;/EventID&amp;gt;&amp;lt;Version&amp;gt;5&amp;lt;/Version&amp;gt;&amp;lt;Level&amp;gt;4&amp;lt;/Level&amp;gt;&amp;lt;Task&amp;gt;3&amp;lt;/Task&amp;gt;&amp;lt;Opcode&amp;gt;0&amp;lt;/Opcode&amp;gt;&amp;lt;Keywords&amp;gt;0x8000000000000000&amp;lt;/Keywords&amp;gt;&amp;lt;TimeCreated SystemTime="2023-11-13T13:34:45.693615000Z"/&amp;gt;&amp;lt;EventRecordID&amp;gt;140108&amp;lt;/EventRecordID&amp;gt;&amp;lt;Correlation/&amp;gt;&amp;lt;Execution ProcessID="24493" ThreadID="24493"/&amp;gt;&amp;lt;Channel&amp;gt;Linux-Sysmon/Operational&amp;lt;/Channel&amp;gt;&amp;lt;Computer&amp;gt;computername&amp;lt;/Computer&amp;gt;&amp;lt;Security UserId="0"/&amp;gt;&amp;lt;/System&amp;gt;&amp;lt;EventData&amp;gt;&amp;lt;Data Name="RuleName"&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name="UtcTime"&amp;gt;2023-11-13 13:34:45.697&amp;lt;/Data&amp;gt;&amp;lt;Data Name="ProcessGuid"&amp;gt;{ba131d2e-2a52-6550-285f-207366550000}&amp;lt;/Data&amp;gt;&amp;lt;Data Name="ProcessId"&amp;gt;64284&amp;lt;/Data&amp;gt;&amp;lt;Data Name="Image"&amp;gt;/opt/splunkforwarder/bin/splunkd&amp;lt;/Data&amp;gt;&amp;lt;Data Name="User"&amp;gt;root&amp;lt;/Data&amp;gt;&amp;lt;Data Name="Protocol"&amp;gt;tcp&amp;lt;/Data&amp;gt;&amp;lt;Data Name="Initiated"&amp;gt;true&amp;lt;/Data&amp;gt;&amp;lt;Data Name="SourceIsIpv6"&amp;gt;false&amp;lt;/Data&amp;gt;&amp;lt;Data Name="SourceIp"&amp;gt;x.x.x.x&amp;lt;/Data&amp;gt;&amp;lt;Data Name="SourceHostname"&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name="SourcePort"&amp;gt;60164&amp;lt;/Data&amp;gt;&amp;lt;Data Name="SourcePortName"&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name="DestinationIsIpv6"&amp;gt;false&amp;lt;/Data&amp;gt;&amp;lt;Data Name="DestinationIp"&amp;gt;x.x.x.x&amp;lt;/Data&amp;gt;&amp;lt;Data Name="DestinationHostname"&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;Data Name="DestinationPort"&amp;gt;8089&amp;lt;/Data&amp;gt;&amp;lt;Data Name="DestinationPortName"&amp;gt;-&amp;lt;/Data&amp;gt;&amp;lt;/EventData&amp;gt;&amp;lt;/Event&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have in the transforms.conf&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[sysmon-eventid]
REGEX = &amp;lt;EventID&amp;gt;(\d+)&amp;lt;/EventID&amp;gt;
FORMAT = EventID::$1

[sysmon-computer]
REGEX = &amp;lt;Computer&amp;gt;(.*?)&amp;lt;/Computer&amp;gt;
FORMAT = Computer::$1

[sysmon-data]
REGEX = &amp;lt;Data Name="(.*?)"&amp;gt;(.*?)&amp;lt;/Data&amp;gt;
FORMAT = $1::$2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are then called in the props.conf with some logic and:&lt;/P&gt;&lt;P&gt;REPORT-sysmon = sysmon-eventID,sysmon-computer,sysmon-data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For some reason, the computer field is extracted successfully but not eventID or data name fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tested the regex in regex.101 but not working.&lt;/P&gt;&lt;P&gt;I am not sure if it's the raw logs having issues or something else?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Things I have tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;confirmed it is calling the correct sourcetype&lt;/LI&gt;&lt;LI&gt;KV_MODE=xml in props.conf which doesn't parse it properly&lt;/LI&gt;&lt;LI&gt;DATATYPE =xml in props.conf which doesn't work&lt;/LI&gt;&lt;LI&gt;Tried changing the regex to something else but doesn't work&lt;/LI&gt;&lt;LI&gt;tried changing the end of &amp;lt;/EventID&amp;gt; to &amp;lt;\/EventID&amp;gt; which did nothing&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Not sure what else to try ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 10:11:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751757#M119353</guid>
      <dc:creator>ta1</dc:creator>
      <dc:date>2025-08-17T10:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751758#M119354</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/271514"&gt;@ta1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue with the EventID is probably because of the incorrect closing tag - you've got &amp;lt;EventID&amp;gt; instead of &amp;lt;/EventID&amp;gt;&lt;/P&gt;&lt;P&gt;Let me run some checks on a fixed version of the transforms.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 10:07:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751758#M119354</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-08-17T10:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751760#M119355</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, sorry that was a typo, fixed it. In my regex I had&amp;nbsp;&lt;SPAN&gt;&amp;lt;/EventID&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It just doesn't seem to extract.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 10:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751760#M119355</guid>
      <dc:creator>ta1</dc:creator>
      <dc:date>2025-08-17T10:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751762#M119356</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/271514"&gt;@ta1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see below some working transforms.conf to try:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="livehybrid_0-1755425685717.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/39990iF47538E947749DE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="livehybrid_0-1755425685717.png" alt="livehybrid_0-1755425685717.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[sysmon-eventid]
REGEX   = &amp;lt;EventID&amp;gt;(\d+)&amp;lt;/EventID&amp;gt;
FORMAT  = EventID::$1

[sysmon-computer]
REGEX   = &amp;lt;Computer&amp;gt;(.*?)&amp;lt;/Computer&amp;gt;
FORMAT  = Computer::$1

[sysmon-data]
# This will extract each key value pair
REGEX   = &amp;lt;Data Name="(?&amp;lt;_KEY_1&amp;gt;[^\"]+)"&amp;gt;(?&amp;lt;_VAL_1&amp;gt;[^\&amp;lt;]+)&amp;lt;/Data&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Please let me know how you get on:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 10:15:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751762#M119356</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-08-17T10:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751763#M119357</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;I tried it but still doesn't seem to work.&lt;/P&gt;&lt;P&gt;I am using the sysmon for linux add-on and the fields are not extracting besides Computer and Keywords.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/AddOns/released/NixSysmon/About" target="_blank"&gt;https://docs.splunk.com/Documentation/AddOns/released/NixSysmon/About&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just can't figure out what I am doing wrong because I can see the logs besides those.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 10:31:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751763#M119357</guid>
      <dc:creator>ta1</dc:creator>
      <dc:date>2025-08-17T10:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing in transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751776#M119363</link>
      <description>&lt;P&gt;First things first - how do you know they are "not working"? How did you confirm it? These might be very basic questins but you don't wanna know how many times I've seen people just searching in fast mode or filtering out fields...&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 19:10:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/XML-Parsing-in-transforms-conf/m-p/751776#M119363</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-08-17T19:10:07Z</dc:date>
    </item>
  </channel>
</rss>

