# Unpairing Sensor from Brain

## Introduction

Unpairing is the process of removing the sensor and brain association. The sensor unpairing may be required in case of :

1. Brain migration to new IP.
2. The sensor is being returned to Vectra.

Related Links:

* [Pairing Physical Sensors](https://docs.vectra.ai/deployment/appliance-operations/broken-reference)
* [How do I clear data from a Vectra Cognito brain or sensor before returning the appliance?](https://docs.vectra.ai/deployment/appliance-operations/broken-reference)

## Preparation:

1. You can see the list of paired sensors and the list of sensors available for pairing from the "brain\_web\_UI -> Data Sources -> network -> Sensors":\
   Note: On Cognito Detect Version 7.3 and below: Manage → Sensors:\
   ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-96fb184b12ec529597e50302a9938efb12edca63%2Funpairing-sensor-from-brain-1.jpg?alt=media)\
   The status column indicates whether the sensor has been paired (i.e. Forwarding / Not-forwarding) or is available for pairing (i.e. Provisioned / Pairing). Sensors that have been paired with other brain devices are not listed on this screen.

## Steps:

#### From the UI

1. Go to "Brain\_Web\_UI -> Data Sources -> Network -> Sensors".
2. Hover the cursor over the sensor you want to unpair; to see the unpair icon (Marked with a red border in the below picture). Click on it.\
   ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-bae63467e35eeac6bba85111ae684472cf1732e3%2F5ab0ee08b8a1f91e0f83064cb199cd22be2186740da4ed8b56ca3bd0b30d0c27.jpg?alt=media)
3. The pop-up show like the below screen. Click on the "Unpair Sensor" button ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-5124b9f8ec3e4e48dae6107db33004cc13edfe6b%2F7f173a6d72f9ed8d539cf687e1c3fd45473dbbb8a4ff3f4fba6957a6d7aa59d4.jpg?alt=media)\
   The status of sensor will chnage to unpairing.\
   ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-aea7927c897a7775987f18ec48c3ba21d68032bd%2Fefc4f39a41f212c4bcf6276ff62bcb382cffaaf6bae65296ac11ead4b214a250.jpg?alt=media)
4. Wait for approx 5 minutes; the sensor status should chage to "Provisioned" .\
   ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-196521ec9cbb17995e0ceef8eb7e1be14eaeeba9%2F326ad8a951d1bb9d092b909c73a303a2ed68a8f9ce6372f6a0f5c15c94a440eb.jpg?alt=media)
5. There may be situations when the brain is not able to reach the sensor; in that case:
   1. Click on unpair button again.\
      ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-04b6a6c1936c246ab96acd85c4aab44cb84fa72e%2F9457dee921ff18adbcdfdee458f99ec17c2710fb2b2903e1ba3229cc3b492a97.jpg?alt=media)
   2. The pop-up will appear . Click on "Force Unpair Sensor".\
      ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-da16833e4458696a2c4043bf9a13a420bb4ed6e7%2Fb994f0ee159f4f3bd6069a0d44be1a7b6f11c5fa6a3b9603b3eaa5d57b4bc089.jpg?alt=media)\
      If the sensor is a Virtual Sensor, just delete the sensor image; and if it's a physical sensor then login to sensor VCLI as a 'vectra' user, and run the command

      ```ckeditor_codeblock
      show brain
      del brain
      show brain
      ```

      The sensor unpairing is complete now.

#### From CLI

1. To list the sensor:

   ```language-c
   show sensors
   ```
2. Now, to unpair (*replace \[SERIAL] by the sensor serial number*):

   ```language-c
   sensor unpair [SERIAL]
   ```
3. In special cases, for example, if a virtual sensor was deleted from the host before unpairing it, you will can force the removal:

   ```language-c
   sensor unpair --force [SERIAL]
   ```

####

#### **Unpairing Cloud Sensor:**

1. Login to the QUX/RUX portal > Data sources > Select cloud sensor (AWS CloudTrail, Azure AD & M365) and expand it.
2. Click on the “Delete” icon\
   ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-fb2bd694eaa2479aa39a5bed573672952cd6fadd%2F28d784eb1be367e0c1be4bbeecf398e3606c2f6a3424d28188514aa6ea8e2ed8.jpg?alt=media)
3. It will ask for the confirmation page, select “Remove Connection”\
   ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-9e63c1bcec2d6f8693ca38ca4e5ae38b21311583%2Fd986184a3a51722d762b3a5569b881e53e8c278f6d29e4964aed1a0bd8d221c5.jpg?alt=media)
4. Wait for 2 minutes, and the cloud sensor will disappear.

## Verification:

1. The Sensor state should be at the 'Available' state at "Brain\_Web\_UI -> Data Sources -> Network -> Sensors".\
   ![Sensor Available for pairing](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-fb81033d3f1ee83ccd44d3e66cf6c91a0049921f%2Fc8f137657052b46c73ab9e7b23197deeded733eecb0795e0fc8b774854c128ac.jpg?alt=media)
2. In the case of the Physical Sensor, the following VCLI command should give \<blank> result.

   ```ckeditor_codeblock
   show brain
   ```

## Troubleshooting:

If prerequisites are passing then sensor pairing can go as easily as it can be; however in case of any issue please contact Vectra support. If possible, please add the following information to the ticket:

1. Output of VCLI commands on Sensor:

```ckeditor_codeblock
show serial-number
show version
show brain
show interface
```

2. Output of VCLI commands on the brain:

```ckeditor_codeblock
show serial-number
show version
show interface
```

```
 
```

3\. Screenshot of sensor detail at: "brain\_web\_UI -> Data Sources -> Network -> Sensors"; then scroll to the sensor in the subject and click on the tree.
