# ONES Telemetry Agent Installation

## ONES Agent v1.2.1 support Restrict IP&#x20;

1. ONESv1.2.1 Agent restricts the device to send metrics to any random server
2. While installation of Agent it asks to enable the Restrict IP feature with at max 5 Controllers

## Installation

On the Application machine, go to ONES-1.2.1/ones\_t\_agent folder

<mark style="color:blue;">`root@ones-application:~$ cd /ONES-1.2.1/ones_t_agent`</mark>

### Installation (Agent Install on multiple switches at the same time)&#x20;

* Enter device details (Management IP, Username and Password ) in device\_info.csv

<mark style="color:blue;">`root@ones-application/ONES-1.2.1/ones_t_agent:~$ vi device_info.csv`</mark>

```
ip,user,passwd
10.4.4.75,admin,YourPaSsWoRd
10.4.4.76,admin,YourPaSsWoRd
10.4.4.77,admin,YourPaSsWoRd 
...
...
...
```

* Save the File&#x20;

**Executing the installation script can be used for installing a telemetry agent on one or more devices in the data centre.**

{% hint style="info" %}
The installer file automatically detects & will process fresh installation or upgrade to the new version
{% endhint %}

<mark style="color:blue;">`root@ones-application/ONES-1.2.1/ones_t_agent:~$ python3 ones_agent_parallel_installer.py`</mark>

1. Script asks to enable Restrict IP feature

```
Do you want enable restrict ip. Enter Yes/No : Yes
```

2. User can input at max 5 Controller

```
Do not enter more that 5 IPs

Enter allowed IPs Eg - 10.1.1.1,10.1.1.10 : 10.4.4.11
```

### Installation Begin

{% code fullWidth="false" %}

```log
root@ones-application/ONES-1.2.1/ones_t_agent:~$ python3 ones_agent_parallel_installer.py
Do you want enable restrict ip. Enter Yes/No : Yes
Do not enter more that 5 IPs

Enter allowed IPs Eg - 10.1.1.1,10.1.1.10 : 10.4.4.11
[{'ip': '10.4.4.61', 'passwd': 'YourPaSsWoRd', 'user': 'admin', 'installation_instance': 1, 'restrict_ip': 'Yes', 'allowed_ip': '10.4.4.11'}]
###############Connecting to switch###############
Connection to switch 10.4.4.61 successful.....................
Looking for previous installation........................
ones-agent:v1_dev
Previous installation found commencing uninstallation on the device 10.4.4.61........
stop ones-agent docker on the device 10.4.4.61........
docker stopped successfully 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 ones-agent.service file
ones-agent.service file copied successfully on the device 10.4.4.61........
##################################################################
Deployment of ones-agent to switch 10.4.4.61 is successful
```

{% endcode %}

{% hint style="info" %}
Now Agent will only stream the metrics to the given controller
{% endhint %}
