Configure dropwizard modules for same services in different namespaces

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.

      - 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.

Maybe autodiscover? Autodiscover | Metricbeat Reference [7.11] | Elastic

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