> 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/g/grafana.md).

# Grafana

Grafana is an open-source observability platform. OctoXLabs reads the users of a Grafana instance, so that you can see who has access to monitoring dashboards and data.

## Use cases

* List all Grafana users.

```
Adapters = grafana
```

* Find Grafana users with no sign-in for 90 days.

```
Adapters = grafana AND NOT LastLogOnTime last now-90d/d
```

## Before you begin

### Network

| Source              | Destination    | Port                        | Protocol                     |
| ------------------- | -------------- | --------------------------- | ---------------------------- |
| OctoXLabs connector | Grafana server | 443 (default, configurable) | HTTP or HTTPS, see Is secure |

Is secure is off by default. Turn it on if Grafana is served over HTTPS.

### Required permissions

| Scope or role                        | Permission       | Needed for |
| ------------------------------------ | ---------------- | ---------- |
| Grafana Admin (server administrator) | Search all users | Users      |

## Create credentials in Grafana

{% stepper %}
{% step %}

### Prepare a Grafana Admin account

Use an account that has the **Grafana Admin** role. Note the username and password.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter    | Required | Type             | Default | Description                                                       |
| ------------ | -------- | ---------------- | ------- | ----------------------------------------------------------------- |
| Ip           | Yes      | Text             | None    | IP address of the Grafana host.                                   |
| Port         | No       | Integer          | 443     | Port number.                                                      |
| Username     | Yes      | Text             | None    | Account with the Grafana Admin role.                              |
| Password     | Yes      | Text (sensitive) | None    | Account password.                                                 |
| Is secure    | No       | Boolean          | False   | Use HTTPS.                                                        |
| Timeout      | No       | Integer          | 30      | Seconds to wait for API responses.                                |
| Thread count | No       | Integer          | 32      | Parallel threads for user pages. Minimum 1, maximum 32.           |
| Sleep time   | No       | Integer          | 0       | Seconds between thread batches. Increase it on rate limit errors. |

## Troubleshooting

| Error message | Cause                                        | Fix                                                                                                              |
| ------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Not verified  | The code has no adapter-specific error text. | Check the log for `Status Code`, `URL` and `Method` lines. An HTTP 403 means the account is not a Grafana Admin. |

## Change history

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