Skip to main content Skip to complementary content

Setting up the Qlik Alerting monitoring app

Qlik Alerting includes a Qlik Sense monitoring app that helps you understand and visualize what is happening with your Qlik Alerting environment. With the monitoring app, you can see the load on the system, the average processing times, unsent alerts, and other information.

Creating the data connections

You can either use the connections.bat file to automatically create the data connections, or you can create them manually.

Creating the data connection with the connections.bat file

When you install Qlik Alerting, it includes a .bat file that helps you create and configure the Qlik Alerting data connections.

  1. On the Qlik Alerting server, navigate to C:\Program Files\Qlik Alerting\setup\monitoring-connection.

  2. Double click the connections.bat file to run it.

    Information noteThe connections.bat file should be opened by the same user who installed Qlik Alerting on the computer, and the same user to whom the alerting services are being delivered. If not, there may be undefined behavior.
  3. When prompted, enter your username and password. Use your Qlik Alerting administrator log-on credentials.

  4. Open the Qlik Sense QMC. Check that you have two new data connections: monitor_alerting and monitor_alerting_login.

Creating the data connections manually

If you prefer or are required to create the data connections manually, follow these steps.

monitor_alerting_login data connection

This data connection makes the authentication request to Qlik Alerting and is required to get the authenticated session token to run the monitor_alerting API connection to retrieve the data. See monitor_alerting data connection below.

  1. In Qlik Sense, create a new app.

  2. Open the Data Load Editor.

  3. Create a new REST data connection.

    1. For the URL, enter the Qlik Alerting server information.

      https://<QA_Server>:<QA_https_port>/api/login

    2. Set the Method to POST.

    3. In the POST body, add your Qlik Alerting administrator username and password.

      {"user":"<your_QA_username>","password":"<your_QA_password>"}

    4. In the query header, add content-type:application/json.

    5. Click Test Connection.

    6. Name the connection monitor_alert_login.

    7. Click Create.

  4. Open the QMC.

  5. Open Data Connections, then select your connection: monitor_alert_login <domain_user>.

  6. Click Edit this record, then change the connection name to monitor_alert_login.

  7. Click Save.

monitor_alerting data connection

This data connection is used to retrieve data from Qlik Alerting. You do not need to create a connection for each endpoint. The different endpoint URLs are passed through this connection from the monitoring app script.

Information noteYou need the session token from running the monitor_alerting_login result to run this process. Follow the steps below to get the session token.
  1. From the app you created above, open the script editor.

  2. Paste in the following script, and replace the variables <QA_Server> and <QA_thpps_port> with the relevant information for your Qlik Alerting server.

    LIB CONNECT TO 'monitor_alerting_login';
    
    Let vURL = 'https://<QA_Server>:<QA_https_port>/api/login';
    
    Connection:
    LOAD [token],
    [userId],
    [userName],
    [firstName],
    [isAdmin],
    [license],
    [expiresOn]
    ;
    SELECT
    "token",
    "userId",
    "userName",
    "firstName",
    "isAdmin",
    "license",
    "expiresOn"
    FROM JSON (wrap on) "root"
    WITH CONNECTION(
    Url "$(vURL)"
    )
    ;
    // Set new variable values
    LET vAuth = Peek('token',0, 'Connection');
    LET vUserId = Peek('userId',0,'Connection');
    LET vUserName = Peek('userName',0,'Connection');
    LET vAdmin = Peek('isAdmin',0,'Connection');
    
    Trace >>>;
    Trace >>> Auth $(vAuth);
    Trace >>> User $(vUserId);
    Trace >>>;
    
    drop table Connection;
  3. Reload the Qlik Sense app but do not close the script editor.

    A script pop-up window shows the number of trace items. These are the variable outputs in the script text.

  4. Copy the Auth & User values.

  5. Create a new REST data connection.

    1. For the URL, enter the Qlik Alerting server information.

      https://<QA_Server>:<QA_https_port>/api/groups/users

    2. Set the Method to GET.

    3. In the query header, add authorization:auth value from script and userid:user value from script.

    4. Click Test Connection.

    5. Name the connection monitor_alerting.

    6. Click Create.

  6. Open the QMC.

  7. Open Data Connections, then select your connection: monitor_alerting <domain_user>.

  8. Click Edit this record, then change the connection name to monitor_alerting.

  9. Click Save.

Import and reload the Qlik Alerting monitoring app

After the data connections are created, you import the Qlik Alerting monitoring app.

  1. From the Qlik Sense QMC, import the Qlik Alerting monitoring app. Navigate to C:\Program Files\Qlik Alerting\setup\monitoring-connection and select Qlik Alerting Monitoring.qvf.

    Information noteTo learn how to import apps in the QMC, see Importing apps.
  2. Open the app in the Qlik Sense hub, then open the Data Load Editor.

  3. On the Set Load Details tab of the script, locate the vServer variable and replace it with your Qlik Alerting server name, for example: https://QlikAlertingServerName.Comapny.com:4552.

  4. Click Reload to test the connection.

Change of user password used in data connections

The password of the administrator user that is entered when the data connections are created is stored in the monitor_alerting_logindata connection. If you have used the connections.bat file this will be in an encrypted format, if you have created the connection manually it will not. To update the password do the following:

  1. If you created the connection manually:
    1. Open the QMC.
    2. Go to Data Connections, then select the monitor_alerting_loginconnection and click to Edit this record.
    3. In the connection string field find the requestBody where you will see the previous password and you can type in your new one in it's place. Please be careful to keep the URL enconding that surrounds the password.
      requestBody={%3user%3:%3username%3,%3password%3:%3adminPassword%3}
  2. If you created the connections using the automated connection.bat process:
    1. Open the QMC
    2. Go to Data Connections, then select the monitor_alerting_login and the monitor_alerting connections and delete
    3. Rerun the process in to create the data connections using teh connections.bat file process as documented at the top of this page.

Troubleshooting

If the reload does not work as expected, there are a few things to check:

  1. Check you have entered the correct Qlik Alerting user credentials when creating the data connections. You can verify this by looking at the monitor_alerting_login connection and checking the username and password in the URL. They will be surrounded by URL-encoded quotatation marks (%3<username>%3).

  2. Check that the URL is correct in the data connection. The URL entered into the data connection comes from the Qlik Alerting configuration step where you enter the hostname of the Qlik Alerting server. You must use the fully qualified domain name.

  3. Check that you have entered the correct fully qualified server name and port in the vServer variable in the script of the Qlik Alerting monitoring app. This is a manual step as we do not insert this during the data connection process.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!