Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Email Notification for Your Qlik Sense Environment

Here is a simple Qlik Sense application that will email an administrator when a task failure is detected.

Working with Qlik Sense for a while now, it occurred to me that I do not have an easy way of receiving alerts via email when a reload task fails. In QlikView, this was an automatic as the QMC has a setting where you can input an email address and you will automatically receive an email when a task fails. But alas, as of the publishing of this article, no such automatic feature exists in Qlik Sense.

Well worry not, because here is a pretty simple way that to add this feature to your own environment.

There are a few extensions that add this capability to your Qlik Sense QMC, but one of them simply did not work for me and I realized that even if an extension will function, I would be at the mercy of that developer to keep it maintained or to make changes. Given that I do not possess a web developer skill set I looked for an alternative approach.

(adsbygoogle = window.adsbygoogle || []).push({});

The path I went down was to create a Qlik Sense application that loads the latest script logs and then leverages the free SMTP Qlik Web Connector to send out an email if any errors are found. In this article, you will be provided the application itself, instructions on how to configure it for your environment and some information on how it works.

Disclaimer: Living Qlik makes no guarantee regarding the functionality of this application and takes no responsibility or liability for any effect its use will have in your environment. Use at your own risk.

One other thing to note is that the method described here was the result of me simply noodling around until I came across something that worked for me at which point I decided it was appropriate to share. This method is by no means the only nor the best way to obtain alerts from Qlik Sense. I welcome your thoughts on how you have accomplished this task differently!

Prerequisite: Qlik Web Connectors package – SMTP Connector

So before you fire up this application you will first need to go to the Qlik software download page and obtain the Qlik Web Connectors package which includes the SMTP Connector. As of publication, this particular connector can be used free of charge. You will need to download it and install it in your Qlik Sense server environment.

Installing this is not so simple because you will definitely want to review some of the options. The one I made sure to enable was setting up the Web Connector package to run as a windows service. You can review the setup here.

If you want the qvf that I used, you can download it here.

Configuring the Task Error Notifier

Firstly, this script is set up to run on a server where Standard mode has been turned off. In other words we are enabling Legacy mode. If this is not allowed in your environment, you will need to adjust script so that variables are not required in your from strings. I chose to leverage Legacy mode just to make it a little easier to configure.

To enable legacy mode, go to the QMC and under Engines, uncheck the Standard mode box under Advanced.

Next you will want to import the app (.qvf) and configure for your environment. Open the script editor to the Config Variables tab.

Adjust the variable values to your needs. A few notes:

vMinutesToGoBack:        You want to set this to the task trigger frequency you will be setting on the QMC. This is so that every time this qvf runs, it only goes back to the time the app last ran. We do not want any overlap.

The rest of the variables will need to configured to your SMTP server settings.

Test it out and once you get it working, set it up on your server as a task.

How Does it Work?

A list of the task failures gets stored in the Log\Scheduler\System folder. Looking in this file within the latest time frame will give you all the tasks that have errors, subject to your logging settings on the server.

The hardest part here was just turning the Qlik Timestamp into a decimal number. There is probably a more efficient way to do this, but I got it done.

This was also don’t in a loop, just in case the scheduler is spread out over a couple nodes. In that case, there would be more than one file to load.

The next page of script simple checks to see if there are errors. We probably could have just checked the table to see if it has at least one row. Maybe this is a little overkill.

The last part of this script sends out the email. Again, this will require the installation of the Qlik Web Connectors that should be free.

The screenshot below does not show the entire script.

The Result?

Once you have tested and set this up as a task, any time a task fails, you will receive an email. Here is an example of what I was able to produce. You should only receive one email for a specific task occurrence and you should not receive an email if there were no errors.

I see some obvious next steps, where you could set up either in the same app or in a separate app notifications for Nprinting or for QlikView. I believe it is also possible to attach files using this connector so you could attach the actual log file for example. There are many possibilities.

Again, if you want the app I developed, you can download it here.

I welcome your suggestions or improvements.

Happy Qliking!

 

 



This post first appeared on LivingQlik, please read the originial post: here

Share the post

Email Notification for Your Qlik Sense Environment

×

Subscribe to Livingqlik

Get updates delivered right to your inbox!

Thank you for your subscription

×