Skip to content

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 to another.

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 configure your connection in Grafana later.

2. Construct the URLs for the data sources

Section titled “2. Construct the URLs for the data sources”

Once you have your credentials ready, follow these steps to construct the URLs for the data sources:

  1. Navigate to your Observability instance.

  2. Open the API tab.

  3. Copy the instance ID.

  4. Get the cluster parameter of your instance (e.g., by viewing the Logs Query URL: https://logs.$CLUSTER.argus.eu01.stackit.cloud/instances/...) and copy it.

  5. Construct the relevant URLs for your specific data type:

    # For Prometheus datasource (metrics)
    https://storage.api.$CLUSTER.argus.eu01.stackit.cloud/instances/$INSTANCE_ID
    e.g. https://storage.api.stackit1.argus.eu01.stackit.cloud/instances/11111111-2222-3333-4444-555555555555
    # For Loki datasource (logs)
    https://logs.$CLUSTER.argus.eu01.stackit.cloud/instances/$INSTANCE_ID
    e.g. https://logs.stackit1.argus.eu01.stackit.cloud/instances/11111111-2222-3333-4444-555555555555
    # For Tempo datasource (traces)
    https://$FIRST_13_CHARACTERS_OF_INSTANCE_ID-tui.traces.$CLUSTER.argus.eu01.stackit.cloud
    e.g. https://11111111-2222-tui.traces.stackit1.argus.eu01.stackit.cloud

Configure the destination instance to read from the source instance using Grafana.

  1. Navigate to the Observability instance where you want to set up the new data source (the destination).

  2. Log in to its Grafana UI.

  3. Open the left toggle menu, navigate to Connections, and select Data sources.

  4. Click on Add new data source.

  5. Select the correct data source type based on your data:

    • For Thanos, choose Prometheus.
    • For Loki, choose Loki.
    • For Tempo, choose Tempo.
  6. Enter a recognizable name for your data source.

  7. In the Connection section, enter the target URL you constructed above.

  8. Enter your technical credentials in the Authentication section as Basic authentication.

  9. Click Save & test.

If everything is configured correctly, Grafana will display a “Data source is working” confirmation message.