30 Replies Latest reply: Jul 11, 2017 11:33 PM by Rohit Kumar RSS

    Alerts in Qlik Sense

    Paula Calva

      Hi!!

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

       

      Thank a lot!

      Paula

        • Re: Alerts in Qlik Sense
          Sangram Reddy

          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.

          • Re: Alerts in Qlik Sense
            Levi Turner

            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-Logging-Using-Append…

              • Re: Alerts in Qlik Sense
                Kevin Case

                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.

                  • Re: Alerts in Qlik Sense
                    Levi Turner

                    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

                • Re: Alerts in Qlik Sense
                  Stavros Orfanoudakis

                  Hi,

                   

                  There is also the Notification Connector from Qlik Web Connectors, where it can be integrated in the script editor and used in combination with other functions.

                   

                  You can also attache up to 5 files (eg. logs) and since it's in Standard Web Connectors no license is required.