Using ONES Telemetry Agent

ONES Agent v2.1 support Agent Auto discovery

  1. ONESv2.1 Agent support auto-discovery feature

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

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

    6. brickid

    7. rackid

Installation

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

--UPDATE HERE--

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

ONES Telemetry Agent can be installed on SONiC-based switches, provided as part of the NCP Package, navigate to the below location to start the installation

NCP-Extracted-Folder > ones_t_agent
  • Navigate to the ones_t_agent folder

  • Edit the device inventory in the ‘device_info.csv’ file

    vi device_info.csv
device_info.csv
ip,user,passwd,layer,region,azid,brickid,rackid
"x.x.x.x","admin","YourPaSsWoRd","leaf","NYK",1,1,1
"x.x.x.x","admin","YourPaSsWoRd","leaf","NYK",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.

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.

Installation Begin

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.4.4.11
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: No
468025bd9c12: Loading layer [==================================================>]   2.56kB/2.56kB
1961412d5783: Loading layer [==================================================>]  36.56MB/36.56MB
de3513fa22d1: Loading layer [==================================================>]  42.69MB/42.69MB
ca3343e443b5: Loading layer [==================================================>]  1.421MB/1.421MB
Loaded image: avizdock/agent_installer:latest
Docker image 'avizdock/agent_installer:latest' is loaded.
ab76dcd0da078a25570efe51a0057040f47e8a4a5c7320a47eb7a63ac5b42d8c
Docker container 'agent_installer' is running.
...
...
...
###############Connecting to switch###############
Connection to switch 10.4.4.61 successful.....................
Looking for previous installation........................
...
...
...
Loading Docker image on the device 10.4.4.61 ###########################################
Docker image loaded successfully on the device 10.4.4.61........
Getting name of the loaded image
image = ##avizdock/ones-agent:v2.1.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:v2.1.0
b'a01ff31e2f11613e608d7aa425748c69e4d803c5c3cd8a14a1524d173b5e9549\n'
Loading Service file on the device 10.4.4.61........
Service file loaded successfully on the device 10.4.4.61##################
Enabling ones-agent.service 10.4.4.61 ##################
Enabled ones-agent as service successfully on the device 10.4.4.61 ##################
Starting ones-agent service on the device 10.4.4.61........
started ones-agent service successfully on the device 10.4.4.61 ##################
Enabling ones-agent to restart after booting on the device 10.4.4.61........
Made ones-agent immune to booting on the device 10.4.4.61########################
Copying ones-agent.tar file
ones-agent.tar file copied successfully on the device 10.4.4.61........
Copying agent.conf file
agent.conf file copied successfully on the device 10.4.4.61........
Copying ones-agent.service file
ones-agent.service file copied successfully on the device 10.4.4.61........
Copying ones_agent_ip_rule.sh file
ones_agent_ip_rule.sh file copied successfully on the device 10.4.4.61........
Copying ones_agent_start.sh file
ones_agent_start.sh file copied successfully on the device 10.4.4.61........
##################################################################
Status of ones-agent.service is -      Active: active (running) since Mon 2024-04-15 19:32:21 IST; 1min 35s ago

Deployment of ones-agent to switch 10.4.4.61 is successful
agent_installer

Docker agent_installer has been stopped
agent_installer

Docker agent_installer has been removed
Untagged: avizdock/agent_installer:latest
Deleted: sha256:6604bbec1feedd9169ea6cca598650bf2f1fe659ae587e9637f80adabe877eeb
Deleted: sha256:4754441bc1128ca32bd0085e2a366e111b4882359cdebc92560d243a671f33e3
Deleted: sha256:c803c23f2ec84e2601fa5e5d954b1cbf406167ae057d7200e9d2f61ba1f402fa
Deleted: sha256:f9279b9fbc87fee822c69ea9cacc2f9d9a10d9c54bbc21732205684ea3bcf0b1
Deleted: sha256:27ea50b3cb2914caa5f99e5268ba0b47e15fb7c490275f560c54e400162e2cc3

Docker  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).

  • Run the ‘ones_agent_parallel_installer.sh’ script to start the agent installation on the SONiC Switches

./ones_agent_parallel_installer.sh
  • After the Installation is complete, Switches will auto-discover the Controller and start streaming data to the Dashboard

Last updated