Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Alerts in Qlik Sense

Hi!!

Is there any way to create an alert in Qlik Sense like the alerts in Qlikview?

Thank a lot!

Paula

1 Solution

Accepted Solutions
reddy-s
Master II
Master II

Hi Paula,

There is no implicit functionality yet available in qliksense but I have found a work around for this using Python and SMTP for mailing.

Check this out: Automatic Alerts(Email)

Thanks,

Sangram.

View solution in original post

41 Replies
reddy-s
Master II
Master II

Hi Paula,

There is no implicit functionality yet available in qliksense but I have found a work around for this using Python and SMTP for mailing.

Check this out: Automatic Alerts(Email)

Thanks,

Sangram.

Anonymous
Not applicable
Author

Sangram,

Thanks a lot for this! I'll check it!

I hope Qlik Sense will add this functionality as soon as posible

Thanks,

Paula.

reddy-s
Master II
Master II

Always welcome Paula!

I wish the same too!

Levi_Turner
Employee
Employee

Not exactly the same, but there are built in appenders which can function as alerts: https://help.qlik.com/en-US/sense/2.2/Subsystems/PlanningQlikSenseDeployments/Content/Server/Server-...

kevincase
Creator II
Creator II

Levi,

My assumption is that this appender is for the Proxy service.  Can this also be configured to work for the Scheduler service?  I think what Paula (and others) is  looking for are the email messages that View sends when a reload task fails.

Levi_Turner
Employee
Employee

The example is for the Proxy service, but, in principle, any service can be setup. Here are some steps from one of our internal guys that we have on using it for the Scheduler:

To configure Qlik Sense to use an appender, a configuration file, LocalLogConfig.xml must be created in the %ProgramData%\Qlik\Sense\<service> folder.

In this example the SmtpAppender will be used to send an email through Gmail, whenever a task may fail.

Create the file LocalLogConfig.xml in %ProgramData%\Qlik\Sense\Scheduler (as it is the scheduler we want to monitor in this example)

Add the following code into LocalLogConfig.xml

<?xml version="1.0"?>

<configuration>

    <!-- Mail appender-->

    <appender name="MailAppender" type="log4net.Appender.SmtpAppender">

        <filter type="log4net.Filter.LevelRangeFilter">

            <param name="levelMin" value="ERROR" />

        </filter>

        <filter type="log4net.Filter.DenyAllFilter" />

        <evaluator type="log4net.Core.LevelEvaluator">

            <param name="threshold" value="ERROR"/>

        </evaluator>

        <param name="to" value="you@gmail.com" />

        <param name="from" value="you@gmail.com" />

        <param name="subject" value="Qlik Sense" />

        <param name="smtpHost" value="smtp.gmail.com" />

        <param name="port" value="587" />

        <param name="EnableSsl" value="true" />

        <param name="Authentication" value="Basic" />

        <param name="username" value="you@gmail.com" />

        <param name="password" value="yourpassword" />

        <param name="bufferSize" value="0" /> <!-- Set this to 0 to make sure an email is sent on every error -->

        <param name="lossy" value="true" />

        <layout type="log4net.Layout.PatternLayout">

            <param name="conversionPattern" value="%newline%date %-5level %newline%property{TaskName}%newline%property{AppName}%newline%message%newline%newline%newline" />

        </layout>

    </appender>

    <!--Send mail on task failure-->

    <logger name="System.Scheduler.Scheduler.Slave.Tasks.ReloadTask">

        <appender-ref ref="MailAppender" />

    </logger>

</configuration>

Line 6,10: Sets the level of logging, in this case any ERROR in the log will be sent as an email

Line 24: Defined conversion pattern for the output. To be able to output custom properties in the log (example, Taskname), append %property{propertyname} to the output pattern

Line 28: Logger name identifies the component to monitor. This can be found by investigating the actual log file

Line 29: appender-ref should match the name identifying the appender. More than one appender can be configured in the same configuration file

I haven't actually done this so I am relying on authority, but it should work. Those steps along with the help documentation should get you all working. Here is the documentation on the appender as well: Apache log4net – Apache log4net Manual: Introduction

kevincase
Creator II
Creator II

Levi,

Thanks so much!  This is EXACTLY what I was looking for.

Not applicable
Author

Hi Levi, I'm working on configuring email notifications too, and I'm trying to follow your steps. How do I setup a configuration file in the %ProgramData%\Qlik\Sense\<service> folder? Is this through the QMC?

Thank you for your help.

rohitk1609
Master
Master

Hi Levi,

I have tested your code, smtp appender is working fine with gmail id and trigger mail but my use case says, it should use internal SMTP server not gmail ID. can you please help me how to do it, I already put SMTP server address in HOST, port and in my case there is no username and password.

Thanks Levi