Configure APM with Host Agent
Using APM with Linux / Docker Agent
Case 1 : Application Running natively on VM / Host
If you are running your application on a VM / host natively, where the host agent is running. Then APM will communicate to Host Agent without any effort !
Case 2 : Application Running as a container
If you are running your application as a container, then you might have to forward data generated by Middleware APM to Middleware Host Agent. You simply have to set this environment variable in your container:
MW_AGENT_SERVICE=<DOCKER_BRIDGE_GATEWAY_ADDRESS>
172.17.0.1
Using APM with Kubernetes Agent
If your application is running inside Kubernetes, Then you will have to forward data generated by Middleware APM to Middleware Kubernetes AgentYou simply have to set this environment variable in your container:
MW_AGENT_SERVICE=mw-service.mw-agent-ns.svc.cluster.local
In the above command, We are assuming that Middleware Kubernetes Agent is running inside “mw-agent-ns” namespace.
In some exceptional cases Middleware Agent might be running in a different Kubernetes namespace. You can get the correct namespace with this command
kubectl get service --all-namespaces | grep mw-service