Adding a global label for all metrics and logs coming from an agent policy

Hello

I need to have a way to filter all the logs and metrics that come from all elastic agent (and integrations) with a certain policy.
For example all dev metrics collected by the dev agents should have a lable: env: dev.
I have found this documentation, but im not sure how it relates to the Elastic Agents.
Our agents are managed by Fleet, and are installed into each Kubernetes cluster.
We are collecting metrics from multiple sources and want to have this label applied to them all for filtering purposes.
If there is a way to do this from the agent and not utilizing an ingest pipeline that would be ideal.
I know you can add tags to agents, but from what I can see that has no use other than to filter agents in the ui.
Thanks!

You may be able to do this by adding processors to the integration

1 Like

Adding global processors to an agent policy is supposed to be in the works according to this issue in Github. However, it's currently marked 8.6-candidate.

1 Like

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