Not able to add self managed k8s cluster name in metrics

I have followed the instruction given in following link to setup elastic agent. I'm able to get metrics in ELK, however i could not get cluster name Dashboard.

The document is not helping to find a way to add cluster name for self managed k8s cluster metrics.

Hi @Hilarudeen_Allaudeen Welcome to the community!

That is the quick start which deploys a self managed Elastic Agent it is meant as a quickstart and is not really easily customizable. You would need to go in and edit the configuration by hand which is very error prone especially if you are just getting started with this.

You will need to add something like this to to every integration

    processors:
      - add_fields:
          target: ''
          fields:
            kubernetes.cluster.name: stephenb-gke

What I would recommend now that you tried the quickstart would be to use a Fleet Managed agent with the Kubernetes Integration.

Do you have Fleet Installed?

Pro Tip (Increase the resources in the downloaded)

If so it is much easier to customize and add fields at the indivisual Integration or event at the Policy Level which will add the fields you want to every document which is a perfect place to add fields like kubernetes.cluster.name etc

Example here I just added this field to the policy that runs all my kubernetes integrations and it is now added to every document / data.