Understanding why only one agent policy can be assigned to an agent

Dear community.

I'm in the situation to setup an elastic agent to retrieve logs with custom integration from a directory e.g. d:\Logs\MyApp_Staging\*.log on machine A
and on machine B. So I have created an agent policy with name myapp-staging and assign the agent A and B to it and create a custom log integration with name logs-myapp-staging. Now I want to setup another application and collect the logs from d:\Logs\AnotherApp_Testing\*.log on machine A, B and C. Normally I would say to create a new agent policy with name anotherapp-testing, assign the agent A, B and C to it and create a custom log integration with name logs-anotherapp-testing. But this is not working because you cannot assign more than one agent policies to an agent. Installing a new agent on the same machine is also not possible.

How would you handle this scenario?

Regards

HHobeck

If I'm not wrong you just need to add the machine C to the same policy, even if it does not have any logs for the app myapp-staging, it will just ignore it because the log files do not exist.

Thank you very much for your quick reply. Do you think it is a good design? It feels like there is something missing in the way how the agents can be assigned to policies. At least it was my expectation how to do this.

Regards

HHobeck

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