How to reindex the vROPS database

The vRealize Operations Appliance has it’s own local database. Behind the scenes it is running vPostgres to store information for the infrastructure it is monitoring. Over time the database tables can become fragmented and impact performance of the user interface. Always snapshot or backup your appliance before attempting this procedure. NOTE: This procedure is not currently supported by VMware. Use at your own risk or call VMware support to assist you. This has only been tested on vROPS 6 single node deployment. I will be testing distributed soon.

1. Login to vCenter and take a snapshot of your vROPS appliance VM.

2. Login to the vROPS appliance as root or sudo to root and run the following command and press enter

su - postgres -c "/opt/vmware/vpostgres/current/bin/reindexdb -a > /tmp/reindexdb.log"

3. After a few minutes the script should finish then run the following command to view the log file

cat /tmp/reindexdb.log

4. If you want to run this on a regular schedule create a shell file with the following and save it

su - postgres -c "/opt/vmware/vpostgres/current/bin/reindexdb -a > /tmp/reindexdb.log"

5. Type the following and press enter to make the file executable

chmod u+x /reindexdb.sh

6. Use the following guide to add the reindexdb.sh file to a cron job

Remember sharing is caring!

3 Replies to “How to reindex the vROPS database”

  1. As someone who supports this product, I am wondering just how much performance improvements can be attained by this trick. vPostgres only stores alerts and alarms in vROps 6, and it should only accounts for about 5% of the data in the system. The other 95% of the data storage and processing is handled by other services. Does this really make an appreciable difference in a production system?

    • I have found the improvements to be mostly in the UI responsiveness. This is after the appliance has been deployed for some time. Over time the UI can become slow and sluggish. I believe this is because the java pages that are displayed depend on the vPostgres DB.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.