# Configure dropwizard modules for same services in different namespaces

**URL:** <https://discuss.elastic.co/t/configure-dropwizard-modules-for-same-services-in-different-namespaces/264162>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [February 12, 2021, 5:57pm UTC](https://discuss.elastic.co/t/configure-dropwizard-modules-for-same-services-in-different-namespaces/264162 "2021-02-12T17:57:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![umesh2020](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umesh2020/32/126038_2.png) [@umesh2020](https://discuss.elastic.co/u/umesh2020)\
**Post date:** [February 12, 2021, 5:57pm UTC](https://discuss.elastic.co/t/configure-dropwizard-modules-for-same-services-in-different-namespaces/264162/1 "2021-02-12T17:57:32Z")

</div>

Hi  
we have multiple services exposing metrics using dropwizard running in kubernetes environment. Same services run in multiple kubernetes. namespaces, so I need to configure metricbeat everytime a new namespace is added. Is there a way to simplify this ? My configuration looks something like this.

```auto
      - module: redis
        hosts: ["redis.sam-test1:6379"]
        namespace: "sam-test1"
        metricsets:
          - info
          - keyspace
        period: 30s
        processors:
        - add_kubernetes_metadata: ~

```

Each time, I duplicate above configuration whenever the service runs in new namespace. Is there a better way ?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [February 16, 2021, 11:36am UTC](https://discuss.elastic.co/t/configure-dropwizard-modules-for-same-services-in-different-namespaces/264162/2 "2021-02-16T11:36:41Z")

</div>

Maybe autodiscover? [Autodiscover | Metricbeat Reference [7.11] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-autodiscover.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 16, 2021, 1:37pm UTC](https://discuss.elastic.co/t/configure-dropwizard-modules-for-same-services-in-different-namespaces/264162/3 "2021-03-16T13:37:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
