Agents
Agents are specialized Services that run a single Process on each Instance.
Defining an Agent
You can define any Service as an Agent by setting
its agent attribute to true
services:
telemetry:
agent: true
Communicating with an Agent
Often it is useful for other Processes to communicate with an Agent running on its Instance.
You can declare ports that will be available to communicate with an Agent using the ports attribute:
services:
telemetry:
agent: true
ports:
- 8125/udp
- 8126
Agents will listen on the IP address of the underlying Instance. This means that you cannot deploy two Agents on the same Rack that listen on the same port.
Each Process will have the IP address of its
Instance available in the INSTANCE_IP environment variable.
In the example above, any Process on the same Rack can communicate
with the telemetry Agent running on its Instance using the
following endpoints:
udp://$INSTANCE_IP:8125tcp://$INSTANCE_IP:8126
A process can only communicate with the agent running on the same node. Ensure the
INSTANCE_IPcorresponds to the node that the process is running on.