---
title: "datasource"
description: "Fields of a `datasource` variable."
---

> Documentation Index
> Fetch the complete documentation index at: https://slashobserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# datasource

## Example

```json
{
  "name": "ds",
  "type": "datasource",
  "datasourceType": "prometheus",
  "default": "prom"
}
```

From [`spec/examples/datasource-variable.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/datasource-variable.json).

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. |
| `label` | `string` |   |
| `description` | `string` |   |
| `hide` | `"label"`, `"variable"` |   |
| `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. |
| `type` (required) | `"datasource"` |   |
| `datasourceType` (required) | `"prometheus"`, `"clickhouse"` |   |
| `regex` | `string` |   |
| `default` | `datasourceUid` | A configured datasource uid; its type comes from the server's registry. |

Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/bac0fe39/spec/schema/observespec.v0.json) at `bac0fe39`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
