> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Grafana Connector | OpenMetadata Integration Guide

> Learn how to configure and use the Grafana connector in OpenMetadata. Includes setup, authentication, metadata ingestion, and lineage.

export const MetadataIngestionUi = ({connector, selectServicePath, addNewServicePath, serviceConnectionPath}) => {
  return <>
    <p>
      To ingest metadata from your sources, you need to create a service connection.
      The service connects your source system with OpenMetadata. Once you create
      a service, you can use it to configure your ingestion workflows.<br />
      <br />
      To create a service connection and ingest your metadata, follow the steps below:
    </p>
      <Steps>
      <Step title="Select the Service">
        <ol>
          <li>
            On the left navigation bar, click <strong>Settings</strong>.
          </li>
          <li>
            On the next page, click <strong>Services</strong>, and then select the service.
            <img src="/public/images/connectors/visit-services-page.png" alt="Visit Services Page" />
          </li>
        </ol>
      </Step>

      <Step title="Create a New Service">
        To add a new service connection, click <strong>Add New Service</strong>.
        <img src="/public/images/connectors/create-new-service.png" alt="Create a new Service" />
      </Step>

      <Step title="Select the Connector">
        Select <strong>{connector}</strong> as the service type and click <strong>Next</strong>.

        {selectServicePath && <img src={selectServicePath} alt="Select Service" />}
      </Step>

      <Step title="Name and Describe the Service">
        Enter a unique <strong>Service Name</strong> and <strong>Description</strong>.
        <ul>
         <li><strong>Service Name</strong>: OpenMetadata identifies services by their service name. Enter a name that distinguishes this deployment from other services, including other {connector} services you are ingesting metadata from.</li>
        </ul>

        <Note>
          The service name cannot be changed after it is set.
       </Note>

        {addNewServicePath && <img src={addNewServicePath} alt="Add New Service" />}
      </Step>

      <Step title="Configure the Service Connection">
        Set up the connection settings required for {connector} to set up the service and start ingesting metadata from your sources. The right-hand panel displays help documentation for the selected connection type in the product UI.
        {serviceConnectionPath && <img src={serviceConnectionPath} alt="Configure Service connection" />}
      </Step>
    </Steps>
  </>;
};

export const ConnectorDetailsHeader = ({name, icon, stage, availableFeatures, unavailableFeatures = [], availableFeaturesCollate = []}) => {
  const showSubHeading = availableFeatures?.length > 0 || unavailableFeatures?.length > 0 || availableFeaturesCollate?.length > 0;
  const totalAvailableFeatures = [...availableFeatures || [], ...availableFeaturesCollate || []];
  return <div className="container">
      <div className="Heading">
        <div className="flex items-center gap-3">
          {icon && <div className="IconContainer">
              <img src={icon} alt={name} noZoom className="ConnectorIcon" />
            </div>}
          <h1 className="ConnectorName">{name}</h1>
          <span className={`StageBadge ${stage === 'PROD' ? 'prod' : 'beta'}`}>
            {stage}
          </span>
        </div>
      </div>
      {showSubHeading && <div className="SubHeading">
          <div className="FeaturesHeading">Feature List</div>
          <div className="FeaturesList">
            {totalAvailableFeatures.map(feature => <div className="FeatureTag AvailableFeature" key={feature}>
                ✓ {feature}
              </div>)}
            {unavailableFeatures.map(feature => <div className="FeatureTag UnavailableFeature" key={feature}>
                ✕ {feature}
              </div>)}
          </div>
        </div>}
    </div>;
};

<ConnectorDetailsHeader icon="/public/images/connectors/grafana.png" name="Grafana" stage="BETA" availableFeatures={["Dashboards", "Charts", "Owners", "Tags", "Lineage"]} unavailableFeatures={[]} />

In this section, we provide guides and references to use the Grafana connector.
Configure and schedule Grafana metadata and profiler workflows from the OpenMetadata UI:

* [Requirements](#requirements)
* [Metadata Ingestion](#metadata-ingestion)

## Requirements

To access the Grafana APIs and import dashboards and panels into OpenMetadata, you need a Service Account Token with sufficient permissions (Admin role is recommended) and API access enabled on your Grafana instance.

## Metadata Ingestion

<MetadataIngestionUi connector={"Grafana"} selectServicePath={"/public/images/connectors/grafana/select-service.png"} addNewServicePath={"/public/images/connectors/grafana/add-new-service.png"} serviceConnectionPath={"/public/images/connectors/grafana/service-connection.png"} />

<Steps>
  <Step title="Test the Connection">
    Once the credentials have been added, click on *Test Connection* and *Save* the changes.

    <img src="https://mintcdn.com/openmetadata/9G75p72jJKYgvFUQ/public/images/connectors/test-connection.png?fit=max&auto=format&n=9G75p72jJKYgvFUQ&q=85&s=4ac71a56e30fa3dd1be86f82c1f07068" alt="Test Connection" width="1494" height="310" data-path="public/images/connectors/test-connection.png" />
  </Step>

  <Step title="Configure Metadata Ingestion">
    After adding and testing the dashboard service, configure the metadata ingestion pipeline. To configure, follow the steps below:

    1. Navigate to **Settings** > **Services** > **Dashboards**.
    2. On the **Dashboards** services page, click the service you've added.
    3. Go to the **Agents** tab, and then click **Add Agent** > **Add Metadata Agent**.
    4. Configure the ingestion details. See [Metadata Ingestion Options](#metadata-ingestion-options).

    <img src="https://mintcdn.com/openmetadata/6dnf6RS7LC6LeZyz/public/images/connectors/configure-metadata-ingestion-dashboards.png?fit=max&auto=format&n=6dnf6RS7LC6LeZyz&q=85&s=7698badd2f4356ad46e799a527611995" alt="Configure Metadata Ingestion" width="2084" height="1682" data-path="public/images/connectors/configure-metadata-ingestion-dashboards.png" />

    #### Metadata Ingestion Options

    * **Name**: This field is the name of the ingestion pipeline. Customize it or use the generated name.
    * **Dashboard Filter Pattern (Optional)**: Use it to control whether to include dashboards as part of metadata ingestion.
      * **Include**: Explicitly include dashboards by adding comma-separated regular expressions to the 'Include' field. OpenMetadata will include all dashboards with names matching one or more of the supplied regular expressions. All other dashboards will be excluded.
      * **Exclude**: Explicitly exclude dashboards by adding comma-separated regular expressions to the 'Exclude' field. OpenMetadata will exclude all dashboards with names matching one or more of the supplied regular expressions. All other dashboards will be included.
    * **Chart Filter Pattern (Optional)**: Use it to control whether to include charts as part of metadata ingestion.
      * **Include**: Explicitly include charts by adding comma-separated regular expressions to the 'Include' field. OpenMetadata will include all charts with names matching one or more of the supplied regular expressions. All other charts will be excluded.
      * **Exclude**: Explicitly exclude charts by adding comma-separated regular expressions to the 'Exclude' field. OpenMetadata will exclude all charts with names matching one or more of the supplied regular expressions. All other charts will be included.
    * **Data Model Filter Pattern (Optional)**: Use it to control whether to include data models as part of metadata ingestion.
      * **Include**: Explicitly include data models by adding comma-separated regular expressions to the 'Include' field. OpenMetadata will include all data models with names matching one or more of the supplied regular expressions. All other data models will be excluded.
      * **Exclude**: Explicitly exclude data models by adding comma-separated regular expressions to the 'Exclude' field. OpenMetadata will exclude all data models with names matching one or more of the supplied regular expressions. All other data models will be included.
    * **Project Filter Pattern**: Filter the dashboards, charts, and data sources by projects. Note that all of them support regex as include or exclude. For example, "My project, My proj.\*, .\*Project".
          <Tip>
            We filter the projects by concatenating the entire project hierarchy using dot notation
            (for example, `Project1.NestedProjectA.OtherProject`).
            Make sure the regex filter pattern accounts for this fully-qualified format.
          </Tip>
    * **Enable Debug Log**: Enable this toggle to use debug-level logging.

    <img src="https://mintcdn.com/openmetadata/Uz9EHuUsFWt0w2EL/public/images/connectors/metadata-ingestion-option-1.png?fit=max&auto=format&n=Uz9EHuUsFWt0w2EL&q=85&s=22074b3b6d68aefe2a073aba3ee0f425" alt="Metadata Ingestion Option 1" width="2082" height="1664" data-path="public/images/connectors/metadata-ingestion-option-1.png" />

    * **Lineage Information (Optional)**: Configure this section to enable lineage between your dashboards and the database tables they are built on. OpenMetadata uses the database service name to match and draw the lineage path from table to dashboard.
      * **Db Service Prefixes**: Enter one or more service path prefixes to tell OpenMetadata where to look for the source tables used by your dashboards. Supported formats:
        * `DBServiceName`—matches all tables in the service
        * `DBServiceName.DatabaseName`—matches tables in a specific database
        * `DBServiceName.DatabaseName.SchemaName`—matches tables in a specific schema
        * `DBServiceName.DatabaseName.SchemaName.TableName`—matches a specific table
    * **Query Parser Configuration**: Controls how OpenMetadata parses SQL queries to extract lineage. Use this to select the SQL parser that best fits your data source's dialect.
      * **Query Parser Type**: Choose the SQL parser for lineage extraction:
        * **Auto** (default): Automatically tries SqlGlot first, falls back to SqlFluff, then SqlParse. Recommended for best results.
        * **SqlGlot**: High-performance parser with good dialect support. Falls back to SqlParse on failure.
        * **SqlFluff**: Comprehensive but slower parser with strong dialect support. Falls back to SqlParse on failure.
    * **Include Current Owners**: Enable this toggle to control whether to include owners for the ingested entity if the owner email matches a user stored in the OpenMetadata server as part of metadata ingestion. If the ingested entity already exists and has an owner, the owner will not be overwritten.
    * **Mark Deleted Dashboards**: Optional configuration to soft delete dashboards in OpenMetadata if the source dashboards are deleted. After deleting, all associated entities like lineage and other related data for that dashboard will be deleted.
    * **Mark Deleted Data Models**: Optional configuration to soft delete data models in OpenMetadata if the source data models are deleted. After deleting, all associated entities with that data model will be deleted.
    * **Mark Deleted Charts**: Optional configuration to soft delete charts in OpenMetadata if the source charts are deleted. After deleting, all associated entities with that chart will be deleted.
    * **Include Tags**: Enable this toggle to control whether to include tags in metadata ingestion.
    * **Include Data Models**: Enable this toggle to control whether to include data models as part of metadata ingestion.
    * **Include Draft Dashboard**: Enable this toggle to include draft dashboards. By default, this is enabled.
    * **Include Usage**: Enable this toggle to control whether to include usage data as part of metadata ingestion.
    * **Override Metadata**: Enable this toggle to control whether to override the existing metadata in the OpenMetadata server with the metadata fetched from the source. If enabled, the metadata fetched from the source will override the existing metadata in OpenMetadata. If disabled, only fields that have no value in OpenMetadata will be updated. This is applicable for fields like description, tags, owner, and displayName.
    * **Override Lineage**: Enable this toggle to control whether to override the existing lineage in OpenMetadata with the lineage fetched from the source. If enabled, existing lineage will be replaced. If disabled, new lineage edges will be added without removing existing ones.

    <img src="https://mintcdn.com/openmetadata/Uz9EHuUsFWt0w2EL/public/images/connectors/metadata-ingestion-option-2.png?fit=max&auto=format&n=Uz9EHuUsFWt0w2EL&q=85&s=df7cf675ffedda3a6377eef0107dd529" alt="Metadata Ingestion Option 2" width="2078" height="1666" data-path="public/images/connectors/metadata-ingestion-option-2.png" />
  </Step>

  <Step title="Schedule the Ingestion and Deploy">
    Scheduling can be set up at an hourly, daily, weekly, or manual cadence. The
    timezone is in UTC. Select a Start Date to schedule for ingestion. It is
    optional to add an End Date.

    Review your configuration settings. If they match what you intended,
    click Deploy to create the service and schedule metadata ingestion.

    If something doesn't look right, click the Back button to return to the
    appropriate step and change the settings as needed.

    After configuring the workflow, you can click on Deploy to create the
    pipeline.

    <img src="https://mintcdn.com/openmetadata/j50Bw6ZBiFbbFFnF/public/images/connectors/schedule.png?fit=max&auto=format&n=j50Bw6ZBiFbbFFnF&q=85&s=24b0c2f55f803efde5fb3b3bc24ed3ae" alt="Schedule the Workflow" width="2733" height="1083" data-path="public/images/connectors/schedule.png" />
  </Step>

  <Step title="View the Ingestion Pipeline">
    Once the workflow has been successfully deployed, you can view the
    Ingestion Pipeline running from the Service Page.

    <img src="https://mintcdn.com/openmetadata/9G75p72jJKYgvFUQ/public/images/connectors/view-ingestion-pipeline.png?fit=max&auto=format&n=9G75p72jJKYgvFUQ&q=85&s=7c4e411977371617cb1312efb9f9bfee" alt="View Ingestion Pipeline" width="2733" height="1271" data-path="public/images/connectors/view-ingestion-pipeline.png" />

    <Tip>
      If AutoPilot is enabled, workflows like usage tracking, data lineage, and similar tasks will be handled automatically. Users don’t need to set up or manage them - AutoPilot takes care of everything in the system.
    </Tip>
  </Step>
</Steps>

Enable debug logging to troubleshoot issues:

```bash theme={null}
export LOG_LEVEL=DEBUG
```
