<?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: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp;amp; transforms.conf on a H in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741388#M117869</link>
    <description>&lt;P&gt;OK. So your transform assigning index based on source does work for the same data?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 09:03:34 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-03-11T09:03:34Z</dc:date>
    <item>
      <title>How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a Heavy For</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741343#M117858</link>
      <description>&lt;P&gt;Description:&lt;/P&gt;&lt;P&gt;I am using a Splunk Heavy Forwarder (HF) to forward logs to an indexer cluster. I need to configure props.conf and transforms.conf on the HF to drop all logs that originate from a specific directory and any of its subdirectories, without modifying the configuration each time a new subdirectory is created.&lt;/P&gt;&lt;P&gt;Scenario:&lt;/P&gt;&lt;P&gt;The logs I want to discard are located under /var/log/apple/. This directory contains dynamically created subdirectories, such as:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/var/log/apple/nginx/

/var/log/apple/db/intro/

/var/log/apple/some/other/depth/ &lt;/LI-CODE&gt;&lt;P&gt;New subdirectories are added frequently, and I cannot manually update the configuration every time.&lt;/P&gt;&lt;P&gt;Attempted Solution: I configured props.conf as follows:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/var/log/apple(/.*)?]

TRANSFORMS-null=discard_apple_logs &lt;/LI-CODE&gt;&lt;P&gt;And in transforms.conf:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[discard_apple_logs]

REGEX = . DEST_KEY = queue

FORMAT = nullQueue &lt;/LI-CODE&gt;&lt;P&gt;However, this does not seem to work, as logs from the subdirectories are still being forwarded to the indexers. Question: What is the correct way to configure props.conf and transforms.conf to drop all logs under /var/log/apple/, including those from any newly created subdirectories? How can I ensure that this rule applies recursively without explicitly listing multiple wildcard patterns? Any guidance would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 16:36:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741343#M117858</guid>
      <dc:creator>ParsaIsHash</dc:creator>
      <dc:date>2025-03-10T16:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741351#M117859</link>
      <description>Any reason why you don’t use inputs.conf with blacklist on source side?</description>
      <pubDate>Mon, 10 Mar 2025 19:32:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741351#M117859</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2025-03-10T19:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741352#M117860</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308381"&gt;@ParsaIsHash&lt;/a&gt;&amp;nbsp;&amp;nbsp;you can use inputs.conf with a blacklist to prevent unwanted files from being forwarded at the source level (on the Heavy Forwarder). This approach stops logs from even being read, which is more efficient than filtering them in props.conf and transforms.conf.&lt;/P&gt;&lt;PRE&gt;blacklist = &amp;lt;regular expression&amp;gt;
* If set, files from this input are NOT monitored if their path matches the
  specified regex.
* Takes precedence over the deprecated '_blacklist' setting, which functions
  the same way.
* If a file matches the regexes in both the deny list and allow list settings,
  the file is NOT monitored. Deny lists take precedence over allow lists.
* No default.&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Mar 2025 19:56:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741352#M117860</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2025-03-10T19:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741359#M117861</link>
      <description>&lt;P&gt;1. I suppose the easiest solution would be to just blacklist the directory within a specific inputs.conf stanza. (As others already pointed out)&lt;/P&gt;&lt;P&gt;2. Do your events come from monitor inputs on this HF or are they forwarded from other hosts? From HFs or UFs?&lt;/P&gt;&lt;P&gt;3. Ingest actions?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 22:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741359#M117861</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-03-10T22:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741368#M117862</link>
      <description>&lt;P&gt;The reason I’m not using inputs.conf with a blacklist is that the hosts sending these logs are managed by another company. They control the Universal Forwarders (UF) and their input configurations, meaning we don’t have access to modify them. However, we still need to mask and drop these logs at our end.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 06:54:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741368#M117862</guid>
      <dc:creator>ParsaIsHash</dc:creator>
      <dc:date>2025-03-11T06:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741369#M117863</link>
      <description>&lt;P&gt;i described that why i cannot access the inputs file on UF&lt;/P&gt;&lt;P&gt;its because of that we do not have permission to access the host&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 06:56:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741369#M117863</guid>
      <dc:creator>ParsaIsHash</dc:creator>
      <dc:date>2025-03-11T06:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741370#M117864</link>
      <description>&lt;P&gt;yes you right and i described why i can't in others answer about it&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 06:57:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741370#M117864</guid>
      <dc:creator>ParsaIsHash</dc:creator>
      <dc:date>2025-03-11T06:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741379#M117865</link>
      <description>&lt;P&gt;Yes, that was my suspicion.&lt;/P&gt;&lt;P&gt;Your general idea seems ok (provided that your transform definition contains separate lines which just squished into one on copy-paste).&lt;/P&gt;&lt;P&gt;Additional question - aren't you by amy chance using indexed extractions?&lt;/P&gt;&lt;P&gt;If you are, data is sent as parsed and is not procesed by transforms further down the pipeline.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 07:28:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741379#M117865</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-03-11T07:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741387#M117868</link>
      <description>&lt;P&gt;The only thing happening on this Heavy Forwarder is collecting logs, assigning an index based on the source using transforms.conf and props.conf, and then forwarding them to the indexer cluster.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 08:55:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741387#M117868</guid>
      <dc:creator>ParsaIsHash</dc:creator>
      <dc:date>2025-03-11T08:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741388#M117869</link>
      <description>&lt;P&gt;OK. So your transform assigning index based on source does work for the same data?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 09:03:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741388#M117869</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-03-11T09:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741415#M117870</link>
      <description>&lt;P&gt;Yes, it's working correctly. For example, I am reindexing /var/log/syslog to index=os_logs, and it applies as expected.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 14:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741415#M117870</guid>
      <dc:creator>ParsaIsHash</dc:creator>
      <dc:date>2025-03-11T14:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741419#M117871</link>
      <description>&lt;P&gt;Well... then it should work.&lt;/P&gt;&lt;P&gt;One thing you could change in your spec is dropping the conditionality at the end (you should never have the directory specified as the source,&amp;nbsp; just files from below this directory) but that's not the issue here.&lt;/P&gt;&lt;P&gt;I noticed one thing though - a similar case as we had not long ago in another thread - your transform class has a name "null". That is a fairly common name so it might be getting overriden somewhere else in your configs. See the btool output if it isn't.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 15:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741419#M117871</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-03-11T15:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741509#M117881</link>
      <description>&lt;P&gt;I have already checked, and the transform configuration is correct with no conflicts in other Splunk settings.&lt;/P&gt;&lt;P&gt;Currently, to filter out sources properly, I have to explicitly define each depth of subdirectories using patterns like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/var/log/apple/*]

TRANSFORMS-null=discard_apple_logs

[source::/var/log/apple/*/*]

TRANSFORMS-null=discard_apple_logs&lt;/LI-CODE&gt;&lt;P&gt;This ensures that logs from different levels of subdirectories are included in the filtering process.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;it's quite strange that Splunk can't handle this scenario if that's the case. Use cases like mine should be fairly common, so I would expect a more straightforward way to handle this.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 08:43:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741509#M117881</guid>
      <dc:creator>ParsaIsHash</dc:creator>
      <dc:date>2025-03-12T08:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Drop All Logs Under a Specific Directory and Its Subdirectories Using props.conf &amp; transforms.conf on a H</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741517#M117885</link>
      <description>&lt;P&gt;Well, to be quite precise, it's not a raw regex.&amp;nbsp; The docs say:&lt;/P&gt;&lt;PRE&gt;Match expressions must match the entire name, not just a substring. Match
expressions are based on a full implementation of Perl-compatible regular
expressions (PCRE) with the translation of "...", "*", and "." Thus, "."
matches a period, "*" matches non-directory separators, and "..." matches
any number of any characters.&lt;/PRE&gt;&lt;P&gt;So in case of wildcards it can get tricky.&lt;/P&gt;&lt;P&gt;I'd try&lt;/P&gt;&lt;PRE&gt;[source::/var/log/apple/...]&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Mar 2025 09:09:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Drop-All-Logs-Under-a-Specific-Directory-and-Its/m-p/741517#M117885</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-03-12T09:09:12Z</dc:date>
    </item>
  </channel>
</rss>

