> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/v/virtualmetric-datastream.md).

# VirtualMetric DataStream

VirtualMetric DataStream is a telemetry pipeline platform. OctoXLabs collects your Directors as devices and, if you enable it, your DataStream console accounts as users. Directors are the containerized processing nodes you deploy in your own infrastructure. They are not the entries under **Fleet Management > Devices**, which are telemetry inputs.

## Use cases

* List all Directors.

```
Adapters = virtualmetric-datastream
```

## Before you begin

### Network

| Source              | Destination                                                                 | Port                 | Protocol |
| ------------------- | --------------------------------------------------------------------------- | -------------------- | -------- |
| OctoXLabs connector | DataStream API host (default `api-service.eu-west.cloud.virtualmetric.com`) | 443                  | HTTPS    |
| OctoXLabs connector | HTTP proxy (optional)                                                       | Set in **Proxy URL** | HTTP     |

### Required permissions

| Scope or role        | Permission | Needed for                                              |
| -------------------- | ---------- | ------------------------------------------------------- |
| Role `DIRECTOR_READ` | Read       | Directors (devices)                                     |
| Role `USER_READ`     | Read       | Console accounts (users), only if **Fetch users** is on |

A token carries the permissions of the single role assigned to it. A missing, unknown or expired token, or a role without the needed permission, gets an HTTP 401 response.

## Create credentials in VirtualMetric DataStream

{% stepper %}
{% step %}

### Open token settings

Click the hamburger menu in the top left corner. Select **Organization**, then **Settings**. Open the **API Tokens** tab.
{% endstep %}

{% step %}

### Generate a token

Click **Generate New Token**. Give it a name. Leave **Set expiration** unchecked, or replace the token in OctoXLabs before it expires.
{% endstep %}

{% step %}

### Assign a role

Assign a role that has `DIRECTOR_READ`. Add `USER_READ` if you collect users.
{% endstep %}

{% step %}

### Copy the token

Copy the token before you close the wizard. It is shown only once.
{% endstep %}
{% endstepper %}

To find the host for your region, open the **API Preview** drawer on any Create screen and read **$BASE\_URL**. Drop the trailing `/api/v1`.

## Connection parameters

| Parameter     | Required | Type    | Default                                     | Description                                                                                                                     |
| ------------- | -------- | ------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Domain        | No       | Text    | api-service.eu-west.cloud.virtualmetric.com | API host without scheme and without `/api/v1`. Change it for other regions.                                                     |
| Api token     | Yes      | Text    |                                             | Sent as `Authorization: Bearer <token>`.                                                                                        |
| Fetch devices | No       | Boolean | True                                        | Collect Directors. A Director is identified by its IP address. Directors in Managed mode have no address and are not collected. |
| Fetch users   | No       | Boolean | False                                       | Collect console accounts.                                                                                                       |
| Per page      | No       | Integer | 100                                         | Records per request.                                                                                                            |
| Proxy URL     | No       | Text    |                                             | Proxy in `host:port` format.                                                                                                    |
| Timeout       | No       | Integer | 30                                          | Seconds to wait for API responses.                                                                                              |

## Troubleshooting

| Error message | Cause                                 | Fix                                                                                      |
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------------------- |
| Not verified  | The adapter has no custom error text. | A 401 response means a bad token or a role without the permission. Check the role first. |

## Change history

{% hint style="info" %}
Available starting from version 6.7.2.
{% endhint %}
