<?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 event filtering using transforms and props in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/event-filtering-using-transforms-and-props/m-p/191337#M38077</link>
    <description>&lt;P&gt;My event data contains the foll&lt;/P&gt;

&lt;P&gt;POST:....&lt;BR /&gt;
...&lt;BR /&gt;
&lt;TRANSACTION&gt;ffffff&lt;/TRANSACTION&gt;&lt;BR /&gt;
ABCD&lt;BR /&gt;
EFG&lt;BR /&gt;
&lt;ACCESS&gt;&lt;/ACCESS&gt;&lt;BR /&gt;
WERT&lt;BR /&gt;
SDF&lt;BR /&gt;
... and so on&lt;/P&gt;

&lt;P&gt;As you see some lines are non-xml and some are xml..&lt;/P&gt;

&lt;P&gt;my props.conf file has right set of rules&lt;/P&gt;

&lt;P&gt;[sourcetype]&lt;BR /&gt;
BREAK_ONLY_BEFORE = &lt;TRANSACTION&gt;|&lt;ACCESS&gt;|&lt;ERROR&gt;&lt;BR /&gt;
KV_MODE = xml&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
TRANSFORMS-set = setnull, setparsing&lt;/ERROR&gt;&lt;/ACCESS&gt;&lt;/TRANSACTION&gt;&lt;/P&gt;

&lt;P&gt;and in transforms.xml&lt;/P&gt;

&lt;P&gt;[setnull]&lt;BR /&gt;
REGEX= .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setparsing]&lt;BR /&gt;
REGEX = &lt;TRANSACTION&gt;|&lt;ERROR&gt;|&lt;ACCESS&gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/ACCESS&gt;&lt;/ERROR&gt;&lt;/TRANSACTION&gt;&lt;/P&gt;

&lt;P&gt;Will this work? ...the lines outside XML tags as shown in example should not be indexed...&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:33:07 GMT</pubDate>
    <dc:creator>ajaysamantbms</dc:creator>
    <dc:date>2020-09-28T15:33:07Z</dc:date>
    <item>
      <title>event filtering using transforms and props</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/event-filtering-using-transforms-and-props/m-p/191337#M38077</link>
      <description>&lt;P&gt;My event data contains the foll&lt;/P&gt;

&lt;P&gt;POST:....&lt;BR /&gt;
...&lt;BR /&gt;
&lt;TRANSACTION&gt;ffffff&lt;/TRANSACTION&gt;&lt;BR /&gt;
ABCD&lt;BR /&gt;
EFG&lt;BR /&gt;
&lt;ACCESS&gt;&lt;/ACCESS&gt;&lt;BR /&gt;
WERT&lt;BR /&gt;
SDF&lt;BR /&gt;
... and so on&lt;/P&gt;

&lt;P&gt;As you see some lines are non-xml and some are xml..&lt;/P&gt;

&lt;P&gt;my props.conf file has right set of rules&lt;/P&gt;

&lt;P&gt;[sourcetype]&lt;BR /&gt;
BREAK_ONLY_BEFORE = &lt;TRANSACTION&gt;|&lt;ACCESS&gt;|&lt;ERROR&gt;&lt;BR /&gt;
KV_MODE = xml&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
pulldown_type = 1&lt;BR /&gt;
TRANSFORMS-set = setnull, setparsing&lt;/ERROR&gt;&lt;/ACCESS&gt;&lt;/TRANSACTION&gt;&lt;/P&gt;

&lt;P&gt;and in transforms.xml&lt;/P&gt;

&lt;P&gt;[setnull]&lt;BR /&gt;
REGEX= .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setparsing]&lt;BR /&gt;
REGEX = &lt;TRANSACTION&gt;|&lt;ERROR&gt;|&lt;ACCESS&gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/ACCESS&gt;&lt;/ERROR&gt;&lt;/TRANSACTION&gt;&lt;/P&gt;

&lt;P&gt;Will this work? ...the lines outside XML tags as shown in example should not be indexed...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/event-filtering-using-transforms-and-props/m-p/191337#M38077</guid>
      <dc:creator>ajaysamantbms</dc:creator>
      <dc:date>2020-09-28T15:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: event filtering using transforms and props</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/event-filtering-using-transforms-and-props/m-p/191338#M38078</link>
      <description>&lt;P&gt;Er, well, no. Your events will be broken where you've indicated, i.e. like this;&lt;/P&gt;

&lt;P&gt;Event 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;transaction&amp;gt;ffffff&amp;lt;/transaction&amp;gt; 
ABCD EFG 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;access&amp;gt;&amp;lt;/access&amp;gt; 
WERT SDF
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thus you should consider whether these are the types of event that you want. Btw, do they even contain timestamps? &lt;/P&gt;

&lt;P&gt;As for the second part of your setup, the nullQueueing &lt;EM&gt;will&lt;/EM&gt; work, but maybe not as you've expected. The ordering of the transforms is correct - all events (the regex dot) get &lt;CODE&gt;queue=nullQueue&lt;/CODE&gt; in the first transform, but since &lt;EM&gt;all&lt;/EM&gt; events (at least according to your sample events) will also match on the second transform, they get the &lt;CODE&gt;queue&lt;/CODE&gt; set back to &lt;CODE&gt;indexQueue&lt;/CODE&gt;. In short, the order of the transforms matters since each event for your sourcetype will pass through all transforms - in order - before being processed further.  &lt;/P&gt;

&lt;P&gt;If you want to filter out &lt;EM&gt;parts of&lt;/EM&gt; an event, you should probably look at some other options, like SEDCMD. Perhaps this can be of use;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.1/Data/Anonymizedatausingconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.1/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;K&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2013 22:01:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/event-filtering-using-transforms-and-props/m-p/191338#M38078</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-12-29T22:01:29Z</dc:date>
    </item>
  </channel>
</rss>

