Configure the Wavefront data source
This document explains how to configure the Wavefront data source in Grafana.
Before you begin
Before you configure the data source, make sure you have:
- Grafana permissions: An administrator role for the Grafana organization.
- Wavefront tenant URL: For example,
https://myenvironment.wavefront.com. - Wavefront API token: Generated from a user account or a service account. For details, refer to Generate a Wavefront API token.
Generate a Wavefront API token
You can authenticate with a user token or a service account token. Service accounts are recommended for shared Grafana deployments because they aren’t tied to an individual user.
Generate a user account token
- Sign in to your Wavefront tenant.
- Click the gear icon in the top right of the page and select your user name (for example,
me@grafana.com). - Select the API Access tab at the top of the user page.
- Copy an existing token or click Generate.
- Save the token for the next step.
Generate a service account token
- Sign in to your Wavefront tenant.
- Click the gear icon in the top right of the page and select Account management.
- In the left navigation, select Accounts, Groups, & Roles.
- Select the Service Accounts tab and click Create New Account.
- Enter a name for the service account.
- Under Permissions, select Accounts, Groups, & Roles.
- Under Tokens, copy the generated token.
Note
The service account token is displayed only once. Save it before leaving the page.
Add the data source
To add the Wavefront data source in Grafana:
- Click Connections in the left-side menu.
- Click Add new connection.
- Type
Wavefrontin the search bar. - Select Wavefront.
- Click Add new data source.
Configure settings
The configuration page has a general settings area at the top followed by two plugin sections: Wavefront settings and Customization.
General settings
Wavefront settings
Customization
Verify the connection
Click Save & test to verify the configuration. When the connection succeeds, Grafana displays the message OK.
If the test fails, Grafana displays one of the following messages:
For more error scenarios, refer to Troubleshoot the Wavefront data source.
Provision the data source
You can provision the Wavefront data source with either a Grafana provisioning YAML file or the Grafana Terraform provider.
Provision the data source with YAML
Define the data source in a YAML file under Grafana’s provisioning directory. For more information, refer to Provision Grafana.
apiVersion: 1
datasources:
- name: Wavefront
type: grafana-wavefront-datasource
access: proxy
editable: true
jsonData:
url: <WAVEFRONT_TENANT_URL>
requestTimeout: 30
enableSecureSocksProxy: false
secureJsonData:
token: <WAVEFRONT_API_TOKEN>Replace the placeholders with your values:
<WAVEFRONT_TENANT_URL>- Your Wavefront tenant URL, for examplehttps://myenvironment.wavefront.com.<WAVEFRONT_API_TOKEN>- A Wavefront API token with permission to read metrics and events.
Set enableSecureSocksProxy to true only when you need to route the connection through a secure socks proxy.
Provision the data source with Terraform
You can provision the Wavefront data source with the Grafana Terraform provider.
resource "grafana_data_source" "wavefront" {
type = "grafana-wavefront-datasource"
name = "Wavefront"
url = "https://myenvironment.wavefront.com"
json_data_encoded = jsonencode({
url = "https://myenvironment.wavefront.com"
requestTimeout = 30
enableSecureSocksProxy = false
})
secure_json_data_encoded = jsonencode({
token = var.wavefront_api_token
})
}
variable "wavefront_api_token" {
type = string
sensitive = true
}Set the url attribute on the resource and the url key inside json_data_encoded to the same Wavefront tenant URL. The plugin reads the URL from jsonData; the resource-level url is displayed in the Grafana UI.
Next steps
- Learn how to build queries with the Wavefront query editor.
- Create dynamic dashboards with Wavefront template variables.


