# Bucket assignment question with matchesvalue

**URL:** <https://community.dynatrace.com/t/bucket-assignment-question-with-matchesvalue/51265>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, configuration-as-code, kubernetes, logs\
**Created:** [April 16, 2025, 8:13pm UTC](https://community.dynatrace.com/t/bucket-assignment-question-with-matchesvalue/51265 "2025-04-16T20:13:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dynatrace\_curio](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@dynatrace\_curio](https://community.dynatrace.com/u/dynatrace_curio)\
**Post date:** [April 16, 2025, 8:13pm UTC](https://community.dynatrace.com/t/bucket-assignment-question-with-matchesvalue/51265/1 "2025-04-16T20:13:03Z")

</div>

Hello everybody,

I’m using Monaco with Dynatrace. I’m trying to configure the bucket&nbsp; to extend the log retention period for ONLY all k8s located in a management zone.

I know that I can use in the Matcher field this command&nbsp;matchesValue(managementzone, “management\_zone\_name”).

Or I can list all k8s with matchesvalue&nbsp;matchesValue(k8s.namespace.name, \“k8\_name\”) but I’m planning to create or remove regularly a k8s. I don’t want to change each time the Matcher Field.

But this command includes all components in the management zone but I’m interested about the k8s.

Do you know some commands that I can use in the Matcher field to get the list of all k8s in a specific management zone?

Thank you very much in advance.

---

<div class="post-metadata">

**Author:** ![marco\_irmer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marco_irmer/32/3038_2.png) [@marco\_irmer](https://community.dynatrace.com/u/marco_irmer)\
**Post date:** [April 16, 2025, 10:34pm UTC](https://community.dynatrace.com/t/bucket-assignment-question-with-matchesvalue/51265/2 "2025-04-16T22:34:07Z")

</div>

Perhaps the matcher could be updated with a second condition to only match log events that carry the k8s.namespace.name field.

```javascript
matchesValue(managementzone, "management_zone_name") and isNotNull(k8s.namespace.name)

```
