ONES Telemetry Agent Installation

ONES Agent v3.0 support Agent Auto discovery

  1. ONESv3.0 Agent support auto-discovery feature

  2. ONESv3.0 Agent support to send telemetry on multiple controllers (Max 2)

  3. Restrict IP feature can be enabled/disabled

  4. Only Collector upgrade after Deployment is possible now

  5. Password-based authentication is supported

  6. 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

  7. Need to add a few inputs while installing the agent

    1. Controller IP //To restrict the telemetry streaming

    2. Device Credentials

    3. Layer

    4. Region

    5. type

    6. groupid

    7. azid

    8. brickid

    9. rackid

Installation

On the Application machine, go to ONES-3.0/ones_t_agent folder

root@ones-application:~$ cd /ONES-3.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-3.0/ones_t_agent:~$ vi device_info.csv

The user needs to add all the required details in the CSV file, This CSV file will be used to push this information to agent.conf(/etc/sonic/agent.conf) file to every switch and ones-agent on the switch will pick the details from agent.conf file and will register itself to ONES controller with all the given parameters this helps a NetOps engineer to directly add a CSV file containing all the details, The Engineer needs not to add one by one devices on the controller which actually is time-consuming

ip,user,passwd,layer,region,type,groupid,azid,brickid,rackid
"10.20.2.12","admin","YourPaSsWoRd","Spine","San_Jose_Lab","sonic",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.

The installer file automatically detects & will process fresh installation or upgrade to the new version

While upgrading, all the previous files will automatically get deleted on the Switch

If users want to use the certificate for GNMI & Auto-Registration, so users need to put the certificate in directory gnmi-certs(for GNMI) & auto-reg-certs(for Agent Auto Registration)

root@ones-application/ONES-3.0/ones_t_agent:~$ ./ones_agent_parallel_installer.sh

  1. 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
  1. 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 
  1. Scripts asks to put the Controller IP to use auto-discovery feature

Enter 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.4.11

User can only add 2 Controller IP to restrict the telemetry streaming

  1. 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.

  1. 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

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 the agent installation? (yes/no): no
Enter the ip address of collectors to auto-discover. Do not enter more than 2. Eg - 10.1.1.10,10.2.2.5 : 10.20.0.87
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: Yes
Do you want to enable password authentication? (yes/no): yes
Enter the new username: admin
Enter the new password: YourPaSsWoRd
e2ef8a51359d: Loading layer [==================================================>]  72.54MB/72.54MB
ae2d55769c5e: Loading layer [==================================================>]  7.401MB/7.401MB
3054512b6f71: Loading layer [==================================================>]  31.35MB/31.35MB
997b8e79e84f: Loading layer [==================================================>]   5.12kB/5.12kB
e6c5004ee77f: Loading layer [==================================================>]   11.7MB/11.7MB
867f2af1b281: Loading layer [==================================================>]   2.56kB/2.56kB
86fee8a2d43f: Loading layer [==================================================>]  31.45MB/31.45MB
4a2339f45f2a: Loading layer [==================================================>]   42.7MB/42.7MB
274d02d0f011: Loading layer [==================================================>]  1.421MB/1.421MB
Loaded image: avizdock/agent_installer:latest
Docker image 'avizdock/agent_installer' is loaded.
06275757da6600fb25d31f1e4c195116d52729e0d80db1aa8064474c5e858ae5
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.2.12', 'user': 'admin', 'passwd': 'YourPaSsWoRd', 'layer': 'Leaf', 'region': 'San_Jose_Lab', 'type': 'Sonic', 'groupid': '', 'azid': '1', 'brickid': '1', 'rackid': '1', 'installation_instance': 1, 'agentip': '10.20.2.12', 'collectorip': '10.20.0.80', 'restrict_collector_ip': 'no', 'password_authentication': 'yes', 'username': 'admin', 'encpass': 'e08d855d42cc2e488592731e', 'enciv': '5b3e16bb25581d5e0934683617dbc445'}]
###############Connecting to switch###############
Connection to switch 10.20.2.12 successful.....................
Looking for previous installation........................
avizdock/ones-agent:v3.0.0
Previous installation found commencing uninstallation on the device 10.20.2.12........
stop ones-agent docker on the device 10.20.2.12........
docker stopped successfully on the device 10.20.2.12........
remove ones-agent docker on the device 10.20.2.12........
docker removed successfully on the device 10.20.2.12........
remove redundant ones-agent docker container on the device 10.20.2.12........
No redundant ones-agent container found on the device 10.20.2.12........
remove docker ones-agent images from DUT on the device 10.20.2.12........
docker image removed successfully on the device 10.20.2.12........
Removing work directory on the device 10.20.2.12........
removed work directory successfully on the device 10.20.2.12........
#####ones-agent uninstalltion completed from device=########## 10.20.2.12

Creating work directory  on the device 10.20.2.12........
Work Directory ones-agent_1725877821_191873 created successfully on the device 10.20.2.12 .............
Copying ones_agent_start.sh to directory ones-agent_1725877821_191873 on the device 10.20.2.12 .............
Copying ones_agent_start.sh to directory ones-agent_1725877821_191873 successful on the device 10.20.2.12 .............
ones_agent_start.sh file copied to /usr/bin successfully on the device 10.20.2.12........
Copying ones_agent_ip_rule.sh to directory ones-agent_1725877821_191873 on the device 10.20.2.12 .............
Copying ones_agent_ip_rule.sh to directory ones-agent_1725877821_191873 successful on the device 10.20.2.12 .............
ones_agent_ip_rule.sh file copied to /usr/bin successfully on the device 10.20.2.12........
Copying ones-agent.service to directory ones-agent_1725877821_191873 on the device 10.20.2.12 .............
Copying ones-agent.service to directory ones-agent_1725877821_191873 successful on the device 10.20.2.12 .............

Installation proceeding with NoTls mode
Copying agent.conf to directory ones-agent_1725877821_191873 successful on the device 10.20.2.12 .............
agent.conf copied to /etc/sonic successfully on the device 10.20.2.12........
Copying ones-agent.tar to directory ones-agent_1725877821_191873 on the device 10.20.2.12 .............
Copying ones-agent.tar to directory ones-agent_1725877821_191873 on the device 10.20.2.12 .............
Loading Docker image on the device 10.20.2.12 ###########################################
Docker image loaded successfully on the device 10.20.2.12........
Getting name of the loaded image
image = ##avizdock/ones-agent:v3.0.0##
Running docker.....................
docker run -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 --net=host --privileged -dt --name ones-agent avizdock/ones-agent:v3.0.0
b'969e2e65db674b594c7ced6f789b2b44ef7a8b556d28499a90c94ba4125b5c00\n'
Loading Service file on the device 10.20.2.12........
Service file loaded successfully on the device 10.20.2.12##################
Enabling ones-agent.service 10.20.2.12 ##################
Enabled ones-agent as service successfully on the device 10.20.2.12 ##################
Starting ones-agent service on the device 10.20.2.12........
Made ones-agent immune to booting on the device 10.20.2.12########################
Copying ones-agent.tar file
ones-agent.tar file copied successfully on the device 10.20.2.12........
Copying agent.conf file
agent.conf file copied successfully on the device 10.20.2.12........
Copying ones-agent.service file
ones-agent.service file copied successfully on the device 10.20.2.12........
Copying ones_agent_ip_rule.sh file
ones_agent_ip_rule.sh file copied successfully on the device 10.20.2.12........
Copying ones_agent_start.sh file
ones_agent_start.sh file copied successfully on the device 10.20.2.12........
##################################################################
Status of ones-agent.service is -      Active: active (running) since Mon 2024-09-09 16:03:52 IST; 1min 35s ago

removing backup files
removed backup directory successfully on the device 10.20.2.12........
Deployment of ones-agent to switch 10.20.2.12 is successful
╒══════════════╤══════════╕
│ IP Address   │ Result   │
╞══════════════╪══════════╡
10.20.2.12   │ Pass     │
╘══════════════╧══════════╛
agent_installer

Docker agent_installer has been stopped
agent_installer

Docker agent_installer has been removed
Untagged: avizdock/agent_installer:latest
Deleted: sha256:180765aed1eba26b8d30d3bef983682a2b36a3507b7655c6e614f22dbbf80007
Deleted: sha256:7912382f54799a2f35358528c441af6bb745ba6fe6cb040a7be48347ff7e80a3
Deleted: sha256:fe33139b53a0b2b401d44f57a74ff789beb4a3a38792f80a793cc01611bab9e7
Deleted: sha256:38e2eba240dfe04c6d027aafc1954c84fc1eadeb3e4fd9d1e9a8ad7100686d7f
Deleted: sha256:53fdc4ec83b42d7060b4143da9ffbf9dd55e3bfa6fb4843bfacec19dcbd80e4b
Deleted: sha256:11b1633cb703032b065434387b48194f3e97a57aaddc61a31aa2918a1fd32780
Deleted: sha256:aa353210edce17d0370066fc6184cff9e2a9197884e6f43a0ad1fd32b630f8de
Deleted: sha256:b23b2f4af61d8cc745c6bea66be93bd59b97c3971c36466ae4ea345f52fdfc67
Deleted: sha256:b55ff4d1eb4dd15edbc9ffc15b1bd5771cd09c371b0e7c44cbcbd5c5f62ec76a
Deleted: sha256:e2ef8a51359d088511d34c725305c220294a1fcd5fe5e5dbe4d698c7239ce2c9

Docker avizdock/agent_installer image has been removed

Now Agent will only stream the metrics to the given controller & will autoregister on the ONES-App

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

Copyright © Aviz Networks, Inc.