ONES Agent configuration file allows user to add new collector(controller) after the agent installation if required
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.
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.
Update controller IP without installing agent
Does the ONES-agent is integrated with SONiC NOS? (yes/no): noDo you want to add only Collector IP for auto-discovery and skip the agent installation ?(yes/no): yesEnter the ip address of collectors to auto-discover. Do not enter more than 2. Eg - 10.1.1.10,10.2.2.5 : 10.4.5.254Do you want to restrict access only to provided collector ip?Note: Providing Yes will restrict access to agent only with the provided collector IP AddressEnter Yes/No: No468025bd9c12: Loading layer [==================================================>] 2.56kB/2.56kB1961412d5783: Loading layer [==================================================>] 36.56MB/36.56MBde3513fa22d1: Loading layer [==================================================>] 42.69MB/42.69MBca3343e443b5: Loading layer [==================================================>] 1.421MB/1.421MBLoaded image: avizdock/agent_installer:latestDocker image 'avizdock/agent_installer:latest' is loaded.6466655d5e7dc2631ea51df49e41d75661547603aaa0ddd4615778170fa33a70Docker container 'agent_installer' is running.CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES6466655d5e7d avizdock/agent_installer:latest "python3"1 second ago Up Less than a second agent_installer10.4.5.254nonoSelecting ‘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.[{'ip': '10.4.4.61', 'user': 'admin', 'passwd': 'YourPaSsWoRd', 'layer': 'Leaf', 'region': 'Nyk', 'azid': '1', 'brickid': '1', 'rackid': '1', 'installation_instance': 1, 'agentip': '10.4.4.61', 'collectorip': '10.4.5.254', 'restrict_collector_ip': 'no'}]Agent installation skipped successfully........Adding Collector IP for auto-discovery...........###############Connecting to switch###############Connection to switch 10.4.4.61 successful..............................Docker agent_installer has been stoppedagent_installerDocker agent_installer has been removedUntagged: avizdock/agent_installer:latestDeleted: sha256:6604bbec1feedd9169ea6cca598650bf2f1fe659ae587e9637f80adabe877eebDeleted: sha256:4754441bc1128ca32bd0085e2a366e111b4882359cdebc92560d243a671f33e3Deleted: sha256:c803c23f2ec84e2601fa5e5d954b1cbf406167ae057d7200e9d2f61ba1f402faDeleted: sha256:f9279b9fbc87fee822c69ea9cacc2f9d9a10d9c54bbc21732205684ea3bcf0b1Deleted: sha256:27ea50b3cb2914caa5f99e5268ba0b47e15fb7c490275f560c54e400162e2cc3Docker image has been removed
Upon upgrading the Controller IP, it will automatically register with the new ONES