Configure the Vercel data source
This document explains how to configure the Vercel data source in Grafana.
Before you begin
Before you configure the data source, ensure you have the following:
- The Grafana
Organization administratorrole. Only administrators can add and configure data sources. - A Vercel access token. For more information, refer to Creating an access token in the Vercel documentation.
- If you scoped your token to a team, the ID of that Vercel team.
Key concepts
If you’re new to Vercel, this page uses the following terms:
Add the data source
To add the Vercel data source:
- Click Connections in the left-side menu.
- Click Add new connection.
- Enter
Vercelin the search bar. - Select Vercel.
- Click Add new data source.
Configure settings
Configure the following settings for the data source.
Authentication
The Vercel data source authenticates with a bearer access token.
Access token
Vercel scopes access tokens to either your full account or a specific team. If you scope a token to a team, you must also provide a Team ID that matches the scope of the token.
To create and add an access token:
- Log in to the Vercel account tokens page.
- Click Create Token, name the token, set a scope, and set an expiration date.
- Copy the generated token.
- In the Grafana data source configuration, under Authentication, enter the token in the Token field.
- If the token is team-scoped, enter the matching team in the Team ID field.
Verify the connection
Click Save & test to verify the configuration. The health check retrieves the list of projects for the authenticated account or team. When the test succeeds, Grafana displays health check succeeded for 'Retrieve a list of projects' query, which confirms that the access token, and the Team ID when required, are valid.
If the test fails, Grafana displays the reason returned by the health check. For example, a missing or empty token returns invalid/empty bearer token. For more failure messages and fixes, refer to Troubleshoot the Vercel data source.
Provision the data source
You can define the data source in YAML files as part of the Grafana provisioning system. For more information, refer to Provisioning Grafana data sources.
The following example provisions a Vercel data source with an access token and a Team ID:
apiVersion: 1
datasources:
- name: Vercel
type: grafana-vercel-datasource
jsonData:
variables:
team_id: team_1a2b3c4d5e6f7g8h9i0j1k2l
secureJsonData:
vercel.token: your-token-hereOmit the variables.team_id value when you scope your access token to your full account.
Provision the data source with Terraform
You can also provision the data source with the Grafana Terraform provider using the grafana_data_source resource. You set the Team ID through the variables object in json_data_encoded, and you set the access token through secure_json_data_encoded.
resource "grafana_data_source" "vercel" {
type = "grafana-vercel-datasource"
name = "Vercel"
json_data_encoded = jsonencode({
variables = {
team_id = "team_1a2b3c4d5e6f7g8h9i0j1k2l"
}
})
secure_json_data_encoded = jsonencode({
"vercel.token" = "your-token-here"
})
}Omit the variables object when you scope your access token to your full account.


