Changing local connections
As when changing remote connections you need an id of the local connection to change it. To list all connections for a multi-cluster view, both remote and local, you can do
query {
searchDomain(name: "myMultiClusterView") {
... on View {
remoteConnections {
id
... on RemoteClusterConnection {
publicUrl
}
... on LocalClusterConnection {
targetViewId
}
}
}
}
}
This will output the list of connections, with the local connections listed at the end:
{
"data": {
"searchDomain": {
"remoteClusterConnection": {
"id": "CW8ppOz5CUfabsT7zB5dKIRs05DqIHuR",
"publicUrl": "https://remotelogscale2.com/"
}, {
"id": "lsQxFIyq0zU6LklhEJ2CkH4M7hQHEYOR",
"targetViewId": "kvTm4oht5pOUqEQUK58h0wNk"
}
}
}
}
The output indicates the connection id of the local connection:
lsQxFIyq0zU6LklhEJ2CkH4M7hQHEYOR
. To change which view it
points to you can run this mutation:
mutation {
updateLocalClusterConnection(
input: {
multiClusterViewName: "myMultiClusterView"
connectionId: "lsQxFIyq0zU6LklhEJ2CkH4M7hQHEYOR"
targetViewName: "humio-metrics"
}
)
}
After this the view will include data from humio-metrics rather than humio. To check that the change has been applied you can do,
query {
searchDomain(name: "myMultiClusterView") {
remoteClusterConnection(id: "lsQxFIyq0zU6LklhEJ2CkH4M7hQHEYOR") {
id
... on LocalClusterConnection {
targetViewId
}
}
}
}
This will return the connection information:
{
"data": {
"searchDomain": {
"remoteClusterConnection": {
"id": "lsQxFIyq0zU6LklhEJ2CkH4M7hQHEYOR",
"targetViewId": "to1amS163Pb6FH1PNv3JVjYG"
}
}
}
}
Local connections identify their target view by id, not name, so you get
the id of humio-metrics as the value of
targetViewId
instead of the name. If you want to
be absolutely sure the value is correct you can do
query {
searchDomain(name: "humio-metrics") {
id
}
}
In this case it generates the ID for the view:
{
"data": {
"searchDomain": {
"id": "to1amS163Pb6FH1PNv3JVjYG"
}
}
}
This matches the value for targetViewId
that we identified
earlier.