Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT

Email Alert for Qlik Sense task failed (Very easy)

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_Babu_Samineni

Email Alert for Qlik Sense task failed (Very easy)

Last Update:

Jul 1, 2020 11:03:13 AM

Updated By:

Anil_Babu_Samineni

Created date:

Jul 1, 2020 11:00:46 AM

Hi Team,

This document can help about configuration for Task failure notification in Qlik Sense

Connector installation and configuration

This part only needs to be done once on all Qlik Sense nodes per environment.

Prerequisites: Anonymous authentication to the <Company> SMTP relay has been opened. 

1. Download the Qlik Web Connectors March 2020 Patch 1 (currently installed) from the Qlik download site.
Go to www.qlik.com to log on with a registered customer or partner account, select Services > Customer Downloads, and then select the Qlik Connectors tab.

2. Before you unzip the file, check that the folder is not blocked by Windows security. To unblock the zip file, right click on the file, select Properties, then click on Unblock in the General tab. Click Apply.

3. Unzip QlikWebConnectorsX.X.zip (where X. X - is the version name) and place the unzipped files in a folder on the root directory of one of the nodes Windows server D:QlikWebConnector

4. Start up the Web connectors server in manual mode to configure it: open 😧 QlikWebConnectors\QlikWebConnectors.exe
If successful the following window will open.

Qlik Web connector.png

5. Proceed to http://localhost:5555/web to configure the SMTP connector. Qlik SMTP connector is available on Connectors / Standard page. Click on the connector name to go to the connector Parameters page.


Fill in the details:


SMTP Server: Talk to windows team 
Port: 25
SSL Mode: None
To: [Your Email Address to test]
Subject: Qlik Sense Failure Notification
Message: Qlik Sense Says Hi !!
HTML ON
From Email: Your From Address 


Send a test email by clicking on Save Inputs & Run Table. You can see the result in Data Preview section and must receive the test email


6. Close the Web Connectors Page and the Qlik Web Connectors window to stop the connectors server.


7. Edit "Install Service. bat" file in D:QlikWebConnectors, Batch Files to configure the connectors as a service, so they auto start up with the Windows as follows:

REM *****************************
REM IMPORTANT - PLEASE READ:
REM * You should ensure than you have 'unblocked' the Qlik Web Connectors download zip file BEFORE unzipping it and running this.
REM * You need to change the following paths to match your .NET installation directory and QlikWebConnectorsSVC.exe location.
REM * You should run this file as Administrator (right click, 'Run as administrator').
REM *****************************
"%windir%\Microsoft.NET\Framework\v4.0.30319\installutil" "D:\QlikWebConnectors\QlikWebConnectorsSVC.exe"

pause


8. Save the batch file… Right click the Install Service bat file and select Run as administrator.

      a. The batch file installs the Qlik Web Connectors as a Windows Service.

Command Prompt.png

when the batch file finishes, press any key to close the command window

you should see an entry for Qlik Web connectors like

Services Status.PNG

9. From the Windows start menu, type Services to open the Services dialog.
      a Right click on the Qlik Web Connectors service entry
      b. In the Qlik Web Connectors Properties dialog, click on the Start under the General tab to start the service.
          Ensure that the Service status is Running.
          Warning: Close the Click Web Connectors before you complete this step. If they are running when you press start, you will get a message saying that the service has started and then stopped.
      c. Select the Recovery tab and set First failure to Restart the Service and set the time for Restart service after to zero (0) minutes. 

Apply the changes and click OK.


10. The Qlik Web Connectors should be available at http: //localhost:5555/
11. Install and configure the connectors on all other Qlik Sense nodes. The easiest way to do it:
      a. Stop the service and copy the folder D:QlikWebConnectors, to all other Qlik Sense nodes
      b. Register the service on each of the nodes (steps 8-10).
      c. Start the service which has been stopped at step (a).


12. Create new connection in every Qlik Sense environment not the nodes.
      i. Data load editor - Create new connection - REST
      ii. URL: Can be found from 5th point
     iii. Authentication Schema: Anonymous.
     iv. Skip server certificate validation: ON
     v. Query parameters:
          1. to: your emal for test
          2. subject: test
          3. message: test
     vi. Name: SendEmail
     vii. By default the connection name created via the Data load edit will be something like "SendEmail (<usemame>)". Remove the user name from the connection name via QMC.

Till above the connection setup is done.

How to setup the email alert for existing dashboard and newly creating dashboard?

1) Let's say, I have an Qlik Sense application called QSAppName.qvf {QSAppName is Dashboard Name} and this dashboard created task either daily/weekly/monthly etc.

2) To create alert, Again one application required

      a) Let's say, I've created an application called QSAppName_Failure_Notification.qvf 

      b) Go to Script / data load editor, And add the following script

LIB CONNECT TO 'SendEmail';// You can add multiple email's as well in the recipient with delimiter of semicolon (;)
Let vTo = 'to Address here';
Let vCc = 'CC Address here';
Let vSubject = 'QlikSense Dashboard Failure Notification';
Let vMessage = 'Your message'; // You can write in HTML also, If you likeEmailStatus:
SQL SELECT
"status",
"result",
"filesattached"
FROM CSV (header on, delimiter ",", quote """") "CSV_source"
WITH CONNECTION(
QUERY "to" "$(vTo)",
QUERY "cc" "$(vCc)",
QUERY "subject" "$(vSubject)",
QUERY "message" "$(vMessage)");

3) Create task for "QSAppName_Failure_Notification.qvf" on dependency of failure to "QSAppName.qvf"

Bingo, You achieved very powerful feature enjoy with your email's. I love to hear some question's, If any using Comment box 

 

Regards,

Anil Samineni

Labels (2)
Comments
pcrocker
Contributor
Contributor

Hello, I am getting the following error when running the app (occurs at the end of the script):

20211018T113258.383-0400  4 fields found: status, result, filesattached, __extra_,
20211018T113258.390-0400  Error: CSV is not valid: columns number of row 8 is different from previous rows (1 and 3).
20211018T113258.390-0400  row: content="width=device-width, initial-scale=1, shrink-to-fit=no"
20211018T113258.404-0400  Execution Failed

 

Has anyone run into this and found a solution?

Thanks.

Anil_Babu_Samineni

@rathorep No, With this not possible, You have to alter some script which can attach the attachment.

0 Likes
Anil_Babu_Samineni

@VaidhyaGanesan That is based on script how you need it, For bulk you can refer Qlik Alerting.

0 Likes
Anil_Babu_Samineni

@pcrocker For me that is Source issue not above script, Did you checked first how your load statement and is that working? 

0 Likes
haty
Contributor III
Contributor III

If you don't mind installing an app on your sever, I recommend using NickAkincilar/QlikSense-Task-Failure-Email-Alerts: Automated email alerts for failed Qlikse Alerts (.... Very easy to use and works well, have been using it for several years.

lijianqlik
Contributor
Contributor

I'm getting the same error as @pcrocker :

CSV is not valid: columns number of row 8 is different from previous rows (1 and 3). row: content="width=device-width, initial-scale=1, shrink-to-fit=no"

 

Aditya_Chitale
Specialist
Specialist

Is there any way to add the app name/id in my mail message ?

0 Likes
rockabs
Contributor III
Contributor III

@Aditya_Chitale Not really, But you can use Qlik alerting if required. 

Or, Anyway, this is not global specific and it is Application specific, Hence you must use your own message or subject of the email which gives you a clue.

Let vSubject = 'QlikSense Dashboard Failure Notification';

0 Likes
Jaya15
Contributor II
Contributor II

Dear All

Can you Please help me i this 
I am trying to get more then one task failure notification but i am getting only one can you pleas help me to get more then one task failure
getting this now

Jaya15_0-1660650007056.png

 

want to get the 2nd table as well
using below code

Jaya15_1-1660650007058.png

 

Jaya15_2-1660650007060.png

 

Please help

Thanks 

Jaya Sharma

0 Likes
anjali24
Partner - Contributor
Partner - Contributor

Hi @Anil_Babu_Samineni , can you please share if there is way to get Task name, task id, app id details on the email notification.

0 Likes
Version history
Last update:
‎2020-07-01 11:03 AM
Updated by: