mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
Docs: Clean up influxdb.md (#20618)
* Clean up influxdb.md Mostly typos, some wording consistency and clarification * feature-rich Co-Authored-By: Marcus Olsson <olsson.e.marcus@gmail.com> * Query editor wording Co-Authored-By: Marcus Olsson <olsson.e.marcus@gmail.com> * Update docs/sources/features/datasources/influxdb.md Co-Authored-By: Marcus Olsson <olsson.e.marcus@gmail.com> * One less "you can" Co-Authored-By: Marcus Olsson <olsson.e.marcus@gmail.com> * Query example wording Co-Authored-By: Marcus Olsson <olsson.e.marcus@gmail.com> * Remove extraneous newline * Use less words Co-Authored-By: Marcus Olsson <olsson.e.marcus@gmail.com> * Remove more newlines * Use present tense * Add missing 'to' * Summary fixup Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Down with gerunds in headers Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * consistent tenses Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Remove br html tag #1 Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Remove br html tag #2 Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Less future tense Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Spell out location of annotations view Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Query input fixups Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * More detail on where to access InfluxDB editor Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Provisioning fixups Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
parent
116b6188a6
commit
5cfc681175
@ -12,9 +12,9 @@ weight = 2
|
||||
|
||||
# Using InfluxDB in Grafana
|
||||
|
||||
Grafana ships with very feature rich data source plugin for InfluxDB. Supporting a feature rich query editor, annotation and templating queries.
|
||||
Grafana ships with a feature-rich data source plugin for InfluxDB. The plugin includes a custom query editor and supports annotations and query templates.
|
||||
|
||||
## Adding the data source
|
||||
## Add the data source
|
||||
|
||||
1. Open the side menu by clicking the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
@ -64,24 +64,24 @@ Identifier | Description
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v45/influxdb_query_still.png" class="docs-image--no-shadow" animated-gif="/img/docs/v45/influxdb_query.gif" >}}
|
||||
|
||||
You find the InfluxDB editor in the metrics tab in Graph or Singlestat panel's edit mode. You enter edit mode by clicking the
|
||||
panel title, then edit. The editor allows you to select metrics and tags.
|
||||
You can access the InfluxDB editor under the metrics tab when you are in the edit mode of the Graph or Singlestat panels.
|
||||
Enter edit mode by clicking the panel title, and clicking **Edit**. The editor allows you to select metrics and tags.
|
||||
|
||||
### Filter data (WHERE)
|
||||
To add a tag filter click the plus icon to the right of the `WHERE` condition. You can remove tag filters by clicking on
|
||||
the tag key and select `--remove tag filter--`.
|
||||
the tag key and then selecting `--remove tag filter--`.
|
||||
|
||||
**Regex matching**
|
||||
|
||||
You can type in regex patterns for metric names or tag filter values, be sure to wrap the regex pattern in forward slashes (`/`). Grafana
|
||||
will automatically adjust the filter tag condition to use the InfluxDB regex match condition operator (`=~`).
|
||||
You can type in regex patterns for metric names or tag filter values. Be sure to wrap the regex pattern in forward slashes (`/`). Grafana automatically adjusts the filter tag condition to use the InfluxDB regex match condition operator (`=~`).
|
||||
|
||||
### Field and Aggregation functions
|
||||
In the `SELECT` row you can specify what fields and functions you want to use. If you have a
|
||||
group by time you need an aggregation function. Some functions like derivative require an aggregation function. The editor tries simplify and unify this part of the query. For example:<br>
|
||||
![](/img/docs/influxdb/select_editor.png)<br>
|
||||
group by time you need an aggregation function. Some functions like derivative require an aggregation function. The editor tries to simplify and unify this part of the query. For example:
|
||||
|
||||
The above will generate the following InfluxDB `SELECT` clause:
|
||||
![](/img/docs/influxdb/select_editor.png)
|
||||
|
||||
The above generates the following InfluxDB `SELECT` clause:
|
||||
|
||||
```sql
|
||||
SELECT derivative(mean("value"), 10s) /10 AS "REQ/s" FROM ....
|
||||
@ -203,8 +203,7 @@ be applied to all your InfluxDB queries.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
|
||||
An example query:
|
||||
|
||||
@ -212,15 +211,13 @@ An example query:
|
||||
SELECT title, description from events WHERE $timeFilter ORDER BY time ASC
|
||||
```
|
||||
|
||||
For InfluxDB you need to enter a query like in the above example. You need to have the ```where $timeFilter```
|
||||
part. If you only select one column you will not need to enter anything in the column mapping fields. The
|
||||
Tags field can be a comma separated string.
|
||||
For InfluxDB, you need to enter a query like the one in the example above. The ```where $timeFilter``` component is required. If you only select one column, then you do not need to enter anything in the column mapping fields. The **Tags** field can be a comma-separated string.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
You can now configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources).
|
||||
|
||||
Here are some provisioning examples for this dat asource.
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
Loading…
Reference in New Issue
Block a user