Connecting to a PostgreSQL database

Do you want to connect to a PostgreSQL database?  Great!  BrightGauge has that ability.  Here’s a quick document to help you get it connected:

Step 1 - Log in to your BrightGauge Account  

If you haven’t created an account yet, go here to get started.

 

Once logged in, to get started: 

  • New Accounts

On first login, from the account Overview page, click on the "Add a Datasource" button:

Or, from the first "Welcome to BrightGauge" dashboard page, click on the "Connect a Datasource"

Existing Accounts

From the account Overview page (to access click on the BrightGauge logo on the top left hand corner), click on the green "+" towards the bottom right of the page (next to the list of your existing datasources):

Or, click on "Data" menu on the the top righthand corner of the screen, and select "Datasources" from the drop down menu:

Now click on “Add a New Datasource” and then click on the "PostgreSQL" icon:

 

Whether a new or existing account, you'll come to datasource settings screen below. Leave this page open as it will be used in Step 4. You can now proceed onto the next steps.

scn_datasources_addnew_onprem_database.png

Step 2 - Download and Install BrightGauge Agent

You’ll need to download and configure the BrightGauge Agent. Click Download to download the agent. Documentation to help setup configure the BrightGauge Agent can be found here.  Make sure to install the BrightGauge agent on a machine somewhere within the same network as your mySQL database. If you have any questions, please contact Support by selecting Help > Open a Ticket from the top menu bar.

Step 3 - Set Up the PostgreSQL Server

  • If the server is within a different network, make a firewall exception for port 5432 (5432 is the default port, but can be changed during SQL server setup, so if it has been changed, use whatever port the database was set up with).
  • Create a user.  Password Authentication is preferred.  Please follow documentation for assistance in setting up a user on your database: PostgreSQL Password Authentication

Step 4 - Install the PostgreSQL ODBC

Install the latest 32 Bit PostgreSQL ODBC driver on the same machine the agent is on.  The 32 Bit driver is required as our agent can only interact with 32 bit software.  Download the latest full driver from http://www.postgresql.org/ftp/odbc/versions/msi/

  1. On the machine go to Administrative Tools (control panel -> administrative tools)
  2. Click on ODBC Data Source 32 Bit (Windows Server) or Data Sources 32 Bit (Windows 7 Professional and Ultimate and later).
  3. Go to System DSN
      Screen_Shot_on_2018-02-07_at_17_35_37.png
  4. Click on PostgreSQL Unicode  
     Screen_Shot_2014-10-23_at_4.25.48_PM.png
  5. Fill in the Setup box with the following information:
    • Data Source (DSN Name): any name you want
    • database: PostgreSQL database name
    • Server: local machine name, IP address (internal if local, external if off-site), or URL
    • Port: 5432 (if using non-default setup, use the port you selected upon creation of PostgreSQL server)
    • User: username you setup in Step 3
    • Password: password you setup for the user in Step 3

Screen_Shot_2014-10-23_at_4.31.01_PM.png

 

Step 5 - Configure the Datasource Settings

scn_datasources_addnew_onprem_database.png

Refer to the screenshot above and match the corresponding numbered fields:

  1. Name: A name for the connection.
  2. Agent Host: The computer on which the agent is installed.
  3. Database Internal IP/Hostname: Internal IP address or hostname for the database server (if using multiple SQL instances, use the IP or machine name followed by a backslash and then the instance name: 192.168.1.100\instance or SQLServer\instance).
  4. Database Name: The database name (e.g., cwwebapp_brightgauge).
  5. Database Internal Port: This field is for advanced SQL setups not using the default SQL port (1433). Enter the non-default port in this field. Leave BLANK if using the default SQL port (1433).
  6. Database Username: Your database username.
  7. Database Password: Your database password.

Step 6 - Test Connection

Once you've filled out all of the fields, make sure to test the connection.  If successful, save the connection.

Please note, a common issue we have seen clients experience is with the "AutoFill" feature in web browsers inputting the wrong credentials for the database user field. When a test connection is successful, the page is refreshed and the autofill takes effect automatically without the user realizing. The user then selects save, accidentally saving the autofilled credentials which are incorrect. A way to prevent this issue is to open a private browsing window (or incognito window) to fill out the datasource configuration page, or simply retyping the credentials after the test connection and clicking "Save".

Once you’ve saved the connection it's now off to build some new datasets!  Help documents for SQL building in BrightGauge can be found here.

 

 

Was this article helpful?
1 out of 2 found this helpful

Comments

0 comments