Configure the Jira data source

Grafana provides a number of configuration options for the Jira data source. For general information on adding a data source, refer to Add a data source.

Before you begin

Before you configure the Jira data source, complete the following steps:

  1. Install the Jira data source plugin. To install the plugin, refer to Install Grafana plugins.
  2. Create a Jira API token. To create an API token, refer to Manage API tokens for your Atlassian account.
  3. Verify you have access to the Jira projects you want to query.
  4. Ensure you have the organization administrator role in Grafana. Only administrators can add data sources.

Add the Jira data source

Complete the following steps to add a new Jira data source:

  1. Click Connections in the left-side menu.
  2. Click Add new connection.
  3. Type Jira in the search bar.
  4. Select the Jira 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 Jira configuration.

Jira configuration options

The following section describes the configuration options available for the Jira data source.

Connection

Configure the connection to your Jira instance. If you are unsure of your Jira URL, contact your Jira administrator.

  • Provider - Where your Jira instance is hosted. Select Jira Cloud if Jira is hosted on Atlassian Cloud. Select Jira Data Center / Jira Server if Jira is hosted on-premises or elsewhere.

  • URL - The root URL for your Atlassian instance. For example, https://your-domain.atlassian.net.

Authentication

Configure authentication to access the data source. The authentication method depends on your Jira deployment type.

  • User email (optional) - The email address for the user or service account. Required for Jira Cloud.

  • API Token - The API token associated with the user. To create an API token, refer to Manage API tokens for your Atlassian account. If you are using an API token with scopes enabled, the token must include the following permissions: read:jira-user and read:jira-work. Ensure these permissions are granted to support the required APIs, including Issue Search and Myself. You may use Granular scopes instead of Classic scopes, however Classic scopes are recommended.

  • Scoped token - The toggle switch to indicate the API Token is configured with scopes

  • Cloud id - The Cloud id of Jira Cloud App

Authentication methods:

Jira deploymentUser emailAPI TokenMethod
Jira CloudRequiredAPI token from AtlassianBasic authentication
Jira Data CenterOptionalPersonal Access Token (PAT)Bearer token (if email empty)
Jira ServerOptionalPersonal Access Token (PAT)Bearer token (if email empty)

Note

For Jira Data Center and Jira Server, you can use Personal Access Tokens (PAT) with Bearer token authentication. Leave the User email field empty and enter your PAT in the API Token field.

Additional settings

Additional settings are optional and provide more control over your data source. This section is available in Grafana 10.0.0 and later.

  • Enable Secure Socks Proxy - Toggle to enable proxying the data source connection through a secure socks proxy to a different network. For more information, refer to Configure a data source connection proxy.

Private data source connect (PDC)

Note

Private data source connect (PDC) is only available for Grafana Cloud users.

Use PDC to connect to and query data within a secure network without opening that network to inbound traffic from Grafana Cloud. For more information on how PDC works, refer to Private data source connect. For setup instructions, refer to Configure Grafana private data source connect (PDC).

  • Private data source connect - Select the PDC connection from the drop-down menu or create a new connection.

Save and test

After you have configured your Jira data source options, click Save & test to validate the connection. You can also remove a connection by clicking Delete.

Provision the Jira data source

You can provision the Jira data source in YAML files as part of the Grafana provisioning system. For more information about provisioning a data source, refer to Provision Grafana.

YAML
apiVersion: 1
datasources:
  - name: Jira
    type: grafana-jira-datasource
    access: proxy
    basicAuth: false
    editable: true
    enabled: true
    jsonData:
      url: https://your-domain.atlassian.net
      user: user@example.com
      hosting: cloud
      scopedToken: false
      cloudId: cloud id of Jira Cloud App
    secureJsonData:
      token: <your-api-token>

The following table describes the provisioning options:

FieldDescriptionRequired
urlThe root URL for your Atlassian instanceYes
userThe email address for the user or service accountNo
hostingThe Jira provider type: cloud or serverYes
tokenThe API token for authenticationYes

Provision using Terraform

You can provision the Jira data source using the Grafana Terraform provider.

hcl
resource "grafana_data_source" "jira" {
  type = "grafana-jira-datasource"
  name = "Jira"

  json_data_encoded = jsonencode({
    url     = "https://your-domain.atlassian.net"
    user    = "user@example.com"
    hosting = "cloud"
  })

  secure_json_data_encoded = jsonencode({
    token = var.jira_api_token
  })
}