<?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 How to ignore concrete rows from csv file before indexing? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474735#M133501</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I spent really a lot of time, but found no solution. Here is my problem. There is CSV file, which should be indexed:&lt;/P&gt;

&lt;P&gt;Lötprotokoll Version 1.0&lt;BR /&gt;
Laufende Nummer;Version Lötprotokoll;Lötprogramm Version&lt;BR /&gt;
1;1;1;&lt;BR /&gt;
2;3;4;&lt;BR /&gt;
937;381.000000;110.000000;&lt;BR /&gt;
938;382.000000;113.000000;&lt;BR /&gt;
565136;1;1;9;&lt;/P&gt;

&lt;P&gt;I want to sent it to the Splunk using forwarder. I want, that the rows 1, 3, 4, 5, 6 will be ignored and not indexed. Can anybody help me, please, how to do it?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2019 10:06:24 GMT</pubDate>
    <dc:creator>spisiakmi</dc:creator>
    <dc:date>2019-09-10T10:06:24Z</dc:date>
    <item>
      <title>How to ignore concrete rows from csv file before indexing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474735#M133501</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I spent really a lot of time, but found no solution. Here is my problem. There is CSV file, which should be indexed:&lt;/P&gt;

&lt;P&gt;Lötprotokoll Version 1.0&lt;BR /&gt;
Laufende Nummer;Version Lötprotokoll;Lötprogramm Version&lt;BR /&gt;
1;1;1;&lt;BR /&gt;
2;3;4;&lt;BR /&gt;
937;381.000000;110.000000;&lt;BR /&gt;
938;382.000000;113.000000;&lt;BR /&gt;
565136;1;1;9;&lt;/P&gt;

&lt;P&gt;I want to sent it to the Splunk using forwarder. I want, that the rows 1, 3, 4, 5, 6 will be ignored and not indexed. Can anybody help me, please, how to do it?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 10:06:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474735#M133501</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2019-09-10T10:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore concrete rows from csv file before indexing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474736#M133502</link>
      <description>&lt;P&gt;I can create 2 very similar regex.&lt;BR /&gt;
1. regex with 2 captured groups, which should be indexed&lt;BR /&gt;
.+\n(.+\n).+\n.+\n.+\n.+\n(.+\n)&lt;BR /&gt;
2. regex with 2 captured groups, which should be ignored&lt;BR /&gt;
(.+\n).+\n(.+\n.+\n.+\n.+\n).+\n&lt;/P&gt;

&lt;P&gt;I have probably 2 possible choises.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;preamble_regex: the question is,  if it is possible to put here regex #2, and if the captured groups will be accepted&lt;/LI&gt;
&lt;LI&gt;transforms.conf and parsing [stanza]: 
[setparsing]
REGEX = regex #1
DEST_KEY = queue
FORMAT = indexQueue
the same question, if I use regex #1, if the captured groups will be accepted&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 11 Sep 2019 06:19:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474736#M133502</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2019-09-11T06:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore concrete rows from csv file before indexing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474737#M133503</link>
      <description>&lt;P&gt;I tried to import the file manualy. I created my own sourcetype and added the parameter PREAMBLE_REGEX. It has no influence on the previewed content of indexed csv file. Even I tried simple regular expressions. The question is, if the parameter PREAMBLE_REGEX is either working properly.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:06:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474737#M133503</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2020-09-30T02:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore concrete rows from csv file before indexing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474738#M133504</link>
      <description>&lt;P&gt;Finally I used the Powershell script, which picks only (indexed from 0) rows 1, 6:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Get-ChildItem *\*.protocol | ForEach { Get-Content $_.Fullname | Select-Object -Index 1,6 | Out-File "$($_.Directory)\$($_.BaseName).csv" -Encoding utf8}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Oct 2019 13:33:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-concrete-rows-from-csv-file-before-indexing/m-p/474738#M133504</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2019-10-14T13:33:57Z</dc:date>
    </item>
  </channel>
</rss>

