# Create NeoLoadWeb telemetry instances

When you create an instance of the NeoLoad Web provider, you should specify some configuration information to allow the provider to correctly extract and process metrics from NeoLoad Web.

You can specify configuration information within the `config` part of the YAML of the instance definition.

#### Required properties <a href="#required-properties" id="required-properties"></a>

* `accountToken` - NeoLoad Web API access token.

### Telemetry instance reference <a href="#telemetry-instance-reference" id="telemetry-instance-reference"></a>

The following YAML file describes the definition of a telemetry instance.

```yaml
provider: NeoLoadWeb  # this is an instance of the NeoLoad Web provider
config:
  neoloadApi: http://neoload-api.mydomain.com     # API host
  accountToken: d2d9d8c6064b35209d7f6912db986a6e  # access token
  actions:    # the list of User Paths to import
    - 01 - Home page
  metrics:    # the list of metrics to import
    - transactions_response_time
    - transactions_throughput
    - pages_response_time
    - users
```

The following table provides the reference for the `config` section within the definition of the NeoLoad Web provider instance:

| Field          | Type            | Description                         | Default value                         | Restrictions | Required |
| -------------- | --------------- | ----------------------------------- | ------------------------------------- | ------------ | -------- |
| `accountToken` | String          | A valid access token                |                                       |              | Yes      |
| `neoloadApi`   | URL             | Hostname of the NeoLoad Web API     | `https://neoload-api.saas.neotys.com` | A valid url  | No       |
| `metrics`      | List of strings | List of component metrics to import | `['<all transactions>']`              |              | No       |
| `actions`      | List of strings | List of "User Paths" to import      |                                       |              | No       |

Notice: the NeoLoadWeb provider imports data points matching at least one of the configured values for both `metrics` and `actions`.

## Use cases

This section reports common use cases addressed by this provider.

### Collect Web Application metrics <a href="#collect-web-application-metrics" id="collect-web-application-metrics"></a>

Check the [Web Application](https://docs.akamas.io/akamas-docs/3.6/reference/optimization-packs/web-application-pack) page for a list of all web application metrics available in Akamas

This example shows how to configure the NeoLoad Web provider in order to collect performance metrics published on the SaaS web API.

You must create a YAML file with the definition of a telemetry instance (`neoload_instance.yml`) of the NeoLoad Web provider:

```yaml
provider: NeoLoadWeb
config:
  accountToken: d2d9d8c6064b35209d7f6912db986a6e
```

and then create the telemetry instance using the Akamas CLI:

```bash
akamas create telemetry-instance neoload_instance.yml
```

You can then configure the workflow in order to trigger the execution of a NeoLoad test using the NeoLoadWeb provider, as in the following example:

```yaml
name: neoloadweb_wf
tasks:
- name: Run NeoLoadWeb
  operator: NeoLoadWeb

  arguments:
    accountToken: d2d9d8c6064b35209d7f6912db986a6e
    controllerZoneId: mlmEt
    lgZones: mlmEt:1

    scenarioName: test
    projectFile:
      http:
        url: https://files.akamas.io/neoload/project00.zip
        verifySSL: false
```

## Best practices <a href="#best-practices" id="best-practices"></a>

This section reports common best practices you can adopt to ease the use of this telemetry provider.

* **filter the imported metrics**: import only the required metrics using the `metrics` and `actions` filters, in order to avoid throttling on the NeoLoad Web instance.
