<?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: Skip lines/events during log rotation in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605979#M105319</link>
    <description>&lt;P&gt;You only need those props and transforms conf files on indexers/heavy forwarders.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2022 11:56:59 GMT</pubDate>
    <dc:creator>JacekF</dc:creator>
    <dc:date>2022-07-18T11:56:59Z</dc:date>
    <item>
      <title>Is it possible to Skip lines/events during log rotation?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605943#M105314</link>
      <description>&lt;P&gt;Hello community&lt;/P&gt;
&lt;P&gt;We are ingesting sftp log. The logfile rotates once every 24h. "headers" are set in the new file every rotation which gets indexed.&lt;/P&gt;
&lt;P&gt;Unlike every other event indexed, the "linecount" for this event is 2 instead of 1 so they are pretty easy to spot.&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class=""&gt;#Date:&lt;/SPAN&gt; &lt;SPAN class=""&gt;Mon&lt;/SPAN&gt; &lt;SPAN class=""&gt;Jan&lt;/SPAN&gt; &lt;SPAN class=""&gt;10&lt;/SPAN&gt; &lt;SPAN class=""&gt;00:00:00&lt;/SPAN&gt; &lt;SPAN class=""&gt;CEST&lt;/SPAN&gt; &lt;SPAN class=""&gt;2020&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN class=""&gt;#Fields:&lt;/SPAN&gt; &lt;SPAN class=""&gt;date&lt;/SPAN&gt; &lt;SPAN class=""&gt;time&lt;/SPAN&gt; &lt;SPAN class=""&gt;ip&lt;/SPAN&gt; &lt;SPAN class=""&gt;port&lt;/SPAN&gt; &lt;SPAN class=""&gt;.........&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;I've seen examples regarding skipping header lines in CSV files, though this is a textfile. It is not a huge issue though still something which is a bit irritating.&lt;/P&gt;
&lt;P&gt;Is it possible to skip these lines so they are not forwarded/indexed? How would I go about accomplishing this?&lt;/P&gt;
&lt;P&gt;Thank you in advace&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 14:22:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605943#M105314</guid>
      <dc:creator>fatsug</dc:creator>
      <dc:date>2022-07-18T14:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Skip lines/events during log rotation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605974#M105315</link>
      <description>&lt;P&gt;You can configure Splunk to drop events (send them to nullQueue), based on regex. You can find details in the Splunk documentation:&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues" target="_blank"&gt;Route and filter data - Splunk Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 11:17:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605974#M105315</guid>
      <dc:creator>JacekF</dc:creator>
      <dc:date>2022-07-18T11:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Skip lines/events during log rotation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605975#M105316</link>
      <description>&lt;P&gt;Hi and thanks&lt;/P&gt;&lt;P&gt;Hm, so basically I could do something like:&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;PRE&gt;[source::/my/source/here]
TRANSFORMS-null= setnull&lt;/PRE&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;PRE&gt;[setnull]
REGEX = ^#[a-zA-Z]+: 
DEST_KEY = queue
FORMAT = nullQueue&lt;/PRE&gt;&lt;P&gt;In the same files where I define field extraction? Currently this TA lives on the search heads and the universal forwarder collecting the log. Do I need this TA anywhere else or would that be enough?&lt;/P&gt;&lt;P&gt;Thank you again&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 11:32:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605975#M105316</guid>
      <dc:creator>fatsug</dc:creator>
      <dc:date>2022-07-18T11:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Skip lines/events during log rotation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605976#M105317</link>
      <description>&lt;P&gt;As per documentation: "&lt;SPAN&gt;Although similar to forwarder-based routing, queue routing can be performed by an indexer, as well as a heavy forwarder." Which means that you need to create a TA and deploy it to the indexer(s) or heavy forwarder (if your are using it).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The transforms file should be ok, if you are sure that events you want to keep, will not match provided REGEX.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 11:41:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605976#M105317</guid>
      <dc:creator>JacekF</dc:creator>
      <dc:date>2022-07-18T11:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Skip lines/events during log rotation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605977#M105318</link>
      <description>&lt;P&gt;Ah, the "caveat" at the end...&lt;/P&gt;&lt;P&gt;So yeah, I need to deploy the TA to the indexers to "skip" these header events once per 24h. Not sure I understand the manual here 100% though. Is it enough if this config is present on indexers and heavy forwarders, or should I push this to universal forwarder and search heads as well?&lt;/P&gt;&lt;P&gt;Regarding the regex, no events should ever start with # for this source, so that should be OK.&lt;/P&gt;&lt;P&gt;Thank you again! Fantastic feedback&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 11:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605977#M105318</guid>
      <dc:creator>fatsug</dc:creator>
      <dc:date>2022-07-18T11:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Skip lines/events during log rotation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605979#M105319</link>
      <description>&lt;P&gt;You only need those props and transforms conf files on indexers/heavy forwarders.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 11:56:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605979#M105319</guid>
      <dc:creator>JacekF</dc:creator>
      <dc:date>2022-07-18T11:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Skip lines/events during log rotation</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605982#M105320</link>
      <description>&lt;P&gt;Fantastic!&lt;/P&gt;&lt;P&gt;I'll mark the initial reply as the solution and se if I can get the configuration deployed. Fingers crossed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 11:58:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-Skip-lines-events-during-log-rotation/m-p/605982#M105320</guid>
      <dc:creator>fatsug</dc:creator>
      <dc:date>2022-07-18T11:58:53Z</dc:date>
    </item>
  </channel>
</rss>

