Skip to content
LogScale Self-Hosted
This is an archived version of the documentation downloaded from LogScale Documentation Archives. Up to date documentation, and documentation for later versions, is available on LogScale Documentation

#### Adding a remote connection

To add a connection to a view, you must create a permission token for the remote view or repository and then add the connection to the local multi-cluster view.

1. In the remote cluster go to the `Settings` for the view, select the Tokens from the list of sections on the left.

2. Click + Add new. You will be prompted with the New API token window. Give the token a name, and then select the `Data read access token` checkbox. Click the Create token to create the token. The generated token will be of the form of a random string of characters, for example:

       vaHxkz7gKHiNLKganfVQPGtIGKet9jW5~dxg83aJsA6p2jStEvM5z7GNWOl2X1Lu7apz15cR3OEd6

   Copy the token and keep it safe as the string will not be shown again. The generated token is specific to the view or repository where it was created. To share multiple views, a token will need to be created on each view that you want to access as part of a multi-cluster view.

To add the connection to the cluster, you will need the token as a parameter to the createRemoteClusterConnection() mutation in the cluster with the multi-cluster view:

graphql

    mutation {
      createRemoteClusterConnection(
        input: {
          multiClusterViewName: "myMultiClusterView"
          publicUrl: "https://$REMOTE_LOGSCALE_URL/"
          token: "$REPO_TOKEN"
        }
      )
    }

The required arguments are:

- `multiClusterViewName`

  The name of the multi-cluster view in the local cluster.

- `publicUrl`

  The URL of the cluster.

- `token`

  The token for the remote view that you created in the previous steps. The name of the view does not need to be specified, as the token identifies the view.

You can add as many remote connections as you want but only one connection for each remote cluster. For more complex topologies, see Understanding Multi-Cluster Topologies.

You can check whether a remote connection is valid before adding it. To do so use the checkRemoteClusterConnection() query whose input is the same as the input you would use the add the connection:

graphql

    query {
      checkRemoteClusterConnection(
        input: {
          multiclusterViewName: "myMultiClusterView"
          publicUrl: "https://$REMOTE_LOGSCALE_URL/"
          token: "$REPO_TOKEN"
        }
      ) {
        isValid
        errorMessage
        remoteViewName
        remoteServerVersion
        remoteServerCompatVersion
      }
    }

If validation fails it will give an error message describing why. If it succeeds it will return information about the remote view and server.

#### Enter search term