Prerequisites to connecting to Qlik Sense server

In order to connect to and authenticate against the Qlik Sense (QS) server, several requirements must be satisfied. Metric Insights accesses the Qlik Sense server via the same ports and protocol that your users access Qlik Sense via web browser - port 80 (http), 443 (https). In addition, Metric Insights accesses the Qlik Sense Websocket API over port 4747 as well as port 4244 if using NTLM authentication.

This article describes the process of fulfilling these requirements:

 

  1. Determine preferred authentication method
  2. Create a Qlik Sense certificate (on QS server in QMC)
  3. Installing Java
  4. Installing a Remote Data Collector on the QS server
  5. Configuring the Qlik Sense certificate on the Windows machine
  6. Install Chrome Browser on QS server
  7. Creating a qliksense.conf file

1. Determine preferred authentication method

The Metric Insights Qlik Sense plugin provides the following two authentication methods:

  1. Certificate based auth
  2. User based auth

With certificate authentication, Metric Insights utilizes certificates generated in the Qliksense Management Console (QMC) to connect (in lieu of a password). With user authentication, Metric Insights utilizes a username and password to connect.

To continue with certicate auth, please proceed to step #2.

To use user auth, please proceed to step #6.

2. Create a Qlik Sense certificate (on QS server in QMC)

Metric Insights uses a client certificate for authentication with the Qlik Sense server.

Instructions:

Go to your Qlik Sense server and sign into the QMC.

In the QMC, go to the Certificates page and fill in the following fields:

  1. Add machine name button
  2. Machine name - The value is not important and can be any non-empty string.
  3. Certificate password (Required). Important: Remember this value because you will need to enter it in Step #4 below.
  4. Export file format - Must be “Windows format." Note for Qlik Sense 1.1 you are not given this option
  5. Note the location that Qlik Sense will create the certificate (e.g., C:\ProgramData\Qlik\Sense\Repository\Exported Certificates)
  6. Export certificates button

Qlik Sense then creates the following certificate files: client.pfx, root.cer, server.pfx in the folder (e.g., in C:\ProgramData\Qlik\Sense\Repository\Exported Certificates\<Machine name>\)

Note: Instructions for exporting a Qlik Sense certificate can also be found in the following Qlik Sense help article:   https://help.qlik.com/sense/2.0/en-US/online/#../Subsystems/ManagementConsole/Content/export-certificates.htm )

3. Install Java on the machine

Follow this link to download and install Java.

4. Install a Remote Data Collector

A Remote Data Collector must be used to avoid certain Qlik Sense specific issues, such as:

For step-by-step installation instructions please see: Configure a Remote Data Collector

5. Configure Qlik Sense certificate on your Windows machine

Continuing from the creation of the Qlik Sense certificate in Step #1, copy the certificates to the directories specified below for use by the Remote Data Collector. Note, if Qlik Sense is deployed on a cluster, copy the certificate files over to the machine where the Remote Data Collector is installed:

  1. Copy client.pfx from the Qlik Sense server to C:\Program Files (x86)\Metric Insights\Certificates\
  2. Copy root.cer from the Qlik Sense server to  C:\Program Files (x86)\Metric Insights\Certificates\
  3. Open a Windows Command Prompt, then run the keytool.exe as shown below then see step #4 for the passord:
C:\Program Files (x86)\Java\jre1.8.0_111\bin\keytool.exe" -keystore "C:\Program Files (x86)\Java\jre1.8.0_111\lib\security\cacerts" -importcert -alias qsnew10 -file "C:\Program Files (x86)\Metric Insights\Certificates\

4.  Enter keystore password: changeit 

5.  File server.pfx is not needed.

6.  In file C:\Program Files (x86)\Metric Insights\Insightd\plugins\qliksense.conf update the client_key_pass value with the Certificate password value you entered when creating the certificate. Important: This is the value you specified in the Qlik Sense QMC in Step #1.

6. Install Chrome Browser on QS server

If the Chrome Browser does not already exist on the QS server, please install Chrome. Metric Insights utilizes a chrome driver to grab images of report objects. For the chrome driver to work, the chrome browser must be present on the same system. Download chrome from here: https://www.google.com/chrome/ . Chrome driver and chromium are version compatible. The compatibility is to be checked here http://chromedriver.chromium.org/downloads . Metric Insights has a one-shop-stop solution for chrome and chrome driver. Please download a zipped thirdparty folder from our AWS account
https://s3.amazonaws.com/metricinsights-share/thirdparty.zip  (just click the link for the folder to be downloaded to your machine )>> unzip it and replace the thirdparty folder in C:\Program Files (x86)\Metric Insights\Insightd 

 

7. Create qliksense.conf if it does not already exist.

  1. In C:\Program Files (x86)\Metric Insights\Insightd\plugins create a qliksense.conf configuration file
  2. Enter the following four parameters and provide values for them (leave the pathToBrowser and pathToDriver as in the example below if you replaced the thirdparty folder)
  • client_key_path: specify the path to the client.pfx certificate file <- (if using certificate auth)
  • client_key_pass: specify the password for client.pfx <- (if using certificate auth)
  • pathToBrowser: specify the path to chrome.exe (Chrome Browser)
  • pathToDriver: specify the path to chromedriver.exe (Chrome Driver)

Example:

pathToBrowser=C:\Program Files (x86)\Metric Insights\Insightd\thirdparty\chrome-win32\chrome.exe
pathToDriver=C:\Program Files (x86)\Metric Insights\Insightd\thirdparty\chromedriver.exe
client_key_path=C:\Program Files (x86)\Metric Insights\Certificates\
client_key_pass=<cert-password-from-step-1.3>

 Start Metric Insights Daemon to make the RDC send a heartbeat to the Metric Insights application (on your Windows machine: Services>>pick Metric Insights Daemon from the list >> Restart option). Go to Metric Insights UI and check the heartbeat for your remote data collector. Once the heartbeat is received, try the test connection of your Qlik Sense connection profile.

Optional commands for managing Qlik Sense certificates in Metric Insights

NOTE: if you want to delete keytool aliases created in step 3 above, then use the following commands:

List alias for root.cer in keytool:

"C:\Program Files (x86)\Java\jre1.8.0_111\bin\keytool.exe" -list -keystore "C:\Program Files (x86)\Java\jre1.8.0_111\lib\security\cacerts" 

Enter keystore password:  changeit

Delete alias for root.cer in keytool:

"C:\Program Files (x86)\Java\jre1.8.0_111\bin\keytool.exe" -delete -alias qsnew10 -keystore "C:\Program Files (x86)\Java\jre1.8.0_111\lib\security\cacerts"

Enter keystore password:  changeit

Next: Collecting data. Once setup, pulling data from Qlik Sense is easy. You configure data connection in Metric Insights, then begin collecting data.

0 Comments

Add your comment

E-Mail me when someone replies to this comment