<?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: Send multiple lines to nullQueue from XML file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78859#M16143</link>
    <description>&lt;P&gt;did you try with (?m) in front of you regex?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?m)^((.|\n|\r)*)\&amp;lt;\/Policy\&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As well any nullqueue transforms require splunk restart to be applied.&lt;/P&gt;

&lt;P&gt;If it still not working it will be useful to paste here the part of your xml you want to filter.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;and with this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?m)((.*(\r*))+?\&amp;lt;\/Policy\&amp;gt;$)  - **NOT WORKING**
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;UPDATE 2:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;With below confs i got it filtered out&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test_xml]
TRANSFORMS-sourcetype_junk=sourcetype_junk
BREAK_ONLY_BEFORE_DATE=false
BREAK_ONLY_BEFORE=(?m)\&amp;lt;ReportHost\sname
SHOULD_LINEMERGE=true
TRUNCATE=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_junk]
LOOKAHEAD = 10000
DEST_KEY = queue
REGEX = (?m)(^\&amp;lt;\?\bxml.*)
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 26 Feb 2012 10:39:46 GMT</pubDate>
    <dc:creator>MarioM</dc:creator>
    <dc:date>2012-02-26T10:39:46Z</dc:date>
    <item>
      <title>Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78858#M16142</link>
      <description>&lt;P&gt;I'm trying to index an XML file that has multiple lines in the beginning that I do not want or need indexed.  I've worked out the regex in RegExr (external online regex testing site) that does select all the unwanted lines.  But when I bring the file into Splunk the lines are still indexed.  Below are my transforms.conf and props.conf.  &lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
TRANSFORMS-sourcetype_junk = sourcetype_junk
BREAK_ONLY_BEFORE = \&amp;lt;ReportHost
DATETIME_CONFIG = CURRENT
MAX_TIMESTAMP_LOOKAHEAD = 0
SHOULD_LINEMERGE = true
TRUNCATE = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_junk]
LOOKAHEAD = 100000
DEST_KEY = queue
REGEX = ^((.|\n|\r)*)\&amp;lt;\/Policy\&amp;gt;
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any ideas how to accomplish this?&lt;/P&gt;

&lt;P&gt;Example, everything from the beginning to end of Policy is not needed.  There is quite a few more line than what is shown below.:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" ?&amp;gt;
&amp;lt;NessusClientData_v2&amp;gt;
&amp;lt;Policy&amp;gt;
&amp;lt;FamilyItem&amp;gt;
&amp;lt;FamilyName&amp;gt;CentOS Local Security Checks&amp;lt;/FamilyName&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/FamilyItem&amp;gt;
&amp;lt;FamilyItem&amp;gt;
&amp;lt;FamilyName&amp;gt;AIX Local Security Checks&amp;lt;/FamilyName&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/FamilyItem&amp;gt;
&amp;lt;FamilyItem&amp;gt;
&amp;lt;FamilyName&amp;gt;CISCO&amp;lt;/FamilyName&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/FamilyItem&amp;gt;
&amp;lt;FamilyItem&amp;gt;&amp;lt;FamilyName&amp;gt;Junos Local Security Checks&amp;lt;/FamilyName&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/FamilyItem&amp;gt;
&amp;lt;/FamilySelection&amp;gt;
&amp;lt;IndividualPluginSelection&amp;gt;
&amp;lt;PluginItem&amp;gt;&amp;lt;PluginId&amp;gt;34220&amp;lt;/PluginId&amp;gt;
&amp;lt;PluginName&amp;gt;Netstat Portscanner (WMI)&amp;lt;/PluginName&amp;gt;
&amp;lt;Family&amp;gt;Port scanners&amp;lt;/Family&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/PluginItem&amp;gt;&amp;lt;PluginItem&amp;gt;&amp;lt;PluginId&amp;gt;14274&amp;lt;/PluginId&amp;gt;
&amp;lt;PluginName&amp;gt;Nessus SNMP Scanner&amp;lt;/PluginName&amp;gt;
&amp;lt;Family&amp;gt;Port scanners&amp;lt;/Family&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/PluginItem&amp;gt;&amp;lt;PluginItem&amp;gt;&amp;lt;PluginId&amp;gt;14272&amp;lt;/PluginId&amp;gt;
&amp;lt;PluginName&amp;gt;netstat portscanner (SSH)&amp;lt;/PluginName&amp;gt;
&amp;lt;Family&amp;gt;Port scanners&amp;lt;/Family&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/PluginItem&amp;gt;&amp;lt;PluginItem&amp;gt;&amp;lt;PluginId&amp;gt;10180&amp;lt;/PluginId&amp;gt;
&amp;lt;PluginName&amp;gt;Ping the remote host&amp;lt;/PluginName&amp;gt;
&amp;lt;Family&amp;gt;Port scanners&amp;lt;/Family&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/PluginItem&amp;gt;&amp;lt;PluginItem&amp;gt;&amp;lt;PluginId&amp;gt;11219&amp;lt;/PluginId&amp;gt;
&amp;lt;PluginName&amp;gt;Nessus SYN scanner&amp;lt;/PluginName&amp;gt;
&amp;lt;Family&amp;gt;Port scanners&amp;lt;/Family&amp;gt;
&amp;lt;Status&amp;gt;enabled&amp;lt;/Status&amp;gt;
&amp;lt;/PluginItem&amp;gt;&amp;lt;/IndividualPluginSelection&amp;gt;
&amp;lt;/Policy&amp;gt;
&amp;lt;Report name="ScanNumber2" xmlns:cm="http://www.nessus.org/cm"&amp;gt;
&amp;lt;ReportHost name="192.168.1.100"&amp;gt;&amp;lt;HostProperties&amp;gt;
&amp;lt;tag name="HOST_END"&amp;gt;Sat Feb 25 09:31:53 2012&amp;lt;/tag&amp;gt;
&amp;lt;tag name="system-type"&amp;gt;general-purpose&amp;lt;/tag&amp;gt;
&amp;lt;tag name="operating-system"&amp;gt;Microsoft Windows Server 2003 Service Pack 2&amp;lt;/tag&amp;gt;
&amp;lt;tag name="mac-address"&amp;gt;00:0c:29:2e:7c:68&amp;lt;/tag&amp;gt;
&amp;lt;tag name="host-ip"&amp;gt;192.168.1.100&amp;lt;/tag&amp;gt;
&amp;lt;tag name="host-fqdn"&amp;gt;system32.localdomain.com&amp;lt;/tag&amp;gt;
&amp;lt;tag name="netbios-name"&amp;gt;SYSTEM32&amp;lt;/tag&amp;gt;
&amp;lt;tag name="HOST_START"&amp;gt;Sat Feb 25 09:20:12 2012&amp;lt;/tag&amp;gt;
&amp;lt;/HostProperties&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in adavance,&lt;BR /&gt;
Joe&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;WORKING Configurations&lt;/STRONG&gt;&lt;BR /&gt;
props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MAX_EVENTS = 210000
[sourcetype]
TRANSFORMS-sourcetype_junk = sourcetype_junk
BREAK_ONLY_BEFORE = (?m)\&amp;lt;ReportHost\sname
DATETIME_CONFIG = CURRENT
MAX_TIMESTAMP_LOOKAHEAD = 0
SHOULD_LINEMERGE = true
TRUNCATE = 0
BREAK_ONLY_BEFORE_DATE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_junk]
LOOKAHEAD = 10000
DEST_KEY = queue
REGEX = (?m)(^\&amp;lt;\?\bxml.*)
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Due to the number of lines in each event the flashtimeline.xml did need to be adjusted with an override to display a larger number of lines in the EventsViewer Module.&lt;/P&gt;

&lt;P&gt;Another thank you to MarioM for his assistance with the nullQueue problem.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2012 17:49:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78858#M16142</guid>
      <dc:creator>jgedeon120</dc:creator>
      <dc:date>2012-02-25T17:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78859#M16143</link>
      <description>&lt;P&gt;did you try with (?m) in front of you regex?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?m)^((.|\n|\r)*)\&amp;lt;\/Policy\&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As well any nullqueue transforms require splunk restart to be applied.&lt;/P&gt;

&lt;P&gt;If it still not working it will be useful to paste here the part of your xml you want to filter.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;and with this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?m)((.*(\r*))+?\&amp;lt;\/Policy\&amp;gt;$)  - **NOT WORKING**
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;UPDATE 2:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;With below confs i got it filtered out&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test_xml]
TRANSFORMS-sourcetype_junk=sourcetype_junk
BREAK_ONLY_BEFORE_DATE=false
BREAK_ONLY_BEFORE=(?m)\&amp;lt;ReportHost\sname
SHOULD_LINEMERGE=true
TRUNCATE=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_junk]
LOOKAHEAD = 10000
DEST_KEY = queue
REGEX = (?m)(^\&amp;lt;\?\bxml.*)
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Feb 2012 10:39:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78859#M16143</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2012-02-26T10:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78860#M16144</link>
      <description>&lt;P&gt;Yes, I have tried the multiline entry (?m).  I will try to sanitize a small sample. Currently with just one entry what needs to be filtered out is over 1700 lines long.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2012 10:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78860#M16144</guid>
      <dc:creator>jgedeon120</dc:creator>
      <dc:date>2012-02-26T10:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78861#M16145</link>
      <description>&lt;P&gt;MarioM,&lt;/P&gt;

&lt;P&gt;Thank you very much.  You figured it out.&lt;/P&gt;

&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2012 11:58:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78861#M16145</guid>
      <dc:creator>jgedeon120</dc:creator>
      <dc:date>2012-02-26T11:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78862#M16146</link>
      <description>&lt;P&gt;MarioM,&lt;/P&gt;

&lt;P&gt;It looks like I spoke too soon and the file was not indexed when I looked.  The section I need excluded is still being indexed.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2012 12:30:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78862#M16146</guid>
      <dc:creator>jgedeon120</dc:creator>
      <dc:date>2012-02-26T12:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78863#M16147</link>
      <description>&lt;P&gt;i think it's something to do with your line breaking...I am testing it out...&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2012 12:33:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78863#M16147</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2012-02-26T12:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78864#M16148</link>
      <description>&lt;P&gt;MarioM,&lt;/P&gt;

&lt;P&gt;If it would help, use the contact me button in my profile and we can work on a screen share so that this can be figured out.  There seems to be a few older posts with people looking for the same thing with no solution.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2012 13:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78864#M16148</guid>
      <dc:creator>jgedeon120</dc:creator>
      <dc:date>2012-02-26T13:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78865#M16149</link>
      <description>&lt;P&gt;i don't think it will help...for strange reason it work on my conf as per update 2 from my answer&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2012 15:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78865#M16149</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2012-02-26T15:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple lines to nullQueue from XML file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78866#M16150</link>
      <description>&lt;P&gt;MarioM,&lt;/P&gt;

&lt;P&gt;Thank you for your assistance with this.  I now have it indexing as I was trying to get it to index.  The policy information is not there and all the events are split into ReportHost name events.  I can now continue to try and get this productive.  Thanks again.  I will update my question with my final props and transforms configurations.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2012 16:28:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Send-multiple-lines-to-nullQueue-from-XML-file/m-p/78866#M16150</guid>
      <dc:creator>jgedeon120</dc:creator>
      <dc:date>2012-02-26T16:28:32Z</dc:date>
    </item>
  </channel>
</rss>

