Friday, January 2, 2015

vCOPS - Recreate missing vSphere group dashboard

If you are familiar with the custom-ui of vCops you will find that since 5.7 you are providing with some default custom dashboards under the vsphere group.
  
We recently installed VNX analytics adapter which seems to have removed the vsphere group default dashboards. 

To fix this perform the following tasks:

SSH into UI VM
Browse to
cd /usr/lib/vmware-vcops/user/conf/dashboards/
Run the script  "import-dashboards.sh"

This will only share the dashboards with admin user
Edit the sh file at bottom where states:
    # import imported templates as dashboards for admin user


The xml files listed here are the custom dashboards.
These can also be copied out (for instance with WinSCP) and imported into a  manually created new dashboard.

Add lines for different users but firstly create duplicate of file for backup purposes

Cp import-dashboard.sh import-dashboard.sh.default
Vi /import-dashboards.sh

/usr/lib/vmware-vcops/user/conf/dashboards # ls -l

-rw-r--r-- 1 admin admin  61794 Aug 26 04:56 DashboardTemplate-Alerts.xml
-rw-r--r-- 1 admin admin 117798 Aug 26 04:56 DashboardTemplate-ClusterUtilization.xml
-rw-r--r-- 1 admin admin  90979 Aug 26 04:56 DashboardTemplate-DatastorePerformance.xml
-rw-r--r-- 1 admin admin  74401 Aug 26 04:56 DashboardTemplate-DatastoreSpace.xml
-rw-r--r-- 1 admin admin 170642 Aug 26 04:56 DashboardTemplate-Heatmaps.xml
-rw-r--r-- 1 admin admin  77214 Aug 26 04:56 DashboardTemplate-HostMemory.xml
-rw-r--r-- 1 admin admin 117370 Aug 26 04:56 DashboardTemplate-HostUtilization.xml
-rw-r--r-- 1 admin admin  76295 Aug 26 04:56 DashboardTemplate-Troubleshooting.xml
-rw-r--r-- 1 admin admin 128042 Aug 26 04:56 DashboardTemplate-VMPerformance.xml
-rw-r--r-- 1 admin admin 117626 Aug 26 04:56 DashboardTemplate-VMUtilization.xml



  # import imported templates as dashboards for all administrator users
    bash  ./dbcli.sh dashboard import group:Administrators $TD_1 --default true --set 1
    bash  ./dbcli.sh dashboard import group:Administrators $TD_2
    bash  ./dbcli.sh dashboard import group:Administrators $TD_3
    bash  ./dbcli.sh dashboard import group:Administrators $TD_4
    bash  ./dbcli.sh dashboard import group:Administrators $TD_5
    bash  ./dbcli.sh dashboard import group:Administrators $TD_6
    bash  ./dbcli.sh dashboard import group:Administrators $TD_7
    bash  ./dbcli.sh dashboard import group:Administrators $TD_8
    bash  ./dbcli.sh dashboard import group:Administrators $TD_9

    bash  ./dbcli.sh dashboard import group:Administrators $TD_10



From vCOPS 5.7.3  release notes:

  • All and group options for dashboard commands
    For the dashboard import, dashboard delete, and dashboard reorder commands, you can use one of the following options instead of specifying a user name:
    * --all
    * --group:<group_name[,<group_name>]

    The --all option applies the command to all user accounts. The --group:<group_names[,<group_name>] option applies the command to all user accounts that belong to the specified user groups. For example, the command dashboard import group:Administrators,Operators "templates\MyDashboard.bin" imports the dashboard MyDashboard.bin to all user accounts that belong to the Administrators and Operators user groups.
    The dashboard import command also has a --set <rank> option that enables you to set the dashboard order. For example, the command dashboard import MyUser2 "dashboards/MyDashboard.bin" --set 1 imports the dashboard MyDashboard.bin and makes it the first dashboard in the dashboard list for the user MyUser2.

No comments:

Post a Comment