Grafana Cloud Enterprise
Last reviewed: August 6, 2026

Configure the Jenkins data source

This document explains how to configure the Jenkins data source. For query instructions, refer to the Jenkins query editor.

Before you begin

Before configuring the data source, ensure you have:

Add the data source

To add the data source:

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

Connection

Configure the connection to your Jenkins instance.

SettingDescription
NameThe name used to refer to the data source in panels and queries.
URLThe URL of your Jenkins instance, for example, https://ci.jenkins.io. This field is required.

Authentication

If your Jenkins instance requires authentication, provide the following credentials. The data source uses HTTP basic authentication.

SettingDescription
UserThe username to use for authentication.
PasswordThe password or API token to use for authentication.

To read more about the Jenkins Remote Access API, refer to the Jenkins documentation.

Private data source connect

The Jenkins data source supports Private Data Source Connect (PDC), which lets Grafana Cloud query a Jenkins instance on a private network.

When the Secure Socks Proxy feature is enabled in your Grafana environment, an Enable Secure Socks Proxy toggle appears in the data source configuration. Enable it to route the data source connection through the proxy to your private network.

Verify the connection

Click Save & test to verify the connection. When the connection succeeds, Grafana displays Data source is working. If the connection fails, Grafana displays Unable to connect to Jenkins followed by the error details.

To make Jenkins the default data source for new panels and queries, click Make default at the bottom of the configuration page, next to Save & test.

Provision the data source

You can define the data source in YAML files as part of Grafana’s provisioning system. For more information, refer to Provisioning Grafana data sources.

Here’s a provisioning example for this data source:

YAML
apiVersion: 1
datasources:
  - name: Jenkins
    type: grafana-jenkins-datasource
    access: proxy
    jsonData:
      url: https://ci.jenkins.io
      username: <USERNAME>
    secureJsonData:
      password: <PASSWORD>

You can also provision the data source with Terraform using the grafana_data_source resource:

hcl
resource "grafana_data_source" "jenkins" {
  type = "grafana-jenkins-datasource"
  name = "Jenkins"

  json_data_encoded = jsonencode({
    url      = "https://ci.jenkins.io"
    username = "<USERNAME>"
  })

  secure_json_data_encoded = jsonencode({
    password = "<PASSWORD>"
  })
}

The Jenkins data source reads the instance URL from jsonData.url, so set the URL inside json_data_encoded rather than the resource’s top-level url argument.

Next steps