ONES Telemetry Agent Installation
ONES Agent v4.0
ONESv4.0 Agent support auto-discovery feature
ONESv4.0 Agent support to send telemetry on multiple controllers (Max 2)
Dial-out feature
Restrict IP feature can be enabled/disabled
Only Collector upgrade after Deployment is possible now
Password-based authentication is supported
Using the Restrict IP feature agent will discover the ONES Controller and will update the entry on the ONES App with all the feature metrics
Need to add a few inputs while installing the agent
Controller IP //To restrict the telemetry streaming
Device Credentials
Layer
Region
type
groupid
fabric
azid
brickid
rackid
Installation
On the Application machine, go to ONES-4.0/ones_t_agent folder
root@ones-application:~$ cd /ONES-4.0/ones_t_agent
Installation (Agent Install on multiple switches at the same time)
Enter device details (Management IP, Username and Password ) in device_info.csv
root@ones-application/ONES-4.0/ones_t_agent:~$ vi device_info.csv
ip,user,passwd,layer,region,type,fabricid,groupid,azid,brickid,rackid
"10.20.2.12","admin","YourPaSsWoRd","Spine","San_Jose_Lab","sonic","3",1,1,1,1
...
...
...
The user must maintain the layer names exactly as specified above (case-sensitive). If the user inputs names that differ from these, they may encounter issues when using the ONES application.
Save the File
Executing the installation script can be used for installing a telemetry agent on one or more devices in the data centre.
root@ones-application/ONES-4.0/ones_t_agent:~$ ./ones_agent_parallel_installer.sh
User will have option to update creds inc ase ONES-Agent is already installed
Do you want to update the username/password for password authentication? (Yes/No): No
Users can use ONES-Agent as an integrated service in SONiC OS or can use it as an independent third-party container.
Does the ONES-agent is integrated with SONiC NOS? (yes/no): no
Users can choose this option to only update one more controller IP without doing the complete agent installation.
Do you want to add only Collector IP for auto-discovery and skip the agent installation ?(yes/no): no
Scripts asks to put the Controller IP to use auto-discovery feature
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
Collector IPs accepted: 10.20.0.235
User can choose the restriction to send telemetry to collector IP only
Do you want to restrict access only to provided collector ip?
Note: Providing Yes will restrict access to agent only with the provided collector IP Address
Enter Yes/No : Yes
It's important to restrict collector IP as No in case the running network has NAT translation from private to public IP for ONES server access from the device.
User can enable password based authentication between agnet and collector
Do you want to enable password authentication? (yes/no): yes Enter the new username: admin Enter the new password: YourPaSsWoRd
Installation Begin
root@aviz:/home/aviz/ones-1754654734-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): No
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
Collector IPs accepted: 10.20.0.235
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): Ye
Error: Option not found. Please choose either 'Yes' or 'No'.
root@aviz:/home/aviz/ones-1754654734-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): No
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
Collector IPs accepted: 10.20.0.235
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): Yes
Enter the username: admin
Enter the password: ********
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.206', '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.206', 'collectorip': '10.20.0.235', 'restrict_collector_ip': 'no', 'password_authentication': 'yes', 'username': 'admin', 'encpass': '38f16c831daf537e2570db33', 'enciv': '1075520c913efc09bcd5f381bc2b1bd5'}]
############### Connecting to switch with IP 10.20.3.206 ###############
Connection to switch 10.20.3.206 successful.....................
Fetching device details before agent installation...
+--------------+-----------------------------+-------------------+----------+--------------+
| IP Address | Platform | HwSKU | ASIC | ASIC Count |
+==============+=============================+===================+==========+==============+
| 10.20.3.206 | x86_64-accton_as7726_32x-r0 | Accton-AS7726-32X | broadcom | 1 |
+--------------+-----------------------------+-------------------+----------+--------------+
Looking for previous installation........................
ones-agent:v4.0.0
Previous installation found commencing uninstallation on the device 10.20.3.206........
stop ones-agent docker on the device 10.20.3.206........
docker stopped successfully on the device 10.20.3.206........
remove ones-agent docker on the device 10.20.3.206........
docker removed successfully on the device 10.20.3.206........
remove redundant ones-agent docker container on the device 10.20.3.206........
No redundant ones-agent container found on the device 10.20.3.206........
remove docker ones-agent images from DUT on the device 10.20.3.206........
docker image removed successfully on the device 10.20.3.206........
Removing work directory on the device 10.20.3.206........
removed work directory successfully on the device 10.20.3.206........
#####ones-agent uninstallation completed from device=########## 10.20.3.206
Checking if ones-agent container exists...
Creating work directory on the device 10.20.3.206........
Work Directory ones-agent_1755021254_7545485 created successfully on the device 10.20.3.206 .............
Copying ones_agent_start.sh to directory ones-agent_1755021254_7545485 on the device 10.20.3.206 .............
Copying ones_agent_start.sh to directory ones-agent_1755021254_7545485 successful on the device 10.20.3.206 .............
ones_agent_start.sh file copied to /usr/bin successfully on the device 10.20.3.206........
Copying ones_agent_ip_rule.sh to directory ones-agent_1755021254_7545485 on the device 10.20.3.206 .............
Copying ones_agent_ip_rule.sh to directory ones-agent_1755021254_7545485 successful on the device 10.20.3.206 .............
ones_agent_ip_rule.sh file copied to /usr/bin successfully on the device 10.20.3.206........
Copying ones-agent.service to directory ones-agent_1755021254_7545485 on the device 10.20.3.206 .............
Copying ones-agent.service to directory ones-agent_1755021254_7545485 successful on the device 10.20.3.206 .............
Installation proceeding with NoTls mode
Copying agent.conf to directory ones-agent_1755021254_7545485 successful on the device 10.20.3.206 .............
agent.conf copied to /etc/sonic successfully on the device 10.20.3.206........
Copying ones-agent.tar to directory ones-agent_1755021254_7545485 on the device 10.20.3.206 .............
Copying ones-agent.tar to directory ones-agent_1755021254_7545485 on the device 10.20.3.206 .............
Loading Docker image on the device 10.20.3.206 ###########################################
Docker image loaded successfully on the device 10.20.3.206........
Getting name of the loaded image
image = ##ones-agent:v4.0.0##
Running docker.....................
docker run -v /var/log:/var/log -v /proc:/host_proc --pid=host -it -v /var/run/docker.sock:/var/run/docker.sock -v /host/reboot-cause:/host/reboot-cause -v /etc/sonic:/etc/sonic -v /var/run/redis:/var/run/redis -v /var/run:/var/hostrun --log-driver local --log-opt max-size=5m --log-opt max-file=3 --cpu-period=100000 --cpu-quota=50000 --cpu-shares=512 --net=host --privileged -dt --name ones-agent ones-agent:v4.0.0
b'c5f998b4acf6faf966c6ed32c841464402eacf80b5bd8b2413e2fade9758a07d\n'
Loading Service file on the device 10.20.3.206........
Service file loaded successfully on the device 10.20.3.206##################
Enabling ones-agent.service 10.20.3.206 ##################
Enabled ones-agent as service successfully on the device 10.20.3.206 ##################
Starting ones-agent service on the device 10.20.3.206........
Made ones-agent immune to booting on the device 10.20.3.206########################
Copying ones-agent.tar file
ones-agent.tar file copied successfully on the device 10.20.3.206........
Copying agent.conf file
agent.conf file copied successfully on the device 10.20.3.206........
Copying ones-agent.service file
ones-agent.service file copied successfully on the device 10.20.3.206........
Copying ones_agent_ip_rule.sh file
ones_agent_ip_rule.sh file copied successfully on the device 10.20.3.206........
Copying ones_agent_start.sh file
ones_agent_start.sh file copied successfully on the device 10.20.3.206........
##################################################################
Status of ones-agent.service is - Active: active (running) since Tue 2025-08-12 17:58:51 UTC; 1min 35s ago
removing backup files
removed backup directory successfully on the device 10.20.3.206........
Found ones-agent version: v4.0.0
Deployment of ones-agent to switch 10.20.3.206 is successful
╒══════════════╤══════════╤═══════════╕
│ IP Address │ Result │ Version │
╞══════════════╪══════════╪═══════════╡
│ 10.20.3.206 │ Pass │ v4.0.0 │
╘══════════════╧══════════╧═══════════╛
Docker agent_installer has been stopped
Docker agent_installer has been removed
Docker avizdock/agent_installer image has been removed
The user needs to make sure, The devices have a unique name, otherwise, there will issue while plotting the full topology view(Topology Page).

Last updated