# Exclude specific log files

**URL:** <https://community.dynatrace.com/t/exclude-specific-log-files/43975>\
**Category:** Open Q&A\
**Tags:** oneagent\
**Created:** [February 5, 2024, 11:35am UTC](https://community.dynatrace.com/t/exclude-specific-log-files/43975 "2024-02-05T11:35:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralmughyir](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@ralmughyir](https://community.dynatrace.com/u/ralmughyir)\
**Post date:** [February 5, 2024, 11:35am UTC](https://community.dynatrace.com/t/exclude-specific-log-files/43975/1 "2024-02-05T11:35:25Z")

</div>

We need to **exclude** access to **certain log files** from Dynatrace. There is any method to&nbsp;excluding?

---

<div class="post-metadata">

**Author:** ![Islam\_Zedan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/islam_zedan/32/31999_2.png) [@Islam\_Zedan](https://community.dynatrace.com/u/Islam_Zedan)\
**Post date:** [February 5, 2024, 11:41am UTC](https://community.dynatrace.com/t/exclude-specific-log-files/43975/2 "2024-02-05T11:41:06Z")

</div>

Hello,

Yes, you can exclude some logs from monitoring using ingest rules. please check the below document for further details.

> **[Log ingest rules](https://docs.dynatrace.com/docs/analyze-explore-automate/log-monitoring/acquire-log-data/log-storage-classic)**
>
> Include and exclude specific log sources already known to OneAgent for storage and analysis.

[https://docs.dynatrace.com/docs/shortlink/log-monitoring-log-drop](https://docs.dynatrace.com/docs/shortlink/log-monitoring-log-drop)

Thanks,

Islam

---

<div class="post-metadata">

**Author:** ![DantePaoloni](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@DantePaoloni](https://community.dynatrace.com/u/DantePaoloni)\
**Post date:** [February 5, 2024, 11:44am UTC](https://community.dynatrace.com/t/exclude-specific-log-files/43975/3 "2024-02-05T11:44:00Z")

</div>

You need to block ingesting of those logs, or limit the user access to query those logs?

Both possibilities are there:

\* In case of ingest. In **Settings, Log Ingest Rules →** you can create a exclude rule with the condition of log source, or log content or other values.

\* If you need to filter at query level, ingest but only some users can read them, you can use the [security context](https://docs.dynatrace.com/docs/observe-and-explore/logs/lma-security-context#dql-matcher-in-logs)&nbsp; or [bucket](https://docs.dynatrace.com/docs/shortlink/lma-bucket-assignment)&nbsp;to later&nbsp;&nbsp;[create policy permission](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions) and only the users with the policy can read those logs if are ingested into Dynatrace.
