Configuring Elastic Agent to Monitor MongoDB in Kubernetes

Hi!,

I currently have Elastic Agent managed through Fleet in a Kubernetes environment. My goal is to monitor MongoDB using the integration provided by Elastic. However, I have encountered an issue: all Elastic Agent DaemonSets are making calls to MongoDB, generating unnecessary traffic and potentially impacting performance.

My questions are as follows:

Is it possible to configure Elastic Agent so that only the DaemonSets running on the same node as MongoDB make calls to the database?

If not, is there another recommended strategy to optimize this configuration and prevent all DaemonSets from attempting to connect to MongoDB?

I would greatly appreciate any guidance or documentation you can provide to help resolve this issue.

Looking forward to your feedback.

Best regards,