> 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/r/red-hat-insights.md).

# Red Hat Insights

Red Hat Insights analyzes registered Red Hat Enterprise Linux systems. OctoXLabs reads the hosts from the Insights Inventory API and adds them to the device inventory with their packages, services and hardware profile. The host is fixed, so you do not enter an address.

## Use cases

* List Red Hat Insights hosts.

```
Adapters = red-hat-insights
```

* Find Insights hosts that no EDR covers.

```
Adapters = red-hat-insights AND NOT Adapters = falcon-crowdstrike
```

## Before you begin

### Network

| Source              | Destination                        | Port | Protocol |
| ------------------- | ---------------------------------- | ---- | -------- |
| OctoXLabs connector | sso.redhat.com (token)             | 443  | HTTPS    |
| OctoXLabs connector | console.redhat.com (Inventory API) | 443  | HTTPS    |

### Required permissions

| Scope or role          | Permission | Needed for                          |
| ---------------------- | ---------- | ----------------------------------- |
| Inventory Hosts viewer | Read       | `/api/inventory/v1/beta/hosts-view` |

Service accounts do not inherit permissions from the default access group. Add the account to a group that has the Inventory Hosts viewer role.

## Create credentials in Red Hat Insights

{% stepper %}
{% step %}

### Create the service account

Log in to <https://console.redhat.com>, open **Settings > Service Accounts** and create a new service account.
{% endstep %}

{% step %}

### Copy the credentials

Copy the **Client ID** and the **Client Secret**. The secret is shown only once.
{% endstep %}

{% step %}

### Grant read access

An Organization Administrator or User Access administrator adds the service account to a group in **User Access > Groups** that has the **Inventory Hosts viewer** role.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default | Description                                                  |
| ------------- | -------- | ------- | ------- | ------------------------------------------------------------ |
| Client ID     | Yes      | String  | None    | Client ID of the service account.                            |
| Client Secret | Yes      | String  | None    | Client secret of the service account.                        |
| Per Page      | No       | Integer | 100     | Hosts requested per page. Min 1, max 100.                    |
| Proxy         | No       | String  | None    | Proxy as host:port. The connector prefixes it with http\://. |
| Timeout       | No       | Integer | 30      | Seconds to wait for API responses.                           |

## Troubleshooting

| Error message | Cause                                                                                                                                      | Fix                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Status Code:  | The API answered with a status other than the one the connector expects. The message also lists the URL, the method and the response body. | Read the status code and the response body in the message, then check the credentials, the permissions and the network path. |

## Change history

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