> 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/better-stack-uptime.md).

# Better Stack Uptime

Better Stack Uptime is a service that monitors websites and services. OctoXLabs reads the websites behind your monitors as web applications and your team members as users.

## Use cases

* Find monitored websites that are paused in Better Stack (Web applications).

```
Adapters = better-stack-uptime AND Status = Disabled
```

* List team members and flag the administrators (Users).

```
Adapters = better-stack-uptime AND AdminStatus = true
```

## Before you begin

### Network

| Source              | Destination                          | Port | Protocol |
| ------------------- | ------------------------------------ | ---- | -------- |
| OctoXLabs connector | incidents.betterstack.com (monitors) | 443  | HTTPS    |
| OctoXLabs connector | betterstack.com (team members)       | 443  | HTTPS    |

### Required permissions

| Scope or role                                    | Permission | Needed for                |
| ------------------------------------------------ | ---------- | ------------------------- |
| Global API token or team-scoped Uptime API token | Read       | Monitors and team members |

## Create credentials in Better Stack Uptime

{% stepper %}
{% step %}

### Open the token settings

Sign in to Better Stack and open **Settings > API tokens**.
{% endstep %}

{% step %}

### Pick a token type

For a global token, copy an existing token or create one in **Global API tokens**. For one team, go to **Team-based tokens** and copy or create a token in **Uptime API tokens**.
{% endstep %}

{% step %}

### Know the scope

A team-scoped token reads the monitors and members of its own team only.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter              | Required | Type    | Default                   | Description                                                     |
| ---------------------- | -------- | ------- | ------------------------- | --------------------------------------------------------------- |
| Domain                 | Yes      | String  | incidents.betterstack.com | API host used to read monitors.                                 |
| Team members domain    | Yes      | String  | betterstack.com           | API host used to read team members.                             |
| API token              | Yes      | String  |                           | Global or team-scoped Uptime API token, sent as a Bearer token. |
| Fetch web applications | No       | Boolean | True                      | Collect monitored websites as web applications.                 |
| Fetch users            | No       | Boolean | True                      | Collect team members as users. Pending invitations are skipped. |
| Proxy                  | No       | String  |                           | Proxy as `host:port`.                                           |
| Timeout                | No       | Integer | 30                        | Seconds to wait for API responses.                              |

## Troubleshooting

| Error message                                                                | Cause                                                                                                                                  | Fix                                                                                                  |
| ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Better Stack token spans several teams, but no monitor names a team to list. | The token reaches several teams and no monitor reports a team name, so no members were listed.                                         | Use a team-scoped token or add monitors to the teams.                                                |
| Better Stack team members of could not be fetched:                           | The request for one team failed. Other teams continue.                                                                                 | Check the token access to that team.                                                                 |
| Better Stack returned the same items for page of .                           | The API repeated a page, so paging stopped.                                                                                            | Run the discovery again. Contact Better Stack if it persists.                                        |
| 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 6.9.1.
{% endhint %}
