External Repository for Tableau Resource Monitoring Tool

The Tableau Resource Monitoring Tool uses a PostgreSQL database as its repository to gather and store Tableau Server monitoring data that is used to provide performance and usage information.

Before the 2022.3 release, this PostgreSQL repository was automatically installed with the RMT Server on the same machine as the RMT Server, and this was the only option available. Starting in version 2022.3, you can reconfigure RMT Server to use an externally hosted PostgreSQL database instead of the locally installed database. When RMT Server is configured to use an externally hosted PostgreSQL database, we refer to it as the external repository.

The supported platform for hosting the external repository is an AWS RDS instance. Hosting the repository database externally allows you to manage the availability, backups and disaster recovery of the repository component of the RMT Server.

With the addition of this option to configure an external repository, RMT Server can be configured in the following ways:

  • Continue to use the locally installed repository: This means that the PostgreSQL database that is automatically installed with RMT Server on the same machine will be used as the repository for RMT Server, and no further changes are made to this configuration.
  • Configure RMT Server to use an external repository: This means that the PostgreSQL database that RMT uses is hosted external to RMT Server. This requires making some configuration changes post installation. Currently only AWS RDS instances are supported as the hosting platform for PostgreSQL database.

In order to set up and manage the external repository, you should have a good understanding of the AWS RDS platform and PostgreSQL database. We recommend that you use the documentation on the AWS site for platform-related instructions.

You will also need to know how to configure and manage the external repository configuration for Resource Monitoring Tool. This topic will provide you with that information in the sections below.

New installation of Resource Monitoring Tool

The instructions detailed in this section apply to a new installation of Resource Monitoring Tool. If you have an existing deployment of RMT and want to move to an external repository configuration, see the Existing Resource Monitoring Tool installation section of this topic.

When you install RMT Server, it automatically installs the repository database on the same machine as the RMT Server. The process to configure the external repository is a post-installation configuration where you will reconfigure RMT Server to use an externally hosted PostgreSQL database.

Use the following steps to install Resource Monitoring Tool and reconfigure RMT Server to use an external repository:

  1. Create the external repository: Create an RDS instance to host the external repository with the following recommendations.

    • Minimum recommended PostgreSQL instance specifications:

      • db.m6g.2xlarge (8 vcpu, 32 GiB RAM)

      • SSD Storage with 500 GB disk space

    • Instance configuration values:
      • Max. Worker Processes: Total Logical Processors

      • Max. Workers per Gather: Min. (Total Logical Processors / 2, 4)

      • Max. Parallel Workers: Total Logical Processors

      • Max. Parallel Maintenance Workers: Min. (Total Logical Processors / 2, 4)

      • Shared Buffers: Total Memory / 4

      • Effective Cache Size: 75% of Total Memory

      • Maintenance Work Memory: Total Memory / 16 Linux, Max. 2 GB – 1 MB in Windows

      • Wal Buffers: Derived from Shared Buffers, likely around 16 MB

      • Work Memory: Derived from Shared Buffers and Max. Workers per Gather

    To learn how to create and connect to a PostgreSQL DB instance on AWS, see this page on AWS documentation site.

  2. Install RMT: Follow the instructions Install the RMT Server Using Command Line to install RMT Server, but skip the steps for creating an environment. You will do that later after configuring RMT Server to use the external repository. Note that this will initially install a local PostgreSQL database.

  3. Test the connection to the external repository: Test the connection to the new database using psql, a PostgreSQL administrative tool that is installed with the RMT Server;

    Navigate to the 'bin' folder of the locally installed PostgreSQL installation directory.

    C:\Program Files\Tableau\Tableau Resource Monitoring Tool\prerequisites\postgresql<version number>\bin

    Run the following command to test the connection. Substitute your own value below for aws_rds_servername and provide the PostgreSQL password you created in AWS when prompted.

    .\psql.exe -h <aws_rds_servername> -p 5432 -d postgres -U postgres

    If you receive an error at this point and cannot connect successfully, review the parameter values in the command against the values from the AWS RDS console.

    Once the connection has been successfully established, you can close the psql session with the following command:

    \q

  4. Run rmtadmin master-setup to configure RMT Server to use the external repository. Use the following command examples and edit the command to reflect your Resource Monitoring Tool installation path, AWS RDS instance name, port number and the RDS PostgreSQL admin user password:

    Navigate to the Resource Monitoring Tool RMT Server installation directory: cd 'c:\Program Files\Tableau\Tableau Resource Monitoring Tool\master\'

    Run the command to configure external repository: ./rmtadmin master-setup --db-config=external --db-server=aws_rds_servername --db-port=5432 --db-admin-username=postgres --db-admin-password='postgres_user_password'

  5. Now create an environment and download the bootstrap file:

    • Run the following command to create an environment:

      rmtadmin create-env --name=<myenvironment> --api-username=<TableauServer API user name> --api-password=<password for the Tableau Server API user account>

    • Download the bootstrap file to register Agents:

      rmtadmin bootstrap-file --env=<myenvironment> --filename<The absolute or relative path including the file name>

      The steps are described in full detail here: Install the RMT Server Using Command Line.

  6. Follow the instructions Install the Agent Using Command Line to Install and register Agents on Tableau Server Nodes.

Existing Resource Monitoring Tool installation

There are two paths to migrating an existing RMT installations that are currently using a local repository to an external repository: the path you choose depends on the size and complexity of your environment.

  1. Migration with environment recreation: This is suited to RMT installations that have a small-sized environment with not a lot of configuration and alerts since this path involves recreating the environment and starting again and will lose data that has been collected so far.

    This involves reconfiguring the RMT Server to use an external repository, recreating the environments and redoing all the custom configurations like incident thresholds and re-registering the Agents. This is very similar to doing a new installation of RMT described in the section above except that you will not be installing RMT in this case.

  2. Manual migration with minimal data loss: This is specifically for customers who have large and complex environments and do not want to start fresh again. This migration is manual and not a built-in migration feature for RMT. The instructions to do this are described below:

    Manually migrating local Resource Monitoring Tool repository to an external AWS PostgreSQL DB instance

    Step 1: Create an RDS instance to host the external repository

    Use the following recommendations when creating the new RDS instance:

    • Minimum recommended PostgreSQL instance specifications:

      • db.m6g.2xlarge (8 vcpu, 32 GiB RAM)

      • SSD Storage with 500 GB disk space

    • Instance configuration values:
      • Max. Worker Processes: Total Logical Processors

      • Max. Workers per Gather: Min. (Total Logical Processors / 2, 4)

      • Max. Parallel Workers: Total Logical Processors

      • Max. Parallel Maintenance Workers: Min. (Total Logical Processors / 2, 4)

      • Shared Buffers: Total Memory / 4

      • Effective Cache Size: 75% of Total Memory

      • Maintenance Work Memory: Total Memory / 16 Linux, Max. 2 GB – 1 MB in Windows

      • Wal Buffers: Derived from Shared Buffers, likely around 16 MB

      • Work Memory: Derived from Shared Buffers and Max. Workers per Gather

    To learn how to create and connect to a PostgreSQL DB instance on AWS, see this page on AWS documentation site.

    Step 2: Test to make sure you are able to connect to the new database

    • Test the connection to the new database using psql, a PostgreSQL administrative tool that is bundled with RMT Server. Substitute your own value below for aws_rds_servername and provide the PostgreSQL password you created in AWS when prompted.
    • Navigate to the 'bin' folder of the locally installed PostgreSQL installation directory.

    C:\Program Files\Tableau\Tableau Resource Monitoring Tool\prerequisites\postgresql<version number>\bin

    Run the following command to test the connection. Substitute your own value below for aws_rds_servername and provide the PostgreSQL password you created in AWS when prompted.

    .\psql.exe -h <aws_rds_servername> -p 5432 -d postgres -U postgres

    If you receive an error at this point and cannot connect successfully, review the parameter values in the command against the values from the AWS RDS console.

    Once the connection has been successfully established, you can close the psql session with the following command:

    \q

    Step 3: Obtain the admin password for the local PostgreSQL database currently used by RMT

    Run the following commands to get the admin password from the local repository. This is needed to make a backup of the data in your local repository before doing the migration.

    Navigate to the RMT Server installation folder: cd 'c:\Program Files\Tableau\Tableau Resource Monitoring Tool\master\'

    Get the admin password: rmtadmin get db.adminPassword


    Step 4: Take a backup of the existing PostgreSQL database

    • First, Stop RMT in preparation for taking the database backup.

      rmtadmin stop

    • Now restart just the DB service so you can take the backup: rmtadmin start -db
    • Use the following example scripts and substitute your own values for the file path. If you have customised the port, update that as well. Provide the password from the previous step when prompted:
      • Navigate to the bin folder of the local repository: cd 'C:\Program Files\Tableau\Tableau Resource Monitoring Tool\prerequisites\postgresql<version number>\bin'
    • Take a backup: pg_dump -f your_file_name.dump -F d -j 10 -Z 5 -d tabrmt -h localhost -p 5555 -U postgres

      • -F d: Output a directory-format archive suitable for input into pg_restore
      • -j 10: Run the backup in parallel by backing up 10 tables simultaneously
      • -Z 5: Specify the compression level to use

    Note: Data collected by Resource Monitoring Tool in the time between this step and the final one will not be retained once the migration is complete.

    Step 5: Configure RMT Server to point to the external repository

    • Restart all RMT services: rmtadmin restart --all
    • Use the following command as an example. Edit the command to reflect the RDS server name, port and the RDS postgres user password.

      Navigate to the RMT Server installation folder: cd 'c:\Program Files\Tableau\Tableau Resource Monitoring Tool\master\'

      Configure external repository: rmtadmin master-setup --db-config=external --db-server=<aws_rds_servername> --db-port=5432 --db-admin-username=postgres --db-admin-password=<postgres_user_password>

    Step 6: Restore the back up to the external repository

    • First, stop RMT Server:

      rmtadmin stop

    • Restore the backup you created in step 4 to the new AWS RDS PostgreSQL instance. Edit the example script provided below to reflect your AWS RDS server name and port, and make sure the dump file path and name are accurate. When prompted, provide the password for the "postgres" user in RDS.

      pg_restore -j 5 -c -h <aws_rds_servername> -p 5432 -U postgres -d tabrmt <your_file_name>.dump

      • -j 5: Run the restore in parallel by restoring 5 tables simultaneously
      • -c: Clean (drop) database objects before recreating them

    Step 7: Start the RMT Server

    rmtadmin start

    Step 8: Re-register Agents

    Once the service changes are performed successfully, restart each Agent, then re-register it using the web interface, following the steps below.

    1. Download a new bootstrap file from RMT Server.
    2. Access the Agent web interface by navigating to http://localhost:9002/setup/register and import the bootstrap.
    3. Click Test Message Queue. Review the previous inputs if you receive an error.
    4. Click Connect to Message Queue.
    5. Under the Server section, click the drop-down with “New Environment Server” pre-selected, and rather than accepting the default, pick the server you are trying to register from the list. Scroll to the bottom and click the “Register Agent” button.

    For more details on registering Agents, see Install the Agent Using Command Line.

    Step 9: Verify that RMT Server is running and you are seeing the historical data

    Log in to RMT Server and verify that data from older time periods is present and that new data is being processed. Also review any custom configuration values to make sure everything is migrated correctly.

Upgrade best practices

Here are the general steps you need to follow if you want to upgrade Tableau Resource Monitoring Tool and migrate to an external repository at the same time:

Migration with environment recreation:

  1. Upgrade RMT Server and all Agents to 2022.3 or later.
  2. Steps 2–4 are very similar to the steps you would take to do a new installation – see New installation of Resource Monitoring Tool above. This mainly involves:
    • Creating an AWS PostgreSQL DB instance.
    • Configuring RMT Server to use the external repository.
    • Recreate environments and re-register all the Agents.
  3. Reconfiguring any custom configurations.

Note: You will lose historical data and also need to reconfigure any custom configurations.

Manual migration with minimal data loss:

  1. Upgrade RMT Server and all Agents to version 2022.3 or later
  2. Follow the steps detailed in the migration section. This mainly involves:
    • Creating a AWS PostgreSQL DB instance.
    • Taking a back up of the PostgreSQL database.
    • Configuring RMT Server to use the external repository (PostgreSQL DB instance).
    • Restoring the backup to the external repository.
    • Re-registering the agents.

Upgrading when the new version of RMT requires a major version PostgreSQL upgrade

When there is a change in the PostgreSQL major version requirement for Resource Monitoring Tool, it is a best practice to upgrade the external repository PostgreSQL version first before you upgrade Resource Monitoring Tool. More details are provided below. To see if you should upgrade your external repository PostgreSQL version, see the product compatibility table.

Use the following steps to upgrade RMT and the RDS instance when a PostgreSQL major version upgrade is required

  1. Make a backup of your RDS instance. You will need this in case you need to roll back the upgrade. For more information, see Backing up and restoring an Amazon RDS DB instance topic on the AWS site.
  2. Make a copy of the configuration file in the Resource Monitoring Tool directory. The configuration file is located at:
    C:\Program Files\Tableau\Tableau Resource Monitoring Tool\master\config.json
  3. Upgrade the RDS instance to the new version of PostgreSQL. For more information, see Upgrading the PostgreSQL DB engine for Amazon RDS topic on the AWS site.
  4. Upgrade RMT Server. If the upgrade including the database migration is completed successfully, proceed to the next step. If the upgrade fails, see the instructions in this section on how to recover and roll back the upgrade.
  5. Upgrade all the Agents on Tableau Server nodes to the new RMT version. For more information, see Upgrading Resource Monitoring Tool.

Recovering from a failed upgrade

  1. Uninstall the upgraded RMT Server.
  2. Restore the AWS RDS instance to the version previous to the upgrade. For more information, see the Backing up and restoring an Amazon RDS DB instance topic on the AWS site.
  3. Replace the config file that you backed up prior to the upgrade in the following location. You may have to create this folder as it might have been deleted during uninstallation:


    C:\Program Files\Tableau\Tableau Resource Monitoring Tool\master\config.json

  4. Install RMT Server, which installs a local repository.
  5. Configure RMT Server to use the external repository: rmtadmin master-setup --db-config=external --db-server=<aws_rds_servername> --db-port=5432 --db-admin-username=postgres --db-admin-password=<postgres_user_password> .

 

RMT and PostgreSQL version compatibility

This table lists RMT version 2022.3 and later only, since the external repository is only available from version 2022.3 and later.

RMT VersionPostgreSQL Version shipped with RMTSupported PostgreSQL Version for external repository
2022.313.713.7

Who can do this

To install Resource Monitoring Tool, you must have all the following:

  • Administrator permissions on the machine you are installing Resource Monitoring Tool.
  • Tableau Server Administrator site role.
  • Resource Monitoring Tool Administrator account.
Thanks for your feedback!Your feedback has been successfully submitted. Thank you!