Docs: Update opentsdb.md (#29963)

* Update opentsdb.md

* Update docs/sources/datasources/opentsdb.md

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update docs/sources/datasources/opentsdb.md

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Diana Payton 2020-12-22 09:45:47 -08:00 committed by GitHub
parent 6dbd4c9fe8
commit 0c3911cce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,25 +8,21 @@ weight = 1100
# Using OpenTSDB in Grafana # Using OpenTSDB in Grafana
Grafana ships with advanced support for OpenTSDB. Grafana ships with advanced support for OpenTSDB. This topic explains options, variables, querying, and other options specific to the OpenTSDB data source. Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
## Adding the data source ## OpenTSDB settings
1. Open the side menu by clicking the Grafana icon in the top header. To access OpenTSDB settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the OpenTSDB data source.
1. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
1. Click the `+ Add data source` button in the top header.
1. Select *OpenTSDB* from the *Type* dropdown.
> **Note:** If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
| Name | Description | | Name | Description |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------- | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels and queries. | | `Name` | The data source name. This is how you refer to the data source in panels and queries. |
| `Default` | Default data source means that it will be pre-selected for new panels. | | `Default` | Default data source means that it will be pre-selected for new panels. |
| `Url` | The HTTP protocol, ip and port of you opentsdb server (default port is usually 4242) | | `URL` | The HTTP protocol, IP, and port of your OpenTSDB server (default port is usually 4242) |
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. | | `Whitelisted Cookies` | List the names of cookies to forward to the data source. |
| `Version` | Version = opentsdb version, either <=2.1 or 2.2 | | `Version` | Version = opentsdb version, either <=2.1 or 2.2 |
| `Resolution` | Metrics from opentsdb may have datapoints with either second or millisecond resolution. | | `Resolution` | Metrics from opentsdb may have datapoints with either second or millisecond resolution. |
| `Lookup Limit`| Default is 1000. |
## Query editor ## Query editor
@ -71,7 +67,7 @@ If you do not see template variables being populated in `Preview of values` sect
`tsd.core.meta.enable_realtime_ts` in the OpenTSDB server settings. Also, to populate metadata of `tsd.core.meta.enable_realtime_ts` in the OpenTSDB server settings. Also, to populate metadata of
the existing time series data in OpenTSDB, you need to run `tsdb uid metasync` on the OpenTSDB server. the existing time series data in OpenTSDB, you need to run `tsdb uid metasync` on the OpenTSDB server.
### Nested Templating ### Nested templating
One template variable can be used to filter tag values for another template variable. First parameter is the metric name, One template variable can be used to filter tag values for another template variable. First parameter is the metric name,
second parameter is the tag key for which you need to find tag values, and after that all other dependent template variables. second parameter is the tag key for which you need to find tag values, and after that all other dependent template variables.
@ -102,8 +98,3 @@ datasources:
tsdbResolution: 1 tsdbResolution: 1
tsdbVersion: 1 tsdbVersion: 1
``` ```
## Lookup limits
By default, at most 1000 records are looked up from OpenTSDB.
You can change this by modifying the "Lookup Limit" in the OpenTSDB settings page.