Add a Datasource
A datasource is a combination of a specific database and the credentials to access it.
It is a relatively simple process to add a datasource in the Admin UI if you've met all of the relevant prerequisites.
You must have a properly configured account (username, password) on the datasource you'll be adding. If you choose to store credentials for the datasource with strongDM, you must have those credentials handy. If not, you must have set up Secret Stores and be able to enter the location of the secrets required to access the datasource.
The Hostname or Endpoint you enter for your datasource below must be accessible by at least one gateway or relay. To verify this, log in to the gateway or relay, and use Netcat:
nc -zv <YOUR_HOSTNAME> <YOUR_PORT>(in this example,
nc -zv testdb-01.fancy.org 3306). If your gateway server can connect to this hostname, proceed.
Netcat is an easy tool to check various hostnames and ports by either sending data (a ping) or checking for listeners on the ports. The commands above use -z to check for listeners without sending data and -v to show verbose output. If you don't have Netcat, you can install the
netcatpackage with whatever package manager you are using, such as
apt-get install netcat
Add the Datasource
- Login to the Admin UI and select Datasources from the left hand navigation.
- In the upper right hand section of the screen, click the add datasource button. You'll be presented with a dialog like this:
Use this dialog to configure how your gateways or relays will connect to the datasource.
- Type in a Display Name - this is how the datasource will show up in the Admin UI and local clients.
- Select the type of datasource from the available list of database types.
- Enter the hostname and port. When you select the datasource type, it will automatically fill in the Port field with that database's default port for connectivity. If you know that your database is set to connect on a different port, enter that port here now.
- The Port Override field provides an organization-wide standard port for users to connect to this datasource via their client. In most organizations this field will automatically populate; you can optionally overwrite it with your own preferred port.
- Type in the name of the database you'll be connecting to with this datasource, as well as the username and password of the user that will be used for this datasource.
- By default, for PostgreSQL and its derivative DBMS (e.g. Greenplum), strongDM will limit all connections to the configured database. If you would like to change that, uncheck this option.
- Click the 'create' button. Once this is done, the Admin UI will update and show your new datasource with a yellow icon while it runs initial health checks.
- Eventually, you should see the icon turn gray, then green:
- If it does not turn green, check the Diagnostics tab for errors.
If you have multiple datasources to create, follow the above steps for each datasource.
If any errors occur, please copy them into an email and send to email@example.com.