> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/pam/administration/assets/discovery.md).

# Discover assets on the network

Find assets automatically — from a cloud provider account or by scanning an IP range — and let sync policies file them into the inventory.

## What this is and when to use it

Discovery registers a **discovery account** — a cloud provider, a virtualization platform, or a local network segment — and then finds the assets behind it. **Sync policies** decide what happens to each asset found: which platform it gets, which folder of the inventory it lands in, and how it is named.

Use it when onboarding an environment, and keep it scheduled afterwards so that machines created outside the solution do not stay outside the inventory.

The screen has three tabs:

| Tab                 | What it does                                                |
| ------------------- | ----------------------------------------------------------- |
| **Accounts**        | Lists and manages the discovery accounts already registered |
| **Sync policy**     | The rules that classify discovered assets                   |
| **Select provider** | The provider catalog, used to register a new account        |

## Before you start

* For a cloud provider, credentials with permission to list instances.
* For a LAN scan, the IP range and a port that responding hosts will have open.
* An idea of how you want assets filed — at least one sync policy should exist before the first synchronization, or everything lands in the default.

## Supported providers

| Provider                                                                    | Type                              |
| --------------------------------------------------------------------------- | --------------------------------- |
| [AWS](https://wiki.datadike.com/pam/administration/assets/discovery-aws.md) | Public cloud                      |
| Azure                                                                       | Public cloud                      |
| Google Cloud                                                                | Public cloud                      |
| Volcengine                                                                  | Public cloud                      |
| Ucloud uhost                                                                | Public cloud                      |
| Huawei Cloud                                                                | Public cloud                      |
| Huawei Private Cloud                                                        | Private cloud                     |
| VMware                                                                      | Virtualization                    |
| OpenStack                                                                   | Private cloud                     |
| Nutanix                                                                     | Hyperconverged infrastructure     |
| **LAN**                                                                     | Local network, by IP segment scan |

## Steps — scanning an IP range

1. Open **Environment › Discover** and go to **Select provider**.
2. Click **+** on **LAN**. A three-step wizard opens in a side panel.
3. **Basic** — give the account a **Name**. **Platform** is filled in as *LAN* and is read-only.
4. **LAN** — fill the **Attrs**:
   * **IP segment** — the range in CIDR notation, `10.0.30.0/24` for example. Press Enter to add more than one segment
   * **Test port** — the port used to confirm an address responds, `22` for SSH
   * **Test timeout** — how long to wait for each address, in seconds
   * **Hostname prefix** — prepended to the name of every asset found
5. **Other** — an optional **Description**.
6. Click **Confirm**.
7. Back on **Accounts**, select the new card and click **Sync**.

## What you should see

![The Discover screen, listing the registered discovery accounts](https://1085357737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7xzJyi9JVzRwnV6JzUho%2Fuploads%2Fgit-blob-b55964a35e46df218bcc5d854266ca552918bba9%2Fdiscover.png?alt=media)

**1** How many discovery accounts exist. **2** The provider catalog, where a new account is registered.

The account card shows two counters: **REGION**, how many regions the synchronization covers, and **ASSET**, how many assets have been found. After a run, the **Synchronization history** tab records the execution and **Synchronize instance** lists the instances found.

## How to verify it worked

1. Open **Environment › Assets**.
2. The discovered hosts must be there, in the folder the sync policy assigned, on the platform it assigned, named as its hostname policy dictates.
3. If assets were found but did not reach the inventory, check **Release assets** in the account's **Quick update** — with it off, synchronized assets are not released automatically.

Finding instances and filing them are two different things. The counters prove the first; only the asset list proves the second.

## Sync policies

Policies are evaluated **in priority order** and act on the assets that match their conditions.

{% hint style="warning" %}
Priority runs from **1 to 100**, default **50**, and **the lower the number, the higher the priority**. The policy with the smallest number is evaluated first.
{% endhint %}

### Creating a policy

On the **Sync policy** tab, click **Create**. The wizard has four steps.

**1. Basic** — the **Name** and the **Priority**.

**2. Condition** — which assets the policy reaches.

* **Relationship conditions** — **And** applies the action only when every condition matches; **Or** applies as soon as one does
* **Condition** — each line combines three fields, added with **Add**:
  * **Attribute name** — *Instance name*, *Instance platform name*, or *Instance address*
  * **Match** — the comparison operator
  * **Attribute value** — the value compared against

**3. Action** — what is applied to matching assets.

* **Resource type** — what to assign: *Platform*, *Node*, or the naming policy
* **Resources** — the specific value for that type

The built-in policy shows the typical shape: it sets the **Platform**, the destination **Node** in the inventory, and the hostname policy — which decides whether the asset is named after the instance, or after the instance combined with part of its IP address.

**4. Other** — a free-text **Description**.

## Field reference

### Discovery account — Quick update

| Field              | What it does                                                                      |
| ------------------ | --------------------------------------------------------------------------------- |
| IP type            | Whether synchronization uses the asset's private or public IP                     |
| Release assets     | Whether synchronized assets are released into the inventory automatically         |
| Manually execution | Runs a synchronization on demand (**Execute**) or adjusts the schedule (**Edit**) |

### LAN account

| Field           | What it does                                                    |
| --------------- | --------------------------------------------------------------- |
| IP segment      | The range to scan, in CIDR. Required. Multiple segments allowed |
| Test port       | The port used to confirm an address responds. Required          |
| Test timeout    | Seconds to wait per address. Required                           |
| Hostname prefix | Prefix applied to the name of every discovered asset. Required  |

### Sync policy

| Field                   | What it does                                                     |
| ----------------------- | ---------------------------------------------------------------- |
| Priority                | 1 to 100, default 50. Lower is evaluated first                   |
| Relationship conditions | **And** requires every condition; **Or** requires one            |
| Attribute name          | *Instance name*, *Instance platform name*, or *Instance address* |
| Resource type           | *Platform*, *Node*, or the naming policy                         |

## Related pages

* [Asset inventory](https://wiki.datadike.com/pam/administration/assets/inventory.md)
* [Discover assets in AWS](https://wiki.datadike.com/pam/administration/assets/discovery-aws.md) — credentials, regions and sync for AWS accounts
* [Platforms](https://wiki.datadike.com/pam/administration/assets/platforms.md) — what the policy assigns to each discovered asset
* [Folders and tags](https://wiki.datadike.com/pam/administration/assets/folders-and-tags.md)
* [Collect accounts from an asset](https://wiki.datadike.com/pam/administration/accounts/discovery-of-accounts.md) — the next step after finding the host
