Slemma allows to connect to your databases in two ways: Directly or through the SSH tunnel.
Direct Connection requires you to whitelist Slemma’s IP address (220.127.116.11) and enter your connection details (user, database, password, and etc. ) on the Integration settings dialogue. In other words, it requires your database to be accessible from the internet. If your database is on a private network and you do not want it to be accessible from the internet, you can set up a secure tunnel to forward encrypted inbound connections from our SSH server to your database server, or use your own SSH/proxy.
Creating a new data source
Navigate to your Data sources page, click the blue plus icon on the bottom right and choose the desired data source from the list. You’ll see the Integration settings form.
- On the General tab, enter your localhost or IP from your private network, provide database name and user credentials.
- Make sure you check the Use SSH-tunnel box on the Security tab. Slemma will create a command you need to run to open a tunnel.
- Next, run the command in your terminal.
If you are using Windows OS you can use one of the available SSH clients to establish a tunnel. The example here shows a command for Plink.
- When prompted, type in the password from the connection dialog above. You can find it just under the command.
This command should print nothing and appear to exit immediately. It will be running in the background.
- We encourage you to test the tunnel. To do so click TEST from your Integration settings dialogue. It should return a ‘Success’ message if the tunnel is running. Otherwise, Slemma returns ‘Fail’. The most common issue that can cause failure is that your server is unreachable.
NOTE: This method requires the software used to set up SSH tunnel to be running in order to keep your charts updated. This means that should the tunnel stop running (ex. due to server reboot) your charts will be broken once Slemma tries to clear the cache and pull new data. If you want the tunnel restart automatically you can set up autossh or similar tools. Also it might be helpful to add a crontab (startup) entry to set up the tunnel automatically after your machine reboot.