mirror of
https://github.com/grafana/grafana.git
synced 2025-09-26 04:03:51 +08:00

* Docs: Revise data source index * Docs: Consolidate data source administration docs * Docs: Revise panels docs related to data sources * Docs: Revise Alertmanager data source * Docs: Reorganize AWS CloudWatch data source docs * Docs: Reorganize Azure Monitor data source docs * Docs: Move azuremonitor to azure-monitor * Docs: Revise Elasticsearch docs * Docs: Move Elasticsearch index into bundle * Docs: Revise GCM docs * Docs: Revise Graphite docs * Docs: Move Graphite index into bundle * Docs: Revise InfluxDB docs * Docs: Revise Jaeger docs * Docs: Move Jaeger index into bundle * Docs: Revise Loki docs * Docs: Move Loki index into bundle * Docs: Revise MS SQL docs * Docs: Move MS SQL index into bundle * Docs: Revise Prometheus docs * Docs: Move Prometheus index into bundle * Docs: Revise Tempo docs * Docs: Move Tempo index into bundle * Docs: Revise TestData DB docs * Docs: Move TestData DB index into bundle * Docs: Revise Zipkin docs * Docs: Move Zipkin index into bundle * Docs: Move other data sources' index pages into bundles * Docs: Revise frontmatter * Fixing hugo markdown errors * Docs: Add query editor and template var sections to overview doc * Docs: Remove CTAs across data source docs * Docs: Remove CTA * Docs: Remove CTA * Docs: Fix links, images, typos, and usage consistency. * Docs: Fix typos * Docs: Fix CI issues * Update docs/sources/datasources/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Update docs/sources/datasources/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Docs: Fix query editor links * Update docs/sources/panels-visualizations/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Update docs/sources/panels-visualizations/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Docs: Rebundle child pages per writers' toolkit * Docs: Fix prettier for CI * Docs: Fix relrefs from outside data sources docs * Docs: Fix broken relrefs within datasources * Docs: Fix relrefs to data sources docs * Fixed some more refs Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
101 lines
5.6 KiB
Markdown
101 lines
5.6 KiB
Markdown
---
|
|
aliases:
|
|
- /docs/grafana/latest/features/datasources/graphite/
|
|
- /docs/grafana/latest/datasources/graphite/
|
|
- /docs/grafana/latest/data-sources/graphite/
|
|
description: Guide for using Graphite in Grafana
|
|
keywords:
|
|
- grafana
|
|
- graphite
|
|
- guide
|
|
menuTitle: Graphite
|
|
title: Graphite data source
|
|
weight: 600
|
|
---
|
|
|
|
# Graphite data source
|
|
|
|
Grafana includes built-in support for Graphite.
|
|
This topic explains options, variables, querying, and other features specific to the Graphite data source, which include its feature-rich query editor.
|
|
|
|
For instructions on how to add a data source to Grafana, refer to the [administration documentation]({{< relref "../../administration/data-source-management/" >}}).
|
|
Only users with the organization administrator role can add data sources.
|
|
|
|
Once you've added the Graphite data source, you can [configure it]({{< relref "#configure-the-data-source" >}}) so that your Grafana instance's users can create queries in its [query editor]({{< relref "./query-editor/" >}}) when they [build dashboards]({{< relref "../../dashboards/build-dashboards/" >}}) and use [Explore]({{< relref "../../explore/" >}}).
|
|
|
|
## Configure the data source
|
|
|
|
**To access the data source configuration page:**
|
|
|
|
1. Hover the cursor over the **Configuration** (gear) icon.
|
|
1. Select **Data Sources**.
|
|
1. Select the Graphite data source.
|
|
|
|
Set the data source's basic configuration options carefully:
|
|
|
|
| Name | Description |
|
|
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
|
| **Default** | Sets whether the data source is pre-selected for new panels. You can set only one default data source per organization. |
|
|
| **URL** | Sets the HTTP protocol, IP, and port of your graphite-web or graphite-api installation. |
|
|
| **Auth** | For details, refer to [Configure Authentication]({{< relref "../../setup-grafana/configure-security/configure-authentication/" >}}). |
|
|
| **Basic Auth** | Enables basic authentication to the data source. |
|
|
| **User** | Sets the user name for basic authentication. |
|
|
| **Password** | Sets the password for basic authentication. |
|
|
| **Custom HTTP Headers** | Click **Add header** to add a custom HTTP header. |
|
|
| **Header** | Defines the custom header name. |
|
|
| **Value** | Defines the custom header value. |
|
|
|
|
You can also configure settings specific to the Graphite data source:
|
|
|
|
| Name | Description |
|
|
| ----------- | -------------------------------- |
|
|
| **Version** | Select your version of Graphite. |
|
|
| **Type** | Select your type of Graphite. |
|
|
|
|
### Integrate with Loki
|
|
|
|
When you change the data source selection in [Explore]({{< relref "../../explore/" >}}), Graphite queries are converted to Loki queries.
|
|
Grafana extracts Loki label names and values from the Graphite queries according to mappings provided in the Graphite data source configuration.
|
|
Queries using tags with `seriesByTags()` are also transformed without any additional setup.
|
|
|
|
### Provision the data source
|
|
|
|
You can define and configure the data source in YAML files as part of Grafana's provisioning system.
|
|
For more information about provisioning, and for lists of common configuration options and JSON data options, refer to [Provisioning data sources]({{< relref "../../administration/provisioning/#data-sources" >}}).
|
|
|
|
#### Provisioning example
|
|
|
|
```yaml
|
|
apiVersion: 1
|
|
|
|
datasources:
|
|
- name: Graphite
|
|
type: graphite
|
|
access: proxy
|
|
url: http://localhost:8080
|
|
jsonData:
|
|
graphiteVersion: '1.1'
|
|
```
|
|
|
|
## Query the data source
|
|
|
|
Grafana includes a Graphite-specific query editor to help you build queries.
|
|
The query editor helps you quickly navigate the metric space, add functions, and change function parameters.
|
|
It can handle all types of Graphite queries, including complex nested queries through the use of query references.
|
|
|
|
For details, refer to the [query editor documentation]({{< relref "./query-editor/" >}}).
|
|
|
|
## Use template variables
|
|
|
|
Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables.
|
|
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
|
Grafana refers to such variables as template variables.
|
|
|
|
For details, see the [template variables documentation]({{< relref "./template-variables/" >}}).
|
|
|
|
## Get Grafana metrics into Graphite
|
|
|
|
Grafana exposes metrics for Graphite on the `/metrics` endpoint.
|
|
For detailed instructions, refer to [Internal Grafana metrics]({{< relref "../../setup-grafana/set-up-grafana-monitoring" >}}).
|