<?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: How to edit my transforms.conf to drop XML event data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176939#M50834</link>
    <description>&lt;P&gt;I suspect you are also over-consuming and deleting events, too.  Try this (new REGEX):&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
[remove-logged-in-reps]&lt;BR /&gt;
REGEX = &amp;lt;/?logged_in_reps&amp;gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:47:31 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2020-09-28T19:47:31Z</dc:date>
    <item>
      <title>How to edit my transforms.conf to drop XML event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176938#M50833</link>
      <description>&lt;P&gt;So I looked on the answer for this question and could not find it. (Look at code and sample below.) So the input is fine. It removed the top part of the XML output and the first "logged_in_reps", but it never removes the last tag of "logged_in_reps" . It keeps it part of the last "rep" block which is going to throw off when I try to extract the other fields.&lt;/P&gt;

&lt;P&gt;Any help would be great!&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::bomgar_get_logged_in_reps]
TRANSFORMS-null = remove-xmlheader
TRANSFORMS-null = remove-logged-in-reps

[bomgar_get_logged_in_reps]
BREAK_ONLY_BEFORE = &amp;lt;rep[^&amp;gt;]+&amp;gt;.*?
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[remove-xmlheader]
REGEX = &amp;lt;[?]xml.*&amp;gt;
DEST_KEY = queue
FORMAT = nullQueue

[remove-logged-in-reps]
REGEX = &amp;lt;.*logged_in_reps.*&amp;gt;
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample Input:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;logged_in_reps xmlns="http://www.bomgar.com/namespaces/API/command"&amp;gt;
    &amp;lt;rep id="5"&amp;gt;
        &amp;lt;display_name&amp;gt;User Here&amp;lt;/display_name&amp;gt;
                ... Other fields removed.
        &amp;lt;/rep&amp;gt;
    &amp;lt;rep id="6"&amp;gt;
        &amp;lt;display_name&amp;gt;User Here&amp;lt;/display_name&amp;gt;
                ... Other fields removed.
        &amp;lt;/rep&amp;gt;
&amp;lt;/logged_in_reps&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176938#M50833</guid>
      <dc:creator>ShaneF</dc:creator>
      <dc:date>2020-09-28T19:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transforms.conf to drop XML event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176939#M50834</link>
      <description>&lt;P&gt;I suspect you are also over-consuming and deleting events, too.  Try this (new REGEX):&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
[remove-logged-in-reps]&lt;BR /&gt;
REGEX = &amp;lt;/?logged_in_reps&amp;gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:47:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176939#M50834</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-09-28T19:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transforms.conf to drop XML event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176940#M50835</link>
      <description>&lt;P&gt;Worked, now it's getting rid of the last "rep" pair which happens to be me in the xml output currently. arg!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 13:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176940#M50835</guid>
      <dc:creator>ShaneF</dc:creator>
      <dc:date>2015-04-30T13:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transforms.conf to drop XML event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176941#M50836</link>
      <description>&lt;P&gt;It is doing this because your last event contains the end-tag (your nullqueue setting says to send any events with that string to oblivion).&lt;BR /&gt;
If you are using LINE_BRAKER, try using this instead:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
LINE_BREAKER=()(\r\n)&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;This should prevent your "rep" events from containing the "logged_in_reps" tag.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:47:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176941#M50836</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-09-28T19:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transforms.conf to drop XML event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176942#M50837</link>
      <description>&lt;P&gt;Assuming to put that in the "props.conf" under [bomgar_get_logged_in_reps] ?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:47:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176942#M50837</guid>
      <dc:creator>ShaneF</dc:creator>
      <dc:date>2020-09-28T19:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my transforms.conf to drop XML event data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176943#M50838</link>
      <description>&lt;P&gt;I ended up doing this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::bomgar_get_logged_in_reps]
TRANSFORMS-xml = remove-xmlheader
TRANSFORMS-remove = remove-logged-in-reps

[bomgar_get_logged_in_reps]
BREAK_ONLY_BEFORE = &amp;lt;rep[^&amp;gt;]+&amp;gt;.*?
MUST_BREAK_AFTER = &amp;lt;/rep&amp;gt;
EXTRACT-repType = (?i)&amp;lt;type&amp;gt;(?P&amp;lt;type&amp;gt;\w+)(?=&amp;lt;)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and that made it so the last rep block showed up. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 14:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-transforms-conf-to-drop-XML-event-data/m-p/176943#M50838</guid>
      <dc:creator>ShaneF</dc:creator>
      <dc:date>2015-04-30T14:13:05Z</dc:date>
    </item>
  </channel>
</rss>

