Skip to content

Commit

Permalink
EDU-1795: Update Prometheus data source setup in Grafana
Browse files Browse the repository at this point in the history
Source of truth: Dallas
  • Loading branch information
fairlydurable committed Jan 23, 2025
1 parent 2893072 commit bb152dd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions docs/production-deployment/cloud/metrics/prometheus-grafana.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This section describes how to set up your Temporal Cloud and SDK metrics and use
The process for setting up observability includes the following steps:

1. Create or get your Prometheus endpoint for Temporal Cloud metrics and enable SDK metrics.
- For Temporal Cloud, [generate a Prometheus HTTP API endpoint](#temporal-cloud-metrics-setup) on Temporal Cloud using valid certificates.
- For Temporal Cloud, [generate a Prometheus HTTP API endpoint](/production-deployment/cloud/metrics/general-setup) on Temporal Cloud using valid certificates.
- For SDKs, [expose a metrics endpoint](#sdk-metrics-setup) where Prometheus can scrape SDK metrics and [run Prometheus](#prometheus-configuration) on your host. The examples in this article describe running Prometheus on your local machine where you run your application code.
2. Run Grafana and [set up data sources for Temporal Cloud and SDK metrics](#grafana-data-sources-configuration) in Grafana. The examples in this article describe running Grafana on your local host where you run your application code.
3. [Create dashboards](#grafana-dashboards-setup) in Grafana to view Temporal Cloud metrics and SDK metrics. Temporal provides [sample community-driven Grafana dashboards](https://github.com/temporalio/dashboards) for Cloud and SDK metrics that you can use and customize according to your requirements.
Expand Down Expand Up @@ -248,16 +248,20 @@ If you have installed and are running Grafana locally, go to [http://localhost:3

You must configure your Temporal Cloud and SDK metrics data sources separately in Grafana.

To add the Temporal Cloud Prometheus HTTP API endpoint that we generated in the [Temporal Cloud metrics setup](#temporal-cloud-metrics-setup) section, do the following:
To add the Temporal Cloud Prometheus HTTP API endpoint that we generated in the [Temporal Cloud metrics setup](/production-deployment/cloud/metrics/general-setup) section, do the following:

1. Go to **Configuration > Data sources**.
2. Select **Add data source > Prometheus**.
3. Enter a name for your Temporal Cloud metrics data source, such as _Temporal Cloud metrics_.
4. In the **HTTP section**, paste the URL that was generated in the Observability section on the Temporal Cloud UI.
5. In the **Auth section**, enable **TLS Client Auth**.
6. In the **TLS/SSL Auth Details** section, paste the end-entity certificate and key.
Note that the end-entity certificate used here must be part of the certificate chain with the root CA certificates used in your [Temporal Cloud observability setup](#temporal-cloud-metrics-setup).
7. Click **Save and test** to verify that the data source is working.
1. Select **Add data source > Prometheus**.
1. Enter a name for your Temporal Cloud metrics data source, such as _Temporal Cloud metrics_.
1. In the **Connection** section, paste the URL that was generated in the Observability section on the Temporal Cloud UI
1. The **Authentication** section may be left as **No Authentication**.
1. In the **TLS Settings** section, select **TLS Client Authentication**:
1. Leave **ServerName** blank. This is not required.
1. Paste in your end-entity certificate and key.
- Note that the end-entity certificate used here must be part of the certificate chain with the root CA certificates used in your [Temporal Cloud observability setup](/production-deployment/cloud/metrics/general-setup).
1. Click **Save and test** to verify that the data source is working.

![A screenshot showing the data source configuration in Grafana](/img/cloud/add-prometheus-api-endpoint.png)

If you see issues in setting this data source, verify your CA certificate chain and ensure that you are setting the correct certificates in your Temporal Cloud observability setup and in the TLS authentication in Grafana.

Expand Down Expand Up @@ -304,6 +308,6 @@ Temporal has a repository with some community-driven example dashboards for [Tem

To import a dashboard in Grafana, do the following.

1. Go to **Create > Import**.
2. You can either copy and paste the JSON from [Temporal Cloud](https://github.com/temporalio/dashboards/tree/master/cloud) and [Temporal SDKs](https://github.com/temporalio/dashboards/tree/master/sdk) sample dashboards, or import the JSON files into Grafana.
1. In the left-hand navigation bar, select **Dashboards** > **Import dashboard**.
2. You can either copy and paste the JSON from [Temporal Cloud](https://github.com/temporalio/dashboards/tree/master/cloud) and [Temporal SDK](https://github.com/temporalio/dashboards/tree/master/sdk) sample dashboards, or import the JSON files into Grafana.
3. Save the dashboard and review the metrics data in the graphs.
Binary file added static/img/cloud/add-prometheus-api-endpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bb152dd

Please sign in to comment.