> 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/b/bmc-discovery.md).

# BMC Discovery

BMC Discovery finds and models hosts, virtual machines, network devices, storage devices, databases and SNMP managed devices in your network. OctoXLabs reads these nodes through the Discovery REST API and stores them as devices.

## Use cases

* List discovered devices that have installed software (needs Fetch Installed Software).

```
Adapters = bmc-discovery AND InstalledSoftware = *
```

* List storage and network equipment that BMC Discovery found.

```
Adapters = bmc-discovery AND Category = Networking
```

## Before you begin

### Network

| Source              | Destination                           | Port               | Protocol |
| ------------------- | ------------------------------------- | ------------------ | -------- |
| OctoXLabs connector | BMC Discovery host (Domain you enter) | 443 (configurable) | HTTPS    |

### Required permissions

| Scope or role          | Permission                                | Needed for |
| ---------------------- | ----------------------------------------- | ---------- |
| User with an API token | Read access to the node kinds you collect | Devices    |

## Create credentials in BMC Discovery

{% stepper %}
{% step %}

### Open Users

In BMC Discovery go to the **Users** page.
{% endstep %}

{% step %}

### Generate the token

From the **Action** list of the user, select **Generate API Token**.
{% endstep %}

{% step %}

### Copy the token

A dialog shows the token. Copy it and store it safely. API tokens cannot be revoked one by one. To remove a token, delete the user.
{% endstep %}

{% step %}

### Find the API version

Click **Help (?)** on the home page, then the **REST API** link. The page shows the API version. Enter it in the Version field.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                  | Required | Type    | Default | Description                                                       |
| -------------------------- | -------- | ------- | ------- | ----------------------------------------------------------------- |
| Domain                     | Yes      | String  |         | Host name of BMC Discovery.                                       |
| Port                       | No       | Integer | 443     | Port of the API.                                                  |
| API Token                  | Yes      | String  |         | Sent as a Bearer token.                                           |
| Version                    | No       | String  | 1.15    | API version, used in `/api/v<version>`.                           |
| Fetch Installed Software   | No       | Boolean | False   | Fetch installed software for hosts and virtual machines.          |
| Fetch Hosts                | No       | Boolean | True    | Collect Host nodes.                                               |
| Fetch Virtual Machines     | No       | Boolean | True    | Collect VirtualMachine nodes.                                     |
| Fetch Network Devices      | No       | Boolean | True    | Collect NetworkDevice nodes.                                      |
| Fetch Storage Devices      | No       | Boolean | True    | Collect StorageDevice nodes.                                      |
| Fetch Databases            | No       | Boolean | True    | Collect Database nodes.                                           |
| Fetch SNMP Managed Devices | No       | Boolean | True    | Collect SNMPManagedDevice nodes, devices found only through SNMP. |
| Timeout                    | No       | Integer | 30      | Seconds to wait for API responses.                                |
| Thread Count               | No       | Integer | 32      | Parallel threads. Min 1, max 32.                                  |
| Sleep Time                 | No       | Integer | 0       | Delay in seconds between thread batches.                          |

## Troubleshooting

| Error message                | Cause                                                                                                                                  | Fix                                                                                                  |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Status Code: `, URL, Method` | The API answered with an unexpected HTTP status. The shared request code raises it and logs the status, URL, method and response body. | Check the URL, the credentials and the permissions listed above, then run the connection test again. |

## Change history

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