How to connect cross-instance data sources
Last updated on
The following tutorial explains how to connect metrics (Thanos), logs (Loki), and traces (Tempo) data sources from one Observability instance into another.
1. Get the URL of the data source
Section titled “1. Get the URL of the data source”Retrieve the API URL from the instance you want to pull data from (the source).
- Log in to the STACKIT Portal.
- Select the Observability instance you want to get the data from.
- Open the API menu item in the Observability Dashboard section.
- Copy the relevant URL for your specific data type:
- Thanos (Metrics):
https://storage.api.stackit.argus.eu01.stackit.cloud/... - Loki (Logs):
https://logs.stackit.argus.eu01.stackit.cloud/... - Tempo (Traces):
https://<PART_OF_INSTANCE_ID>-tui.traces.stackit.argus.eu01.stackit.cloud/...(<PART_OF_INSTANCE_ID>: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE)
- Thanos (Metrics):
2. Create technical credentials
Section titled “2. Create technical credentials”To access your source data, you have to generate technical user credentials on your source instance.
If you haven’t created these yet, follow the instructions in our Authentication Overview.
Make sure to securely copy the generated Username and Password, as you will need them to construct your connection URL in the next step.
3. Set up the new data source in Grafana
Section titled “3. Set up the new data source in Grafana”Configure the destination instance to read from the source instance using Grafana.
-
Navigate to the Observability instance where you want to set up the new data source (the destination).
-
Log in to its Grafana UI.
-
Open the left toggle menu, navigate to Connections, and select Data sources.
-
Click on Add new data source.
-
Select the correct data source type based on your data:
- For Thanos, choose Prometheus.
- For Loki, choose Loki.
- For Tempo, choose Tempo.
-
Enter a recognizable name for your data source.
-
In the Connection section, enter the target URL. You must inject your credentials directly into the URL using basic authentication formatting (
https://<USERNAME>:<PASSWORD>@<API_URL>).Note: Remove the
https://prefix from your copied API URL to avoid duplication.Depending on your data source, the connection URL follows this structure:
# Thanos (Metrics)https://<USERNAME>:<PASSWORD>@storage.api.stackit.argus.eu01.stackit.cloud/instances/<INSTANCE_ID># Loki (Logs)https://<USERNAME>:<PASSWORD>@logs.stackit.argus.eu01.stackit.cloud/instances/<INSTANCE_ID># Tempo (Traces)https://<USERNAME>:<PASSWORD>@<PART_OF_INSTANCE_ID>-tui.traces.stackit.argus.eu01.stackit.cloud/instances/<INSTANCE_ID> -
Click Save & test.
If everything is configured correctly, Grafana will display a “Data source is working” confirmation message.