Removing duplicate storage cluster with LCM
When you configure a separate storage cluster for metrics, the OpsCenter keyspace is recreated on the storage cluster. Because the OpsCenter UUID changes, you will see duplicate clusters in LCM. To remove the duplicate cluster in Lifecycle Manager (LCM), resync the OpsCenter cluster UUID.
In OpsCenter 6.8.1 and later, LCM finds the OpsCenter cluster by its UUID first and then the intersecting seed list. This improvement prevents LCM from listing a duplicate cluster. |
Prerequisites
-
Configure a separate OpsCenter storage cluster for metrics.
-
Create a unique keyspace to use for each DSE cluster monitored by OpsCenter. If you are storing data for multiple clusters, DataStax recommends adding the cluster name as a suffix to the default keyspace name of
OpsCenter
. For example, set the keyspace name toOpsCenter_Cluster1Storage
for the storage cluster to differentiate it from the OpsCenter keyspace for the monitored cluster.
Procedure
-
Get the unique_cluster_id for the OpsCenter storage cluster.
curl http://127.0.0.1:8888/cluster_name/cluster/unique_cluster_id
// 20190604153731 // http://127.0.0.1:8888/cluster_name/cluster/unique_cluster_id "unique_cluster_id"
-
Get a list of LCM clusters to get the unique opsc-cluster-id and href_URL for the LCM cluster.
curl http://127.0.0.1:8888/api/v2/lcm/clusters/
// 20190604153842 // http://127.0.0.1:8888/api/v2/lcm/clusters { "next": null, "previous": null, "last": 1, "count": 1, "per-page": 50, "current": 1, "results": [ { "opsc-cluster-id": "opsc_cluster_id", "name": "*_cluster_name", "id": "id", "href": "href_URL", ... } ] }
The opsc_cluster_id is not expected to match the unique_cluster_id from the curl result.
-
If opsc-cluster-id and unique_cluster_id do not match, replace the opsc-cluster-id value with the unique_cluster_id using the LCM cluster href_URL.
curl -X PUT href_URL -H "Content-Type: application/json" -d '{"opsc-cluster-id": "unique_cluster_id"}'
If the OpsCenter and LCM cluster UUIDs match and you have duplicate clusters, contact DataStax Support.
-
Refresh the LCM web-interface.
The duplicate cluster should no longer be visible.
Removing duplicate from db_monitoring cluster
Get the unique_cluster_id from db_monitoring cluster.
curl http://127.0.0.1:8888/db_monitoring/cluster/unique_cluster_id
Based on the results, the unique_cluster_id is 6885d453-a816-4c9e-b06f-7050d28c50b5
.
// 20190604153731
// http://127.0.0.1:8888/db_monitoring/cluster/unique_cluster_id
"6885d453-a816-4c9e-b06f-7050d28c50b5"
Get the unique opsc-cluster-id and href_URL for the db_monitoring LCM cluster.
curl http://127.0.0.1:8888/api/v2/lcm/clusters/
Based on the results, the opsc_cluster_id is f1da1420-7846-4c84-bf7d-399d48e6a51e
and the href_URL is [http://127.0.0.1:8888/api/v2/lcm/clusters/cd658793-e763-4e5a-9960-b19fe935f0db](http://127.0.0.1:8888/api/v2/lcm/clusters/cd658793-e763-4e5a-9960-b19fe935f0db).
// 20190604153842
// http://127.0.0.1:8888/api/v2/lcm/clusters
{
"next": null,
"previous": null,
"last": 1,
"count": 1,
"per-page": 50,
"current": 1,
"results": [
{
"opsc-cluster-id": "f1da1420-7846-4c84-bf7d-399d48e6a51e",
"name": "db_monitoring",
"id": "cd658793-e763-4e5a-9960-b19fe935f0db",
"href": "http://127.0.0.1:8888/api/v2/lcm/clusters/cd658793-e763-4e5a-9960-b19fe935f0db",
...
}
]
}
Replace the opsc-cluster-id value with the unique_cluster_id.
curl -X PUT http://127.0.0.1:8888/api/v2/lcm/clusters/cd658793-e763-4e5a-9960-b19fe935f0db -H "Content-Type: application/json" -d '{"opsc-cluster-id": "6885d453-a816-4c9e-b06f-7050d28c50b5"}'
The results show that the opsc-cluster-id matches the unique_cluster_id.
{
"opsc-cluster-id": "6885d453-a816-4c9e-b06f-7050d28c50b5",
"name": "db_monitoring",
"id": "cd658793-e763-4e5a-9960-b19fe935f0db",
"href": "http://127.0.0.1:8888/api/v2/lcm/clusters/cd658793-e763-4e5a-9960-b19fe935f0db",
...
}