Configure Remote PostgreSQL Server for SystemLink Test Monitor

Updated May 9, 2024

Environment

Software

  • SystemLink Server
  • SystemLink Test Module

This article demonstrates how to install PostgreSQL and configure a database to use for the SystemLink Test Monitor.
Using a remote database, as opposed to the default back-end database installed with SystemLink, can enhance scalability and fault tolerance.

 

Prerequisites

  • NI SystemLink Server must be installed on the server PC.
  • The NI SystemLink Server - Test Module must be installed on the server PC.

Installing PostgreSQL

  1. On the server PC, download [External] PostgreSQL.
  2. Run the installer.
  3. On the first selection page, ensure that pgAdmin 4 is included in the package selection. This is a graphical tool for managing databases.
  4. The installer will prompt you to select a password for the Superuser, and a port for the server. Make a note of these.
    • The default Superuser is postgres.
 

Configuring a Remote PostgreSQL Server for SystemLink

  1. On the server PC, open pgAdmin 4.
  2. From the tree on the left hand-side, expand Servers.
  3. Right-click PostgreSQL <version> and select Properties.

Server Properties.PNG
 
  1. Select the Connection tab, and make a note of the Host name and Port.
  2. Click Close to exit the Properties window.

Connection Properties.PNG
 
  1. Follow the steps in Connecting to a Remote PostgreSQL Database to set the configuration parameters for SystemLink.
    • The password was set when initially installing PostgreSQL. Contact your database administrator to find the required password.
    • The database can be obtained by expanding Servers >> PostgreSQL <version> >> Databases in pgAdmin 4. The default database is called postgres.

pgAdmin databases.PNG
 
  1. Click Test Connection to verify that the PostgreSQL server can be reached.
  2. If successful, click Apply to save changes. The SystemLink services will automatically restart.
    • Using the above server as an example, the SystemLink configuration should resemble the image below.

SystemLink PostgreSQL configuration.PNG
 

Viewing Data in the Remote PostgreSQL Database

  1. After the remote PostgreSQL database settings have been configured and the SystemLink services have restarted, run a TestStand sequence.
    • Refer to Integrating Test Monitor with TestStand for instructions on how to configure TestStand to upload results to SystemLink.
    • For demonstration purposes, it is recommended to run the Computer Motherboard Test sequence.
  2. When the sequence completes, verify that it has been uploaded to SystemLink:
    1. Open the SystemLink web interface.
    2. From the menu, open Test Insights >> Results.
    3. The TestStand execution should appear in the list. If not, wait for a few minutes to allow SystemLink to update.
  3. In pgAdmin 4, view the new TestStand result data:
    1. Expand Servers >> PostgreSQL <version> >> Databases.
    2. Right-click the database that has been linked to SystemLink and select Refresh...
    3. Expand the database.
    4. Inside the Schemas branch, there will be new entry called TestMonitor.
    5. Expand TestMonitor >> Tables.
    6. Inside the Tables branch, there will be five new entries:
      • __EFMigrationsHistory
      • paths
      • products
      • results
      • steps
    7. To view a table, right-click it and select View/Edit Data >> All Rows.

Next Steps

To create and execute queries on the PostgreSQL database using pgAdmin 4, refer to Perform Queries on PostgreSQL Tables for SystemLink Test Monitor.