---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/operations/connection/create-prometheus
  - ru/operations/connection/create-prometheus
  - href: en/operations/connection/create-prometheus.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/operations/connection/create-prometheus.html
title: How to create a Prometheus connection in DataLens On-premises
description: Follow this guide to create a connection to Prometheus.
vcsPath: en/operations/connection/create-prometheus.md
---

# Creating a Prometheus connection

To create a Prometheus connection:

1. Open the [connection creation page](https://datalens.ru/connections/new).
1. Under **Databases**, select the **Prometheus** connection.
1. Select the authentication mode and specify the connection parameters:

   {% list tabs group=authentication %}

   - Password {#password}

     * **Host name**: Specify the path to the Prometheus host. You can specify multiple hosts in a comma-separated list. If you fail to connect to the first host, DataLens will select the next one from the list.
     * **Port**: Specify the Prometheus connection port.
     * **URL path**: Optionally, specify the path to the Prometheus API (part of the [URL](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL) without a protocol, host name, and port).
     * **Username**: Specify the username for the Prometheus connection.
     * **Password**: Enter the password for the user.
     * **Cache TTL in seconds**: Specify the cache TTL or leave the default value. The recommended value is 300 seconds (5 minutes).
     * **HTTPS**. Enable the secure connection option if your server supports HTTPS.

     ![image](../../_assets/datalens/operations/connection/connection-prometheus.png)

   - Header {#header}

     * **Host name**: Specify the path to the Prometheus host. You can specify multiple hosts in a comma-separated list. If you fail to connect to the first host, DataLens will select the next one from the list.
     * **Port**: Specify the Prometheus connection port.
     * **URL path**: Optionally, specify the path to the Prometheus API (part of the [URL](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL) without a protocol, host name, and port).
     * **Authorization header**: Specify the authorization token.
     * **Cache TTL in seconds**: Specify the cache TTL or leave the default value. The recommended value is 300 seconds (5 minutes).
     * **HTTPS**. Enable the secure connection option if your server supports HTTPS.

     ![image](../../_assets/datalens/operations/connection/connection-prometheus-auth.png)

   {% endlist %}

1. Optionally, test the connection by clicking **Check connection**.
1. Click **Create connection**.


1. Select the [workbook](../../workbooks-collections/index.md) to save your connection to or create a new one. If using legacy folder navigation, select a folder to save the connection to. Click **Create**.


1. Enter a name for the connection and click **Create**.
