|
1 | 1 | --- |
2 | 2 | title: Tracking Metrics with Prometheus |
3 | 3 | --- |
| 4 | +import StepsWrap from '@site/src/components/StepsWrap'; |
| 5 | +import StepContent from '@site/src/components/Steps/step-content'; |
4 | 6 |
|
5 | 7 | [Prometheus](https://prometheus.io/) offers a robust solution for real-time monitoring, empowering you to track critical metrics and maintain system stability effectively. This topic guides you through the steps to integrate Prometheus with Databend Cloud and provides an overview of the available metrics. |
6 | 8 |
|
7 | 9 | ## Integrating with Prometheus |
8 | 10 |
|
9 | 11 | Follow these steps to set up a Prometheus instance with Docker and integrate it with Databend Cloud: |
10 | 12 |
|
11 | | -### Step 1: Enable Tenant Metrics |
| 13 | +<StepsWrap> |
| 14 | +<StepContent number="1"> |
| 15 | + |
| 16 | +### Enable Tenant Metrics |
12 | 17 |
|
13 | 18 | To start tracking metrics, ensure that metrics are enabled for your Databend Cloud tenant. To enable this feature, submit a support ticket in Databend Cloud by navigating to **Support** > **Create New Ticket** and requesting metrics activation for your tenant. |
14 | 19 |
|
15 | | -### Step 2: Prepare a SQL User |
| 20 | +</StepContent> |
| 21 | +<StepContent number="2"> |
| 22 | + |
| 23 | +### Prepare a SQL User |
16 | 24 |
|
17 | 25 | Create a dedicated SQL user in Databend Cloud for Prometheus to access metrics. For example, you can create a SQL user named `metrics` with the password `metrics_password` using the following SQL statement: |
18 | 26 |
|
19 | 27 | ```sql |
20 | 28 | CREATE USER metrics IDENTIFIED BY 'metrics_password'; |
21 | 29 | ``` |
22 | 30 |
|
23 | | -### Step 3: Start Prometheus Using Docker |
| 31 | +</StepContent> |
| 32 | +<StepContent number="3"> |
24 | 33 |
|
25 | | -1. On your local machine, create a **prometheus.yml** file to configure Prometheus for scraping metrics from Databend Cloud. Use the following template: |
| 34 | +### Start Prometheus Using Docker |
| 35 | + |
| 36 | +1. On your local machine, create a file named **prometheus.yml** to configure Prometheus for scraping metrics from Databend Cloud. Use the following template: |
26 | 37 |
|
27 | 38 | ```yaml title='prometheus.yml' |
28 | 39 | scrape_configs: |
@@ -70,6 +81,9 @@ You're all set! You can now query your tenant metrics directly from Prometheus. |
70 | 81 |
|
71 | 82 |  |
72 | 83 |
|
| 84 | +</StepContent> |
| 85 | +</StepsWrap> |
| 86 | + |
73 | 87 | ## Available Metrics List |
74 | 88 |
|
75 | 89 | Please note that all metrics are prefixed with `databend_cloud_`. |
|
0 commit comments