# Retrieve Specific Filenames Using Wildcards in Dynatrace Log Ingestion Rules

**URL:** <https://community.dynatrace.com/t/retrieve-specific-filenames-using-wildcards-in-dynatrace-log-ingestion-rules/47181>\
**Category:** Logs\
**Tags:** log-configuration, logs\
**Created:** [August 16, 2024, 8:05pm UTC](https://community.dynatrace.com/t/retrieve-specific-filenames-using-wildcards-in-dynatrace-log-ingestion-rules/47181 "2024-08-16T20:05:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GaborBernics](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gaborbernics/32/13449_2.png) [@GaborBernics](https://community.dynatrace.com/u/GaborBernics)\
**Post date:** [August 16, 2024, 8:05pm UTC](https://community.dynatrace.com/t/retrieve-specific-filenames-using-wildcards-in-dynatrace-log-ingestion-rules/47181/1 "2024-08-16T20:05:08Z")

</div>

Hello,

I created a log ingestion rule at the host-group level to pick up logs.  
The log.source contains the wildcard character “\*”, for example, /static/\*/static/service.log.

The machines contain multiple folders:

- /static/XY/static/service.log
- /static/XZ/static/service.log

At first glance, this seems perfect because it can be applied to all machines without needing to create rules with specific folder names for each machine.

However, the log.source is only available with the wildcard, and Dynatrace does not provide the exact filenames.  
As a result, the filtering is not working correctly.

When I need logs only from /static/XY/static/service.log, the query also provides log entries from /static/XZ/static/service.log.

Do you have any idea how I can retrieve the specific filenames?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [August 21, 2024, 12:02pm UTC](https://community.dynatrace.com/t/retrieve-specific-filenames-using-wildcards-in-dynatrace-log-ingestion-rules/47181/2 "2024-08-21T12:02:10Z")

</div>

Hi Gábor!

I think it is not possible. ☹ Maybe other community members have any other ideas.

What would you like to achieve exactly? Drop me an e-mail if you need any online help: [janos.mizsei@telvice.hu](mailto:janos.mizsei@telvice.hu)

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![GaborBernics](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gaborbernics/32/13449_2.png) [@GaborBernics](https://community.dynatrace.com/u/GaborBernics)\
**Post date:** [August 22, 2024, 9:49am UTC](https://community.dynatrace.com/t/retrieve-specific-filenames-using-wildcards-in-dynatrace-log-ingestion-rules/47181/3 "2024-08-22T09:49:27Z")

</div>

Hello Mizső,

Thanks for the confirmation.

The main target is to enforce the log rules at the host-group level, instead of creating rules for all affected services on each machine.  
The service path contains individually generated parts, which complicates the situation.

If Dynatrace is not able to retrieve the full path of the affected log entries, we may need to create individual rules using the API.

Regards,  
Gabor&nbsp;  
[Allianz Technology]

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [August 22, 2024, 10:59am UTC](https://community.dynatrace.com/t/retrieve-specific-filenames-using-wildcards-in-dynatrace-log-ingestion-rules/47181/4 "2024-08-22T10:59:04Z")

</div>

Hi&nbsp;[@GaborBernics](https://community.dynatrace.com/user/79529)!

I thinkthis is the only one way…the individual rules.

Maybe there is a dirty solution with an extra disk capacity reuirements. If you could enrich you every single log lines with the generated information (extra disk requirements for log size). This information could be parsed out from the log lines and could be used for filtering. Example for filtering based on parsed data from log lines…

 ![Mizs_0-1724324194275.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/0/c0c4cbbb3db0eb72f6845626f14434be9126d700.png)

Best regrads,

Mizső

---

<div class="post-metadata">

**Author:** ![moin\_DT1](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@moin\_DT1](https://community.dynatrace.com/u/moin_DT1)\
**Post date:** [February 28, 2025, 4:05pm UTC](https://community.dynatrace.com/t/retrieve-specific-filenames-using-wildcards-in-dynatrace-log-ingestion-rules/47181/5 "2025-02-28T16:05:37Z")

</div>

Hi&nbsp;[@GaborBernics](https://community.dynatrace.com/user/79529);

There is an option to add Attributes in the CUSTOM LOG SOURCES.

 ![moin_DT1_0-1740760301313.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/f/6f728d18bef8c07a71793103a15122b0c208f053.png)

I know its late, but it might be useful for other users of community.

Regards,

Moin

---

<div class="post-metadata">

**Author:** ![MikeDouglas](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mikedouglas/32/22822_2.png) [@MikeDouglas](https://community.dynatrace.com/u/MikeDouglas)\
**Post date:** [May 16, 2025, 4:50pm UTC](https://community.dynatrace.com/t/retrieve-specific-filenames-using-wildcards-in-dynatrace-log-ingestion-rules/47181/6 "2025-05-16T16:50:02Z")

</div>

Thanks! This worked for us.
