Skip to content

Automatically assign Agents to groups

Arranging Agents into groups simplifies the management of your Resilio deployment, and automatically assigning Agents to groups makes administration even more convenient

The Management Console assigns Agents to groups based on tags in the Agent configuration file used when provisioning Agents.

To enable automated group assignment:

  1. Define Agent tags.

    For newly provisioned Agents, tags are defined in the Agent's configuration file. You can add tags to the configuration file directly, or add them in the Management Console and generate a configuration file with the tags included.

    Predefined tags

    Therea are two predefined tags: AGENT_NAME and AGENT_ID. The Management Console won't allow you to add them and you must not add them to the Agent's configuration file.

    Add tags to configuration file in the Management Console

    1. In the Management Console, select Settings > General.
    2. Click Generate Agent config.
    3. In the Tags section, enter the name and the value.

      Note

      Tags names must be uppercase.

    4. Click Save.

      Mc Settings Config File

    5. Click Download, to download the configuration file.

      Tip

      Click the arrow icon for additional options.

      Mc Settings Config File Download Options

    Add tags to the Agent configuration file

    1. Locate your configuration file and open it in a text editor.
    2. Add tags object with a set of "NAME" : "value" pairs.

      Sample configuration file

      {
          "management_server": {
              "host": "172.16.0.80:8444",
              "cert_authority_fingerprint": "d0d5614c46fee9f330b7eae5c1cc",
              "bootstrap_token": "IDKFAIDDQD",
              "disable_cert_check": false
          },
          "mc_restricted_access": false,
          "use_gui": true,
          "tags": {
              "LOCATION": "USA",
              "FUNCTION": "GATEWAY"
          }
      }
      

      Important

      • Tag names must be uppercase.
      • Predefined tags AGENT_NAME and AGENT_ID cannot be added to the configuration file.

    Add tags to already provisioned Agents

    1. In the Management Console, select Agents.
    2. Locate and select the Agents you want to add tags to, then click EDIT TAGS.
    3. Enter the name and the value, then click Save.

    Tip

    You can also manage tags in Agent's details view.

    Agent Tags Agent Details

  2. Create a group, enable and configure auto group membership in the AUTO ASSIGNMENT tab:

    1. Select Automate group membership option to assign Agents to this group automatically.
    2. Select automated group assignment mode:

      • Add all new Agents - Add all newly provisioned Agents to this group.

        Identify Agents by name

        By default, Agents are identified by their Agent ID. If you enable name-based identification Agents connecting to the Management Console with names the same as already connected ones won't be automatically assigned to groups.

        Agent Auto Assignment Identify By Name

        Manual Agents assignment

        The Add all new Agents group assignment mode allows you to manage Agent assignment manually. You can remove automatically added Agents or add Agents provisioned before the group was created.

      • Add new Agents that match the rule - Add newly provisioned Agents that match the tag-based rule.

        Tip

        The Add new Agents that match the rule group assignment mode allows you to manage Agent assignment manually. You can remove automatically added Agents or add Agents that don't match the rule.

      • Always update the group according to the rule - Apply the rule to all Agents and update the group assignment accordingly.

        Tip

        The Always update the group according to the rule group assignment mode is managed automatically and you cannot add or remove Agents to it.

    3. Add an Agent tag and provide a regular expression for string matching.

      Agent Group Autoassignment

      Note

      You can define only one sorting rule based on a single tag.

    4. Click Next and continue creating the group.

Auto-assignment considerations

  • If several groups have similar or same sorting rules, and an Agent's tags match them all, Agent will be added to the groups in order of their creation time, until it faces a conflict. Agent won't be added to the first conflicting group. A corresponding event will be reported and available in the Events view.
  • Tags from the Agent's configuration file are used only when Agent connects to Management Console the first time. Any changes in tags in the sync.conf file after the initial connection, will not be applied. For already provisioned Agents, use the Management Console to manage tags.