---
description: >-
  ONES Agent configuration file allows user to add new collector(controller)
  after the agent installation if required
---

# Adding New Controller

## Overview

To redirect agent telemetry data to a different ONES collector without reinstalling the agent, simply re-run the script with the "Only controller IP addition" option enabled. This process automatically registers the device with the new ONES application and starts the telemetry data stream.

{% hint style="info" %}
**Note:** The terms "collector" and "controller" are synonymous in this context. It is essential to note that the auto-discovery feature is limited to supporting just two controllers.
{% endhint %}

### Update controller IP without installing agent

```log
./ones_agent_parallel_installer.sh
Do you want to update the username/password for password authentication? (Yes/No): No
Does the ONES-agent is integrated with SONiC NOS? (Yes/No): No
Do you want to add only Collector IP for auto-discovery and skip agent installation and other parameters in devices_info.csv ? (Yes/No): Ye
Error: Option not found. Please choose either 'Yes' or 'No'.
root@aviz:/home/aviz/ones-1755167586-onprem/ones_t_agent# ./ones_agent_parallel_installer.sh
Do you want to update the username/password for password authentication? (Yes/No): No
Does the ONES-agent is integrated with SONiC NOS? (Yes/No): No
Do you want to add only Collector IP for auto-discovery and skip agent installation and other parameters in devices_info.csv ? (Yes/No): Yes
Enter the ip address of all collectors to auto-discover. Do not enter more than 2. Eg - 10.1.1.10,10.2.2.5: 10.20.0.235,10.20.0.37
Collector IPs accepted: 10.20.0.235,10.20.0.37
Do you want to restrict access only to the provided collector IP?
Note: Providing Yes will restrict access to agent only with the provided collector IP Address
Enter Yes/No: No
Do you want to enable password authentication? (Yes/No): No

Installing ONES Telemetry Agent
......................................................
Docker image 'avizdock/agent_installer' is loaded.
Docker container 'agent_installer' is running.
Selecting ‘Yes’ will exclusively initiate the day-2 deployment of the Ones-Agent,
involving a reconfiguration of the existing agent to establish communication with the specified collector(s).
Choosing ‘No’ will initiate the deployment of the Ones-Agent as an independent third-party container.
The default values for rackid, brickid, and azid are all set to 0.
[{'ip': '10.20.3.202', 'user': 'admin', 'passwd': 'YourPaSsWoRd', 'layer': 'Leaf', 'region': 'California', 'type': 'Sonic', 'fabricid': '3', 'groupid': '1', 'azid': '1', 'brickid': '1', 'rackid': '1', 'installation_instance': 1, 'agentip': '10.20.3.202', 'collectorip': '10.20.0.235,10.20.0.37', 'restrict_collector_ip': 'no', 'password_authentication': 'no'}]

Skipping agent installation........
Adding Collector IP for auto-discovery...........
############### Connecting to switch with IP 10.20.3.202 ###############
Connection to switch 10.20.3.202 successful.....................
Copying conf file to tmp directory on the device 10.20.3.202 .............
Copying conf file to tmp directory successful on the device 10.20.3.202 .............
Collector ip and restrict_collector_ip successfully added to agent.conf on the device 10.20.3.202........
Docker container is not running. Waiting for it to start...
Docker container is up. Proceeding with collector registration.......

Docker agent_installer has been stopped

Docker agent_installer has been removed

Docker avizdock/agent_installer image has been removed

```

Upon upgrading the Controller IP, it will automatically register with the new ONES
