How to delete all dashboards owned by a user in vRealize Operations Manager 6.1 and later
search cancel

How to delete all dashboards owned by a user in vRealize Operations Manager 6.1 and later

book

Article ID: 312253

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

This article provides steps to delete all dashboards owned by user in vRealize Operations Manager 6.1 and later versions.

Environment

VMware vRealize Operations Manager 6.5.x
VMware vRealize Operations Manager 6.1.x
VMware vRealize Operations Manager 6.3.x
VMware vRealize Operations Manager 6.2.x
VMware vRealize Operations Manager 6.6.x
VMware vRealize Operations Manager 6.7.x
VMware vRealize Operations Manager 6.4.x

Resolution

Note: As per best practice please ensure snapshots are in place before running the below steps.

To delete all the dashboards owned by a user in vRealize Operations Manager 6.1 or later versions:
 
  1. Log in to vRealize Operations Manager master node as root through SSH or Console.
  2. Run this command to list users corresponding to their ID:

    su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -c 'select * from user_name'"

    You see output similar to :
    id | name
    --------------------------------------+-----------------------------
    <UUID_1> | Administrator
    <UUID_2> | admin
  3. Note the ID of the user for which you want to delete the dashboards.
  4. Run this command to log in to the Cassandra Database:

vRealize Operations Manager 6.1 - 6.4

$ALIVE_BASE/cassandra/apache-cassandra-2.1.8/bin/cqlsh --ssl --cqlshrc $ALIVE_BASE/user/conf/cassandra/cqlshrc


vRealize Operations Manager 6.5 - 6.6.1

$VMWARE_PYTHON_BIN $ALIVE_BASE/cassandra/apache-cassandra-2.1.8/bin/cqlsh --ssl --cqlshrc $ALIVE_BASE/user/conf/cassandra/cqlshrc


vRealize Operations Manager 6.7

$VMWARE_PYTHON_BIN $ALIVE_BASE/cassandra/apache-cassandra-3.9/bin/cqlsh --ssl --cqlshrc $ALIVE_BASE/user/conf/cassandra/cqlshrc
 
  1. Run this command to delete all dashboards owned by a user:

    delete from globalpersistence.model_result_common_dashboard_dashboarddto where namespace='model_result_common_dashboard_dashboarddto' and classtype='model_result_common_dashboard_dashboarddto' and key='dashboards_uuid';

    Note: Replace uuid with the ID of the user noted in step 3.

    Example: delete from globalpersistence.model_result_common_dashboard_dashboarddto where namespace='model_result_common_dashboard_dashboarddto' and classtype='model_result_common_dashboard_dashboarddto' and key='dashboards_bc44b073-29dc-491a-98d7-246f7dac8fe3';
     
  2. Run this command to exit the Cassandra database:

    quit;


Additional Information

A quick list of entries in the model_result_common_dashboard_dashboarddto table can be seen using the following command:
select key,strvalue,namespace,classtype from globalpersistence.model_result_common_dashboard_dashboarddto;
 
From here you can match the ID found in step 3 to the key in the table.
Example: The ID <UUID_2> matches the key dashboards_<UUID_2>.
Unable to unshare a Dashboard in vROps 6.1 and later

Impact/Risks:
Note: This procedure modifies the cassandra database.