Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!!
Is there any way to create an alert in Qlik Sense like the alerts in Qlikview?
Thank a lot!
Paula
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.
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.
Sangram,
Thanks a lot for this! I'll check it!
I hope Qlik Sense will add this functionality as soon as posible
Thanks,
Paula.
Always welcome Paula!
I wish the same too!
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-...
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.
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
Levi,
Thanks so much! This is EXACTLY what I was looking for.
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.
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