Agents

Agents are specialized Services that run a single Process on each Instance.

Configuration

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 can not 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:8125
  • tcp://$INSTANCE_IP:8126

** A process will be able to communicate with the agent only if its running on the same node. Be sure the INSTANCE_IP correspond to the node that the process is running.