<?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: Index only Specific Lines from a Strucutred Log File in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683409#M114084</link>
    <description>&lt;P&gt;My intent is that any event message &lt;EM&gt;without&lt;/EM&gt; the string &lt;STRONG&gt;NO_CLIENT_SITE&lt;/STRONG&gt; anywhere in it is discarded.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2024 13:46:52 GMT</pubDate>
    <dc:creator>shocko</dc:creator>
    <dc:date>2024-04-05T13:46:52Z</dc:date>
    <item>
      <title>Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680143#M113632</link>
      <description>&lt;P&gt;I’m using Splunk Enterprise 9 with Universal Forwarder 9 on Windows. I'd like to monitor several structured log files but only ingest specific lines from these files (basically each line begins with a well-defined string so easy to create matching regular expression or simple match against it). I’m wondering where this can be achieved?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Q:&amp;nbsp;&lt;/STRONG&gt;Can the UF do this natively or do I need to monitor the file as a whole then drop certain lines at the indexer?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 21:08:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680143#M113632</guid>
      <dc:creator>shocko</dc:creator>
      <dc:date>2024-06-11T21:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680145#M113634</link>
      <description>&lt;P&gt;Firstly - what do you mean by "structured" here. If you mean INDEXED_EXTRACTIONS, the situation is getting complicated because UF does the parsing and the event is not touched after that (except for ingest actions)&lt;/P&gt;&lt;P&gt;If you just mean a well-known and well-formed events, you could try enabling force_local_processing on your UF&lt;/P&gt;&lt;PRE&gt;force_local_processing = &amp;lt;boolean&amp;gt;
* Forces a universal forwarder to process all data tagged with this sourcetype
  locally before forwarding it to the indexers.
* Data with this sourcetype is processed by the linebreaker,
  aggerator, and the regexreplacement processors in addition to the existing
  utf8 processor.
* Note that switching this property potentially increases the cpu
  and memory consumption of the forwarder.
* Applicable only on a universal forwarder.
* Default: false&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;It' s worth noting though that it's not a recommended setting and it not widely used so you can get problems finding support in case anything goes wrong.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Mar 2024 08:48:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680145#M113634</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-03-09T08:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680181#M113636</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/191266"&gt;@shocko&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The typical approach discards lines at an intermediate heavy forwarder or indexer by sending them to nullQueue:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;# props.conf

[my_sourcetype]
# add line and event-breaking and timestamp extraction here
TRANSFORMS-my_sourcetype_send_to_nullqueue = my_sourcetype_send_to_nullqueue

# transforms.conf

[my_sourcetype_send_to_nullqueue]
# replace foo with a string or expression matching "keep" events
REGEX = ^(?!foo).
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;As with &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;, I've not seen a common use case for force_local_processing. I often say I don't want my application servers turning into Splunk servers, so I prioritize a lightweight forwarder configuration over data transfer. If CPU cores (fast growing files) and memory (large numbers of files) cost you less than network I/O, you may prefer the force_local_processing option; you won't save on disk I/O either way.&lt;/P&gt;&lt;P&gt;If you need a refresher on the functions performed by the uft8, linebreaker, aggregator, and regexreplacement processors, see &lt;A href="https://community.splunk.com/t5/Getting-Data-In/Diagrams-of-how-indexing-works-in-the-Splunk-platform-the-Masa/m-p/590781/highlight/true#M103485" target="_self"&gt;https://community.splunk.com/t5/Getting-Data-In/Diagrams-of-how-indexing-works-in-the-Splunk-platform-the-Masa/m-p/590781/highlight/true#M103485&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Mar 2024 23:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680181#M113636</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2024-03-09T23:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680297#M113671</link>
      <description>&lt;P&gt;I mean &lt;EM&gt;structured&lt;/EM&gt; in terms of each line in the log following a defined structure (space delimited fields) that lends itself to easy parsing.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 15:20:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680297#M113671</guid>
      <dc:creator>shocko</dc:creator>
      <dc:date>2024-03-11T15:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680299#M113672</link>
      <description>&lt;P&gt;OK got it so basically:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;UF gathers a lines and send to heavy forwarder/indexer&lt;/LI&gt;&lt;LI&gt;Indexer drops all lines &lt;EM&gt;except&lt;/EM&gt; those &lt;EM&gt;not matched&lt;/EM&gt; by the reg ex.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'll give it a whirl! Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49493"&gt;@tscroggins&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 15:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/680299#M113672</guid>
      <dc:creator>shocko</dc:creator>
      <dc:date>2024-03-11T15:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683379#M114076</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49493"&gt;@tscroggins&lt;/a&gt;&amp;nbsp; thanks for the steer. I'm close ot getting this working but when I implemenet the transform it drops my event. The even tline looks as follows&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SOMEDATA NO_CLIENT_SITE: MYSYSTEM 10.15.37.48&lt;/LI-CODE&gt;&lt;P&gt;My &lt;STRONG&gt;props.conf&lt;/STRONG&gt; is as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[netlogon]
DATETIME_CONFIG =
LINE_BREAKER = ([\r\n]+)
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Custom
pulldown_type = 1
TRANSFORMS-netlogon_send_to_nullqueue = netlogon_send_to_nullqueue
                                                                     &lt;/LI-CODE&gt;&lt;P&gt;My &lt;STRONG&gt;transforms.conf&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[netlogon_send_to_nullqueue]
REGEX = ^(?!NO_CLIENT_SITE).
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;Is it the regEx at fault here? I have been playing with it at&amp;nbsp;&lt;A href="https://regex101.com/" target="_blank"&gt;regex101: build, test, and debug regex&lt;/A&gt;&amp;nbsp;but I cannot see the issue.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 09:31:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683379#M114076</guid>
      <dc:creator>shocko</dc:creator>
      <dc:date>2024-04-05T09:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683405#M114083</link>
      <description>&lt;P&gt;As configured, the transform will match and discard all events that do not start with NO_CLIENT_SITE. An event starting with SOMEDATA (any string that isn't NO_CLIENT_SITE) would be discarded. Was that your intent?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 13:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683405#M114083</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2024-04-05T13:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683409#M114084</link>
      <description>&lt;P&gt;My intent is that any event message &lt;EM&gt;without&lt;/EM&gt; the string &lt;STRONG&gt;NO_CLIENT_SITE&lt;/STRONG&gt; anywhere in it is discarded.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 13:46:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683409#M114084</guid>
      <dc:creator>shocko</dc:creator>
      <dc:date>2024-04-05T13:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Index only Specific Lines from a Strucutred Log File</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683416#M114085</link>
      <description>&lt;P&gt;It doesn't work that way.&lt;/P&gt;&lt;P&gt;You should do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TRANSFORMS-netlogon_send_to_nullqueue = netlogon_send_all_to_nullqueue, netlogon_keep_some&lt;/LI-CODE&gt;&lt;P&gt;And have the netlogon_send_all_to_nullqueue transform send completely _everything_ to nullQueue&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[netlogon_send_all_to_nullqueue]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;And then keep only some of them - matching the string you want&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[netlogon_keep_some]
REGEX = NO_CLIENT_SITE
DEST_KEY = queue
FORMAT = indexQueue&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Apr 2024 14:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-only-Specific-Lines-from-a-Strucutred-Log-File/m-p/683416#M114085</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-04-05T14:47:47Z</dc:date>
    </item>
  </channel>
</rss>

