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 - ports 80 (http) and 443 (https). In addition, Metric Insights accesses the Qlik Sense Websocket API over port 4747 as well as Qlik Sense Proxy REST API over port 4243.
NOTE: If using a Load Balancer, forward the same ports (80/443, 4247 and 4243).
This article describes the process of fulfilling these requirements:
1. Create a Qlik Sense certificate (on QS server in QMC)
As of Release 5.5, Metric Insights uses a client certificate for authentication with the Qlik Sense server.
To create a certificate, 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:
- Add machine name
- Machine name can be any non-empty string
- Certificate password (Required):
- Export file format must be “Windows format."
- Disk Location where your certificate will be exported
- Qlik Sense creates the following certificate files: client.pfx, root.cer, server.pfx and exports them to the specified folder
- Click [Export certificates] to initiate the process
Instructions on exporting a Qlik Sense certificate can also be found in the following Qlik Sense help article Exporting certificates
2. Install Java on the machine
Follow this link to download and install Java.
3. 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, see: Configure a Remote Data Collector
4. Configure Qlik Sense certificate on your Windows machine
Qlik Sense certificate is only required for Version 5.5.0 and beyond.
Copy the certificates created and exported in Step 1 to the directories specified below for use by the Remote Data Collector (RDC).
If Qlik Sense is deployed on a cluster, copy the certificate files over to the machine where the RDC is installed:
- Copy client.pfx from the Qlik Sense server to C:\Program Files (x86)\Metric Insights\Certificates\
- Copy root.cer from the Qlik Sense server to C:\Program Files (x86)\Metric Insights\Certificates\
- File server.pfx is not needed
- Open a Windows Command Prompt, then run the
keytool.exeas shown below (Java path location will be specific to your environment):
"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\root.cer"
- As prompted, enter keystore password: changeit
- In the file
C:\Program Files (x86)\Metric Insights\Insightd\plugins\qliksense.confupdate the client_key_pass value with the Certificate password value you entered when creating the certificate.
- If the
qliksense.conffile doesn't already exist, go to Step 6 for instructions on creating the file.
- If the
5. Install Chrome Browser on QS server (optional)
If the Chrome Browser does not already exist on the QS server, 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.
- Chrome driver and chromium are version-compatible. The compatibility is to be checked here ChromeDriver - WebDriver for Chrome.
Metric Insights has a one-shop-stop solution for Chrome and Chrome driver.
You can download a zipped third-party folder from our AWS account
- 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
6. Create a Qlik Sense configuration file
- In C:\Program Files (x86)\Metric Insights\Insightd\plugins create a qliksense.conf file
- Enter the following four parameters and provide values for them (leave the pathToBrowser and pathToDriver as in the example below if you replaced the third-party 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)
client_key_path=C:\Program Files (x86)\Metric Insights\Certificates\ client_key_pass=<cert-password-from-step-1.3> pathToBrowser=C:\Program Files (x86)\Metric Insights\Insightd\thirdparty\chrome-win32\chrome.exe pathToDriver=C:\Program Files (x86)\Metric Insights\Insightd\thirdparty\chromedriver.exe
- As of Release 5.4.0 and beyond, chrome.exe (Chrome Browser) and chromedriver.exe (Chrome Driver) are included in the RDC package.
- pathToBrowser and pathToDriver variables do not need to be specified unless you want to use your own Chrome Browser and Chrome Driver files, in which case you have to define the path to these files in the qliksense.conf file.
- 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" option in 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 4 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