Files

13 KiB
Raw Permalink Blame History

aliases description keywords labels menuTitle title weight refs
../data-sources/graphite/
../datasources/graphite/
../features/datasources/graphite/
This document provides instructions for configuring the Graphite data source.
grafana
graphite
guide
products
cloud
enterprise
oss
Configure Configure the Graphite data source 100
explore provisioning-data-sources internal-grafana-metrics build-dashboards configure-authentication data-source-management private-data-source-connect configure-pdc
pattern destination
/docs/grafana/ /docs/grafana/<GRAFANA_VERSION>/explore/
pattern destination
/docs/grafana-cloud/ /docs/grafana/<GRAFANA_VERSION>/explore/
pattern destination
/docs/grafana/ /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
pattern destination
/docs/grafana-cloud/ /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
pattern destination
/docs/grafana/ /docs/grafana/<GRAFANA_VERSION>/setup-grafana/set-up-grafana-monitoring/
pattern destination
/docs/grafana-cloud/ /docs/grafana/<GRAFANA_VERSION>/setup-grafana/set-up-grafana-monitoring/
pattern destination
/docs/grafana/ /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/
pattern destination
/docs/grafana-cloud/ /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/
pattern destination
/docs/grafana/ /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-authentication/
pattern destination
/docs/grafana-cloud/ /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-authentication/
pattern destination
/docs/grafana/ /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
pattern destination
/docs/grafana-cloud/ /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
pattern destination
/docs/grafana/ docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/
pattern destination
/docs/grafana-cloud/ docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/
pattern destination
/docs/grafana/ /docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc
pattern destination
/docs/grafana-cloud/ /docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc

Configure the Graphite data source

This document provides instructions for configuring the Graphite data source and explains available configuration options. For general information on managing data sources, refer to Data source management.

Before you begin

  • You must have the Organization administrator role to configure the Graphite data source. Organization administrators can also configure the data source via YAML with the Grafana provisioning system.

  • Grafana comes with a built-in Graphite data source plugin, eliminating the need to install a plugin.

  • Familiarize yourself with your Graphite security configuration and gather any necessary security certificates and client keys.

Add the Graphite data source

To configure basic settings for the data source, complete the following steps:

  1. Click Connections in the left-side menu.
  2. Click Add new connection
  3. Type Graphite in the search bar.
  4. Select the Graphite data source.
  5. Click Add new data source in the upper right.

Grafana takes you to the Settings tab, where you will set up your Graphite configuration.

Configuration options in the UI

Following is a list of configuration options for Graphite.

Setting Description
Name The display name for the data source. This is how you'll reference it in panels and queries.
Examples: graphite-1, graphite-metrics.
Default When enabled, sets this data source as the default for dashboard panels. It will be automatically selected when creating new panels.

HTTP:

Setting Description
URL Sets the HTTP protocol, IP, and port of your graphite-web or graphite-api installation.
Since the access method is set to Server, the URL must be accessible from the Grafana backend.
Allowed cookies By default, Grafana removes forwarded cookies. Specify cookie names here to allow them to be forwarded to the data source.
Timeout Sets the HTTP request timeout in seconds.

Auth:

Setting Description
Basic Auth Toggle on to enable basic authentication to the data source.
  User Sets the username used for basic authentication.
  Password Enter the password used for basic authentication.
With Credentials Toggle on to include cookies and authentication headers in cross-origin requests.
TLS Client Auth Toggle on to enable TLS client authentication (both server and client are verified).
  ServerName The server name used to verify the hostname on the certificate returned by the server.
  Client Cert Client certificate generated by a Certificate Authority (CA) or self-signed.
  Client Key Private key used to encrypt communication between the client and server. Also generated by a CA or self-signed.
With CA Cert Toggle on to authenticate with a CA certificate.
  CA Cert CA certificate used to validate the server certificate.
Skip TLS Verify Toggle on to bypass TLS certificate validation. Not recommended unless necessary or for testing purposes.
Forward OAuth Identity Toggle on to forward the user's upstream OAuth identity to the data source. Grafana includes the access token in the request.

Custom HTTP Headers:

Pass along additional information and metadata about the request or response.

Setting Description
Header Add a custom header. This allows custom headers to be passed based on the needs of your Graphite instance.
Value The value of the header.

Graphite details:

Setting Description
Version Select your Graphite version from the drop-down. This controls which functions are available in the Graphite query editor. Use 1.1.x for Grafana Cloud Graphite.
Graphite backend type Select the Graphite backend type. Choosing Metrictank enables additional features like query processing metadata. (Metrictank is a multi-tenant time series engine compatible with Graphite.) Use Default for Grafana Cloud Graphite.
Rollup indicator Toggle on to display an info icon in panel headers when data aggregation (rollup) occurs. Only available when Metrictank is selected.

Label mappings:

Label mappings are the rules you define to tell Grafana how to pull pieces of the Graphite metric path into Loki labels when switching data sources. They are currently only supported between Graphite and Loki queries.

When you change your data source from Graphite to Loki, your queries are automatically mapped based on the rules you define. To create a mapping, specify the full path of the metric and replace the nodes you want to map with label names, using parentheses. The corresponding label values are extracted from your Graphite query during the data source switch.

Grafana automatically maps all Graphite tags to labels, even if you havent defined explicit mappings. When using matching patterns with {}(e.g., metric.{a,b}.value), Grafana converts them to Lokis regular expression matching syntax. If your queries include functions, Graphite extracts the relevant metrics and tags, then matches them against your mappings.

Graphite Query Mapped to Loki Query
alias(servers.west.001.cpu,1,2) {cluster="west", server="001"}
alias(servers.*.{001,002}.*,1,2) {server=~"(001,002)"}
interpolate(seriesByTag('foo=bar', 'server=002'), inf) {foo="bar", server="002"}
Setting Description
Private data source connect Only for Grafana Cloud users. Establishes a private, secured connection between a Grafana Cloud stack and data sources within a private network. Use the drop-down to locate the PDC URL. For setup instructions, refer to Private data source connect (PDC) and Configure PDC. Click Manage private data source connect to open your PDC connection page and view your configuration details.

|

After configuring your Graphite data source options, click Save & test at the bottom to test the connection. You should see a confirmation dialog box that says:

Data source is working

Provision the data source

You can define and configure the data source in YAML files as part of the Grafana provisioning system. For more information about provisioning, and for lists of common configuration options and JSON data options, refer to Provisioning data sources.

Example Graphite YAML provisioning file:

apiVersion: 1

datasources:
  - name: Graphite
    type: graphite
    access: proxy
    url: http://localhost:8080
    jsonData:
      graphiteVersion: '1.1'